/* Equipao: prerregistro de clientes (/) y de aliados (/aliados). P23, ronda 2 aprobada por Carlos el 11/11/2026.
   Manual de marca v4: Tinta, Cal y Papel, con Manrope. La política de seguridad de equipao.app no admite estilos en
   línea ni imágenes data:, así que todo vive aquí. El formulario conserva sus campos, su envío y su captcha. */
/* Manrope del manual v4, recortada a latín (manrope-latin.ttf, 61 KB) desde /brand/Manrope-variable.ttf: mismos dibujos y eje de peso. */
@font-face { font-family: "Manrope"; src: url("/prelaunch/manrope-latin.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@layer reset, tokens, base, layout, components, sections;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  img, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  button, input, select { font: inherit; color: inherit; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    --tinta: #142B35; --cal: #D8FA60; --papel: #F5F4EE; --petroleo: #176B63;
    --bg: var(--papel); --surface: #FFFFFF; --tinta-2: #1C3846;
    --text: var(--tinta); --text-2: #43575F; --text-3: #5C6D73; --on-dark: #F5F4EE; --on-dark-2: #B3C1C5;
    --border: rgb(20 43 53 / .09); --border-strong: rgb(20 43 53 / .2); --hairline: rgb(20 43 53 / .08);
    --ok: #1F7A4D; --danger: #9B3022;
    --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--petroleo);
    --font: "Manrope", Arial, system-ui, sans-serif;
    --t-xs: .8125rem; --t-s: .9375rem; --t-m: 1rem; --t-l: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
    --t-xl: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
    --t-2xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    --t-3xl: clamp(1.875rem, 1.4rem + 1.9vw, 3rem);
    --t-hero: clamp(2.5rem, 1.55rem + 4vw, 4.5rem);
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
    --r-s: 8px; --r-m: 14px; --r-l: 22px; --r-xl: 28px; --r-full: 999px;
    --shadow-2: 0 1px 2px rgb(20 43 53 / .05), 0 12px 32px -12px rgb(20 43 53 / .16);
    --dur-instant: 100ms; --dur-fast: 160ms; --dur-hero: 640ms;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --dist-m: 16px;
    --page: 1200px; --gutter: clamp(16px, 4vw, 40px); --section: clamp(72px, 4rem + 4vw, 136px); --half: clamp(44px, 2rem + 2vw, 68px);
  }
  @media (prefers-reduced-motion: reduce) { :root { --dur-fast: 1ms; --dur-hero: 1ms; --dist-m: 0px; } }
}

@layer base {
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body { font-family: var(--font); font-size: var(--t-m); line-height: 1.55; color: var(--text); background: var(--bg);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  h1, h2, h3 { font-weight: 650; line-height: 1.1; letter-spacing: -.024em; text-wrap: balance; }
  p, dd, li { text-wrap: pretty; }
  a { color: var(--petroleo); text-underline-offset: 3px; text-decoration-thickness: 1px; }
  :focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-s); }
  .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .skip { position: absolute; left: var(--s4); top: -100px; z-index: 50; background: var(--tinta); color: var(--on-dark); padding: var(--s3) var(--s4);
    border-radius: var(--r-s); font-weight: 600; text-decoration: none; }
  .skip:focus { top: var(--s4); }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
  /* Cada sección aporta la mitad del aire: entre dos secciones queda uno completo, no el doble. */
  .section { padding-block: var(--half); }
  .split { display: grid; gap: var(--s6); }
  @media (min-width: 900px) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s8); } }
}

