/* gameplanai.app landing page.
   Built from docs/redesign/design_handoff_landing_page (hi-fi reference). Most
   visual values live inline in index.html, copied verbatim from the reference;
   this file holds tokens, motion, interactive states and the mobile rules the
   handoff didn't specify. */

:root {
  --paper: #FAF9F5;
  --white: #FFFFFF;
  --ink: #17161C;
  --ink-text: #1A1820;
  --text-2: #44404D;
  --text-3: #6B6774;
  --text-4: #8B8794;
  --hairline: #E6E3DA;
  --sunken: #F3F1EA;
  --violet: #7B52E3;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink-text); font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--text-2); }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

/* Lucide icons from the inline sprite (stroke inherits currentColor). */
.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: block; }

/* Conditional blocks: transparent to layout when shown. Showing one restarts
   the CSS animations inside it, which is how every "rise/pop/sheet" replays. */
gp-if { display: contents; }
gp-if[hidden] { display: none !important; }

.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; }
/* Skip link: visible only when focused from the keyboard. */
a.sr-only:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; margin: 0; clip: auto; z-index: 2000; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--hairline); padding-top: env(safe-area-inset-top); }
.header-row { max-width: 1200px; margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo-link { display: flex; align-items: center; }
/* The PNG carries built-in padding, hence the negative margins (per the handoff). */
.logo { height: 72px; width: auto; display: block; margin: -16px 0 -16px -24px; object-fit: contain; object-position: left center; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.nav-link { color: var(--text-2); }
.nav-fields .label-short { display: none; }
.nav-cta { white-space: nowrap; }
.nav-cta:hover { background: #2E2C36 !important; color: #fff !important; }

/* Hero capability row is a list for semantics. */
.cap-row { list-style: none; margin: 0; padding: 0; }

/* ---------- Motion (verbatim from the reference) ---------- */
@keyframes gpLandWave { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
.gpl-noscroll::-webkit-scrollbar { width: 0; height: 0; }
.gpl-noscroll { scrollbar-width: none; }
@keyframes gplScrim { from { opacity: 0; } to { opacity: 1; } }
@keyframes gplSheet { from { transform: translateY(102%); } to { transform: translateY(0); } }
@keyframes gplRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gplPop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.gpl-scrim { animation: gplScrim 200ms ease both; }
.gpl-sheet { animation: gplSheet 300ms var(--ease) both; }
.gpl-rise { animation: gplRise 360ms var(--ease) both; }
.gpl-pop { animation: gplPop 300ms var(--ease) both; }
@keyframes gplDot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.gpl-dot { animation: gplDot 1s ease-in-out infinite; }
@keyframes gplCaret { 50% { opacity: 0; } }
.gpl-caret { animation: gplCaret 900ms step-end infinite; }
@keyframes gplFlash { 0% { opacity: 0; } 25% { opacity: 0.95; } 100% { opacity: 0; } }
.gpl-flash { animation: gplFlash 520ms ease-out both; }
@keyframes gplStrike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gplDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes gplFade { from { opacity: 0; translate: -6px 0; } to { opacity: 1; translate: 0 0; } }
.gpl-strike { transform-origin: 0 50%; animation: gplStrike 520ms cubic-bezier(0.65,0,0.35,1) both; }
.gpl-d1 { animation-delay: 480ms; }
.gpl-d2 { animation-delay: 700ms; }
.gpl-d3 { animation-delay: 1000ms; }
.gpl-callout { animation: gplFade 360ms var(--ease) both; }
.gpl-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: gplDraw 520ms var(--ease) 200ms both; }
.gpl-dh { animation-delay: 680ms; animation-duration: 220ms; }
.gpl-late { animation-delay: 1100ms; }
.gpl-hide { opacity: 0; }
path.gpl-hide { opacity: 1; stroke-dasharray: 1; stroke-dashoffset: 1; }
.gpl-dl { animation-delay: 1300ms; }
.gpl-dlh { animation-delay: 1780ms; animation-duration: 220ms; }

/* ---------- Interactive states the reference expressed as style-hover ---------- */
[data-ref="mapChip"]:hover, [data-ref="carpoolChip"]:hover { background: var(--sunken) !important; }
.cap-tabs button:hover[aria-pressed="false"] { background: var(--sunken) !important; }
[data-on-click="toggleFaq"]:hover span { color: var(--text-2); }

/* Calendar source tiles: neutral monogram until official partner logos arrive. */
.cal-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px; padding: 12px 4px 11px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--hairline); text-align: center; min-width: 0; }
.cal-logo { width: 34px; height: 34px; border-radius: 9px; display: block; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(26,24,32,0.06); }
.cal-name { font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--ink-text); }
.cal-name-short { display: none; }

