// Homeowner experience — Huly-grade

// === HERO ===
const Hero = () => {
  const [postcode, setPostcode] = React.useState('');
  return (
    <section style={{ position: 'relative', overflow: 'hidden', paddingTop: 96, paddingBottom: 72 }}>
      <div className="hero-glow" />
      <div className="grid-bg" />
      <div className="container" style={{ position: 'relative' }}>
        <Reveal>
          <span className="chip" style={{ marginBottom: 28 }}>
            <i className="led" />
            £7,500 GOVERNMENT GRANT · APPLIED FOR YOU · DERBY · NOTTS · SHEFFIELD
          </span>
        </Reveal>
        <Reveal delay={80}>
          <h1 className="h1-display" style={{ maxWidth: 920 }}>
            A warmer home,<br />
            half the bill,<br />
            <em style={{ color: 'var(--accent)', fontStyle: 'italic' }}>without the salesman.</em>
          </h1>
        </Reveal>
        <Reveal delay={180}>
          <p className="lead" style={{ marginTop: 28, maxWidth: 580 }}>
            We're a small team of MCS-certified engineers. We size your heat pump properly, install it tidily, and answer the phone for the next ten years. No call-centres, no commission, no jargon.
          </p>
        </Reveal>
        <Reveal delay={280}>
          <div style={{ marginTop: 36, display: 'flex', gap: 8, maxWidth: 540, padding: 6, border: '1px solid var(--line-2)', borderRadius: 999, background: 'rgba(255,253,248,0.7)', backdropFilter: 'blur(20px)', boxShadow: '0 4px 20px rgba(27,38,32,0.04)' }}>
            <input value={postcode} onChange={e => setPostcode(e.target.value.toUpperCase())}
              placeholder="Your postcode — e.g. DE22 2HP"
              style={{ flex: 1, border: 'none', outline: 'none', background: 'transparent', padding: '0 18px', color: 'var(--fg)', fontSize: 15 }} />
            <button className="btn btn-accent">Get my fixed quote <span className="arrow">→</span></button>
          </div>
          <div style={{ marginTop: 14, display: 'flex', gap: 24, fontSize: 12, color: 'var(--fg-3)', flexWrap: 'wrap' }}>
            <span>✓ Free survey · no obligation</span>
            <span>✓ Fixed price · no surprises</span>
            <span>✓ Reply within 4 working hours</span>
          </div>
        </Reveal>
        <Reveal delay={380}>
          <div style={{ marginTop: 56, display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 32, paddingTop: 36, borderTop: '1px solid var(--line)' }}>
            {[
              { v: 847, s: '', l: 'Homes warmed since 2019' },
              { v: 612, p: '£', l: 'Average yearly saving' },
              { v: 4.2, d: 1, s: '', l: 'Real efficiency · 4× a boiler' },
              { v: 38, s: 'dB', l: 'Quieter than your fridge' },
            ].map((s, i) => (
              <div key={i}>
                <div className="serif tnum" style={{ fontSize: 56, lineHeight: 1, color: 'var(--fg)' }}>
                  <CountUp to={s.v} prefix={s.p || ''} suffix={s.s || ''} decimals={s.d || 0} />
                </div>
                <div style={{ marginTop: 10, fontFamily: 'var(--mono)', fontSize: 11, letterSpacing: '0.1em', textTransform: 'uppercase', color: 'var(--fg-4)' }}>{s.l}</div>
              </div>
            ))}
          </div>
        </Reveal>
      </div>
    </section>
  );
};

// === Accreditations strip — instant trust ===
const Accreditations = () => (
  <section style={{ padding: '32px 0', borderTop: '1px solid var(--line)', borderBottom: '1px solid var(--line)', background: 'rgba(237,230,216,0.4)' }}>
    <div className="container">
      <div style={{ display: 'grid', gridTemplateColumns: 'auto 1fr', gap: 40, alignItems: 'center' }}>
        <div className="mono" style={{ fontSize: 11, color: 'var(--fg-4)', letterSpacing: '0.14em', textTransform: 'uppercase' }}>
          Certified by
        </div>
        <div style={{ display: 'flex', gap: 40, flexWrap: 'wrap', alignItems: 'center', justifyContent: 'space-between' }}>
          {['MCS', 'TrustMark', 'HIES', 'NICEIC', 'Daikin D1+', 'Vaillant Advanced', 'Which? Trusted Trader'].map(b => (
            <span key={b} className="serif" style={{ fontSize: 22, color: 'var(--fg-2)', letterSpacing: '-0.01em' }}>{b}</span>
          ))}
        </div>
      </div>
    </div>
  </section>
);

// === Marquee ===
const Marquee = () => (
  <section style={{ padding: '64px 0', borderTop: '1px solid var(--line)', borderBottom: '1px solid var(--line)' }}>
    <div className="marquee">
      <div className="marquee-track">
        {[1,2].map(k => ['£612 saved · Mosley · Allestree', '38 dB · Patel · Sheffield', '2-day install · Wilson · Beeston', '4.32 SCOP · Khan · West Bridgford'].map((t, i) => (
          <span key={`${k}-${i}`} className="serif" style={{
            fontSize: 'clamp(48px, 7vw, 104px)',
            fontStyle: i % 2 ? 'italic' : 'normal',
            color: i % 2 ? 'var(--accent)' : 'var(--fg)',
            lineHeight: 1, fontWeight: 400,
          }}>{t}</span>
        )))}
      </div>
    </div>
  </section>
);

