:root {
  /* Manual de marca (docs/MARCA.md): negro, blanco, celeste Drive y azul noche. */
  --bg: #000000;
  --surface: #111111;
  --surface-alt: #1a1a1a;
  --text: #ffffff;
  --muted: #a3a3a3;
  --accent: #b3e5fc;
  --accent-200: #e6f6fe;
  --accent-300: #cdeefd;
  --accent-800: #3c4f58;
  --accent-900: #1d2a30;
  --navy: #042536;
  --navy-glow: #0a3a52;
  --success: #3f9a45;
  --error: #fa3f31;
  --divider: color-mix(in srgb, var(--text) 16%, transparent);
  --text-82: color-mix(in srgb, var(--text) 82%, transparent);
  --text-75: color-mix(in srgb, var(--text) 75%, transparent);
  --text-72: color-mix(in srgb, var(--text) 72%, transparent);
  --font-heading: "Outfit", system-ui, -apple-system, sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, sans-serif;
  --radius: 8px;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 72px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-300);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
}

p {
  margin: 0;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprite {
  display: none;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

main {
  flex: 1;
}

/* Header */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-brand img {
  width: clamp(130px, 15vw, 160px);
  height: auto;
}

.lang {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}

.lang button {
  min-height: 32px;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 20px;
  cursor: pointer;
}

.lang button + button {
  border-left: 1px solid var(--divider);
}

.lang button[aria-pressed="true"] {
  background: var(--accent-900);
  color: var(--accent);
}

.lang button:hover:not([aria-pressed="true"]) {
  background: color-mix(in srgb, var(--text) 7%, transparent);
}

.lang button:focus-visible {
  outline-offset: -2px;
}

/* Shared */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 13px;
  line-height: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-feature-settings: "tnum" 1;
}

.kicker::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  margin-top: 18px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.cta .icon {
  font-size: 18px;
}

.cta:hover:not(:disabled) {
  background: var(--accent-300);
  border-color: var(--accent-300);
}

.cta:active:not(:disabled) {
  background: var(--accent-200);
  border-color: var(--accent-200);
}

.cta:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Waitlist form */

.waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  max-width: 520px;
}

.waitlist input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  caret-color: var(--accent);
}

.waitlist input::placeholder {
  color: var(--muted);
}

.waitlist input:hover {
  border-color: color-mix(in srgb, var(--text) 45%, transparent);
}

.waitlist input:focus-visible {
  border-color: var(--accent);
  outline-offset: 0;
}

.waitlist input[aria-invalid="true"] {
  border-color: var(--error);
}

.waitlist .msg {
  flex-basis: 100%;
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.waitlist .msg[data-state="error"] {
  color: var(--error);
}

.waitlist .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.done {
  display: none;
  gap: 14px;
  align-items: flex-start;
  max-width: 520px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--success) 45%, transparent);
}

.done .icon {
  margin-top: 2px;
  color: var(--success);
  font-size: 26px;
}

.done strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.done p {
  color: var(--text-75);
  font-size: 14px;
  line-height: 1.5;
}

.waitlist-box[data-done="true"] .waitlist {
  display: none;
}

.waitlist-box[data-done="true"] .done {
  display: flex;
}

/* Hero */

.hero {
  padding: clamp(48px, 9vw, 120px) var(--gutter) clamp(56px, 8vw, 96px);
}

