/* ============================================
   DANTSE - Minimalist Futuristic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --white: #FFFFFF;
  --black: #000000;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-300: #D4D4D4;
  --gray-400: #A3A3A3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #171717;
  --gray-800: #0A0A0A;

  /* Semantic colors for docs */
  --text: #000000;
  --text-muted: #525252;
  --text-dim: #A3A3A3;
  --bg: #FFFFFF;
  --bg-card: #FAFAFA;
  --border: #E5E5E5;
  --accent: #000000;
  --accent-dim: rgba(0, 0, 0, 0.3);
  --accent-glow: rgba(0, 0, 0, 0.05);
  --yellow: #FFD500;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --font-display: 'Inter', system-ui, sans-serif;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;
  --space-3xl: 160px;
  --space-4xl: 200px;

  --radius: 4px;
  --radius-lg: 8px;
  --transition: all 0.2s ease;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   BACKGROUND - Grid principal
   ============================================ */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--gray-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-200) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--gray-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-100) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: -3;
}

/* ============================================
   CORNER MARKS
   ============================================ */

.corner-mark {
  position: fixed;
  width: 40px;
  height: 40px;
  pointer-events: auto;
  z-index: 10;
  cursor: crosshair;
}

.corner-mark::before,
.corner-mark::after {
  content: '';
  position: absolute;
  background: var(--gray-300);
  transition: all 0.3s var(--ease-out);
}

.corner-mark::before {
  width: 1px;
  height: 100%;
  left: 50%;
}

.corner-mark::after {
  width: 100%;
  height: 1px;
  top: 50%;
}

.corner-mark:hover::before,
.corner-mark:hover::after {
  background: var(--black);
}

.corner-mark:hover::before {
  height: 140%;
  top: -20%;
}

.corner-mark:hover::after {
  width: 140%;
  left: -20%;
}

.corner-mark--tl { top: 30px; left: 30px; }
.corner-mark--tr { top: 30px; right: 30px; }
.corner-mark--bl { bottom: 30px; left: 30px; }
.corner-mark--br { bottom: 30px; right: 30px; }

.corner-mark span {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: all 0.3s var(--ease-out);
  background: var(--white);
}

.corner-mark:hover span {
  border-color: var(--black);
  transform: translate(-50%, -50%) scale(1.8);
  background: var(--black);
}

/* Coordenadas */
.coord {
  position: fixed;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray-400);
  pointer-events: none;
  z-index: 10;
  letter-spacing: 0.05em;
}

.coord--tl { top: 78px; left: 30px; }
.coord--tr { top: 78px; right: 30px; }
.coord--bl { bottom: 78px; left: 30px; }
.coord--br { bottom: 78px; right: 30px; }

a { color: var(--black); text-decoration: underline; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--black); color: var(--white); }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes draw-line-h {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes draw-line-v {
  from { transform: scaleY(0); opacity: 1; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(10px, -20px); }
  50% { transform: translate(-10px, -10px); }
  75% { transform: translate(5px, -25px); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.1); }
}

@keyframes scan-line {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================
   HEADER
   ============================================ */

header {
  padding: var(--space-md) 0;
  animation: fade-in 0.6s var(--ease-out);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

header.scrolled {
  border-bottom-color: var(--gray-200);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo:hover { text-decoration: none; }

nav {
  display: flex;
  gap: var(--space-md);
}

nav a {
  font-size: 14px;
  text-decoration: none;
  color: var(--gray-500);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--black);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  background: var(--white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Horizontal frame lines */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--black);
  transform-origin: left;
  animation: draw-line-h 1s var(--ease-out) forwards;
}

.hero::before { top: 100px; }
.hero::after { bottom: 100px; animation-delay: 0.15s; }

/* Content frame */
.hero-frame {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  z-index: 2;
}

.hero-frame::before,
.hero-frame::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--black);
  transform-origin: top;
  animation: draw-line-v 0.8s var(--ease-out) 0.4s forwards;
  opacity: 0;
}

.hero-frame::before { left: 0; }
.hero-frame::after { right: 0; animation-delay: 0.5s; }

.hero h1 {
  font-size: 60px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-md);
  animation: fade-up 1s var(--ease-out) 0.6s both;
}

.hero p {
  font-size: 18px;
  color: var(--gray-500);
  margin-bottom: var(--space-lg);
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  animation: fade-up 1s var(--ease-out) 0.75s both;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  animation: fade-up 1s var(--ease-out) 0.9s both;
}

