/* ============================================================
   FLANGU LANDING PAGE — WAITLIST VARIANT (ADDITIVE STYLES)
   Loaded after landing.css. Never edits landing.css tokens —
   only adds new ones and new component classes for the
   pre-launch email-capture UI.
   ============================================================ */

/* ── W1. TOKENS (additive — none of these exist in landing.css) ── */
:root {
  --c-error: #E05252;
  /* no error colour is defined in landing.css;
     --c-success (#2DCC70) exists and is reused as-is */
  --c-navy-38: rgba(26, 50, 98, 0.38);
  /* placeholder text */
}

/* ── W2. WAITLIST BLOCK — base (mobile-first shared) ── */
.lp-wl {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
}

/* ─ "Not out yet" note ─ */
.lp-wl__note {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  /* 8px */
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-navy);
  opacity: 0.55;
  /* exact match to .lp-hero__trust-item */
  margin-bottom: 14px;
  text-align: center;
}

.lp-wl__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--c-mainblue);
  animation: lp-wl-pulse 2.4s var(--ease-expo) infinite;
}

@keyframes lp-wl-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(86, 135, 232, 0.45);
  }

  70%,
  100% {
    box-shadow: 0 0 0 6px rgba(86, 135, 232, 0);
  }
}

/* ─ Form: single pill, button inset (≥768px) ─ */
.lp-wl__form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 6px 6px 18px;
  background: var(--c-white);
  border: 1.5px solid var(--c-navy-08);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-soft);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.lp-wl__form:hover {
  border-color: var(--c-navy-12);
}

.lp-wl__form:focus-within {
  border-color: var(--c-mainblue);
  box-shadow: var(--shadow-soft), 0 0 0 4px var(--c-mainblue-08);
}

.lp-wl__form.is-invalid {
  border-color: var(--c-error);
}

.lp-wl__form.is-invalid:focus-within {
  box-shadow: var(--shadow-soft), 0 0 0 4px rgba(224, 82, 82, 0.12);
}

.lp-wl__field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.lp-wl__icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--c-navy);
  opacity: 0.32;
  transition: color var(--t-fast), opacity var(--t-fast);
}

.lp-wl__form:focus-within .lp-wl__icon {
  color: var(--c-mainblue);
  opacity: 0.85;
}

.lp-wl__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0;
  /* the pill owns the padding */
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  /* ≥16px — anything smaller triggers iOS
     zoom-on-focus, which breaks the hero layout */
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-navy);
}

.lp-wl__input::placeholder {
  color: var(--c-navy-38);
  font-weight: 400;
}

/* Chrome's yellow autofill fill would break the white pill */
.lp-wl__input:-webkit-autofill,
.lp-wl__input:-webkit-autofill:hover,
.lp-wl__input:-webkit-autofill:focus {
  -webkit-box-shadow: inset 0 0 0 1000px var(--c-white);
  -webkit-text-fill-color: var(--c-navy);
  transition: background-color 9999s ease-out;
}

/* ─ Submit: .lp-btn-primary base + inset overrides ─ */
.lp-wl__submit {
  flex-shrink: 0;
  padding: 11px 22px;
  /* .lp-btn-primary is 14px 32px — too tall for the pill */
  font-size: 14px;
  box-shadow: none;
  /* the pill already floats; a second shadow muddies it */
  border: none;
  cursor: pointer;
}

.lp-wl__submit:hover {
  background: var(--c-mainblue-deep);
  box-shadow: none;
  transform: none;
}

.lp-wl__submit:active {
  transform: scale(0.96);
}

.lp-wl__submit:focus-visible {
  outline: 2px solid var(--c-mainblue);
  outline-offset: 3px;
}

.lp-wl__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--c-mainblue);
}

/* ─ Hint ─ */
.lp-wl__hint {
  margin-top: 10px;
  max-width: 380px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--c-navy);
  opacity: 0.45;
  text-align: center;
  text-wrap: pretty;
}

/* ─ Cloudflare Turnstile widget (rendered explicitly by landing_waitlist.js) ─ */
.lp-wl__turnstile {
  display: flex;
  justify-content: center;
}

.lp-wl__turnstile:not(:empty) {
  margin-top: 10px;
}

/* ─ Result messages (styling only; toggled by the separate task) ─ */
.lp-wl__msg {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.lp-wl__msg--success {
  color: var(--c-success);
}

.lp-wl__msg--error {
  color: var(--c-error);
}

.lp-wl__msg[hidden] {
  display: none;
}

/* ── W3. MOBILE (<768px) — two stacked pills ── */
@media (max-width: 767px) {
  .lp-wl {
    max-width: 340px;
  }

  .lp-wl__form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .lp-wl__form:hover,
  .lp-wl__form:focus-within {
    border-color: transparent;
    box-shadow: none;
  }

  .lp-wl__field {
    padding: 14px 18px;
    /* 50px tall — comfortable touch target */
    background: var(--c-white);
    border: 1.5px solid var(--c-navy-08);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-soft);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
  }

  .lp-wl__field:focus-within {
    border-color: var(--c-mainblue);
    box-shadow: var(--shadow-soft), 0 0 0 4px var(--c-mainblue-08);
  }

  .lp-wl__form.is-invalid .lp-wl__field {
    border-color: var(--c-error);
  }

  .lp-wl__submit {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    border-radius: var(--r-pill);
    box-shadow: 0 4px 20px rgba(86, 135, 232, 0.30);
    /* restored — free-standing here */
  }
}