.hero h1 {
  max-width: 17ch;
  margin: 22px 0 0 -0.04em;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero h1 span {
  display: block;
}

.hero h1 .accent {
  color: var(--accent);
}

.road {
  position: relative;
  max-width: 560px;
  height: 1px;
  margin: 30px 0 26px;
  overflow: hidden;
  background: linear-gradient(to right, var(--divider), var(--divider) calc(100% - 48px), transparent);
}

.road span {
  position: absolute;
  top: 0;
  left: -12%;
  width: 72px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent));
  box-shadow: 0 0 12px var(--accent);
  animation: drive 4.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes drive {
  0% { left: -12%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.hero .sub {
  max-width: 56ch;
  color: var(--text-82);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
}

.hero .waitlist-box {
  margin-top: 32px;
}

.privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.privacy .icon {
  font-size: 15px;
}

/* How it works */

.how {
  padding: clamp(40px, 6vw, 72px) var(--gutter);
}

.how .section-title {
  max-width: 22ch;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  background: linear-gradient(to right, transparent, var(--divider) 48px calc(100% - 48px), transparent) no-repeat top / 100% 1px;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px clamp(0px, 3vw, 40px) 8px 0;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step-head .n {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  font-feature-settings: "tnum" 1;
}

.step-head .line {
  flex: 1;
  max-width: 64px;
  height: 1px;
  background: linear-gradient(to right, var(--accent-800), transparent);
}

.step-head .icon {
  margin-left: auto;
  color: var(--accent);
  font-size: 26px;
}

.steps h3 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.steps p {
  max-width: 38ch;
  color: var(--text-75);
  font-size: 15px;
  line-height: 1.6;
}

/* Why */

.why {
  padding: clamp(48px, 7vw, 88px) 0;
  background:
    radial-gradient(900px 420px at 85% -40%, color-mix(in srgb, var(--navy-glow) 80%, transparent), transparent 64%),
    var(--navy);
}

.why .grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}

.why .section-title {
  max-width: 16ch;
}

.why .lead {
  max-width: 40ch;
  margin-top: 18px;
  color: var(--text-72);
  font-size: 15.5px;
  line-height: 1.6;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefits li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}

.benefits .icon {
  color: var(--accent);
  font-size: 26px;
}

.benefits h3 {
  font-size: 17px;
  line-height: 1.3;
}

.benefits p {
  color: var(--text-72);
  font-size: 14px;
  line-height: 1.55;
}

/* Closing CTA */

.close {
  padding: clamp(56px, 8vw, 104px) var(--gutter);
}

.close .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: end;
}

.close h2 {
  max-width: 16ch;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.close .lead {
  max-width: 48ch;
  margin-top: 18px;
  color: var(--text-82);
  font-size: 16px;
  line-height: 1.6;
}

.close .waitlist-box {
  margin-top: 28px;
}

.badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.badge .icon {
  font-size: 16px;
}

.badge.primary {
  border-color: transparent;
  background: var(--accent-900);
  color: var(--accent-200);
}

/* Footer */

footer {
  background: linear-gradient(to right, transparent, var(--divider) 48px calc(100% - 48px), transparent) no-repeat top / 100% 1px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 36px var(--gutter) 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.foot-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.foot-brand img {
  width: 120px;
  height: auto;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.foot-links .mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-300);
  text-decoration: none;
}

.foot-links .mail:hover {
  color: var(--accent);
}

.foot-links .mail .icon {
  font-size: 16px;
}

.social {
  display: flex;
  gap: 6px;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--text);
}

.social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.social .icon {
  font-size: 20px;
}

/* Responsive */

@media (max-width: 860px) {
  .why .grid,
  .close .grid {
    grid-template-columns: 1fr;
  }

  .badges {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .cta {
    flex: 1 1 100%;
  }

  .nav-brand img {
    width: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .road span {
    left: 60%;
    opacity: 1;
    animation: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cta,
  .lang button,
  .social a,
  .waitlist input {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
}

/* Auth pages (auth/) */

[hidden] {
  display: none !important;
}

.auth {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(56px, 8vw, 96px);
}

.auth-card {
  width: 100%;
  max-width: 540px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--divider);
}

.auth-state {
  display: none;
}

.auth-card[data-view="loading"] .auth-state[data-state="loading"],
.auth-card[data-view="form"] .auth-state[data-state="form"],
.auth-card[data-view="ok"] .auth-state[data-state="ok"],
.auth-card[data-view="error"] .auth-state[data-state="error"] {
  display: block;
}

.auth-state > .icon {
  display: block;
  margin-top: 26px;
  color: var(--accent);
  font-size: 40px;
}

.auth-state[data-state="ok"] > .icon {
  color: var(--success);
}

.auth-state[data-state="error"] > .icon {
  color: var(--error);
}

.auth h1 {
  margin-top: 16px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.auth .lead {
  margin-top: 14px;
  color: var(--text-82);
  font-size: 16px;
  line-height: 1.6;
}

.auth .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 28px;
}

.auth .actions .cta {
  text-decoration: none;
}

.auth .back {
  font-size: 14px;
  font-weight: 500;
}

.auth .help {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text-82);
  font-size: 14px;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  caret-color: var(--accent);
}

.field input:hover {
  border-color: color-mix(in srgb, var(--text) 45%, transparent);
}

.field input:focus-visible {
  border-color: var(--accent);
  outline-offset: 0;
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field .hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-82);
  font-size: 14px;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.auth-form .cta {
  justify-self: start;
}

.auth-form .msg {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.auth-form .msg[data-state="error"] {
  color: var(--error);
}

@media (max-width: 480px) {
  .auth-form .cta,
  .auth .actions .cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .field input {
    transition: border-color 0.15s ease;
  }
}
