/* somosnais.com — "en construcción" landing.
   Values are taken 1:1 from somosnais-landing-reference.html (the approved design). */

/* Self-hosted Google Fonts (variable, Latin subset: covers á é í ó ú ñ ¡ ¿). */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/fredoka-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --tangerine: #E8590C; /* hero */
  --tangerine-hover: #C94A07;
  --charcoal: #23313A; /* text, inner stripe */
  --lilac: #A78BFA; /* pop accent, middle stripe */
  --white: #FFFFFF;
  --muted: #4B5A64; /* body copy, 7:1 on white */
  --subtle: #5B6770; /* small print, 5.8:1 on white */
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

body { margin: 0; }

/* Keep the `hidden` attribute working on elements that set their own display. */
[hidden] { display: none !important; }

/* ── Page + the giant striped "n" frame ─────────────────────────────── */
.page {
  min-height: 100vh;
  box-sizing: border-box;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font-body);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
}

/* Each arch keeps a transparent 32px border for layout. The visible stripe is
   drawn by ::before on exactly the same border box, so the stripes can animate
   on their own while the content inside stays visible from the first frame. */
.arch {
  position: relative;
  display: flex;
  border: 32px solid transparent;
  border-bottom-width: 0;
  border-radius: 9999px 9999px 0 0;
}

.arch::before {
  content: "";
  position: absolute;
  top: -32px;
  left: -32px;
  right: -32px;
  /* Legs run past the page bottom (clipped by .page) so the scroll
     parallax below never shows a gap under them. */
  bottom: -120px;
  border: 32px solid var(--stripe);
  border-bottom-width: 0;
  border-radius: inherit;
  pointer-events: none;
}

.arch-1 {
  --stripe: var(--tangerine);
  width: min(1040px, calc(100% + 256px));
  flex: 1 0 auto;
  box-sizing: border-box;
  padding: 16px 16px 0;
}

.arch-2 {
  --stripe: var(--lilac);
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px 16px 0;
}

.arch-3 {
  --stripe: var(--charcoal);
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  padding: 80px 24px 0;
}

/* ── Content ────────────────────────────────────────────────────────── */
.wordmark {
  width: min(280px, 72%);
  height: auto;
  display: block;
}

.badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--charcoal);
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--charcoal);
}

h1 {
  margin: 0;
  max-width: 680px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 1.5rem + 2.6vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.accent { color: var(--tangerine); }

.lead {
  margin: 0;
  max-width: 520px;
  font-size: 18px;
  line-height: 28px;
  color: var(--muted);
  text-wrap: pretty;
}

/* ── Waitlist form ──────────────────────────────────────────────────── */
.waitlist {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  text-align: left;
}

.waitlist label {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  padding-left: 4px;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.waitlist input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  height: 56px;
  box-sizing: border-box;
  padding: 0 22px;
  border: 2px solid var(--charcoal);
  border-radius: 999px;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
}

.button {
  flex: 1 0 auto;
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--tangerine);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.button:hover { background: var(--tangerine-hover); }
.button:disabled { cursor: progress; }

.form-note {
  margin: 0;
  padding-left: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--subtle);
}

/* Shown in place of the form after a successful sign-up, or below it on error. */
.form-status {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  padding-left: 4px;
}

.form-status.is-success {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 28px;
  text-align: center;
  padding: 18px 0 0;
}

/* Brand has no red; the copy carries the meaning. Charcoal keeps 14:1 contrast. */
.form-status.is-error { color: var(--charcoal); }

/* Honeypot: off-screen, hidden from assistive tech, never focusable. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Social pills ───────────────────────────────────────────────────── */
.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  box-sizing: border-box;
  border: 2px solid var(--charcoal);
  border-radius: 999px;
  color: var(--charcoal);
  text-decoration: none;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

a.pill:hover { background: var(--charcoal); color: var(--white); }

/* The 404 page's "Volver al inicio" link uses the button look. */
a.button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  text-decoration: none;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  width: 100%;
  padding: 40px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lockup {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 32px;
  color: var(--charcoal);
}

.legal {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--subtle);
}

.legal a { color: var(--subtle); }

/* ── Focus + motion ─────────────────────────────────────────────────── */
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 3px;
}

/* Entrance: the three stripes rise in, like the video's opening.
   Only the stripes animate; the content never starts hidden. */
@media (prefers-reduced-motion: no-preference) {
  .arch::before { animation: rise 700ms cubic-bezier(.34, 1.56, .64, 1) both; }
  .arch-2::before { animation-delay: 90ms; }
  .arch-3::before { animation-delay: 180ms; }
  @keyframes rise {
    from { transform: translateY(48px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }

  /* Scroll parallax: motion.js sets --scroll (0 → 1 over the first 320px).
     The stripes lift apart like the video's stacked-band bounce (outer moves
     most). Uses `translate`, so it composes with the entrance's `transform`.
     Gaps only widen, so stripes never overlap each other or the content.
     Without JS, --scroll is unset and the page stays still. */
  .arch::before { translate: 0 calc(var(--scroll, 0) * var(--spread)); }
  .arch-1::before { --spread: -96px; }
  .arch-2::before { --spread: -64px; }
  .arch-3::before { --spread: -32px; }
}