/* ── W4. DESKTOP SIDE-BY-SIDE (≥1024px) — left-align to match the column ── */
@media (min-width: 1024px) {
  .lp-wl {
    align-items: flex-start;
    max-width: 420px;
  }

  .lp-wl__note,
  .lp-wl__hint,
  .lp-wl__msg {
    text-align: left;
  }
}

/* ── W5. REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .lp-wl__dot {
    animation: none;
  }

  .lp-wl__form,
  .lp-wl__field,
  .lp-wl__icon,
  .lp-wl__submit {
    transition: none !important;
  }
}

/* ── W6. ON-BLUE VARIANT (section 04 panel) ── */
.lp-wl--on-blue {
  position: relative;
  z-index: 1;
  /* clears .lp-cta__inner::after grain layer */
  margin-top: 36px;
  /* matches the .lp-cta__badges margin it replaces */
  max-width: 460px;
  align-items: center;
}

.lp-wl--on-blue .lp-wl__note {
  color: var(--c-white);
  opacity: 0.80;
}

.lp-wl--on-blue .lp-wl__dot {
  background: var(--c-white);
  animation-name: lp-wl-pulse-light;
}

@keyframes lp-wl-pulse-light {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  }

  70%,
  100% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
}

.lp-wl--on-blue .lp-wl__form {
  border-color: rgba(255, 255, 255, 0.40);
  box-shadow: 0 10px 30px rgba(15, 40, 90, 0.18);
  /* matches .lp-cta__badge:hover depth */
}

.lp-wl--on-blue .lp-wl__form:hover {
  border-color: rgba(255, 255, 255, 0.70);
}

.lp-wl--on-blue .lp-wl__form:focus-within {
  border-color: var(--c-white);
  box-shadow: 0 10px 30px rgba(15, 40, 90, 0.18), 0 0 0 4px rgba(255, 255, 255, 0.28);
}

/* Submit stays --c-mainblue: it sits on a white pill, so it reads on-brand
   and needs no special-casing against the panel behind it. */
.lp-wl--on-blue .lp-wl__submit:focus-visible {
  outline-color: var(--c-white);
}

.lp-wl--on-blue .lp-wl__hint {
  color: var(--c-white);
  opacity: 0.68;
}

.lp-wl--on-blue .lp-wl__msg--success {
  color: var(--c-white);
}

.lp-wl--on-blue .lp-wl__msg--error {
  color: #FFD9D9;
}

@media (max-width: 767px) {
  .lp-wl--on-blue {
    max-width: 320px;
    margin-top: 28px;
  }

  /* The hero keeps the default stacked mobile treatment from W3, untouched.
     The CTA form instead stays a single inset pill on mobile too — the
     submit button sits at the pill's right edge as a circular icon button
     instead of dropping into its own full-width block below the field,
     which is what previously left it reading as a mainblue button on the
     mainblue panel with barely any contrast. */
  .lp-wl--on-blue .lp-wl__form {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 6px 6px 18px;
    background: var(--c-white);
    border: 1.5px solid rgba(255, 255, 255, 0.40);
  }

  .lp-wl--on-blue .lp-wl__form.is-invalid {
    border-color: var(--c-error);
  }

  .lp-wl--on-blue .lp-wl__field {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* Icon-only circular button — the "Notify me" text node itself is
     untouched (same markup as the hero button, so desktop/tablet render
     identically with zero risk of divergence); font-size/line-height
     collapse it to nothing visually here while keeping it as the
     button's accessible name. The arrow is a background-image on ::after
     rather than a real DOM icon, so it can never appear at ≥768px. */
  .lp-wl--on-blue .lp-wl__submit {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--r-pill);
    box-shadow: none;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
  }

  .lp-wl--on-blue .lp-wl__submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12H19M19 12L13 6M19 12L13 18' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
  }
}

@media (min-width: 1024px) {

  /* the panel is centre-aligned — opt out of W4's left-align */
  .lp-wl--on-blue {
    align-items: center;
  }

  .lp-wl--on-blue .lp-wl__note,
  .lp-wl--on-blue .lp-wl__hint,
  .lp-wl--on-blue .lp-wl__msg {
    text-align: center;
  }
}

/* ── W7. FOOTER (waitlist variant) ── */
.lp-footer__coming-soon {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-white);
  opacity: 0.55;
  margin-bottom: var(--sp-sm);
  /* 12px */
}

.lp-footer__coming-soon .lp-wl__dot {
  background: var(--c-white);
  animation-name: lp-wl-pulse-light;
}

.lp-footer__waitlist-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 11px 22px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  color: var(--c-white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.lp-footer__waitlist-link:hover {
  border-color: rgba(255, 255, 255, 0.60);
  background: rgba(255, 255, 255, 0.06);
}

.lp-footer__waitlist-link:active {
  transform: scale(0.96);
}

.lp-footer__waitlist-link:focus-visible {
  outline: 2px solid var(--c-white);
  outline-offset: 3px;
}
