/* RunaClip · landing de lista de espera
   Paleta: blancos cálidos + naranja (acción) + morado (marca). Solo modo claro. */

:root {
  /* Neutros (tintados hacia el morado, nunca negro ni gris puro) */
  --bg: #F7F7F8;
  --surface: #FFFFFF;
  --ink: #141218;
  --ink-2: #5E5A6B;
  --ink-3: #8F8B9C;
  --hairline: rgba(20, 18, 24, 0.09);
  --hairline-strong: rgba(20, 18, 24, 0.16);

  /* Marca */
  --orange: #FF682B;
  --orange-hover: #FF7E47;
  --violet: #885CF6;
  --violet-ink: #6B3FE0;      /* morado para texto pequeño (contraste AA) */
  --violet-deep: #381D62;
  --violet-tint: rgba(136, 92, 246, 0.09);
  --violet-line: rgba(136, 92, 246, 0.24);

  --error: #C2261B;

  --radius: 12px;
  --radius-inner: 9px;

  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;

  --gutter: clamp(20px, 4vw, 48px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* Sin efecto rebote al llegar arriba o abajo (iOS Safari): si no, la espiral fija asoma por
   debajo del pie y parece que el footer se levanta. */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;            /* altura real del móvil, también cuando Safari esconde su barra */
  overscroll-behavior-y: none;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--violet); color: #fff; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ───────────── Espiral de tarjetas (fondo) ───────────── */

.spiral {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Velo suave detrás del texto: deja ver las tarjetas, solo les baja el contraste */
.spiral::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 34% 30% at 50% 50%, rgba(247, 247, 248, 0.62) 0%, rgba(247, 247, 248, 0.38) 55%, rgba(247, 247, 248, 0) 100%);
}

.spiral__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  height: 338px;               /* 9:16, mismo tamaño que el prototipo de Stitch */
  margin: -169px 0 0 -95px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, #FAFAFB, #ECEBF0);
  box-shadow: 0 12px 28px rgba(20, 18, 24, 0.07), 0 1px 3px rgba(20, 18, 24, 0.04);
  overflow: hidden;
  display: grid;
  place-items: center;
  will-change: transform, opacity;
  opacity: 0;
}
.spiral__card[data-tone="violet"] { background: linear-gradient(180deg, #FAF8FF, #EEE8FD); }
.spiral__card[data-tone="orange"] { background: linear-gradient(180deg, #FFFAF7, #FCEDE5); }

.spiral__card video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

.spiral__play {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 3px rgba(20, 18, 24, 0.08);
  display: grid;
  place-items: center;
  color: var(--ink-2);
}
.spiral__play svg { width: 16px; height: 16px; margin-left: 2px; }

.spiral__bar {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  height: 4px;
  border-radius: 4px;
  background: rgba(20, 18, 24, 0.08);
  overflow: hidden;
}
.spiral__bar span { display: block; height: 100%; border-radius: inherit; background: rgba(56, 29, 98, 0.32); }
.spiral__card[data-tone="orange"] .spiral__bar span { background: rgba(255, 104, 43, 0.55); }
.spiral__card[data-tone="violet"] .spiral__bar span { background: rgba(136, 92, 246, 0.55); }

/* ───────────── Cabecera ───────────── */

.site-header,
.site-footer {
  position: relative;
  z-index: 2;
  background: rgba(247, 247, 248, 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-weight: 600;
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--violet);
  margin-left: 0.04em;
}

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.lang a {
  padding: 6px 10px;
  border-radius: var(--radius-inner);
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }

/* ───────────── Hero ───────────── */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vh, 96px) var(--gutter);
  text-align: center;
}

.hero__inner {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--violet-line);
  background: #F1ECFE;          /* tinte morado opaco: las tarjetas de la espiral no se transparentan */
  color: var(--violet-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--violet);
}

.headline {
  margin: 28px 0 0;
  /* La 2.ª línea no se parte; el segundo término garantiza que "Nosotros editamos." quepa con margen en móvil */
  font-size: min(clamp(46px, 8.2vw, 96px), calc((100vw - 40px) / 8.4));
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.headline em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.headline__accent { display: block; white-space: nowrap; }   /* las dos palabras en cursiva, siempre en la 2.ª línea */
.headline .accent-violet { color: var(--violet); }
.headline .accent-orange { color: var(--orange); }

.lede {
  margin: 24px 0 0;
  max-width: 580px;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ───────────── Formulario ───────────── */

.waitlist {
  width: 100%;
  max-width: 520px;
  margin-top: 36px;
}

.field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(20, 18, 24, 0.07);
  transition: border-color 0.15s;
}
.field:focus-within { border-color: var(--violet); }
.field[data-invalid] { border-color: var(--error); }

.field__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  color: var(--ink-3);
}
.field__icon svg { width: 18px; height: 18px; }

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 4px;
  border-radius: var(--radius-inner);
  font: inherit;
  font-size: 16px;               /* evita el zoom automático en iOS */
  color: var(--ink);
}
.field input::placeholder { color: var(--ink-3); }

