/* Verge website. Colours and type match the app (lib/widgets/app_colors.dart). */
:root {
  --green: #1b4332;
  --green-light: #2d6a4f;
  --gold: #d4a853;
  --gold-text: #8a6a1f;
  --cream: #f8f6f0;
  --white: #ffffff;
  --text: rgba(0, 0, 0, 0.78);
  --muted: rgba(0, 0, 0, 0.56);
  --line: rgba(27, 67, 50, 0.12);
  --tint: rgba(27, 67, 50, 0.07);
  --error: #b3261e;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(27, 67, 50, 0.12);
  --gutter: 16px;
  --max: 1120px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--green); }
a:hover { color: var(--green-light); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--green); color: var(--white); padding: 8px 14px; border-radius: 10px;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 246, 240, 0.9);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-mark { width: 32px; height: 32px; flex: none; display: block; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--green); cursor: pointer;
}
.nav-links {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  flex-direction: column; gap: 4px; padding: 12px var(--gutter) 20px;
  background: var(--cream); border-bottom: 1px solid var(--line);
}
.nav-links.open { display: flex; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--text); }
/* :not(.btn) so the waitlist button keeps its own padding. */
.nav-links a:not(.btn) { padding: 10px 4px; }
.nav-links .btn { margin-top: 8px; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; position: static; flex-direction: row; align-items: center; gap: 28px; padding: 0; background: none; border: 0; }
  .nav-links a:not(.btn) { padding: 0; }
  .nav-links .btn { margin-top: 0; }
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--green); color: var(--white) !important; text-decoration: none;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--green-light); transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }

.waitlist { width: 100%; max-width: 480px; }
.waitlist-row { display: flex; flex-direction: column; gap: 10px; }
.waitlist input[type='email'] {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 18px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--white);
  font: inherit; font-size: 16px; color: var(--text);
}
.waitlist input[type='email']:focus { outline: none; border-color: var(--green-light); box-shadow: 0 0 0 4px var(--tint); }
/* The label never wraps or overflows; the email box gives way instead. */
.waitlist .btn { min-height: 52px; flex-shrink: 0; white-space: nowrap; }
.waitlist .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 10px 4px 0; font-size: 13px; color: var(--muted); }
.form-status { min-height: 1.5em; margin: 8px 4px 0; font-size: 14px; font-weight: 600; }
.form-status[data-kind='success'] { color: var(--green-light); }
.form-status[data-kind='error'] { color: var(--error); }
.tester-offer { margin-top: 12px; padding: 16px 18px; border-radius: 16px; background: var(--tint); text-align: left; }
.waitlist .tester-offer p { margin: 0 0 12px; max-width: none; font-size: 14px; color: var(--text); }
.waitlist .tester-offer strong { color: var(--green); }
.waitlist .tester-offer .form-status { margin: 8px 0 0; }
.waitlist .tester-offer .form-status:empty { display: none; }

@media (min-width: 520px) {
  .waitlist-row { flex-direction: row; }
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 56px; }
.hero .container { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 80px 0 96px; }
  .hero .container { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--tint); color: var(--green); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

h1, h2, h3 { color: var(--green); line-height: 1.15; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(36px, 7vw, 60px); font-weight: 800; margin: 18px 0 18px; }
h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
.lead { font-size: clamp(17px, 2.2vw, 19px); color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.hero h1 em { font-style: normal; color: var(--green-light); background: linear-gradient(transparent 62%, rgba(212, 168, 83, 0.45) 62%); }

/* ---------- Phone mockup ---------- */
.phone {
  width: min(320px, 86vw); margin: 0 auto; padding: 14px; border-radius: 44px;
  background: #101614; box-shadow: var(--shadow), inset 0 0 0 2px #2b332f;
}
.phone-screen { border-radius: 32px; background: var(--cream); padding: 18px 16px 22px; overflow: hidden; }
.phone-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.phone-top small { display: block; font-size: 11px; color: var(--muted); }
.phone-top strong { font-size: 17px; color: var(--green); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.sts-card { background: var(--green); color: var(--white); border-radius: 22px; padding: 18px; }
.sts-card small { font-size: 12px; opacity: 0.8; }
.sts-amount { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 2px; }
.sts-amount span { font-size: 18px; font-weight: 600; opacity: 0.85; }
.sts-meta { font-size: 12px; opacity: 0.85; }
.sts-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); margin: 14px 0 6px; overflow: hidden; }
.sts-bar i { display: block; height: 100%; width: 38%; background: var(--gold); border-radius: 99px; }
.mini-card { background: var(--white); border-radius: 18px; padding: 12px 14px; margin-top: 12px; }
.mini-card h4 { margin: 0 0 6px; font-size: 13px; color: var(--green); }
.mini-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; padding: 6px 0; border-top: 1px solid var(--line); }
.mini-row:first-of-type { border-top: 0; }
.mini-row b { color: var(--text); }
.pill { font-size: 11px; font-weight: 700; color: var(--white); background: var(--green); padding: 3px 10px; border-radius: 99px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
@media (min-width: 900px) { section { padding: 96px 0; } }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 14px 0 0; }