// === Features grid (Huly tile style) ===
const Features = () => {
  const tiles = [
    { n: '01', t: 'Heat loss to MCS spec', d: 'Room-by-room calculation. U-values, exposed walls, glazing. We measure before we quote.' },
    { n: '02', t: 'Sized to your weather', d: 'Local design temperature, real wind exposure, your hot water habits. Not a spreadsheet default.' },
    { n: '03', t: 'Quieter than a fridge', d: '38 dB at 1m. Anti-vibration mounts. Sited away from bedrooms. Your neighbours stay friends.' },
    { n: '04', t: '10-year guarantee', d: 'Parts, labour, and call-outs. We monitor remotely and usually catch issues before you notice.' },
    { n: '05', t: 'Manufacturer-trained', d: 'Daikin D1+, Vaillant Advanced, Mitsubishi Ecodan accredited. Real certification, not a weekend course.' },
    { n: '06', t: 'Tidy, on time', d: 'Two days on average. Old boiler out, new system in. Floors covered, garden raked, no mess.' },
  ];
  return (
    <section className="section">
      <div className="container">
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1.6fr', gap: 80, marginBottom: 64 }}>
          <div>
            <Reveal><span className="eyebrow">03 / What's different</span></Reveal>
            <Reveal delay={120}>
              <h2 className="h2-display" style={{ marginTop: 24 }}>
                Six obsessions<br />
                <em style={{ color: 'var(--accent)' }}>that change the result.</em>
              </h2>
            </Reveal>
          </div>
          <Reveal delay={200}>
            <p className="lead" style={{ alignSelf: 'end' }}>
              Most heat pumps are installed badly because they're sized in five minutes from a kitchen table. We do it properly — which is why ours run quieter, cheaper, and longer.
            </p>
          </Reveal>
        </div>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 16 }}>
          {tiles.map((t, i) => (
            <Reveal key={t.n} delay={i * 60}>
              <div className="feat-tile" style={{ height: '100%' }}>
                <div className="feat-num">{t.n}</div>
                <h3 className="serif" style={{ fontSize: 28, marginTop: 16, marginBottom: 12, fontWeight: 400 }}>{t.t}</h3>
                <p style={{ color: 'var(--fg-3)', fontSize: 14, lineHeight: 1.6 }}>{t.d}</p>
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
};

// === Savings calculator (clean, dark) ===
const SavingsCalc = () => {
  const [house, setHouse] = React.useState('semi');
  const [age, setAge] = React.useState('1980-2000');
  const [insulation, setInsulation] = React.useState('average');

  const hf = { flat: 0.55, terrace: 0.75, semi: 1.0, detached: 1.4, bungalow: 0.85 }[house];
  const af = { 'pre-1930': 1.25, '1930-1980': 1.05, '1980-2000': 0.85, 'post-2000': 0.65 }[age];
  const inf = { poor: 1.2, average: 1.0, good: 0.8 }[insulation];

  const heat = Math.round(11000 * hf * af * inf);
  const newCost = Math.round((heat / 3.6) * 0.265);
  const oldCost = Math.round(heat * 0.062 / 0.86 + 200);
  const saving = Math.max(0, oldCost - newCost);
  const installCost = Math.round(13800 * hf);
  const net = Math.max(0, installCost - 7500);

  const Pill = ({ value, set, options }) => (
    <div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>
      {options.map(o => (
        <button key={o.id} onClick={() => set(o.id)}
          style={{
            padding: '8px 14px', borderRadius: 999,
            border: `1px solid ${value === o.id ? 'var(--accent)' : 'var(--line-2)'}`,
            background: value === o.id ? 'var(--accent)' : 'transparent',
            color: value === o.id ? '#FFFCF6' : 'var(--fg-2)',
            fontSize: 13, fontWeight: 500,
            transition: 'all 200ms',
          }}>{o.l}</button>
      ))}
    </div>
  );

  return (
    <section className="section" style={{ position: 'relative' }}>
      <div className="container">
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64 }}>
          <div>
            <Reveal><span className="eyebrow">05 / Savings · live</span></Reveal>
            <Reveal delay={120}>
              <h2 className="h2-display" style={{ marginTop: 24 }}>
                Real numbers,<br/>
                <em style={{ color: 'var(--accent)' }}>your home.</em>
              </h2>
            </Reveal>
            <Reveal delay={220}>
              <p className="lead" style={{ marginTop: 24 }}>
                Estimates use Ofgem's April 2026 cap and a conservative SCOP of 3.6 — what we actually deliver, not what manufacturers print.
              </p>
            </Reveal>
            <Reveal delay={320}>
              <div className="surface" style={{ marginTop: 32, padding: 18 }}>
                <div className="mono" style={{ fontSize: 11, color: 'var(--fg-4)', letterSpacing: '0.1em', marginBottom: 10 }}>ASSUMPTIONS</div>
                <div style={{ display: 'grid', gap: 8, fontSize: 13 }}>
                  {[['Electricity','£0.265/kWh'],['Gas','£0.062/kWh'],['Boiler efficiency','86%'],['Heat pump SCOP','3.60']].map(r => (
                    <div key={r[0]} className="row between"><span style={{ color: 'var(--fg-3)' }}>{r[0]}</span><span className="mono">{r[1]}</span></div>
                  ))}
                </div>
              </div>
            </Reveal>
          </div>
          <Reveal delay={200}>
            <div className="surface-2" style={{ padding: 32 }}>
              <div style={{ display: 'grid', gap: 24 }}>
                <div>
                  <label style={{ display: 'block', marginBottom: 10, fontSize: 13, color: 'var(--fg-2)' }}>House type</label>
                  <Pill value={house} set={setHouse} options={[
                    {id:'flat',l:'Flat'},{id:'terrace',l:'Terrace'},{id:'semi',l:'Semi'},{id:'detached',l:'Detached'},{id:'bungalow',l:'Bungalow'}
                  ]} />
                </div>
                <div>
                  <label style={{ display: 'block', marginBottom: 10, fontSize: 13, color: 'var(--fg-2)' }}>Year built</label>
                  <Pill value={age} set={setAge} options={[
                    {id:'pre-1930',l:'Pre-1930'},{id:'1930-1980',l:'1930–1980'},{id:'1980-2000',l:'1980–2000'},{id:'post-2000',l:'Post-2000'}
                  ]} />
                </div>
                <div>
                  <label style={{ display: 'block', marginBottom: 10, fontSize: 13, color: 'var(--fg-2)' }}>Insulation</label>
                  <Pill value={insulation} set={setInsulation} options={[
                    {id:'poor',l:'Poor'},{id:'average',l:'Average'},{id:'good',l:'Good'}
                  ]} />
                </div>
              </div>
              <div className="divider" style={{ margin: '32px 0' }} />
              <div style={{ display: 'grid', gridTemplateColumns: '1.6fr 1fr', gap: 12 }}>
                <div style={{ padding: 24, borderRadius: 16, background: 'var(--accent)', color: '#FFFCF6' }}>
                  <div className="mono" style={{ fontSize: 10, letterSpacing: '0.12em', opacity: 0.7 }}>YEARLY SAVING</div>
                  <div className="serif tnum" style={{ fontSize: 64, lineHeight: 1, marginTop: 8 }}>£{saving.toLocaleString()}</div>
                  <div style={{ fontSize: 12, marginTop: 8, opacity: 0.7 }}>vs. gas at current cap</div>
                </div>
                <div className="surface" style={{ padding: 16, display: 'grid', gap: 8 }}>
                  <div className="row between"><span style={{ fontSize: 12, color: 'var(--fg-3)' }}>Heat demand</span><span className="mono tnum">{(heat/1000).toFixed(1)}k kWh</span></div>
                  <div className="row between"><span style={{ fontSize: 12, color: 'var(--fg-3)' }}>New running</span><span className="mono tnum">£{newCost}/yr</span></div>
                  <div className="row between"><span style={{ fontSize: 12, color: 'var(--fg-3)' }}>Install</span><span className="mono tnum">£{installCost.toLocaleString()}</span></div>
                  <div className="row between"><span style={{ fontSize: 12, color: 'var(--fg-3)' }}>BUS grant</span><span className="mono tnum" style={{ color: 'var(--accent)' }}>−£7,500</span></div>
                  <div className="divider" />
                  <div className="row between"><span style={{ fontSize: 12 }}>You pay</span><span className="serif tnum" style={{ fontSize: 22 }}>£{net.toLocaleString()}</span></div>
                </div>
              </div>
              <div style={{ display: 'flex', gap: 10, marginTop: 24 }}>
                <button className="btn btn-primary">Book a free survey <span className="arrow">→</span></button>
                <button className="btn btn-ghost">Email me this</button>
              </div>
            </div>
          </Reveal>
        </div>
      </div>
    </section>
  );
};

