// Marketing site sections — composes the entire page.

const { PhoneFrame, PhoneHome, PhoneHistory, PhoneInsights, BrowserFrame, DashboardMock, useIsMobile } = window;
const { ChevronDown, ChevronRight, Check, ArrowLeft } = window.Icons;

// TestFlight beta — the app isn't on the App Store yet ("Soon").
const TESTFLIGHT_URL = 'https://testflight.apple.com/join/gY9sKr7g';

// ─── Wordmark + Logo Mark ────────────────────────────────────
function OonaLogo({ height = 28, color, accentColor = '#EBC39E', showMark = true }) {
  const fg = color || 'var(--oona-primary)';
  return (
    <div style={{ display: 'inline-flex', alignItems: 'center', gap: 12 }}>
      {showMark && (
        <svg viewBox="0 0 80 64" style={{ height: height, width: height * 80/64, display: 'block' }}>
          <circle cx="26" cy="30" r="22" fill={fg}/>
          <circle cx="58" cy="40" r="14" fill={accentColor}/>
        </svg>
      )}
      <span style={{
        fontFamily: '"Newsreader", "Iowan Old Style", Georgia, serif',
        fontWeight: 500, fontSize: height * 1.15, lineHeight: 1, letterSpacing: '-0.04em',
        color: fg,
      }}>oona</span>
    </div>
  );
}

// ─── HEADER ──────────────────────────────────────────────────
function Header() {
  const mobile = useIsMobile();
  return (
    <header style={{
      position: 'sticky', top: 0, zIndex: 50,
      background: 'rgba(245,238,231,0.85)', backdropFilter: 'blur(14px)',
      WebkitBackdropFilter: 'blur(14px)', borderBottom: '1px solid rgba(216,202,190,0.5)',
    }}>
      <div style={{
        maxWidth: 1280, margin: '0 auto', padding: mobile ? '12px 20px' : '16px 40px',
        display: 'flex', alignItems: 'center', justifyContent: 'space-between',
      }}>
        <OonaLogo height={mobile ? 24 : 28}/>
        {!mobile && (
          <nav style={{ display: 'flex', gap: 32, font: '500 14px/1 "DM Sans"' }}>
            <a href="#app"       style={navLink}>The app</a>
            <a href="#dashboard" style={navLink}>The dashboard</a>
            <a href="#family"    style={navLink}>Shared care</a>
            <a href="#faq"       style={navLink}>FAQ</a>
          </nav>
        )}
        <div style={{ display: 'flex', gap: mobile ? 10 : 14, alignItems: 'center' }}>
          {!mobile && <a href="https://dashboard.oonaapp.co.uk" style={{ ...navLink, color: 'var(--fg-1)' }}>Sign in</a>}
          <a href={TESTFLIGHT_URL} target="_blank" rel="noopener noreferrer" style={{
            font: '600 14px/1 "DM Sans"', background: 'var(--oona-primary)',
            color: 'var(--oona-text-on-primary)', padding: '11px 18px', borderRadius: 14,
            textDecoration: 'none', display: 'inline-flex', alignItems: 'center', gap: 10,
          }}>
            Get the app
            <span style={{
              font: '600 10px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.08em',
              background: '#EBC39E', color: '#5F567A',
              padding: '4px 8px', borderRadius: 999,
            }}>Soon</span>
          </a>
        </div>
      </div>
    </header>
  );
}
const navLink = { color: 'var(--fg-2)', textDecoration: 'none' };