.trust { background: var(--green); color: rgba(255, 255, 255, 0.86); }
.trust h2 { color: var(--white); }
.trust .section-head p { color: rgba(255, 255, 255, 0.75); }
.trust-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); padding: 22px; }
.trust-item h3 { color: var(--white); margin-bottom: 8px; }
.trust-item p { margin: 0; }
.trust-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(212, 168, 83, 0.2); color: var(--gold); display: grid; place-items: center; margin-bottom: 14px; }

.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--white); border-radius: var(--radius); padding: 24px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--tint); color: var(--green); font-weight: 800; margin-bottom: 14px;
}
.step p { margin: 8px 0 0; color: var(--muted); }

.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid transparent; transition: border-color 0.2s ease; }
.feature:hover { border-color: var(--line); }
.feature-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--green); display: grid; place-items: center; margin-bottom: 14px; }
.feature p { margin: 8px 0 0; color: var(--muted); }

.ghana { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .ghana { grid-template-columns: 1fr 1fr; gap: 56px; } }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 38px; }
.check-list li::before {
  content: '✓'; position: absolute; left: 0; top: 2px;
  display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--gold); color: var(--white); font-weight: 800; font-size: 13px;
}
.quote-card { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.quote-card p { font-size: 18px; color: var(--green); font-weight: 600; margin: 0 0 14px; }
.quote-card small { color: var(--muted); }

.faq { max-width: 780px; }
.faq details { background: var(--white); border-radius: 16px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--green); padding: 16px 28px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 12px; font-size: 22px; color: var(--green-light); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.faq details p strong { color: var(--green); }

.cta-band { background: var(--white); border-radius: 32px; padding: 40px 24px; text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--muted); margin: 0 auto 24px; max-width: 32em; }
.cta-band .waitlist { margin: 0 auto; text-align: left; }
@media (min-width: 720px) { .cta-band { padding: 64px 48px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 14px; color: var(--muted); }
.site-footer .container { display: grid; gap: 20px; }
@media (min-width: 760px) { .site-footer .container { grid-template-columns: 1fr auto; align-items: center; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--green); }

/* ---------- Legal pages ---------- */
.legal { padding: 40px 0 72px; }
/* Centred on wide screens; full width on phones. */
.legal article { max-width: 760px; margin: 0 auto; background: var(--white); border-radius: 24px; padding: 28px 22px; }
@media (min-width: 720px) { .legal article { padding: 48px 56px; } }
.legal h1 { font-size: clamp(30px, 5vw, 42px); margin: 0 0 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.legal h2 { font-size: 22px; margin: 36px 0 10px; }
.legal h3 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.callout { background: var(--tint); border-radius: 16px; padding: 18px 20px; margin: 20px 0; }
.callout p { margin: 0; }
.callout strong { color: var(--green); }
/* Numbered steps. The number is positioned, not a grid column: a grid would
   split text and <strong> into separate cells that overlap. */
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 16px 0; }
.steps-list li { counter-increment: s; position: relative; padding-left: 44px; min-height: 30px; margin-bottom: 14px; }
.steps-list li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green); color: var(--white); font-weight: 700; font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Two-column panels (planning, accuracy, Android) ---------- */
.split { display: grid; gap: 16px; }
.split-center { gap: 32px; align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-center { gap: 56px; }
}
.panel { background: var(--white); border-radius: var(--radius); padding: 26px; }
.panel h3 { margin: 10px 0 16px; }
.panel-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-text); }
.panel-dark { background: var(--green); color: rgba(255, 255, 255, 0.86); }
.panel-dark h3 { color: var(--white); }
.panel-dark .panel-tag { color: var(--gold); }
.check-list strong { color: var(--green); }
.panel-dark .check-list strong { color: var(--white); }

.footer-contact { margin-top: 6px; }
.footer-contact a { color: var(--green); font-weight: 600; word-break: break-all; }

/* "How did you hear about Verge?": optional chips under the email box.
   Hidden until the person starts on their email, then they slide in. */
.form-extra {
  max-height: 0; opacity: 0; overflow: hidden; visibility: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
}
.form-extra.show { max-height: 360px; opacity: 1; visibility: visible; margin-top: 16px; }
.chip-group { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.chip-group legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--green); }
.chip-group legend span {
  margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--tint);
  font-size: 11px; font-weight: 600; color: var(--muted); vertical-align: 1px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--white); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.chip:hover { border-color: var(--green-light); color: var(--green); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed='true'] { background: var(--green); border-color: var(--green); color: var(--white); }
.chip[aria-pressed='true']::before { content: '✓ '; color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .form-extra, .chip { transition: none; }
}

/* ---------- Living gradients (subtle, slow; off for reduced motion) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 46% at 18% 30%, rgba(45, 106, 79, 0.16), transparent 70%),
    radial-gradient(32% 40% at 82% 22%, rgba(212, 168, 83, 0.22), transparent 70%),
    radial-gradient(42% 50% at 62% 88%, rgba(27, 67, 50, 0.10), transparent 70%);
  animation: verge-drift 20s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes verge-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(3%, -2%, 0) rotate(5deg); }
  100% { transform: translate3d(-3%, 2%, 0) rotate(-4deg); }
}

.sts-card {
  background: linear-gradient(120deg, #1b4332 0%, #2d6a4f 35%, #1f5139 65%, #1b4332 100%);
  background-size: 300% 300%;
  animation: verge-sweep 14s ease-in-out infinite;
}
@keyframes verge-sweep {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, .sts-card { animation: none; }
}