// === Process / Journey ===
const Process = () => {
  const steps = [
    { n: 'Step 01', t: 'Enquire', d: 'A real engineer calls within 4 working hours.', meta: 'Day 0' },
    { n: 'Step 02', t: 'Survey', d: 'Room-by-room heat loss, U-values, photos, full pack.', meta: 'Day 7' },
    { n: 'Step 03', t: 'Design', d: 'You approve flow temps, COP target, radiator plan.', meta: 'Day 14' },
    { n: 'Step 04', t: 'Install', d: 'Two days on site. Boiler out, heat pump in. Floors covered.', meta: 'Day 28' },
    { n: 'Step 05', t: 'Commission', d: 'We balance, tune, walk you through every setting.', meta: 'Day 30' },
    { n: 'Step 06', t: 'Service', d: 'Annual visit, refrigerant check, performance review.', meta: 'Day 365' },
  ];
  return (
    <section className="section" style={{ background: 'linear-gradient(180deg, transparent, rgba(74,222,128,0.02))' }}>
      <div className="container">
        <Reveal><span className="eyebrow">07 / The process</span></Reveal>
        <Reveal delay={120}>
          <h2 className="h2-display" style={{ marginTop: 24, marginBottom: 64, maxWidth: 800 }}>
            From first call<br />
            to first <em style={{ color: 'var(--accent)' }}>warm winter.</em>
          </h2>
        </Reveal>
        <div style={{ position: 'relative', paddingTop: 8 }}>
          {/* Continuous timeline line behind the steps */}
          <div style={{
            position: 'absolute', top: 56, left: '4%', right: '4%', height: 1,
            background: 'linear-gradient(90deg, transparent, var(--accent) 8%, var(--accent) 92%, transparent)',
            opacity: 0.55,
          }} />
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)', position: 'relative' }}>
            {steps.map((s, i) => (
              <Reveal key={i} delay={i * 70}>
                <div style={{
                  padding: '0 18px',
                  minHeight: 260,
                  display: 'flex', flexDirection: 'column', gap: 12,
                  position: 'relative',
                }}>
                  <div className="mono" style={{ fontSize: 11, color: 'var(--accent)', letterSpacing: '0.12em' }}>{s.n}</div>
                  {/* Marker on the timeline */}
                  <div style={{ position: 'relative', height: 24, display: 'flex', alignItems: 'center' }}>
                    <span style={{
                      width: 14, height: 14, borderRadius: 999,
                      background: i === 0 ? 'var(--accent)' : 'var(--bg)',
                      border: '2px solid var(--accent)',
                      boxShadow: i === 0 ? '0 0 16px var(--accent-glow)' : 'none',
                      position: 'relative', zIndex: 1,
                    }} />
                  </div>
                  <h3 className="serif" style={{ fontSize: 26, marginTop: 4, lineHeight: 1.1 }}>{s.t}</h3>
                  <p style={{ fontSize: 13, color: 'var(--fg-3)', lineHeight: 1.55 }}>{s.d}</p>
                  <div className="mono" style={{ marginTop: 'auto', paddingTop: 16, fontSize: 10, color: 'var(--fg-4)', letterSpacing: '0.1em', borderTop: '1px solid var(--line)' }}>{s.meta.toUpperCase()}</div>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
};

// === Testimonials ===
const Stories = () => {
  const items = [
    { q: "We expected a few days of disruption. We got a quiet new system and a tidy garden. Bills down 38% in our first winter.", who: "The Mosley family", where: "Allestree, Derby", saved: 612 },
    { q: "HiLooks didn't try to sell us anything. They told us to insulate the loft first, then call back. We did. Best decision.", who: "Sara & Tom", where: "Beeston, Notts", saved: 540 },
    { q: "Three companies quoted. HiLooks was the only one who actually surveyed every radiator before quoting.", who: "Dr. Patel", where: "Sheffield S11", saved: 790 },
  ];
  const [i, setI] = React.useState(0);
  React.useEffect(() => {
    const id = setInterval(() => setI(v => (v + 1) % items.length), 7000);
    return () => clearInterval(id);
  }, []);
  return (
    <section className="section">
      <div className="container">
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64 }}>
          <div>
            <Reveal><span className="eyebrow">10 / Stories</span></Reveal>
            <Reveal delay={120}>
              <h2 className="h2-display" style={{ marginTop: 24 }}>
                A few hundred<br />
                <em style={{ color: 'var(--accent)' }}>warmer winters.</em>
              </h2>
            </Reveal>
            <Reveal delay={220}>
              <div style={{ marginTop: 40, display: 'flex', gap: 6 }}>
                {items.map((_, k) => (
                  <button key={k} onClick={() => setI(k)} style={{
                    flex: 1, height: 3, border: 'none', borderRadius: 999,
                    background: k === i ? 'var(--accent)' : 'var(--line-2)',
                    transition: 'background 240ms',
                  }} />
                ))}
              </div>
            </Reveal>
          </div>
          <div style={{ position: 'relative', minHeight: 320 }}>
            {items.map((t, k) => (
              <div key={k} style={{
                position: 'absolute', inset: 0,
                opacity: k === i ? 1 : 0,
                transform: k === i ? 'translateY(0)' : 'translateY(16px)',
                transition: 'all 600ms cubic-bezier(0.22,1,0.36,1)',
                pointerEvents: k === i ? 'auto' : 'none',
              }}>
                <p className="serif" style={{ fontSize: 'clamp(28px, 2.6vw, 44px)', lineHeight: 1.2, fontWeight: 400, color: 'var(--fg)' }}>
                  "{t.q}"
                </p>
                <div className="row between" style={{ marginTop: 32, paddingTop: 24, borderTop: '1px solid var(--line)' }}>
                  <div>
                    <div style={{ fontWeight: 500 }}>{t.who}</div>
                    <div style={{ fontSize: 12, color: 'var(--fg-4)', fontFamily: 'var(--mono)', marginTop: 2 }}>{t.where}</div>
                  </div>
                  <div style={{ textAlign: 'right' }}>
                    <div className="serif tnum" style={{ fontSize: 32, color: 'var(--accent)' }}>£{t.saved}</div>
                    <div className="mono" style={{ fontSize: 10, letterSpacing: '0.12em', color: 'var(--fg-4)' }}>SAVED / YR</div>
                  </div>
                </div>
              </div>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
};

// === FAQ ===
const FAQ = () => {
  const items = [
    { q: 'Will it actually heat my old house?', a: 'Yes — if it\'s sized properly. Most installs that fail were undersized or paired with the wrong radiators. We do a proper room-by-room calculation and tell you the truth if your home isn\'t ready.' },
    { q: 'How loud is it?', a: 'Daikin and Vaillant units run at 35–42 dB at 1m. Quieter than a fridge. We site them away from bedrooms with anti-vibration mounts.' },
    { q: 'What if it breaks?', a: 'Our 10-year guarantee covers parts, labour, and call-outs. We monitor remotely and usually catch issues before you notice them.' },
    { q: 'Can I really get it for £0 upfront?', a: 'Yes — between the £7,500 BUS grant and our 0% finance over up to 10 years, most homes pay nothing on day one and the monthly cost is offset by the lower bill.' },
    { q: 'Will I need new radiators?', a: 'Sometimes — heat pumps work best at lower flow temperatures, which means slightly larger radiators in a few rooms. Your design pack tells you exactly which.' },
  ];
  const [open, setOpen] = React.useState(0);
  return (
    <section className="section">
      <div className="container">
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64 }}>
          <div>
            <Reveal><span className="eyebrow">11 / FAQ</span></Reveal>
            <Reveal delay={120}>
              <h2 className="h2-display" style={{ marginTop: 24 }}>
                The honest<br />
                <em style={{ color: 'var(--accent)' }}>answers.</em>
              </h2>
            </Reveal>
          </div>
          <div>
            {items.map((it, i) => (
              <div key={i} style={{ borderTop: '1px solid var(--line)' }}>
                <button onClick={() => setOpen(open === i ? -1 : i)}
                  style={{
                    width: '100%', textAlign: 'left',
                    padding: '24px 0',
                    background: 'transparent', border: 'none',
                    display: 'flex', justifyContent: 'space-between', alignItems: 'center',
                    color: 'var(--fg)',
                  }}>
                  <span className="serif" style={{ fontSize: 24 }}>{it.q}</span>
                  <span style={{
                    width: 32, height: 32, borderRadius: 999,
                    border: '1px solid var(--line-2)', display: 'grid', placeItems: 'center',
                    color: 'var(--accent)', fontSize: 18,
                    transform: open === i ? 'rotate(45deg)' : 'rotate(0)',
                    transition: 'transform 240ms',
                  }}>+</span>
                </button>
                <div style={{ maxHeight: open === i ? 200 : 0, overflow: 'hidden', transition: 'max-height 320ms ease' }}>
                  <p style={{ paddingBottom: 24, color: 'var(--fg-3)', fontSize: 15, lineHeight: 1.6, maxWidth: 640 }}>{it.a}</p>
                </div>
              </div>
            ))}
            <div style={{ borderTop: '1px solid var(--line)' }} />
          </div>
        </div>
      </div>
    </section>
  );
};

// === Pull-quote interlude (between Stories and FAQ) ===
const PullQuoteInterlude = () => (
  <section style={{ padding: '80px 0', position: 'relative' }}>
    <div className="container">
      <Reveal>
        <p className="pull-quote">
          We measure before we quote.<br/>
          We come back when it counts.<br/>
          <em>We answer the phone in February.</em>
        </p>
      </Reveal>
    </div>
  </section>
);

// === Final CTA — cinematic close ===
const FinalCTA = () => (
  <section style={{ position: 'relative', overflow: 'hidden', padding: '180px 0 140px' }}>
    <div className="hero-glow" style={{ inset: '0 0 -40% 0' }} />
    <div className="grid-bg" />
    <div className="container" style={{ position: 'relative', textAlign: 'center' }}>
      <Reveal>
        <span className="chip" style={{ marginBottom: 20 }}>
          <i className="led" /> NEXT-WEEK SURVEYS · 4 SLOTS REMAINING IN DERBY
        </span>
      </Reveal>
      <Reveal delay={80}>
        <span className="eyebrow" style={{ justifyContent: 'center' }}>Ready when you are</span>
      </Reveal>
      <Reveal delay={140}>
        <h2 className="h1-display" style={{ marginTop: 32 }}>
          Replace your boiler.<br />
          <em style={{ color: 'var(--accent)' }}>Keep your weekend.</em>
        </h2>
      </Reveal>
      <Reveal delay={240}>
        <p className="lead" style={{ margin: '32px auto 0', textAlign: 'center' }}>
          Free survey, fixed quote, no hard sell. Reply within four working hours.
        </p>
      </Reveal>
      <Reveal delay={320}>
        <div style={{ display: 'flex', gap: 12, justifyContent: 'center', marginTop: 40, flexWrap: 'wrap' }}>
          <button className="btn btn-accent btn-lg">Book a free survey <span className="arrow">→</span></button>
          <button className="btn btn-ghost btn-lg">Call us · WhatsApp first</button>
        </div>
      </Reveal>
      <Reveal delay={420}>
        <div style={{ marginTop: 64, display: 'grid', gridTemplateColumns: 'repeat(3, max-content)', gap: 32, justifyContent: 'center', paddingTop: 40, borderTop: '1px solid var(--line)' }}>
          {[
            ['No call-centres', 'Engineer answers'],
            ['No commission', 'Honest sizing'],
            ['No surprises', 'Fixed quote'],
          ].map((c, i) => (
            <div key={i} style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
              <span style={{ width: 6, height: 6, borderRadius: 999, background: 'var(--accent)', boxShadow: '0 0 12px var(--accent-glow)' }} />
              <div>
                <div style={{ fontSize: 13, fontWeight: 500 }}>{c[0]}</div>
                <div className="mono" style={{ fontSize: 10, color: 'var(--fg-4)', letterSpacing: '0.1em', marginTop: 2 }}>{c[1].toUpperCase()}</div>
              </div>
            </div>
          ))}
        </div>
      </Reveal>
    </div>
  </section>
);

const Homeowner = () => (
  <main>
    <Hero />
    <Accreditations />
    <FounderPromise />
    <Marquee />
    <Features />
    <Comparison />
    <SavingsCalc />
    <Finance />
    <Process />
    <Aftercare />
    <Coverage />
    <Stories />
    <PullQuoteInterlude />
    <FAQ />
    <FinalCTA />
    <Footer />
  </main>
);

window.Homeowner = Homeowner;

// === Founder promise — human face / trust ===
const FounderPromise = () => (
  <section className="section" style={{ paddingTop: 96, paddingBottom: 56 }}>
    <div className="container">
      <Reveal>
        <div className="vellum lift" style={{ padding: 64, display: 'grid', gridTemplateColumns: '320px 1fr', gap: 64, alignItems: 'center', position: 'relative' }}>
          {/* Founder identity card — replaces JM gradient with a credentials plate */}
          <div style={{ position: 'relative', aspectRatio: '1/1.1' }}>
            <div style={{
              position: 'absolute', inset: 0,
              borderRadius: 18,
              background: 'linear-gradient(170deg, rgba(47,93,67,0.10), rgba(201,122,58,0.08) 60%, rgba(255,253,248,0.6))',
              border: '1px solid rgba(36,46,38,0.12)',
              boxShadow: '0 30px 60px -25px rgba(27,38,32,0.25), inset 0 1px 0 rgba(255,255,255,0.7)',
              padding: 28,
              display: 'flex', flexDirection: 'column',
              overflow: 'hidden',
            }}>
              {/* Top: monogram + chip */}
              <div className="row between" style={{ alignItems: 'flex-start' }}>
                <div style={{
                  fontFamily: 'var(--serif)',
                  fontSize: 64, fontStyle: 'italic',
                  lineHeight: 0.85, letterSpacing: '-0.04em',
                  color: 'var(--accent)',
                }}>JM</div>
                <span className="mono" style={{ fontSize: 9, color: 'var(--fg-4)', letterSpacing: '0.16em' }}>EST · 2019</span>
              </div>
              {/* Middle: name + title */}
              <div style={{ marginTop: 'auto' }}>
                <div className="serif" style={{ fontSize: 22, lineHeight: 1.1, color: 'var(--fg)' }}>James Mosley</div>
                <div className="mono" style={{ fontSize: 10, color: 'var(--fg-3)', letterSpacing: '0.12em', marginTop: 6 }}>FOUNDER · MCS HEAT-PUMP ENGINEER</div>
              </div>
              {/* Bottom: credentials grid */}
              <div style={{ marginTop: 16, paddingTop: 14, borderTop: '1px solid rgba(36,46,38,0.10)', display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8, fontFamily: 'var(--mono)', fontSize: 9.5, letterSpacing: '0.06em', color: 'var(--fg-3)', textTransform: 'uppercase' }}>
                <span>MCS NIC · PROVISIONAL</span>
                <span style={{ textAlign: 'right' }}>F-Gas · 2008</span>
                <span>Daikin D1+</span>
                <span style={{ textAlign: 'right' }}>Vaillant Adv.</span>
              </div>
            </div>
            {/* Floating signature ribbon */}
            <div style={{
              position: 'absolute', bottom: -14, right: -10,
              padding: '6px 14px', borderRadius: 999,
              background: 'var(--accent)', color: '#FFFCF6',
              fontFamily: 'var(--mono)', fontSize: 10, letterSpacing: '0.14em',
              boxShadow: '0 14px 28px -10px rgba(47,93,67,0.45)',
            }}>847 INSTALLS · 0 RECALLS</div>
          </div>

          {/* Promise body */}
          <div>
            <span className="eyebrow">02 / A promise from the founder</span>
            <h3 className="serif drop-cap" style={{ fontSize: 'clamp(26px, 2.8vw, 38px)', lineHeight: 1.2, marginTop: 24, fontWeight: 400, letterSpacing: '-0.02em', maxWidth: 640 }}>
              "I started HiLooks because I was tired of seeing badly-installed heat pumps. If yours doesn't perform — I come back. Free. For ten years."
            </h3>
            <div style={{ marginTop: 28, display: 'grid', gridTemplateColumns: 'repeat(3, max-content)', gap: 24, paddingTop: 20, borderTop: '1px solid var(--line)', fontSize: 12, color: 'var(--fg-3)', fontFamily: 'var(--mono)', letterSpacing: '0.08em' }}>
              <span>· Engineer answers</span>
              <span>· Same-day callback</span>
              <span>· 10-year guarantee</span>
            </div>
          </div>
        </div>
      </Reveal>
    </div>
  </section>
);

// === Comparison table — vs national chain & vs old boiler ===
const Comparison = () => {
  const rows = [
    ['Survey', 'Engineer · 90 mins · room-by-room', 'Sales rep · 20 mins · estimate', '—'],
    ['Sized to your home', 'Yes · MCS heat-loss calc', 'Sometimes · spreadsheet', 'No'],
    ['Yearly running cost', '£480 — £620', '£600 — £900', '£980 — £1,200'],
    ['Engineer answers the phone', 'Same day', 'Call centre · 4–7 days', '—'],
    ['10-year guarantee', 'Parts + labour + call-outs', 'Parts only', 'No'],
    ['Carbon emissions', '0.5 t CO₂e / yr', '0.8 t', '2.6 t'],
    ['Resale value uplift', '+£12,400 (UK avg)', 'Variable', 'Neutral'],
  ];
  return (
    <section className="section" style={{ background: 'rgba(237,230,216,0.4)' }}>
      <div className="container">
        <div style={{ textAlign: 'center', marginBottom: 56 }}>
          <Reveal><span className="eyebrow" style={{ justifyContent: 'center' }}>04 / How we compare</span></Reveal>
          <Reveal delay={120}>
            <h2 className="h2-display" style={{ marginTop: 20, maxWidth: 800, marginInline: 'auto' }}>
              Three ways to heat your home.<br />
              <em style={{ color: 'var(--accent)' }}>One that's done properly.</em>
            </h2>
          </Reveal>
        </div>
        <Reveal delay={200}>
          <div className="surface-2" style={{ overflow: 'hidden' }}>
            <div style={{ display: 'grid', gridTemplateColumns: '1.2fr 1.4fr 1.2fr 1fr', borderBottom: '1px solid var(--line)' }}>
              {['', 'HiLooks', 'National chain', 'Keep old boiler'].map((h, i) => (
                <div key={i} style={{
                  padding: '24px 24px',
                  borderRight: i < 3 ? '1px solid var(--line)' : 'none',
                  background: i === 1 ? 'var(--accent-soft)' : 'transparent',
                }}>
                  <div className="mono" style={{ fontSize: 10, color: 'var(--fg-4)', letterSpacing: '0.1em' }}>OPTION {String(i || '').padStart(2,'0') || ''}</div>
                  <div className="serif" style={{ fontSize: 22, marginTop: 6, color: i === 1 ? 'var(--accent)' : 'var(--fg)' }}>{h}</div>
                </div>
              ))}
            </div>
            {rows.map((r, ri) => (
              <div key={ri} style={{ display: 'grid', gridTemplateColumns: '1.2fr 1.4fr 1.2fr 1fr', borderBottom: ri < rows.length - 1 ? '1px solid var(--line)' : 'none' }}>
                {r.map((cell, ci) => (
                  <div key={ci} style={{
                    padding: '18px 24px',
                    borderRight: ci < 3 ? '1px solid var(--line)' : 'none',
                    fontSize: 14,
                    color: ci === 0 ? 'var(--fg-3)' : ci === 1 ? 'var(--fg)' : ci === 3 ? 'var(--danger)' : 'var(--fg-2)',
                    fontWeight: ci === 1 ? 500 : 400,
                    background: ci === 1 ? 'rgba(47,93,67,0.04)' : ci === 3 ? 'rgba(178,58,42,0.04)' : 'transparent',
                  }}>{cell}</div>
                ))}
              </div>
            ))}
          </div>
        </Reveal>
      </div>
    </section>
  );
};

// === Coverage map ===
const Coverage = () => (
  <section className="section">
    <div className="container">
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64, alignItems: 'center' }}>
        <div>
          <Reveal><span className="eyebrow">09 / Where we work</span></Reveal>
          <Reveal delay={120}>
            <h2 className="h2-display" style={{ marginTop: 24 }}>
              Local engineers,<br />
              <em style={{ color: 'var(--accent)' }}>local accountability.</em>
            </h2>
          </Reveal>
          <Reveal delay={220}>
            <p className="lead" style={{ marginTop: 24 }}>
              We only work within an hour of our depots. If your boiler packs up at 6pm in February, we can be there before bedtime — not in three weeks.
            </p>
          </Reveal>
          <Reveal delay={300}>
            <div style={{ marginTop: 24, display: 'grid', gap: 12 }}>
              {[
                { c: 'Derby & Derbyshire', p: 'DE1 — DE74 · 312 homes' },
                { c: 'Nottingham & Notts', p: 'NG1 — NG34 · 286 homes' },
                { c: 'Sheffield & South Yorks', p: 'S1 — S36 · 249 homes' },
              ].map(r => (
                <div key={r.c} className="row between" style={{ padding: '14px 0', borderTop: '1px solid var(--line)' }}>
                  <div>
                    <div style={{ fontWeight: 500 }}>{r.c}</div>
                    <div className="mono" style={{ fontSize: 11, color: 'var(--fg-4)', marginTop: 2, letterSpacing: '0.06em' }}>{r.p}</div>
                  </div>
                  <span className="mono" style={{ fontSize: 11, color: 'var(--accent)', letterSpacing: '0.1em' }}>ACTIVE</span>
                </div>
              ))}
            </div>
          </Reveal>
        </div>
        <Reveal delay={200}>
          <div className="surface-2" style={{ padding: 32, position: 'relative' }}>
            <svg viewBox="0 0 600 420" style={{ width: '100%', height: 'auto' }}>
              <defs>
                <radialGradient id="rg" cx="50%" cy="50%" r="50%">
                  <stop offset="0%" stopColor="rgba(47,93,67,0.18)" />
                  <stop offset="100%" stopColor="rgba(47,93,67,0)" />
                </radialGradient>
              </defs>
              {/* Region outline */}
              <path d="M 100 80 Q 200 50 320 70 Q 440 60 520 130 Q 560 210 510 320 Q 440 380 320 380 Q 200 380 130 320 Q 60 240 100 80 Z"
                fill="rgba(47,93,67,0.05)" stroke="rgba(47,93,67,0.25)" strokeWidth="1" />
              {/* Service circles */}
              {[
                { x: 200, y: 200, r: 110, c: 'Derby' },
                { x: 380, y: 220, r: 100, c: 'Nottingham' },
                { x: 290, y: 110, r: 90, c: 'Sheffield' },
              ].map((s, i) => (
                <g key={i}>
                  <circle cx={s.x} cy={s.y} r={s.r} fill="url(#rg)" />
                  <circle cx={s.x} cy={s.y} r={s.r} fill="none" stroke="rgba(47,93,67,0.4)" strokeDasharray="3 4" />
                  <circle cx={s.x} cy={s.y} r="6" fill="#2F5D43" />
                  <text x={s.x} y={s.y - 14} textAnchor="middle" fontFamily="JetBrains Mono" fontSize="11" fill="#1B2620" letterSpacing="2">{s.c.toUpperCase()}</text>
                </g>
              ))}
              {/* Customer dots */}
              {Array.from({ length: 80 }, (_, i) => {
                const cx = 80 + Math.random() * 440;
                const cy = 60 + Math.random() * 320;
                return <circle key={i} cx={cx} cy={cy} r="2" fill="#C97A3A" opacity="0.6" />;
              })}
            </svg>
            <div className="mono" style={{ fontSize: 10, color: 'var(--fg-4)', letterSpacing: '0.1em', marginTop: 8, textAlign: 'right' }}>
              847 ACTIVE INSTALLS · LIVE FLEET
            </div>
          </div>
        </Reveal>
      </div>
    </div>
  </section>
);

// === Aftercare — guarantee detail ===
const Aftercare = () => (
  <section className="section" style={{ paddingTop: 80 }}>
    <div className="container">
      <div className="surface-2" style={{ padding: 56, position: 'relative', overflow: 'hidden' }}>
        <div style={{
          position: 'absolute', top: -100, right: -100, width: 320, height: 320,
          background: 'radial-gradient(circle, var(--warm-soft), transparent 70%)',
          filter: 'blur(20px)',
        }} />
        <div style={{ position: 'relative', display: 'grid', gridTemplateColumns: '1fr 1.6fr', gap: 64 }}>
          <div>
            <span className="eyebrow" style={{ color: 'var(--warm)' }}>08 / The 10-year promise</span>
            <h2 className="h2-display" style={{ marginTop: 24 }}>
              Buy once.<br />
              <em style={{ color: 'var(--warm)' }}>Forget about it.</em>
            </h2>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 24 }}>
            {[
              { n: '01', t: 'All parts covered', d: 'Compressor, pump, controller, sensors. Manufacturer + HiLooks backstop.' },
              { n: '02', t: 'All labour covered', d: 'Including weekends and emergency call-outs. No hidden hourly rates.' },
              { n: '03', t: 'Annual service included', d: 'We come, we check refrigerant, we tune. You don\'t lift a finger.' },
              { n: '04', t: 'Performance backed', d: 'If your SCOP underperforms our design, we put it right at our cost.' },
            ].map(c => (
              <div key={c.n} style={{ padding: '20px 0', borderTop: '1px solid var(--line)' }}>
                <div className="mono" style={{ fontSize: 10, color: 'var(--warm)', letterSpacing: '0.12em' }}>YEAR {c.n}–10</div>
                <div className="serif" style={{ fontSize: 22, marginTop: 8 }}>{c.t}</div>
                <p style={{ fontSize: 13, color: 'var(--fg-3)', marginTop: 6, lineHeight: 1.55 }}>{c.d}</p>
              </div>
            ))}
          </div>
        </div>
      </div>
    </div>
  </section>
);