@layer components {
  /* Barra superior */
  .topbar { position: sticky; top: 0; z-index: 20; background: rgb(245 244 238 / .88); backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--hairline); }
  .topbar .wrap { display: flex; align-items: center; gap: var(--s6); min-height: 68px; }
  .logo { display: flex; align-items: center; min-height: 44px; margin-right: auto; }
  /* Logo v4 del kit de marca (primera e en Cal, quipao en Tinta), al mínimo de 120 px que fija el manual. */
  .logo img { width: 120px; height: 32px; }
  .topbar nav { display: none; gap: var(--s6); font-size: var(--t-s); font-weight: 550; }
  .topbar nav a { color: var(--text-2); text-decoration: none; padding: var(--s2) 0; transition: color var(--dur-fast) var(--ease-out); }
  .topbar nav a:hover { color: var(--text); }
  @media (min-width: 900px) { .topbar nav { display: flex; } .logo { margin-right: var(--s3); } .topbar .btn { margin-left: auto; } }

  /* Botones y enlaces */
  .btn { --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--h); padding: 0 var(--s5);
    border-radius: var(--r-full); border: 0; font-size: var(--t-m); font-weight: 650; letter-spacing: -.005em; line-height: 1.2; text-align: center;
    text-decoration: none; cursor: pointer; touch-action: manipulation;
    transition: transform var(--dur-instant) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
  .btn:active { transform: scale(.98); }
  .btn-primary { background: var(--cal); color: var(--tinta); box-shadow: inset 0 0 0 1px rgb(20 43 53 / .08); }
  .btn-primary:hover { background: #CDF04F; }
  .btn-dark { background: var(--tinta); color: var(--on-dark); }
  .btn-dark:hover { background: var(--tinta-2); }
  .btn-s { --h: 44px; padding: 0 var(--s4); font-size: var(--t-s); }
  .btn-block { width: 100%; }
  .btn:disabled { background: rgb(20 43 53 / .07); color: var(--text-3); box-shadow: none; cursor: not-allowed; transform: none; }
  .link { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 600; text-decoration: underline;
    text-decoration-color: var(--border-strong); transition: text-decoration-color var(--dur-fast) var(--ease-out); }
  .link:hover { text-decoration-color: currentColor; }

  .tag { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: var(--r-full);
    font-size: var(--t-xs); font-weight: 650; background: rgb(23 107 99 / .1); color: var(--petroleo); }
  .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

  /* Foto de producto: el fondo blanco del archivo, con borde de vitrina */
  .photo { display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; background: var(--surface); border-radius: var(--r-l);
    box-shadow: inset 0 0 0 1px var(--border); }
  .photo img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }

  .checks { display: grid; gap: var(--s3); }
  .checks li { display: grid; grid-template-columns: 22px 1fr; gap: var(--s3); align-items: start; color: var(--text-2); }
  .checks svg { width: 20px; height: 20px; margin-top: 2px; stroke: var(--petroleo); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .checks b { color: var(--text); font-weight: 650; }
}

