:root {
  --bg-base: #F2F3F7; --bg-surface: #FFFFFF; --bg-surface-alt: #EBEDF3;
  --border: #E0E3EB; --text: #12141B; --text-2: #565C6B; --text-muted: #7D8393;
  --accent: #4F46E5; --on-accent: #FFFFFF; --accent-text: #4338CA; --accent-soft: #ECEBFE;
  --bezel: #12141B;
  --pad: 24px;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* Tokens oscuros: sin atributo manda el sistema; con data-theme manda la elección. */
:root[data-theme="dark"] {
  --bg-base: #0C0D11; --bg-surface: #16181E; --bg-surface-alt: #1F222A;
  --border: #282C36; --text: #F2F3F7; --text-2: #A2A8B6; --text-muted: #7D8393;
  --accent: #818CF8; --on-accent: #0C0D11; --accent-text: #A5B4FC; --accent-soft: #23254A;
  --bezel: #282C36;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base: #0C0D11; --bg-surface: #16181E; --bg-surface-alt: #1F222A;
    --border: #282C36; --text: #F2F3F7; --text-2: #A2A8B6; --text-muted: #7D8393;
    --accent: #818CF8; --on-accent: #0C0D11; --accent-text: #A5B4FC; --accent-soft: #23254A;
    --bezel: #282C36;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg-base); color: var(--text);
  font-family: 'Fustat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500; line-height: 1.5;
}
img, svg { max-width: 100%; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 999px; font-weight: 700; z-index: 10; }
.skip:focus { top: 12px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
/* El margen crece con la pantalla hasta los 120 de Figma (1500px o más), así 1024–1440 conserva espacio para el hero */
@media (min-width: 1024px) { :root { --pad: clamp(64px, 8vw, 120px); } .wrap { max-width: 1440px; } }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.logo { display: inline-flex; color: var(--text); }
.logo svg { height: 32px; width: auto; display: block; }
.nav-right { display: flex; align-items: center; gap: 32px; }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.nav-end { justify-content: flex-end; }
.theme-switch { display: none; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.js .theme-switch { display: inline-flex; }
.theme-switch button { width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-text); }
.theme-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 640px) { .nav-tools { gap: 16px; } .lang-pill { padding: 6px 14px; } }
.nav-links { display: none; gap: 32px; }
.nav-links a { color: var(--text-2); font-size: 16px; font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; font-size: 15px; font-weight: 600; }
.lang-pill a, .lang-pill span { text-decoration: none; }
.lang-pill [aria-current] { color: var(--text); font-weight: 800; }
.lang-pill a:not([aria-current]) { color: var(--text-muted); }
.lang-pill a:not([aria-current]):hover { color: var(--text); }
@media (min-width: 640px) { .nav-links { display: flex; } }
@media (min-width: 900px) { .logo svg { height: 36px; } }

/* Hero */
.hero { display: grid; gap: 48px; align-items: center; padding-top: 24px; padding-bottom: 64px; }
.overline { display: inline-block; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 600; border-radius: 999px; padding: 6px 14px; margin: 0 0 20px; }
h1, h2, h3 { margin: 0; }
.hero h1 { font-weight: 800; font-size: 40px; line-height: 46px; letter-spacing: -0.015em; }
.hero .sub { font-size: 18px; line-height: 27px; color: var(--text-2); margin: 20px 0 28px; max-width: 560px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg-base); border-radius: 999px; padding: 14px 20px; font-size: 16px; font-weight: 600; text-decoration: none; }
.store svg { width: 20px; height: 20px; flex: none; }
.store[aria-disabled="true"] { cursor: default; }
a.store:hover { opacity: .9; }
.hero .note { margin: 20px 0 0; font-size: 15px; color: var(--text-muted); }
.phones { display: flex; justify-content: center; align-items: flex-start; gap: 28px; }
.phone { width: 240px; margin: 0; flex: none; border: 8px solid var(--bezel); border-radius: 13%/6%; background: var(--bezel); box-shadow: 0 24px 48px -16px rgba(18,20,27,.35), 0 8px 16px -8px rgba(18,20,27,.2); }
.phone img { display: block; width: 100%; height: auto; border-radius: 12% / 5.5%; }
.phone.second { display: none; }
@media (min-width: 640px) {
  .phone { width: 280px; }
  .phone.second { display: block; margin-top: 72px; }
  .phones { padding-bottom: 24px; }
}
@media (min-width: 900px) {
  .hero { padding-top: 48px; padding-bottom: 96px; }
  .hero h1 { font-size: 60px; line-height: 66px; }
  .hero .sub { font-size: 21px; line-height: 32px; }
}
/* Dos columnas desde 1024px, como en Figma: los teléfonos y el título escalan con el ancho (280px y 60px desde
   ~1500px), así una notebook de 1280 ve el hero entero sin apilarlo */
@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 4vw, 64px); }
  .hero h1 { font-size: clamp(44px, 4.2vw, 60px); line-height: 1.1; }
  .phones { justify-content: flex-end; gap: clamp(20px, 2vw, 28px); }
  .phone { width: clamp(176px, 18.5vw, 280px); }
  .phone.second { margin-top: clamp(48px, 5vw, 72px); }
}

/* Features */
.features { padding-top: 24px; padding-bottom: 72px; }
.features h2 { font-weight: 800; font-size: 28px; line-height: 34px; letter-spacing: -0.01em; max-width: 760px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 36px; padding: 0; list-style: none; }
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.ico { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 19px; line-height: 26px; font-weight: 700; }
.card p { margin: 0; font-size: 16px; line-height: 24px; color: var(--text-2); }
@media (min-width: 900px) { .features h2 { font-size: 40px; line-height: 48px; } .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.bruno { background: var(--bg-surface-alt); padding: 36px 0; }
.bruno h2 { font-size: 17px; line-height: 24px; font-weight: 700; }
.bruno p { margin: 6px 0 0; font-size: 15px; line-height: 22px; color: var(--text-2); max-width: 900px; }

/* Legal */
.legal { max-width: 720px; margin: 0 auto; padding: 24px var(--pad) 80px; }
.legal .back { display: inline-block; font-size: 16px; font-weight: 600; color: var(--accent-text); text-decoration: none; margin-bottom: 24px; }
.legal .back:hover { text-decoration: underline; }
.legal h1 { font-weight: 800; font-size: 34px; line-height: 40px; letter-spacing: -0.015em; }
.legal .updated { margin: 12px 0 40px; font-size: 15px; color: var(--text-muted); }
.legal section + section { margin-top: 32px; }
.legal h2 { font-size: 21px; line-height: 28px; font-weight: 700; }
.legal p { margin: 8px 0 0; font-size: 17px; line-height: 27px; color: var(--text-2); overflow-wrap: anywhere; }
@media (min-width: 900px) { .legal h1 { font-size: 44px; line-height: 52px; } .legal { padding-left: 0; padding-right: 0; } }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 0; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 40px; padding-bottom: 40px; }
.footer p { margin: 0; font-size: 15px; color: var(--text-muted); }
.footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.footer a { font-size: 15px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }
.footer a.lang { color: var(--accent-text); }

/* 404 / redirect */
.center { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 16px; padding: 48px var(--pad); }
.center h1 { font-size: 34px; line-height: 40px; font-weight: 800; }
.center p { margin: 0; color: var(--text-2); }
.center .links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