// ─── HERO ────────────────────────────────────────────────────
function Hero() {
  const mobile = useIsMobile();
  return (
    <section style={{ position: 'relative', overflow: 'hidden' }}>
      {/* Soft decorative illustrations */}
      <img src="assets/illustration-cloud.svg" alt="" style={{ position: 'absolute', top: 60, left: 80, width: 140, opacity: 0.55, pointerEvents: 'none', display: mobile ? 'none' : 'block' }}/>
      <img src="assets/illustration-stars.svg" alt="" style={{ position: 'absolute', top: 140, right: 100, width: 110, opacity: 0.5, pointerEvents: 'none', display: mobile ? 'none' : 'block' }}/>
      <img src="assets/illustration-leaf.svg"  alt="" style={{ position: 'absolute', bottom: 100, left: 60, width: 150, opacity: 0.45, pointerEvents: 'none', display: mobile ? 'none' : 'block' }}/>

      <div style={{ maxWidth: 1280, margin: '0 auto', padding: mobile ? '48px 20px 40px' : '88px 40px 64px', display: 'grid', gridTemplateColumns: mobile ? '1fr' : '1.1fr 1fr', gap: mobile ? 40 : 60, alignItems: 'center', position: 'relative' }}>
        <div>
          <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.12em', color: 'var(--fg-2)', marginBottom: mobile ? 20 : 28 }}>
            For parents, partners and grandparents
          </div>
          <h1 style={{
            font: mobile ? '500 40px/1.08 "Newsreader",serif' : '500 88px/1.02 "Newsreader",serif',
            color: 'var(--fg-1)',
            letterSpacing: '-0.025em', margin: 0, maxWidth: 640,
          }}>
            A quieter baby tracker. Built for the whole family.
          </h1>
          <p style={{
            font: mobile ? '400 16px/1.55 "DM Sans"' : '400 19px/1.55 "DM Sans"', color: 'var(--fg-2)', marginTop: mobile ? 20 : 28, maxWidth: 540,
          }}>
            Log feeds, sleep, nappies and notes in one tap — at 3am, with one hand. Then catch up on the dashboard with a coffee. Everyone caring for your baby, on the same page.
          </p>
          <div style={{ display: 'flex', gap: 14, marginTop: 36, flexWrap: 'wrap', alignItems: 'center' }}>
            <a href={TESTFLIGHT_URL} target="_blank" rel="noopener noreferrer" style={ctaPrimary}>
              Download for iOS
              <span style={comingSoonBadge}>Soon</span>
            </a>
            <a href="#dashboard" style={ctaSecondary}>See the dashboard ›</a>
          </div>
          <div style={{ marginTop: 36, font: '400 13px/1.5 "DM Sans"', color: 'var(--fg-3)' }}>
            Designed in Britain · No ads, ever
          </div>
        </div>

        {/* Phone hero */}
        <div style={{ position: 'relative', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
          {/* Soft moon behind */}
          <img src="assets/illustration-moon.svg" alt="" style={{
            position: 'absolute', top: -40, right: -30, width: mobile ? 180 : 280, opacity: 0.6,
          }}/>
          <div style={{ position: 'relative', transform: 'rotate(-3deg)' }}>
            <PhoneFrame scale={mobile ? 0.78 : 0.85}>
              <PhoneHome/>
            </PhoneFrame>
          </div>
        </div>
      </div>
    </section>
  );
}
const ctaPrimary = {
  font: '600 15px/1 "DM Sans"', background: 'var(--oona-primary)',
  color: 'var(--oona-text-on-primary)', padding: '16px 22px', borderRadius: 14,
  textDecoration: 'none',
  display: 'inline-flex', alignItems: 'center', gap: 12,
  boxShadow: '0 8px 22px rgba(126,115,159,0.30)',
};
const ctaSecondary = {
  font: '600 15px/1 "DM Sans"', background: 'transparent',
  color: 'var(--oona-primary)', padding: '16px 8px', borderRadius: 14,
  textDecoration: 'none',
};
const comingSoonBadge = {
  font: '600 11px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.1em',
  background: '#EBC39E', color: '#5F567A',
  padding: '5px 9px', borderRadius: 999,
};

// ─── PROOF STRIP ─────────────────────────────────────────────
function ProofStrip() {
  const mobile = useIsMobile();
  const cols = mobile ? 2 : 4;
  const items = [
    { ill: 'bottle', text: 'One-tap logging' },
    { ill: 'moon',   text: 'Auto sleep timer' },
    { ill: 'family', text: 'Shared with anyone' },
    { ill: 'leaf',   text: 'No ads, ever' },
  ];
  return (
    <div style={{ maxWidth: 1280, margin: '0 auto', padding: mobile ? '12px 20px 44px' : '20px 40px 60px' }}>
      <div style={{
        display: 'grid', gridTemplateColumns: `repeat(${cols}, 1fr)`, gap: mobile ? '18px 0' : 0,
        borderTop: '1px solid var(--border-1)', borderBottom: '1px solid var(--border-1)',
        padding: '24px 0',
      }}>
        {items.map((it, i) => (
          <div key={i} style={{
            display: 'flex', alignItems: 'center', gap: 14,
            padding: (i % cols) ? '0 24px' : '0 24px 0 0',
            borderLeft: (i % cols) ? '1px solid var(--border-1)' : 0,
          }}>
            <img src={`assets/illustration-${it.ill}.svg`} alt="" style={{ width: 44, height: 44, flexShrink: 0 }}/>
            <span style={{ font: '500 15px/1.3 "DM Sans"', color: 'var(--fg-1)' }}>{it.text}</span>
          </div>
        ))}
      </div>
    </div>
  );
}

// ─── APP SECTION ─────────────────────────────────────────────
function AppSection() {
  const mobile = useIsMobile();
  const features = [
    { title: 'One tap. Right where your thumb is.',     body: 'Quick-start tiles for Feed, Sleep, Pump and Nappy live on the Today screen. Tap once to start a timer — tap again to log the details.' },
    { title: 'Live timers that don\'t need babysitting.',body: 'Start a feed, switch sides, pause for winding — the timer keeps running in the background until you tap to end it.' },
    { title: 'Today, then the rest.',   body: 'Today is the only screen you need most of the time. History, Insights and Family sit on the Liquid Glass tab bar, one tap away.' },
    { title: 'A note when you need it.', body: 'Capture milestones the same way you log feeds. "First giggle today." Tap, type, done — and it\'s encrypted at rest.' },
  ];
  return (
    <section id="app" style={{ background: 'var(--bg-card)', padding: mobile ? '72px 0 64px' : '120px 0 100px', position: 'relative', overflow: 'hidden' }}>
      <img src="assets/illustration-cloud.svg" alt="" style={{ position: 'absolute', top: 80, left: 60, width: 120, opacity: 0.35, display: mobile ? 'none' : 'block' }}/>
      <img src="assets/illustration-bird.svg"  alt="" style={{ position: 'absolute', bottom: 80, right: 100, width: 110, opacity: 0.35, display: mobile ? 'none' : 'block' }}/>

      <div style={{ maxWidth: 1280, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px' }}>
        <div style={{ maxWidth: 720, marginBottom: mobile ? 48 : 80 }}>
          <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.12em', color: 'var(--fg-2)', marginBottom: 20 }}>
            The app
          </div>
          <h2 style={{
            font: mobile ? '500 38px/1.08 "Newsreader",serif' : '500 64px/1.05 "Newsreader",serif',
            color: 'var(--fg-1)',
            letterSpacing: '-0.02em', margin: 0,
          }}>
            For one-handed <em style={{ color: 'var(--oona-primary)', fontStyle: 'italic' }}>3ams.</em>
          </h2>
          <p style={{ font: '400 18px/1.55 "DM Sans"', color: 'var(--fg-2)', marginTop: 22, maxWidth: 560 }}>
            The whole app is designed around the thumb that's free. No menus, no settings buried three taps deep — just the thing you need to log, right where you expect it.
          </p>
        </div>

        {/* Three phones */}
        <div style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', gap: mobile ? 24 : 32, marginBottom: mobile ? 60 : 100, position: 'relative' }}>
          <div style={{ transform: 'rotate(-4deg) translateY(20px)' }}>
            <PhoneFrame scale={0.75}>
              <PhoneHistory/>
            </PhoneFrame>
            <div style={{ font: '500 12px/1 "DM Sans"', color: 'var(--fg-2)', textAlign: 'center', marginTop: 18, textTransform: 'uppercase', letterSpacing: '0.1em' }}>History</div>
          </div>
          <div style={{ zIndex: 2 }}>
            <PhoneFrame scale={0.82}>
              <PhoneHome/>
            </PhoneFrame>
            <div style={{ font: '600 12px/1 "DM Sans"', color: 'var(--oona-primary)', textAlign: 'center', marginTop: 18, textTransform: 'uppercase', letterSpacing: '0.1em' }}>Today</div>
          </div>
          <div style={{ transform: 'rotate(4deg) translateY(20px)' }}>
            <PhoneFrame scale={0.75}>
              <PhoneInsights/>
            </PhoneFrame>
            <div style={{ font: '500 12px/1 "DM Sans"', color: 'var(--fg-2)', textAlign: 'center', marginTop: 18, textTransform: 'uppercase', letterSpacing: '0.1em' }}>Insights</div>
          </div>
        </div>

        {/* Feature grid */}
        <div style={{ display: 'grid', gridTemplateColumns: mobile ? '1fr' : 'repeat(2, 1fr)', gap: mobile ? 28 : 40, maxWidth: 920, margin: '0 auto' }}>
          {features.map((f, i) => (
            <div key={i} style={{ paddingTop: 24, borderTop: '1px solid var(--border-1)' }}>
              <div style={{ font: '500 22px/1.25 "Newsreader",serif', color: 'var(--fg-1)', letterSpacing: '-0.01em' }}>{f.title}</div>
              <p style={{ font: '400 15px/1.55 "DM Sans"', color: 'var(--fg-2)', marginTop: 10 }}>{f.body}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── DASHBOARD SECTION ───────────────────────────────────────
function DashboardSection() {
  const mobile = useIsMobile();
  const features = [
    { title: 'Patterns, not numbers.',  body: 'Sleep curves, feed rhythms, nappy counts — laid out like a journal so you can read them, not parse them.' },
    { title: 'Caregiver activity.',     body: 'See who logged what, when. Helpful for handovers, even more helpful for splitting the night.' },
    { title: 'Growth in context.',      body: 'Weight, height and milestones plotted gently — never in a way that makes you feel behind.' },
    { title: 'Export for the GP.',      body: 'One tap and you have a clean PDF of the last fortnight to bring to the surgery.' },
  ];

  return (
    <section id="dashboard" style={{ padding: mobile ? '72px 0 64px' : '120px 0 100px', background: 'var(--bg-app)', position: 'relative', overflow: 'hidden' }}>
      <img src="assets/illustration-sun.svg" alt="" style={{ position: 'absolute', top: 100, right: 80, width: 120, opacity: 0.4, display: mobile ? 'none' : 'block' }}/>
      <img src="assets/illustration-tea.svg" alt="" style={{ position: 'absolute', bottom: 100, left: 80, width: 130, opacity: 0.4, display: mobile ? 'none' : 'block' }}/>

      <div style={{ maxWidth: 1280, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px' }}>
        <div style={{ maxWidth: 720, marginBottom: mobile ? 44 : 60 }}>
          <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.12em', color: 'var(--fg-2)', marginBottom: 20 }}>
            The dashboard
          </div>
          <h2 style={{
            font: mobile ? '500 38px/1.08 "Newsreader",serif' : '500 64px/1.05 "Newsreader",serif',
            color: 'var(--fg-1)',
            letterSpacing: '-0.02em', margin: 0,
          }}>
            For slow <em style={{ color: 'var(--oona-primary)', fontStyle: 'italic' }}>Sunday mornings.</em>
          </h2>
          <p style={{ font: '400 18px/1.55 "DM Sans"', color: 'var(--fg-2)', marginTop: 22, maxWidth: 560 }}>
            When you've got both hands and a hot drink, the dashboard at <strong style={{ color: 'var(--fg-1)', fontWeight: 600 }}>dashboard.oonapp.co.uk</strong> turns a week of logs into something worth reading.
          </p>
        </div>

        {/* Browser frame with dashboard */}
        <div style={{ maxWidth: 1100, margin: '0 auto 80px' }}>
          <BrowserFrame url="dashboard.oonapp.co.uk">
            <DashboardMock/>
          </BrowserFrame>
        </div>

        {/* Feature grid */}
        <div style={{ display: 'grid', gridTemplateColumns: mobile ? '1fr' : 'repeat(2, 1fr)', gap: mobile ? 28 : 40, maxWidth: 920, margin: '0 auto' }}>
          {features.map((f, i) => (
            <div key={i} style={{ paddingTop: 24, borderTop: '1px solid var(--border-1)' }}>
              <div style={{ font: '500 22px/1.25 "Newsreader",serif', color: 'var(--fg-1)', letterSpacing: '-0.01em' }}>{f.title}</div>
              <p style={{ font: '400 15px/1.55 "DM Sans"', color: 'var(--fg-2)', marginTop: 10 }}>{f.body}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── SHARED CARE ─────────────────────────────────────────────
function SharedCareSection() {
  const mobile = useIsMobile();
  const people = [
    { i: 'M', name: 'Mum',       role: 'Primary parent', access: 'Full access',                       color: '#7E739F' },
    { i: 'D', name: 'Dad',       role: 'Parent',         access: 'Full access',                       color: '#EBC39E' },
    { i: 'G', name: 'Granny',    role: 'Family',         access: 'Feeds, sleep, nappies',             color: '#B8BEAA' },
    { i: 'N', name: 'Nanny Lou', role: 'Carer',          access: 'Logging only',                      color: '#D9B7C6' },
  ];
  return (
    <section id="family" style={{ background: 'var(--oona-primary)', color: 'var(--oona-text-on-primary)', padding: mobile ? '72px 0 68px' : '120px 0 110px', position: 'relative', overflow: 'hidden' }}>
      <img src="assets/illustration-hands.svg"  alt="" style={{ position: 'absolute', top: 60, right: -40, width: 240, opacity: 0.15, display: mobile ? 'none' : 'block' }}/>
      <img src="assets/illustration-flower.svg" alt="" style={{ position: 'absolute', bottom: 60, left: -30, width: 200, opacity: 0.12, display: mobile ? 'none' : 'block' }}/>

      <div style={{ maxWidth: 1280, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px', position: 'relative' }}>
        <div style={{ maxWidth: 720, marginBottom: mobile ? 48 : 70 }}>
          <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.12em', color: 'rgba(255,249,244,0.7)', marginBottom: 20 }}>
            Shared care
          </div>
          <h2 style={{
            font: mobile ? '500 38px/1.08 "Newsreader",serif' : '500 64px/1.05 "Newsreader",serif',
            color: 'inherit',
            letterSpacing: '-0.02em', margin: 0,
          }}>
            It's not <em style={{ color: '#EBC39E', fontStyle: 'italic' }}>your</em> tracker. It's everyone's.
          </h2>
          <p style={{ font: '400 18px/1.55 "DM Sans"', color: 'rgba(255,249,244,0.8)', marginTop: 22, maxWidth: 600 }}>
            Add your partner, your mum, the nanny — anyone caring for your baby. Each person gets a role with the right access, so Granny can log a feed without seeing your private notes.
          </p>
        </div>

        <div style={{ display: 'grid', gridTemplateColumns: mobile ? 'repeat(2, 1fr)' : 'repeat(4, 1fr)', gap: mobile ? 14 : 20 }}>
          {people.map(p => (
            <div key={p.i} style={{
              background: 'rgba(255,249,244,0.10)', borderRadius: 20, padding: 24,
              border: '1px solid rgba(255,249,244,0.15)',
              backdropFilter: 'blur(10px)', WebkitBackdropFilter: 'blur(10px)',
            }}>
              <div style={{
                width: 52, height: 52, borderRadius: 999, background: p.color,
                color: '#FFF9F4', font: '600 22px/1 "Newsreader",serif',
                display: 'flex', alignItems: 'center', justifyContent: 'center',
                boxShadow: '0 0 0 3px var(--oona-primary), 0 0 0 4px ' + p.color,
                marginBottom: 18,
              }}>{p.i}</div>
              <div style={{ font: '500 20px/1.2 "Newsreader",serif' }}>{p.name}</div>
              <div style={{ font: '400 12px/1.3 "DM Sans"', color: 'rgba(255,249,244,0.7)', marginTop: 4 }}>{p.role}</div>
              <div style={{ marginTop: 18, padding: '8px 12px', background: 'rgba(255,249,244,0.10)', borderRadius: 10, font: '500 12px/1.3 "DM Sans"' }}>{p.access}</div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── FEATURES GRID ───────────────────────────────────────────
function FeaturesGrid() {
  const mobile = useIsMobile();
  const features = [
    { ill: 'bottle',   t: 'Feeds',      d: 'Bottle, breast or solids. Switch sides without stopping the timer.' },
    { ill: 'moon',     t: 'Sleep',      d: 'Track naps and nights. The dashboard reveals patterns over weeks.' },
    { ill: 'nappy',    t: 'Nappies',    d: 'Wet, dirty or mixed — counted, tagged, never lost.' },
    { ill: 'pump',     t: 'Pumping',    d: 'Volume, side, duration. Build up a freezer log over months.' },
    { ill: 'star',     t: 'Milestones', d: 'Capture firsts the same way you log a feed. They stay in the journal.' },
    { ill: 'scale',    t: 'Growth',     d: 'Weight and height plotted gently — never in a way that worries.' },
  ];
  return (
    <section style={{ padding: mobile ? '72px 0' : '120px 0', background: 'var(--bg-app)' }}>
      <div style={{ maxWidth: 1280, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px' }}>
        <div style={{ maxWidth: 720, marginBottom: mobile ? 44 : 64 }}>
          <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.12em', color: 'var(--fg-2)', marginBottom: 20 }}>
            Everything you'd want to log
          </div>
          <h2 style={{
            font: mobile ? '500 34px/1.1 "Newsreader",serif' : '500 56px/1.05 "Newsreader",serif',
            color: 'var(--fg-1)',
            letterSpacing: '-0.02em', margin: 0,
          }}>
            And nothing you wouldn't.
          </h2>
        </div>

        <div style={{ display: 'grid', gridTemplateColumns: mobile ? 'repeat(2, 1fr)' : 'repeat(3, 1fr)', gap: mobile ? 14 : 24 }}>
          {features.map((f, i) => (
            <div key={i} style={{
              background: 'var(--bg-card)', borderRadius: 24, padding: mobile ? 20 : 28,
              boxShadow: 'var(--shadow-1)',
            }}>
              <img src={`assets/illustration-${f.ill}.svg`} alt="" style={{ width: mobile ? 56 : 72, height: mobile ? 56 : 72 }}/>
              <div style={{ font: '500 22px/1.25 "Newsreader",serif', color: 'var(--fg-1)', marginTop: 18, letterSpacing: '-0.01em' }}>{f.t}</div>
              <p style={{ font: '400 14px/1.55 "DM Sans"', color: 'var(--fg-2)', marginTop: 10 }}>{f.d}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── QUOTE / TESTIMONIAL ─────────────────────────────────────
function QuoteSection() {
  const mobile = useIsMobile();
  return (
    <section style={{
      padding: mobile ? '72px 0' : '120px 0',
      background: 'var(--oona-primary-soft)',
      position: 'relative', overflow: 'hidden',
    }}>
      <img src="assets/illustration-moon.svg" alt="" style={{ position: 'absolute', top: 40, right: 60, width: 160, opacity: 0.35, display: mobile ? 'none' : 'block' }}/>
      <img src="assets/illustration-stars.svg" alt="" style={{ position: 'absolute', bottom: 40, left: 100, width: 110, opacity: 0.4, display: mobile ? 'none' : 'block' }}/>

      <div style={{ maxWidth: 920, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px', textAlign: 'center', position: 'relative' }}>
        <div style={{
          font: mobile ? '500 28px/1.3 "Newsreader",serif' : '500 56px/1.2 "Newsreader",serif',
          color: 'var(--fg-1)',
          letterSpacing: '-0.015em',
        }}>
          <span style={{ color: 'var(--oona-primary)' }}>“</span>The first app that didn't make me feel like I was on a leaderboard. Just quiet, useful, and somehow there at 4am when I needed it.<span style={{ color: 'var(--oona-primary)' }}>”</span>
        </div>
        <div style={{ marginTop: 36, font: '500 14px/1 "DM Sans"', color: 'var(--fg-2)' }}>
          <strong style={{ color: 'var(--fg-1)', fontWeight: 600 }}>Aoife M.</strong> · mum of two, Manchester
        </div>
      </div>
    </section>
  );
}

// ─── PRICING ─────────────────────────────────────────────────
function PricingSection() {
  const tiers = [
    {
      name: 'Solo',
      price: 'Free',
      sub: 'forever',
      tagline: 'Everything you need for one caregiver.',
      features: ['Unlimited feed, sleep & nappy logs', 'Pumping & milestones', 'Today + this week views', 'Web dashboard, read-only'],
      cta: 'Start free',
      featured: false,
    },
    {
      name: 'Family',
      price: '£4',
      sub: 'per month',
      tagline: 'For the whole household.',
      features: ['Everything in Solo', 'Up to 6 caregivers with role-scoped access', 'Full dashboard with patterns & growth', 'Export for the GP', 'Priority support'],
      cta: 'Try free for 14 days',
      featured: true,
    },
  ];
  return (
    <section id="pricing" style={{ padding: '120px 0', background: 'var(--bg-app)' }}>
      <div style={{ maxWidth: 1100, margin: '0 auto', padding: '0 40px' }}>
        <div style={{ maxWidth: 720, marginBottom: 64 }}>
          <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.12em', color: 'var(--fg-2)', marginBottom: 20 }}>
            Pricing
          </div>
          <h2 style={{
            font: '500 56px/1.05 "Newsreader",serif', color: 'var(--fg-1)',
            letterSpacing: '-0.02em', margin: 0,
          }}>
            Free for one. <em style={{ color: 'var(--oona-primary)', fontStyle: 'italic' }}>Worth it</em> for the whole family.
          </h2>
        </div>

        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 24, maxWidth: 840, margin: '0 auto' }}>
          {tiers.map((t, i) => (
            <div key={i} style={{
              background: t.featured ? 'var(--oona-primary)' : 'var(--bg-card)',
              color: t.featured ? 'var(--oona-text-on-primary)' : 'var(--fg-1)',
              borderRadius: 24, padding: 36,
              boxShadow: t.featured ? '0 16px 40px rgba(126,115,159,0.25)' : 'var(--shadow-1)',
              position: 'relative',
            }}>
              <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.1em', opacity: t.featured ? 0.7 : 0.6 }}>{t.name}</div>
              <div style={{ display: 'flex', alignItems: 'baseline', gap: 10, marginTop: 18 }}>
                <span style={{ font: '500 56px/1 "Newsreader",serif', letterSpacing: '-0.02em' }}>{t.price}</span>
                <span style={{ font: '500 14px/1 "DM Sans"', opacity: 0.7 }}>{t.sub}</span>
              </div>
              <p style={{ font: '400 15px/1.5 "DM Sans"', opacity: t.featured ? 0.85 : 1, color: t.featured ? 'inherit' : 'var(--fg-2)', marginTop: 8 }}>{t.tagline}</p>

              <div style={{ height: 1, background: t.featured ? 'rgba(255,249,244,0.2)' : 'var(--border-1)', margin: '28px 0 24px' }}/>

              <ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 12 }}>
                {t.features.map((feat, j) => (
                  <li key={j} style={{ display: 'flex', alignItems: 'flex-start', gap: 10, font: '400 14px/1.45 "DM Sans"' }}>
                    <Check size={18} style={{ color: t.featured ? '#EBC39E' : 'var(--oona-primary)', flexShrink: 0, marginTop: 1 }}/>
                    <span>{feat}</span>
                  </li>
                ))}
              </ul>

              <button style={{
                marginTop: 32, width: '100%', font: '600 15px/1 "DM Sans"',
                background: t.featured ? '#FFF9F4' : 'var(--oona-primary)',
                color: t.featured ? 'var(--oona-primary)' : 'var(--oona-text-on-primary)',
                border: 0, borderRadius: 14, padding: '16px 18px', cursor: 'pointer',
              }}>{t.cta}</button>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── FAQ ─────────────────────────────────────────────────────
function FAQSection() {
  const faqs = [
    { q: 'Do I need to log everything?',     a: "No. Oona works as well with three feeds a day as with thirty. Log what's useful and skip the rest." },
    { q: 'Can my partner use Oona too?',     a: 'Yes — add anyone caring for your baby. Each person gets a role with the right access, and their logs are colour-coded so you can see who did what.' },
    { q: 'Will my data stay private?',       a: 'Your baby data is yours. End-to-end encrypted in transit and at rest, never sold, never used to train anything. Delete it any time.' },
    { q: 'Is there a web app?',              a: 'There\'s a read-only dashboard at dashboard.oonapp.co.uk. Use it to review patterns, growth and milestones. Logging happens in the iOS app.' },
    { q: 'What about Android?',              a: 'Coming. We started with iOS so we could get the one-handed thumb interactions right; Android is on the roadmap for late 2026.' },
    { q: 'Can I export my data?',            a: 'Yes — CSV for spreadsheets, PDF for the GP, JSON if you want the lot. Family plan only for now.' },
  ];
  const [open, setOpen] = React.useState(0);
  const mobile = useIsMobile();
  return (
    <section id="faq" style={{ padding: mobile ? '72px 0' : '120px 0', background: 'var(--bg-card)' }}>
      <div style={{ maxWidth: 920, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px' }}>
        <div style={{ maxWidth: 720, marginBottom: mobile ? 40 : 56 }}>
          <div style={{ font: '500 13px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.12em', color: 'var(--fg-2)', marginBottom: 20 }}>
            Frequently asked
          </div>
          <h2 style={{
            font: mobile ? '500 34px/1.1 "Newsreader",serif' : '500 56px/1.05 "Newsreader",serif',
            color: 'var(--fg-1)',
            letterSpacing: '-0.02em', margin: 0,
          }}>
            The things people ask first.
          </h2>
        </div>

        <div style={{ display: 'flex', flexDirection: 'column' }}>
          {faqs.map((f, i) => (
            <div key={i} style={{ borderTop: '1px solid var(--border-1)' }}>
              <button onClick={() => setOpen(open === i ? -1 : i)} style={{
                width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between',
                padding: '24px 0', background: 'transparent', border: 0, cursor: 'pointer', textAlign: 'left',
                font: mobile ? '500 18px/1.35 "Newsreader",serif' : '500 22px/1.3 "Newsreader",serif', color: 'var(--fg-1)', letterSpacing: '-0.01em',
              }}>
                <span>{f.q}</span>
                <ChevronDown size={20} style={{ color: 'var(--fg-2)', transform: open === i ? 'rotate(180deg)' : 'none', transition: 'transform 240ms cubic-bezier(.2,0,0,1)', flexShrink: 0, marginLeft: 16 }}/>
              </button>
              {open === i && (
                <div style={{ font: '400 16px/1.6 "DM Sans"', color: 'var(--fg-2)', paddingBottom: 24, maxWidth: 700 }}>
                  {f.a}
                </div>
              )}
            </div>
          ))}
          <div style={{ borderTop: '1px solid var(--border-1)' }}/>
        </div>
      </div>
    </section>
  );
}

// ─── FINAL CTA ───────────────────────────────────────────────
function FinalCTA() {
  const mobile = useIsMobile();
  return (
    <section id="cta" style={{ padding: mobile ? '72px 0' : '120px 0', background: 'var(--bg-app)', position: 'relative', overflow: 'hidden' }}>
      <img src="assets/illustration-balloon.svg" alt="" style={{ position: 'absolute', top: 60, left: 100, width: 110, opacity: 0.45, display: mobile ? 'none' : 'block' }}/>
      <img src="assets/illustration-heart.svg" alt="" style={{ position: 'absolute', bottom: 60, right: 100, width: 110, opacity: 0.45, display: mobile ? 'none' : 'block' }}/>

      <div style={{ maxWidth: 720, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px', textAlign: 'center', position: 'relative' }}>
        <h2 style={{
          font: mobile ? '500 36px/1.1 "Newsreader",serif' : '500 72px/1.05 "Newsreader",serif',
          color: 'var(--fg-1)',
          letterSpacing: '-0.02em', margin: 0,
        }}>
          The first three months go quickly. <em style={{ color: 'var(--oona-primary)', fontStyle: 'italic' }}>Start logging.</em>
        </h2>
        <p style={{ font: '400 18px/1.55 "DM Sans"', color: 'var(--fg-2)', marginTop: 24 }}>
          Free to try. No ads. Designed in Britain.
        </p>
        <div style={{ display: 'flex', gap: 14, marginTop: 36, justifyContent: 'center', flexWrap: 'wrap', alignItems: 'center' }}>
          <a href={TESTFLIGHT_URL} target="_blank" rel="noopener noreferrer" style={ctaPrimary}>
            Download for iOS
            <span style={comingSoonBadge}>Soon</span>
          </a>
          <a href="#dashboard" style={ctaSecondary}>Explore the dashboard ›</a>
        </div>
      </div>
    </section>
  );
}

// ─── FOOTER ──────────────────────────────────────────────────
function Footer() {
  const mobile = useIsMobile();
  return (
    <footer style={{ background: 'var(--oona-primary)', color: 'rgba(255,249,244,0.85)', padding: mobile ? '56px 0 32px' : '80px 0 40px' }}>
      <div style={{ maxWidth: 1280, margin: '0 auto', padding: mobile ? '0 20px' : '0 40px' }}>
        <div style={{ display: 'grid', gridTemplateColumns: mobile ? '1fr 1fr' : '1.4fr 1fr 1fr 1fr 1fr', gap: mobile ? 28 : 40, marginBottom: mobile ? 40 : 60 }}>
          <div style={{ gridColumn: mobile ? '1 / -1' : 'auto' }}>
            <OonaLogo height={32} color="#FFF9F4" accentColor="#EBC39E"/>
            <p style={{ font: '400 14px/1.55 "DM Sans"', marginTop: 22, maxWidth: 280 }}>
              A quieter baby tracker, built in Britain for the families who do this together.
            </p>
          </div>
          {[
            { title: 'Product', items: [['The app', '#app'], ['The dashboard', '#dashboard'], ['Roadmap', '#faq']] },
            { title: 'Family',  items: [['Shared care', '#family'], ['Permissions', '#family'], ['Inviting Granny', '#family']] },
            { title: 'Company', items: [['About', '/about'], ['Journal', '/journal'], ['Press', '/press'], ['Contact', 'mailto:contact@oonaapp.co.uk']] },
            { title: 'Trust',   items: [['Privacy', '/privacy'], ['Terms', '/terms'], ['DPIA', '/dpia']] },
          ].map(col => (
            <div key={col.title}>
              <div style={{ font: '500 12px/1 "DM Sans"', textTransform: 'uppercase', letterSpacing: '0.1em', color: '#EBC39E', marginBottom: 16 }}>{col.title}</div>
              <div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
                {col.items.map(([label, href]) => (
                  <a key={label} href={href} style={{ color: 'rgba(255,249,244,0.85)', textDecoration: 'none', font: '400 14px/1 "DM Sans"' }}>{label}</a>
                ))}
              </div>
            </div>
          ))}
        </div>

        <div style={{ borderTop: '1px solid rgba(255,249,244,0.15)', paddingTop: 24, display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: 14, font: '400 13px/1.4 "DM Sans"', color: 'rgba(255,249,244,0.6)' }}>
          <span>© 2026 Oona Ltd. Made with care in the UK.</span>
          <span>oonapp.co.uk · dashboard.oonapp.co.uk</span>
        </div>
      </div>
    </footer>
  );
}

Object.assign(window, { Header, Hero, ProofStrip, AppSection, DashboardSection, SharedCareSection, FeaturesGrid, QuoteSection, PricingSection, FAQSection, FinalCTA, Footer });