/* Autorrelleno del navegador: Chrome/Safari pintan un fondo azul lila con esquinas rectas.
   Lo tapamos con una sombra interior del color de la superficie. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  box-shadow: 0 0 0 1000px var(--surface) inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 9999s ease-out 0s;
}
.field input:autofill { background: var(--surface); }

.button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-inner);
  padding: 13px 18px;
  background: var(--orange);
  color: var(--ink);
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s var(--ease-out);
}
.button svg { width: 16px; height: 16px; }
.button:hover { background: var(--orange-hover); }
.button:active { transform: scale(0.985); }
.button[disabled] { opacity: 0.7; cursor: progress; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 0 4px;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}
/* Casilla propia: la nativa no respeta el radio de las esquinas ni en el foco */
.consent input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 5px;
  background: var(--surface) center / 12px no-repeat;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.consent input:hover { border-color: var(--violet); }
.consent input:checked {
  border-color: var(--violet);
  background-color: var(--violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.2 2.3 2.3 4.7-4.9'/%3E%3C/svg%3E");
}
.consent input:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 5px; }
.consent a { color: var(--ink); text-underline-offset: 2px; }
.consent a:hover { color: var(--violet-ink); }

.form-status {
  min-height: 1.5em;
  margin: 10px 4px 0;
  font-size: 13px;
  text-align: left;
  color: var(--error);
}
.form-status:empty { display: none; }

/* Campo trampa para bots: fuera de la vista y del lector de pantalla */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ───────────── Después de apuntarse ───────────── */

.done {
  width: 100%;
  max-width: 520px;
  margin-top: 36px;
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(20, 18, 24, 0.07);
  text-align: left;
}
.done[hidden] { display: none; }

.done__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.done__title::before {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10.5 2.6 2.5L14 7.5'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.done__title:focus { outline: none; }   /* recibe el foco solo para que el lector de pantalla lo anuncie */
.done__text { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }

.survey { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.survey[hidden] { display: none; }
.survey__intro { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

.survey fieldset { margin: 0 0 14px; padding: 0; border: 0; }
.survey legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-inner);
  font-size: 14px;
  color: var(--ink-2);
  background: var(--surface);
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.chip input:hover + span { border-color: var(--violet-line); color: var(--ink); }
.chip input:checked + span { border-color: var(--violet); background: var(--violet-tint); color: var(--violet-deep); }
.chip input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }

.survey__actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.survey__actions .button { padding: 11px 16px; font-size: 14px; }
.link-button {
  border: 0; background: none; padding: 0;
  font: inherit; font-size: 14px; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.link-button:hover { color: var(--ink); }

/* ───────────── Baja ───────────── */

.unsub {
  width: 100%;
  max-width: 480px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(20, 18, 24, 0.07);
  text-align: left;
}
.unsub [hidden] { display: none; }
.unsub__title { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
.unsub .done__text a { color: var(--violet-ink); text-underline-offset: 2px; }
.unsub .button { margin-top: 20px; }

/* ───────────── Pie ───────────── */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  padding: 16px var(--gutter);
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--ink-2);
}
/* Si el navegador aún hace rebote (iOS < 16), lo que asoma bajo el pie es fondo liso, no la espiral.
   Es una sombra y no un bloque: las sombras no alargan la página ni añaden scroll. */
.site-footer { box-shadow: 0 100vh 0 100vh var(--bg); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* ───────────── Páginas legales ───────────── */

.legal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 80px) var(--gutter) 64px;
}
.legal h1 { margin: 0; font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; }
.legal h2 { margin: 40px 0 8px; font-size: 20px; letter-spacing: -0.02em; font-weight: 600; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--violet-ink); text-underline-offset: 2px; }
.legal .meta { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.legal .placeholder { padding: 1px 6px; border-radius: 6px; background: rgba(255, 104, 43, 0.12); color: #9A3A10; font-weight: 600; }
.legal .back { display: inline-block; margin-bottom: 28px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.legal .back:hover { color: var(--ink); }

/* ───────────── Responsive ───────────── */

@media (max-width: 560px) {
  .spiral__card { width: 150px; height: 267px; margin: -133.5px 0 0 -75px; }
  .spiral::after { background: radial-gradient(ellipse 58% 30% at 50% 50%, rgba(247, 247, 248, 0.55) 0%, rgba(247, 247, 248, 0.3) 55%, rgba(247, 247, 248, 0) 100%); }

  .field { flex-wrap: wrap; }
  .field input { flex-basis: calc(100% - 44px); }
  .field .button { width: 100%; padding: 15px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