// === Finance / £0 upfront ===
const Finance = () => (
  <section className="section">
    <div className="container">
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64, alignItems: 'center' }}>
        <div>
          <Reveal><span className="eyebrow">06 / £0 upfront</span></Reveal>
          <Reveal delay={120}>
            <h2 className="h2-display" style={{ marginTop: 24 }}>
              Pay nothing<br />
              <em style={{ color: 'var(--accent)' }}>on day one.</em>
            </h2>
          </Reveal>
          <Reveal delay={220}>
            <p className="lead" style={{ marginTop: 24 }}>
              The £7,500 Boiler Upgrade Scheme covers the deposit. Our 0% finance over up to 10 years covers the rest. Most months, what you pay back is less than what you save on bills.
            </p>
          </Reveal>
        </div>
        <Reveal delay={200}>
          <div className="surface-2" style={{ padding: 32 }}>
            <div className="mono" style={{ fontSize: 10, color: 'var(--fg-4)', letterSpacing: '0.12em', marginBottom: 14 }}>EXAMPLE · 1972 SEMI · DERBY</div>
            <div style={{ display: 'grid', gap: 12 }}>
              <div className="row between"><span style={{ color: 'var(--fg-3)' }}>Install (Daikin 8kW)</span><span className="mono tnum">£13,800</span></div>
              <div className="row between"><span style={{ color: 'var(--fg-3)' }}>BUS grant</span><span className="mono tnum" style={{ color: 'var(--accent)' }}>−£7,500</span></div>
              <div className="divider" />
              <div className="row between"><span style={{ color: 'var(--fg-3)' }}>You finance</span><span className="mono tnum">£6,300</span></div>
              <div className="row between"><span style={{ color: 'var(--fg-3)' }}>Over 120 months · 0% APR</span><span className="mono tnum">£52 / mo</span></div>
              <div className="divider" />
              <div className="row between" style={{ padding: '16px 18px', borderRadius: 12, background: 'var(--accent)', color: '#fff' }}>
                <span>Net monthly cost vs. gas</span>
                <span className="serif tnum" style={{ fontSize: 28 }}>£0 — £8</span>
              </div>
            </div>
            <div className="mono" style={{ fontSize: 10, color: 'var(--fg-4)', marginTop: 14, letterSpacing: '0.06em' }}>
              FINANCE BY OMNI · FCA-AUTHORISED · SUBJECT TO STATUS
            </div>
          </div>
        </Reveal>
      </div>
    </div>
  </section>
);

