/* ==========================================================================
   VidyaSetu Foundation — Design System
   A modern, warm, trustworthy identity for an education nonprofit.
   ========================================================================== */

:root {
  /* Brand palette */
  --brand: #1f7a5c;          /* emerald — trust, growth */
  --brand-dark: #14543f;
  --brand-darker: #0e3a2c;
  --brand-soft: #e7f2ec;
  --accent: #f4a825;         /* saffron — warmth, optimism (donate) */
  --accent-dark: #d98a0e;
  --coral: #e2603b;          /* highlight */
  --ink: #14251f;            /* headings */
  --body: #47554f;           /* body text */
  --muted: #74807a;
  --cream: #fbf7ef;          /* alt section background */
  --cream-2: #f4efe4;
  --white: #ffffff;
  --line: #e7e3d8;

  /* Type */
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Fraunces', 'Georgia', serif;

  /* Shape & depth */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(20, 37, 31, 0.06);
  --shadow: 0 12px 30px rgba(20, 37, 31, 0.10);
  --shadow-lg: 0 24px 60px rgba(20, 37, 31, 0.16);
  --container: 1160px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1rem; }

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

/* ---------- Utility ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body);
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.section { padding: 92px 0; }
.section--cream { background: var(--cream); }
.section--brand { background: radial-gradient(120% 140% at 100% 0%, var(--brand-dark) 0%, var(--brand-darker) 60%); color: #d9e8e1; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: .6rem; }
.section-head p { font-size: 1.08rem; color: var(--muted); margin: 0; }
.text-accent { color: var(--accent); }
.text-brand { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 700; font-size: .98rem;
  cursor: pointer; border: 2px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(31,122,92,.28); }
.btn.primary:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 16px 32px rgba(31,122,92,.34); color:#fff; }
.btn.accent { background: var(--accent); color: #4a3200; box-shadow: 0 10px 24px rgba(244,168,37,.35); }
.btn.accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(244,168,37,.45); color:#4a3200; }
.btn.outline { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn.outline:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); color:#fff; }
.btn.ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn.lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn.block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line);
}
/* The frosted backdrop lives on a pseudo-element: a backdrop-filter on the
   header itself would make it the containing block for the fixed-position
   mobile drawer, collapsing the menu into the header strip. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 0; }
.logo { display: inline-flex; align-items: center; gap: .7rem; }
.logo:hover { color: inherit; }
.logo-mark { flex: none; width: 44px; height: 44px; }
.logo-text .site-title { font-family: var(--font-head); font-size: 1.4rem; line-height: 1; color: var(--ink); margin: 0; }
.logo-text .tagline { margin: 2px 0 0; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: .5rem .85rem; border-radius: var(--radius-pill);
  color: var(--ink); font-weight: 600; font-size: .95rem;
}
.main-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.main-nav a.is-active { color: var(--brand); }
.main-nav a.nav-cta { background: var(--accent); color: #4a3200; margin-left: .4rem; }
.main-nav a.nav-cta:hover { background: var(--accent-dark); color: #4a3200; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: #fff;
  border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 120% at 85% -10%, rgba(244,168,37,.16), transparent 55%),
    radial-gradient(80% 100% at 0% 100%, rgba(31,122,92,.10), transparent 60%),
    var(--cream);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 84px 0 92px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-size: .82rem; font-weight: 600; color: var(--brand-dark); box-shadow: var(--shadow-sm); margin-bottom: 1.4rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(31,122,92,.15); }
.hero-title { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.05; margin-bottom: 1rem; }
.hero-title em { font-style: normal; color: var(--brand); position: relative; }
.hero-lead { font-size: 1.18rem; color: var(--body); max-width: 34ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2rem; }
.hero-trust { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .9rem; }
.hero-trust .avatars { display: flex; }
.hero-trust .avatars span {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; margin-left: -10px;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700; color: #fff;
}
.hero-trust .avatars span:first-child { margin-left: 0; }

/* Hero visual (SVG illustration card) */
.hero-visual { position: relative; }
.hero-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 18px; border: 1px solid var(--line);
}
.hero-card .illus { width: 100%; height: clamp(300px, 34vw, 430px); object-fit: cover; border-radius: var(--radius); overflow: hidden; display: block; }
.hero-float {
  position: absolute; background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  padding: 14px 18px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
}
.hero-float .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.hero-float .fi svg { width: 22px; height: 22px; }
.hero-float .num { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--ink); line-height: 1; }
.hero-float .lbl { font-size: .78rem; color: var(--muted); }
.hero-float.one { top: 26px; left: -26px; }
.hero-float.two { bottom: 24px; right: -22px; }

