/* PunsiCare early access: base, navbar, hero card, forms, questions and the closing card. The product tour is in tour.css.
   Colours are the app's own tokens (src/theme/tokens.js), sampled from the logo. */
:root {
  --ink: #0D2B2A; --muted: #526763; --lake: #064E4E; --lake-deep: #043B3B; --lake-tint: #E6F2EC;
  --leaf: #45A876; --leaf-ink: #22724A; --mist: #F4F7F5; --sunk: #EAF0EC; --line: #DCE6E0; --paper: #FFFFFF;
  --danger: #B3261E; --on-lake: #E6F2EC; --on-lake-muted: #A9C7BD; --err-on-lake: #F2B8B5;
  --r-chip: 12px; --r-card: 18px; --r-sheet: 28px; --r-pill: 999px;
  --gutter: clamp(16px, 5vw, 56px); --max: 1180px; --inset: clamp(8px, 1.6vw, 20px);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --lake-gradient: radial-gradient(110% 130% at 12% 0%, #2c8a78 0%, rgba(44, 138, 120, 0) 55%), radial-gradient(90% 120% at 100% 100%, #012a2a 0%, rgba(1, 42, 42, 0) 60%), linear-gradient(135deg, #0b6b62 0%, #064E4E 55%, #043B3B 100%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.56 var(--font); color: var(--ink); background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--lake); color: var(--paper); padding: 10px 16px; border-radius: var(--r-chip); z-index: 30; }
.skip:focus { top: 12px; }
[id] { scroll-margin-top: 80px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background-color .15s, color .15s; white-space: nowrap; }
.btn-solid { background: var(--lake); color: var(--paper); }
.btn-solid:hover { background: var(--lake-deep); }
.btn-light { background: var(--paper); color: var(--lake); width: 100%; margin-top: 10px; }
.btn-light:hover { background: var(--lake-tint); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Navbar: fixed to the top while scrolling; a hairline appears once the page has moved (class set by app.js). */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; padding-top: env(safe-area-inset-top); }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.nav-logo { display: flex; border-radius: 8px; }
.nav .logo { width: 132px; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); color: var(--ink); font-weight: 500; text-decoration: none; }
.nav-links a:hover { background: var(--sunk); }
.btn-nav { min-height: 42px; padding: 0 18px; font-size: 15px; }
.nav-menu { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: var(--r-chip); cursor: pointer; position: relative; }
.nav-menu span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.nav-menu span:first-child { top: 17px; } .nav-menu span:last-child { top: 25px; }
.nav.open .nav-menu span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.open .nav-menu span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero: a deep-teal card with the headline and the sign-up, centred; the heartbeat runs along its foot. */
.hero-card { position: relative; margin: 0 var(--inset); border-radius: var(--r-sheet); background: var(--lake-gradient); color: var(--paper); overflow: hidden; text-align: center; }
.hero-inner { max-width: 900px; margin: 0 auto; padding: clamp(32px, min(8vw, 7vh), 96px) var(--gutter) clamp(48px, min(8vw, 8vh), 88px); } /* height-aware: short laptop screens get less top space */
h1 { text-wrap: balance; font-weight: 800; font-size: clamp(38px, min(6.2vw, 8.5vh), 74px); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 18px; }
.lede { font-size: clamp(17px, 1.7vw, 21px); color: var(--on-lake); max-width: 36em; margin: 0 auto 30px; text-wrap: balance; }
.hero-card .signup { max-width: 700px; margin: 0 auto; text-align: left; }
.hero-card .fine { text-align: center; color: var(--on-lake-muted); }
.hero-card .fine a { color: var(--paper); }
.hero-card .msg { color: var(--paper); text-align: center; }
.hero-card .msg.err { color: var(--err-on-lake); }
.pulse { position: absolute; left: 0; right: 0; bottom: 6px; width: 100%; height: 56px; pointer-events: none; }
.pulse path { fill: none; stroke: rgba(126, 214, 168, .55); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: draw 2.2s .3s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Dashes are in screen pixels here (non-scaling stroke), so 4000 covers the line on any screen up to about 3500px wide. */

/* Sign-up forms. The top form is one pill with two labelled fields; labels stay visible while typing. */
.signup .row { display: flex; align-items: stretch; padding: 6px; background: var(--paper); border-radius: var(--r-pill); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .55); }
.fld { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 18px; cursor: text; color: var(--ink); }
.fld + .fld { border-left: 1px solid var(--line); }
.fld span { font-size: 12px; font-weight: 700; color: var(--lake); line-height: 1.3; }
.fld input { border: 0; background: transparent; padding: 2px 0 0; font: 500 16px var(--font); color: var(--ink); min-width: 0; width: 100%; }
.fld input:focus { outline: none; }
.fld input::placeholder { color: #8A9B97; }
.fld:has(input[aria-invalid="true"]) span { color: var(--danger); }
.signup .row .btn { flex: none; align-self: center; }
.msg { min-height: 1.4em; margin: 10px 4px 0; font-weight: 500; font-size: 15px; }
.msg.err { color: var(--danger); }
.fine { margin: 2px 4px 0; font-size: 13px; color: var(--muted); }
.done { display: flex; gap: 14px; align-items: flex-start; max-width: 700px; margin: 0 auto; padding: 18px 20px; background: var(--lake-tint); border-radius: var(--r-card); color: var(--lake); text-align: left; }
.done strong { display: block; font-size: 17px; }
.done .tick { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--leaf); position: relative; }
.done .tick::after { content: ''; position: absolute; left: 10px; top: 6px; width: 6px; height: 12px; border: solid var(--paper); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.done:focus { outline: none; }
.done .share { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 8px 18px; border-radius: var(--r-pill); background: var(--lake); color: var(--paper); font-weight: 600; text-decoration: none; line-height: 1.3; }
.done .share-why { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); }
.done .share:hover { background: var(--lake-deep); }

/* One sentence that says what PunsiCare is, before the product tour. */
.intro { text-wrap: balance; text-align: center; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.45; color: var(--muted); max-width: 900px; padding-top: clamp(36px, min(7vw, 8vh), 88px); padding-bottom: clamp(8px, 2vw, 24px); margin: 0 auto; }
.intro em { font-style: normal; color: var(--lake); font-weight: 600; }

/* Questions: two columns of rows that open on tap. */
.faq { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); }
.faq h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); margin: 0 0 20px; text-align: center; }
.faq .items { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; font-weight: 600; font-size: 16px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-right: 6px; border: solid var(--lake); border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { margin: 0; padding: 0 32px 16px 0; color: var(--muted); }

/* Closing card: steps, the full form, and the footer, over a huge faint "Punsi" in Meitei Mayek. */
.close-card { position: relative; margin: 0 var(--inset) var(--inset); border-radius: var(--r-sheet); background: var(--lake-gradient); color: var(--on-lake); overflow: hidden; }
.close-inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: clamp(32px, 6vw, 88px); align-items: start; padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(32px, 5vw, 56px); }
.close-card h2 { color: var(--paper); font-weight: 800; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 22px; max-width: 12em; }
.mini-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 17px; color: var(--on-lake-muted); }
.mini-steps b { color: var(--paper); font-weight: 600; }
.mini-steps li::marker { color: var(--leaf); font-weight: 800; }
.close-card .wa { margin: 22px 0 0; }
.close-card .wa a { color: var(--paper); font-weight: 600; }
.full { display: flex; flex-direction: column; }
.full > label { font-weight: 600; font-size: 15px; color: var(--paper); margin: 14px 0 6px; }
.full .opt { font-weight: 400; color: var(--on-lake-muted); }
.full > input { min-height: 48px; padding: 0 14px; border-radius: var(--r-chip); border: 1px solid rgba(230, 242, 236, .28); background: rgba(255, 255, 255, .08); color: var(--paper); font: 500 16px var(--font); }
.full > input:focus { outline: none; border-color: var(--paper); background: rgba(255, 255, 255, .14); }
.full > input[aria-invalid="true"] { border-color: var(--err-on-lake); }
.full .msg { color: var(--paper); }
.full .msg.err { color: var(--err-on-lake); }
.roles { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.roles legend { font-weight: 600; font-size: 15px; color: var(--paper); margin-bottom: 8px; padding: 0; }
.roles label { cursor: pointer; }
.roles input { position: absolute; opacity: 0; }
.roles span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid rgba(230, 242, 236, .3); color: var(--on-lake); font-weight: 500; font-size: 15px; }
.roles input:checked + span { background: var(--paper); color: var(--lake); border-color: var(--paper); font-weight: 600; }
.roles input:focus-visible + span { outline: 3px solid var(--leaf); outline-offset: 2px; }
.watermark { position: absolute; left: 50%; bottom: -0.18em; transform: translateX(-50%); margin: 0; font: 700 clamp(140px, 26vw, 380px)/1 'Noto Sans Meetei Mayek', var(--font); color: rgba(255, 255, 255, .045); white-space: nowrap; pointer-events: none; }
.close-foot { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 20px var(--gutter) max(24px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--on-lake-muted); border-top: 1px solid rgba(230, 242, 236, .14); }
.close-foot p { margin: 0; }
.close-foot a { color: var(--on-lake); margin-left: 14px; }
.close-foot a:first-child { margin-left: 0; }
.close-foot span[lang] { font-family: 'Noto Sans Meetei Mayek', var(--font); color: var(--leaf); }

/* The top form stacks into a card once the pill gets too narrow for both fields. */
@media (max-width: 760px) {
  .signup .row { flex-direction: column; border-radius: var(--r-card); }
  .fld { padding: 10px 14px; flex: none; }
  .fld + .fld { border-left: 0; border-top: 1px solid var(--line); }
  .signup .row .btn { width: 100%; align-self: stretch; margin-top: 4px; }
}
@media (max-width: 960px) {
  .nav-menu { display: block; }
  .btn-nav { margin-left: auto; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 16px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgba(6, 78, 78, .5); }
  .nav.open .nav-links { display: flex; }
  .nav-links a { min-height: 48px; font-size: 17px; border-radius: var(--r-chip); }
  .close-inner { grid-template-columns: 1fr; }
  .faq .items { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav-inner { min-height: 58px; gap: 8px; }
  .nav .logo { width: 112px; }
  .btn-nav { padding: 0 14px; font-size: 14px; }
  [id] { scroll-margin-top: 70px; }
  .close-foot a { margin-left: 0; margin-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse path { animation: none; stroke-dashoffset: 0; }
}