/* Feature 03: visual on the left on desktop (reference's order: -1). */
.feat3-visual { order: -1; }

/* Feature demo stage: the reference's fixed 448px height fits every mode even
   at 320px wide (Talk stacks to ~428px), so it is never scaled. */
.cap-stage { position: relative; }
.cap-stage-inner { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* ---------- Notify modal ---------- */
.notify-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(23,22,28,0.48); display: flex; align-items: center; justify-content: center; padding: 20px; animation: gplScrim 200ms ease both; }
.notify-scrim[hidden] { display: none; }
.notify-dialog { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 40px); overflow-y: auto; background: #FFFFFF; border-radius: 24px; border: 1px solid var(--hairline); box-shadow: 0 24px 64px rgba(23,22,28,0.22); padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 20px; animation: gplRise 360ms var(--ease) both; }
.notify-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: none; background: transparent; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; }
.notify-close:hover { background: #F1EFE9; }
.notify-head { display: flex; flex-direction: column; gap: 10px; }
/* Only the eyebrow sits beside the close button, so only it keeps clear of it.
   The title gets the full width and stays on ONE line: 28px fits the desktop
   dialog; on phones it scales down (6.6vw) so it still fits at 320px. */
.notify-head .eyebrow { padding-right: 44px; }
.notify-title { margin: 0; font-family: 'Schibsted Grotesk', sans-serif; font-weight: 800; font-size: clamp(20px, 6.6vw, 28px); line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.notify-sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.notify-form { display: flex; flex-direction: column; gap: 12px; }
.notify-label { font-size: 14px; font-weight: 600; color: var(--ink); }
/* 16px keeps iOS from zooming the page on focus. */
.notify-input { height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid #DDDACF; background: var(--paper); font-family: inherit; font-size: 16px; color: var(--ink); outline: none; width: 100%; }
.notify-input:focus { border-color: var(--ink); background: #FFFFFF; }
.notify-input[aria-invalid="true"] { border-color: #C2362F; }
.notify-submit { height: 52px; border: none; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.notify-submit:hover { background: #2E2C36; }
.notify-submit:disabled { opacity: 0.6; cursor: progress; }
.notify-status { margin: 0; min-height: 0; font-size: 14px; font-weight: 600; text-align: center; color: var(--text-2); }
.notify-status:empty { display: none; }
.notify-status.is-error { color: #C2362F; }
.notify-status.is-ok { color: #246A4C; }
.notify-fine { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-3); text-align: center; text-wrap: pretty; }
.ts-slot:empty { display: none; }
.ts-slot { display: flex; justify-content: center; min-height: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
body.modal-open { overflow: hidden; }

/* ---------- Reduced motion: no keyframes, no auto-scroll (JS checks too) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gpl-strike, .gpl-callout, .gpl-draw { animation: none !important; stroke-dashoffset: 0 !important; }
  .gp-wave, .gpl-scrim, .gpl-sheet, .gpl-rise, .gpl-pop, .gpl-flash, .gpl-dot, .gpl-caret, .notify-scrim, .notify-dialog { animation: none !important; }
  .gpl-hide { opacity: 1 !important; }
  path.gpl-hide { stroke-dashoffset: 0 !important; }
}

/* =====================================================================
   Mobile. The handoff only says "grids collapse below ~900px, phone stays
   300×612, store buttons wrap". Everything below fills that gap.
   ===================================================================== */
@media (max-width: 900px) {
  /* Feature 03: the visual comes first in the DOM (left column on desktop);
     once it stacks, push it after the text like features 01 and 02. */
  .feat3-visual { order: 1; }
  #features > div { gap: 88px !important; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  /* Section paddings use the reference's 24px inline; tighten to 20px. */
  #top > div, #features > div, #why, #faq, #download { padding-left: 20px !important; padding-right: 20px !important; }
  #top > div { padding-top: 40px !important; padding-bottom: 56px !important; gap: 48px !important; }
  #top > div > div:first-child { gap: 22px !important; }
  #features > div { padding-top: 64px !important; padding-bottom: 64px !important; gap: 72px !important; }
  #features > div > div { gap: 32px !important; }
  #why { padding-top: 64px !important; }
  #why > div:first-child { margin-bottom: 36px !important; }
  #faq { padding-top: 64px !important; padding-bottom: 64px !important; }
  #download { padding-bottom: 64px !important; }
  /* Demo panels: a bit less side padding so the content gets the width. */
  #features div[style*="padding: 36px 24px 28px"] { padding: 24px 12px 20px !important; gap: 20px !important; }
  [data-ref="calm"] { padding: 22px 12px !important; }
  .feat3-visual { padding: 20px 14px !important; }
  #why > div:last-child > div { padding: 26px 22px !important; }
  /* Phone demo: keep the fixed 300×612 frame, centered, no side overflow. */
  .phone-stage { min-height: 0 !important; }
}

@media (max-width: 480px) {
  .logo { height: 56px; margin: -12px 0 -12px -18px; }
  .header-row { padding-top: 10px; padding-bottom: 10px; }
  .site-nav { gap: 16px; }
  .site-nav .nav-link { display: none; }
  /* Fields stays visible on phones (10/13), shortened so it fits beside the CTA. */
  .site-nav .nav-fields { display: inline; color: var(--ink); white-space: nowrap; }
  .nav-fields .label-long { display: none; }
  .nav-fields .label-short { display: inline; }
  .nav-cta { height: 42px !important; padding: 0 16px !important; font-size: 14px; }
  /* Store buttons: two equal columns that still read as store badges. */
  .store-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; }
  .store-row a, #download a { padding: 0 16px !important; }
  #download > div > div { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; width: 100%; max-width: 400px; }
  .cap-row { gap: 12px 18px !important; }
  /* Talk / Text / Snap pills share the row evenly. */
  .cap-tabs { display: grid !important; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 8px !important; }
  .cap-tabs button { justify-content: center; padding: 0 10px !important; }
  /* Notify modal becomes a bottom sheet. */
  .notify-scrim { align-items: flex-end; padding: 0; }
  .notify-dialog { max-width: none; border-radius: 24px 24px 0 0; border-bottom: 0; padding: 36px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 92dvh; animation-name: gplSheet; animation-duration: 300ms; }
  /* FAQ rows breathe a little less. */
  #faq button[data-on-click="toggleFaq"] { font-size: 17px !important; }
}

/* Narrow phones (10/13): header holds logo + Fields + Get the app — trim so nothing squeezes. */
@media (max-width: 400px) {
  .logo { height: 48px; margin: -10px 0 -10px -15px; }
  .site-nav { gap: 12px; }
  .nav-cta { padding: 0 14px !important; height: 40px !important; }
  /* Very narrow (≈320px): let the logo give way, scaling evenly (object-fit). */
  .logo-link { min-width: 0; }
}


@media (max-width: 340px) {
  .store-row, #download > div > div { grid-template-columns: 1fr !important; }
}
@media (max-width: 370px) {
  .cap-tabs button svg { display: none; }
}

@media (max-width: 480px) {
  /* Calendar tiles: the full names ("Google Calendar") don't fit a 1/5-width
     tile on a phone, so phones show the short name, never broken mid-word. */
  .cal-name-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* still read by screen readers */
  .cal-name-short { display: inline; white-space: nowrap; font-size: 9.5px; letter-spacing: -0.01em; }
  .cal-tile { padding: 10px 1px 9px; gap: 6px; }
  .cal-logo { width: 30px; height: 30px; border-radius: 8px; }
}
@media (max-width: 359px) {
  .cal-name-short { font-size: 8.5px; }
}

/* Trial line in the notify modal. */
.notify-perk { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #246A4C; }
.notify-perk .i { color: #2E7D5B; }