/* ---------- Stats band ---------- */
.stats-band { background: var(--brand-darker); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 56px 0; }
.stat { text-align: center; padding: 8px; }
.stat .num { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); color: #fff; line-height: 1; }
.stat .num .text-accent { color: var(--accent); }
.stat .lbl { margin-top: .5rem; font-size: .95rem; color: rgba(255,255,255,.75); }
.stats-grid .stat + .stat { position: relative; }
.stats-grid .stat + .stat::before { content: ""; position: absolute; left: -14px; top: 15%; height: 70%; width: 1px; background: rgba(255,255,255,.14); }

/* ---------- Cards / Programs ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card .icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1.2rem; }
.card .icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.card p { margin: 0; color: var(--muted); }
.icon-emerald { background: var(--brand-soft); color: var(--brand); }
.icon-saffron { background: #fdf0d5; color: var(--accent-dark); }
.icon-coral { background: #fbe6df; color: var(--coral); }

/* ---------- Split / About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { position: relative; }
.split-media .frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background:#fff; }
.split-media .frame img { width: 100%; height: clamp(300px, 32vw, 420px); object-fit: cover; display: block; }
.check-list { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.check-list li { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; color: var(--body); }
.check-list .ck { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-top: 2px; }
.check-list .ck svg { width: 15px; height: 15px; }
.check-list strong { color: var(--ink); display: block; }

/* ---------- Donation tiers ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tier {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 30px; text-align: center; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.tier:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.tier.featured { border-color: var(--accent); box-shadow: 0 20px 44px rgba(244,168,37,.22); }
.tier .flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #4a3200; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .35rem .9rem; border-radius: var(--radius-pill); }
.tier .amount { font-family: var(--font-head); font-size: 2.4rem; color: var(--ink); line-height: 1; }
.tier .amount span { font-size: 1rem; color: var(--muted); font-family: var(--font-body); }
.tier .tier-name { font-weight: 700; color: var(--brand); margin: .4rem 0 1rem; }
.tier p { color: var(--muted); min-height: 48px; }

/* ---------- Testimonial ---------- */
.quote-card {
  max-width: 820px; margin: 0 auto; text-align: center;
}
.quote-mark { font-family: var(--font-head); font-size: 4rem; line-height: .5; color: var(--accent); }
.quote-card blockquote { font-family: var(--font-head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: #fff; line-height: 1.4; margin: 1rem 0 1.6rem; font-weight: 500; }
.section--brand .section-head h2 { color: #fff; }
.quote-author { display: flex; align-items: center; justify-content: center; gap: .8rem; color: #cfe0d8; }
.quote-author .qa-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color:#4a3200; display: grid; place-items: center; font-weight: 800; }
.quote-author strong { color: #fff; display: block; font-family: var(--font-body); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--radius-lg); padding: 56px; color: #eafaf3; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::after { content:""; position:absolute; inset:0; background: radial-gradient(60% 120% at 90% 10%, rgba(244,168,37,.25), transparent 55%); pointer-events:none; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); position: relative; }
.cta-band p { position: relative; max-width: 560px; margin: 0 auto 1.8rem; color: rgba(255,255,255,.88); font-size: 1.1rem; }
.cta-band .hero-actions { position: relative; justify-content: center; margin: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(80% 130% at 90% -20%, rgba(244,168,37,.14), transparent 55%),
    var(--cream);
  padding: 64px 0; border-bottom: 1px solid var(--line); text-align: center;
}
.page-hero .crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
.page-hero .crumbs a { color: var(--muted); }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.page-hero p { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: .4rem; font-size: .92rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 1rem; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31,122,92,.12);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.form-status.is-error { color: #e2603b !important; }

/* ---------- Info cards (contact) ---------- */
.info-card { display: flex; gap: 1rem; align-items: flex-start; background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.info-card .ii { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.info-card h4 { margin: 0 0 .2rem; font-family: var(--font-body); font-size: 1.05rem; color: var(--ink); }
.info-card p { margin: 0; color: var(--muted); }

/* ---------- Donate options ---------- */
.pay-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.pay-method { border:1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 1rem; background:#fff; display:flex; gap:1rem; align-items:flex-start; }
.pay-method .pm-icon { width:46px;height:46px;border-radius:12px;display:grid;place-items:center;flex:none;background:var(--brand-soft);color:var(--brand); }
.pay-method h4 { margin:0 0 .3rem; font-family:var(--font-body); font-size:1.05rem; color:var(--ink); }
.pay-method p { margin:0 0 .6rem; color:var(--muted); font-size:.92rem; }
.qr-card { text-align:center; background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.qr-card img { width: 200px; margin: 0 auto 1rem; border-radius: 12px; border:1px solid var(--line); }
.code-inline { background: var(--cream-2); padding: .1rem .4rem; border-radius: 6px; font-size: .88em; color: var(--brand-dark); font-family: ui-monospace, monospace; }

/* ---------- Gallery ---------- */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.photos .ph {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm); background: var(--brand-soft);
}
.photos .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.photos .ph:hover img { transform: scale(1.06); }
.photos .ph figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 14px; color: #fff; font-weight: 600; font-size: .95rem;
  background: linear-gradient(transparent, rgba(14,58,44,.82));
}

/* ---------- Partners strip ---------- */
.partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; opacity: .8; }
.partners span { font-family: var(--font-head); font-size: 1.3rem; color: var(--muted); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-darker); color: rgba(255,255,255,.72); padding: 72px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-brand .logo-text .site-title { color: #fff; }
.footer-brand p { margin: 1rem 0 1.2rem; max-width: 32ch; color: rgba(255,255,255,.6); }
.footer h5 { color: #fff; font-family: var(--font-body); font-size: 1rem; margin: 0 0 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: .6rem; }
.footer ul a { color: rgba(255,255,255,.7); }
.footer ul a:hover { color: var(--accent); }
.social { display: flex; gap: 10px; }
.social a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background .2s, transform .2s; }
.social a:hover { background: var(--accent); transform: translateY(-2px); }
.social a svg { width: 20px; height: 20px; }
.footer-news { display: flex; gap: 8px; margin-top: .8rem; }
.footer-news input { flex: 1; padding: .7rem .9rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; }
.footer-news input::placeholder { color: rgba(255,255,255,.5); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .88rem; color: rgba(255,255,255,.55); }
.footer-bottom a { color: rgba(255,255,255,.7); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile hardening ---------- */
/* Stop iOS inflating text in landscape, and keep long words/URLs from
   pushing the layout wider than the screen. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-wrap: break-word; -webkit-tap-highlight-color: rgba(31,122,92,.15); }
h1, h2, h3, h4 { overflow-wrap: break-word; }
.code-inline { overflow-wrap: anywhere; }
/* Grid and flex children default to a min-width of auto, so one long,
   unbreakable string (an email address, a URL) can push the whole layout
   wider than the screen. */
.grid > *, .split > *, .form-row > *, .tiers > *, .pay-grid > *,
.footer-top > *, .stats-grid > *, .photos > * { min-width: 0; }
.footer-news input, .hero-trust span, .info-card p, .pay-method p { min-width: 0; }
/* break-word alone does not shrink min-content width; anywhere does. */
.info-card p, .info-card a, .pay-method p, .qr-card p { overflow-wrap: anywhere; }
/* 16px keeps iOS Safari from zooming in when the field is focused. */
.footer-news input { font-family: inherit; font-size: 16px; }
/* Comfortable touch targets */
.nav-toggle, .footer-news button { touch-action: manipulation; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 64px; }
  .hero-lead { max-width: none; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .pay-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stats-grid .stat + .stat::before { display: none; }
  /* Once the hero stacks, the visual is full-width — pull the floating stat
     cards inside it so they no longer hang off the edge of the page. */
  .hero-float.one { top: 14px; left: 12px; }
  .hero-float.two { bottom: 14px; right: 12px; }
}

@media (max-width: 820px) {
  /* --- Mobile drawer --- */
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1;
    width: min(320px, 84vw); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
    background: #fff; padding: 88px 20px calc(20px + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-lg);
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    transform: translateX(100%); transition: transform .35s var(--ease);
  }
  .main-nav.open { transform: none; }
  .main-nav a { padding: .8rem 1rem; min-height: 44px; display: flex; align-items: center; }
  .main-nav a.nav-cta { margin-left: 0; justify-content: center; margin-top: .5rem; }
  /* Keep the hamburger tappable (to close) while the drawer covers the page. */
  .nav-toggle { display: inline-flex; position: relative; z-index: 2; }
  /* Dimmed backdrop behind the drawer, under the header (z-index 100). */
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 90;
    background: rgba(14,58,44,.45);
  }

  .grid-3, .grid-2, .tiers { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .cta-band { padding: 40px 24px; }
  .hero-float { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .page-hero { padding: 44px 0; }
  .section-head { margin-bottom: 36px; }
  .stats-grid { grid-template-columns: 1fr 1fr; padding: 40px 0; }
  .photos { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .logo-text .tagline { display: none; }

  /* Trim the generous desktop padding so content isn't squeezed into a column. */
  .card { padding: 24px; }
  .form-card { padding: 22px; }
  .tier { padding: 28px 22px; }
  .info-card, .pay-method { padding: 18px; }
  .qr-card { padding: 22px; }
  .cta-band { padding: 32px 20px; }
  .site-footer { padding-top: 52px; }

  .partners { gap: 20px 28px; }
  .partners span { font-size: 1.1rem; }
  .hero-trust { flex-wrap: wrap; }
  .tier p { min-height: 0; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  /* Long CTA labels can't stay on one line at this width. */
  .btn { white-space: normal; text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .cta-band .hero-actions .btn { width: 100%; }
  .photos { grid-template-columns: 1fr; }
  .qr-card img { width: 100%; max-width: 200px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Coarse pointers get no hover lift — it sticks after a tap. */
@media (hover: none) {
  .btn:hover, .card:hover, .tier:hover, .social a:hover { transform: none; }
  .photos .ph:hover img { transform: none; }
}

/* ---------- Founders ---------- */
/* Portraits are taller than the landscape crop .split-media uses by default. */
.split-media .frame img.founder-photo {
  width: 100%; height: auto; aspect-ratio: 4 / 5;
  object-fit: cover; object-position: 50% 18%;
  background: var(--brand-soft);
}
.founder-photo-wrap { max-width: 420px; }
.founder-role { color: var(--brand); font-weight: 700; margin-top: -.5rem; }
/* Alternate which side the portrait sits on, desktop only. */
.split-reverse .split-media { order: 2; }

@media (max-width: 980px) {
  /* Stacked: portrait sits above the copy again, and stays a sensible size. */
  .split-reverse .split-media { order: 0; }
  .founder-photo-wrap { max-width: 340px; margin-left: auto; margin-right: auto; }
  .split-media .frame img.founder-photo { aspect-ratio: 1 / 1; }
}