@layer sections {
  /* Héroe: una sola entrada orquestada al cargar */
  .hero { padding: var(--s7) 0 var(--half); }
  .hero-grid { display: grid; gap: var(--s7); align-items: center; }
  .hero h1 { font-size: var(--t-hero); line-height: 1.03; letter-spacing: -.038em; max-width: 13ch; margin-top: var(--s5); }
  .hero .lead { font-size: var(--t-l); color: var(--text-2); max-width: 44ch; margin-top: var(--s5); }
  .hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s6); margin-top: var(--s6); }
  .hero .fine { font-size: var(--t-s); color: var(--text-3); margin-top: var(--s4); }
  .hero figure .photo { border-radius: var(--r-xl); }
  .hero figcaption { margin-top: var(--s3); font-size: var(--t-s); color: var(--text-3); }
  .hero figcaption b { color: var(--text); font-weight: 650; }
  @media (min-width: 900px) {
    .hero { padding-top: var(--s9); }
    .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s8); }
  }
  @keyframes rise { from { opacity: 0; transform: translateY(var(--dist-m)); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
  .hero-copy > * { animation: rise var(--dur-hero) var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .hero-copy > :nth-child(n+4) { animation-delay: 180ms; }
  .hero figure { animation: settle calc(var(--dur-hero) + 120ms) var(--ease-out) 90ms both; }

  /* Marcas confirmadas, cada una con un equipo real */
  .section-head { display: grid; gap: var(--s3); max-width: 46rem; margin-bottom: var(--s7); }
  .section-head h2, .split h2, .band h2, .signup h2, .film-grid h2 { font-size: var(--t-3xl); }
  .film-grid .muted { font-size: var(--t-l); color: var(--text-2); margin-top: var(--s3); max-width: 34ch; }
  .section-head p, .split > div > p { font-size: var(--t-l); color: var(--text-2); }
  .split > div > p { margin-top: var(--s3); max-width: 36ch; }
  .brands { display: grid; gap: var(--s5); }
  .brand { display: grid; grid-template-columns: 112px 1fr; gap: var(--s2) var(--s4); align-items: center; }
  .brand .photo { grid-row: span 4; border-radius: var(--r-m); }
  /* Las tres marcas en un solo tono: el logo de Hikari es blanco y no se vería sobre Papel. */
  .brand .brand-mark { height: 18px; width: auto; justify-self: start; filter: brightness(0); opacity: .82; }
  .brand h3 { font-size: var(--t-l); margin-top: var(--s1); }
  .brand p { font-size: var(--t-s); color: var(--text-2); }
  .brand .link { min-height: 40px; font-size: var(--t-s); }
  @media (min-width: 640px) {
    .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s5); }
    .brand { grid-template-columns: 1fr; align-content: start; }
    .brand .photo { grid-row: auto; border-radius: var(--r-l); margin-bottom: var(--s3); }
  }

  /* Para quién es: filas, no tarjetas */
  .rows > div { display: grid; gap: var(--s2) var(--s6); padding: var(--s5) 0; border-top: 1px solid var(--hairline); }
  .rows > div:last-child { border-bottom: 1px solid var(--hairline); }
  .rows dt { font-size: var(--t-xl); font-weight: 650; letter-spacing: -.02em; }
  .rows dd { color: var(--text-2); max-width: 52ch; }
  .rows dd .link { margin-top: var(--s1); }
  @media (min-width: 640px) { .rows > div { grid-template-columns: 200px 1fr; align-items: baseline; } }

  /* Cómo funciona: la banda Tinta de la página */
  .band { background: var(--tinta); color: var(--on-dark); padding-block: var(--section); }
  .band h2 { max-width: 20ch; }
  .steps { display: grid; gap: var(--s6); margin-top: var(--s7); counter-reset: paso; }
  .steps li { position: relative; padding-left: 48px; display: grid; gap: var(--s1); }
  .steps li::before { counter-increment: paso; content: counter(paso); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; font-size: var(--t-xs); font-weight: 700; background: var(--on-dark); color: var(--tinta); }
  .steps b { font-size: var(--t-xl); font-weight: 650; letter-spacing: -.015em; }
  .steps span { color: var(--on-dark-2); max-width: 40ch; }
  .band .fine { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid rgb(245 244 238 / .14); color: var(--on-dark-2);
    font-size: var(--t-s); max-width: 70ch; }
  @media (min-width: 900px) {
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s7); }
    .steps li { padding-left: 0; padding-top: 52px; }
  }

  /* Video de PAO */
  .film-grid { display: grid; gap: var(--s6); align-items: center; }
  .film-frame { border-radius: var(--r-xl); overflow: hidden; background: var(--tinta); }
  /* El marco recorta lo que sale del video: el anillo de foco se dibuja en el marco, que no recorta. */
  .film-frame:focus-within { box-shadow: var(--focus); }
  .responsive-film:focus-visible { box-shadow: none; }
  .responsive-film { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--tinta); }
  .responsive-film.is-portrait { aspect-ratio: 9 / 16; width: auto; max-width: 100%; max-height: 78svh; margin-inline: auto; }
  @media (min-width: 900px) { .film-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s8); } }

  /* Prerregistro */
  .signup-grid { display: grid; gap: var(--s7); }
  .signup-copy > p { font-size: var(--t-l); color: var(--text-2); margin-top: var(--s4); max-width: 40ch; }
  .signup-copy .checks { margin-top: var(--s6); }
  .signup-copy .fine { font-size: var(--t-s); color: var(--text-3); margin-top: var(--s6); max-width: 44ch; }
  @media (min-width: 960px) {
    .signup-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s8); align-items: start; }
    .signup-copy { position: sticky; top: 112px; }
  }
  .form-card { display: grid; gap: var(--s5); background: var(--surface); border-radius: var(--r-xl); padding: clamp(20px, 4vw, 40px);
    box-shadow: inset 0 0 0 1px var(--border), var(--shadow-2); }
  .form-card h3 { font-size: var(--t-xl); }
  .form-card .form-note { font-size: var(--t-s); color: var(--text-2); margin-top: calc(var(--s3) * -1); }
  .form-card label { display: block; font-size: var(--t-s); font-weight: 650; }
  .form-card label > span { font-weight: 500; color: var(--text-3); }
  .form-card input:not([type="checkbox"]), .form-card select { display: block; width: 100%; height: 52px; margin-top: var(--s2); padding: 0 var(--s4); border-radius: var(--r-m);
    border: 1px solid var(--border-strong); background: var(--surface); font-size: 16px; font-weight: 500;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
  .form-card input::placeholder { color: var(--text-3); opacity: 1; }
  .form-card input:hover, .form-card select:hover { border-color: rgb(20 43 53 / .34); }
  .form-card input:focus-visible, .form-card select:focus-visible { border-color: var(--petroleo); box-shadow: 0 0 0 3px rgb(23 107 99 / .22); border-radius: var(--r-m); }
  .form-card input:user-invalid, .form-card select:user-invalid { border-color: var(--danger); }
  .form-card .field-select { position: relative; }
  .form-card .field-select select { appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer; }
  .form-card .field-select::after { content: ""; position: absolute; right: 20px; bottom: 22px; width: 8px; height: 8px; pointer-events: none;
    border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); }
  .form-card .consent { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); align-items: start; font-weight: 500; color: var(--text-2); line-height: 1.5; cursor: pointer; }
  .form-card .consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--tinta); cursor: pointer; }
  .form-card .consent > span { color: var(--text-2); }
  .form-card altcha-widget { display: block; --altcha-max-width: 100%; --altcha-border-radius: 14px; --altcha-border-color: var(--border-strong);
    --altcha-color-base: var(--surface); --altcha-color-base-content: var(--text); --altcha-color-primary: var(--petroleo);
    --altcha-color-success: var(--ok); --altcha-checkbox-border-radius: 6px; --altcha-padding: 14px 16px; }
  .form-card .after-submit { font-size: var(--t-s); color: var(--text-3); text-align: center; margin-top: calc(var(--s3) * -1); }
  .status { padding: var(--s4); border-radius: var(--r-m); background: rgb(31 122 77 / .09); color: var(--ok); font-size: var(--t-s); font-weight: 600; line-height: 1.5; }
  .status.error { background: rgb(155 48 34 / .08); color: var(--danger); }
  .prereg-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* Preguntas */
  .faq-list details { border-top: 1px solid var(--hairline); }
  .faq-list details:last-child { border-bottom: 1px solid var(--hairline); }
  .faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 68px; padding: var(--s4) 0;
    font-size: var(--t-l); font-weight: 650; letter-spacing: -.01em; cursor: pointer; list-style: none; }
  .faq-list summary::-webkit-details-marker { display: none; }
  .faq-list summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--border-strong); font-size: 20px; font-weight: 400; color: var(--text-2); }
  .faq-list details[open] summary::after { content: "−"; }
  .faq-list details p { color: var(--text-2); max-width: 62ch; padding-bottom: var(--s5); }

  /* Cierre y pie */
  .closing { padding-block: var(--half) var(--section); }
  .closing-card { display: grid; gap: var(--s5); align-items: center; background: var(--surface); border-radius: var(--r-xl);
    padding: clamp(24px, 4vw, 48px); box-shadow: inset 0 0 0 1px var(--border); }
  .closing-card h2 { font-size: var(--t-2xl); max-width: 26ch; }
  .closing-card p { color: var(--text-2); margin-top: var(--s2); }
  @media (min-width: 760px) { .closing-card { grid-template-columns: 1fr auto; } }
  .footer { border-top: 1px solid var(--hairline); padding: var(--s7) 0 calc(var(--s8) + env(safe-area-inset-bottom)); font-size: var(--t-s); color: var(--text-2); }
  .footer-grid { display: grid; gap: var(--s4); }
  .footer img { width: 120px; height: 32px; }
  .footer a { color: var(--text); font-weight: 600; }
  @media (min-width: 900px) { .footer-grid { grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s7); } }
}