/* ============================================
   HERO PARTICLES SYSTEM
   ============================================ */

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Floating particles - varied sizes */
.particle {
  position: absolute;
  background: var(--black);
  border-radius: 50%;
  animation: float var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: var(--opacity);
}

.particle--sm { width: 4px; height: 4px; }
.particle--md { width: 6px; height: 6px; }
.particle--lg { width: 8px; height: 8px; }

/* Orbiting particles */
.orbit-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}

.orbit-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--black);
  border-radius: 50%;
  animation: orbit var(--orbit-duration) linear infinite;
  --orbit-radius: var(--radius);
  opacity: 0.3;
}

/* Scan line effect - disabled */
.scan-line {
  display: none;
}

/* Corner brackets */
.hero-bracket {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid var(--gray-300);
  animation: fade-in 0.8s var(--ease-out) 1s both;
}

.hero-bracket--tl { top: 120px; left: 80px; border-right: none; border-bottom: none; }
.hero-bracket--tr { top: 120px; right: 80px; border-left: none; border-bottom: none; }
.hero-bracket--bl { bottom: 120px; left: 80px; border-right: none; border-top: none; }
.hero-bracket--br { bottom: 120px; right: 80px; border-left: none; border-top: none; }

/* Pulse rings - disabled */
.pulse-ring {
  display: none;
}

/* Blinking cursor */
.hero-cursor {
  position: absolute;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--gray-400);
  animation: cursor-blink 1s step-end infinite, fade-in 1s var(--ease-out) 1.2s both;
}

/* Grid highlight on hero - disabled */
.hero-grid-highlight {
  display: none;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--black);
  text-decoration: none;
  background: var(--white);
  color: var(--black);
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--black);
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-out);
  z-index: 0;
}

.btn span {
  position: relative;
  z-index: 1;
  transition: color 0.3s;
}

.btn:hover { text-decoration: none; }
.btn:hover::before { transform: translateY(0); }
.btn:hover span { color: var(--white); }

.btn-primary {
  background: var(--black);
  color: var(--white);
}

.btn-primary::before {
  background: var(--white);
}

.btn-primary span { color: var(--white); }
.btn-primary:hover span { color: var(--black); }

.btn-secondary {
  background: var(--white);
  color: var(--black);
}

/* ============================================
   SECTIONS - Enhanced
   ============================================ */

.section {
  padding: var(--space-2xl) 0;
  position: relative;
  background: var(--white);
  overflow: hidden;
}

/* Section variants */
.section--gray {
  background: var(--gray-50);
}

.section--dark {
  background: var(--gray-800);
  color: var(--white);
}

/* Section inner glow effect */
.section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}

.section--dark::after {
  background: linear-gradient(90deg, transparent, var(--gray-600), transparent);
}

/* Section number - large watermark */
.section-number {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 180px;
  font-weight: 600;
  color: var(--gray-100);
  line-height: 0.8;
  pointer-events: none;
  z-index: 1;
  letter-spacing: -0.05em;
  user-select: none;
}

.section--gray .section-number {
  color: var(--gray-200);
}

.section--dark .section-number {
  color: var(--gray-700);
}

/* Vertical accent line */
.section-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--black);
  z-index: 3;
}

.section--dark .section-line {
  background: var(--white);
}

/* Section label */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: currentColor;
}

.section--dark .section-label {
  color: var(--gray-500);
}

/* Section header */
.section-header {
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 2;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.section-header p {
  color: var(--gray-500);
  font-size: 17px;
  max-width: 500px;
}

.section--dark .section-header p {
  color: var(--gray-400);
}

/* Section container */
.section .container {
  position: relative;
  z-index: 2;
}

/* Section decorative patterns */
.section--gray::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(var(--gray-200) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.8;
}

.section--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--gray-700) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-700) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.5;
}

/* ============================================
   TERMINAL - Enhanced
   ============================================ */

.terminal {
  background: var(--white);
  border: 1px solid var(--black);
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px var(--space-md);
  background: var(--gray-100);
  border-bottom: 1px solid var(--black);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--black);
  background: var(--white);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-left: auto;
}

.terminal-body {
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 2;
}

.terminal-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.terminal .prompt {
  color: var(--gray-400);
  user-select: none;
  flex-shrink: 0;
}

.terminal .command {
  color: var(--black);
  font-weight: 500;
}

.terminal .output {
  color: var(--gray-500);
  padding-left: 20px;
}

/* Terminal variants */
.section--gray .terminal {
  background: var(--white);
}

.section--dark .terminal {
  background: var(--black);
  border-color: var(--gray-600);
}

.section--dark .terminal-header {
  background: var(--gray-800);
  border-color: var(--gray-600);
}

.section--dark .terminal-dot {
  border-color: var(--gray-500);
}

.section--dark .terminal .command {
  color: var(--white);
}

.section--dark .terminal .output {
  color: var(--gray-400);
}

/* ============================================
   CARDS - Enhanced
   ============================================ */

.card {
  background: var(--white);
  border: 1px solid var(--black);
  padding: var(--space-md);
  position: relative;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--black);
}

.section--gray .card {
  background: var(--white);
}

.section--dark .card {
  background: var(--gray-800);
  border-color: var(--gray-600);
}

.section--dark .card:hover {
  box-shadow: 4px 4px 0 var(--gray-600);
}

/* Card number */
.card-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.card-number::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.section--dark .card-number {
  color: var(--gray-500);
}

.section--dark .card-number::after {
  background: var(--gray-600);
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.section--dark .card h3 {
  color: var(--white);
}

.card p {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.section--dark .card p {
  color: var(--gray-400);
}

.card code {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 10px 14px;
  color: var(--black);
}

.section--dark .card code {
  background: var(--black);
  border-color: var(--gray-600);
  color: var(--white);
}

/* ============================================
   GRID
   ============================================ */

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ============================================
   COMMAND LIST - Enhanced
   ============================================ */

.command-list {
  border: 1px solid var(--black);
  margin-bottom: var(--space-md);
  background: var(--white);
  overflow: hidden;
}

.command-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--gray-200);
  transition: background 0.2s;
}

.command-item:last-child { border-bottom: none; }

.command-item:hover {
  background: var(--gray-50);
}

.command-item dt,
.command-item dd {
  padding: var(--space-sm) var(--space-md);
}

.command-item dt {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  font-weight: 500;
}

.command-item dd {
  font-size: 14px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
}

/* Command list dark mode */
.section--dark .command-list {
  background: var(--gray-800);
  border-color: var(--gray-600);
}

.section--dark .command-item {
  border-bottom-color: var(--gray-600);
}

.section--dark .command-item:hover {
  background: var(--gray-700);
}

.section--dark .command-item dt {
  background: var(--black);
  border-right-color: var(--gray-600);
  color: var(--white);
}

.section--dark .command-item dd {
  color: var(--gray-400);
}

/* ============================================
   LINKS LIST - Enhanced
   ============================================ */

.links-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-sm);
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--black);
  text-decoration: none;
  font-size: 14px;
  background: var(--white);
  transition: all 0.2s var(--ease-out);
  font-weight: 500;
}

.link-item:hover {
  text-decoration: none;
  background: var(--black);
  color: var(--white);
}

.link-item .arrow {
  color: var(--gray-400);
  transition: transform 0.2s, color 0.2s;
}

.link-item:hover .arrow {
  transform: translateX(4px);
  color: var(--white);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--black);
  background: var(--white);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  color: var(--gray-500);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--black);
}

.footer-copy {
  color: var(--gray-400);
  font-size: 14px;
  font-family: var(--font-mono);
}

/* ============================================
   MOBILE NAV
   ============================================ */

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 100;
  flex-direction: column;
  padding: var(--space-md);
}

.nav-mobile.active { display: flex; }

.nav-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.nav-mobile-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.nav-mobile a {
  display: block;
  padding: var(--space-sm) 0;
  font-size: 24px;
  text-decoration: none;
  color: var(--black);
  font-weight: 500;
  border-bottom: 1px solid var(--gray-200);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  body::before {
    background-size: 50px 50px;
  }

  .corner-mark, .coord { display: none; }

  .hero { min-height: 100svh; }
  .hero h1 { font-size: 40px; }
  .hero-frame { padding: var(--space-lg) var(--space-md); }
  .hero::before { top: 60px; }
  .hero::after { bottom: 60px; }
  .hero-particles { display: none; }
  .hero-cursor { bottom: 80px; font-size: 20px; }
  .hero-bracket { display: none; }
  .hero-grid-highlight { display: none; }

  nav { display: none; }
  .menu-toggle { display: block; }

  .section { padding: var(--space-xl) 0; }
  .section-number { font-size: 100px; right: var(--space-md); }
  .section-header h2 { font-size: 28px; }

  .grid--2, .grid--3 { grid-template-columns: 1fr; }

  .command-item { grid-template-columns: 1fr; }
  .command-item dt { border-right: none; border-bottom: 1px solid var(--gray-200); }

  footer .container { flex-direction: column; gap: var(--space-sm); text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .section-number { font-size: 70px; }
  .links-list { grid-template-columns: 1fr; }
}
