/* =====================================================================
   [Company Name]: site-wide type system
   Loaded after the layered legacy styles, so these values always win.
   Change a size here and it changes on every page.

   Scale (desktop max / mobile min), fluid between 390px and 1440px wide
     H1       72 / 36   page and hero headline
     H2       48 / 30   section headline
     H3       32 / 24   feature headline
     H4       24 / 20   sub-heading
     Title    20        card and list titles
     Lead     20 / 17   intro paragraphs under headlines
     Body     18        long-form reading text (articles)
     UI       16        default text, buttons, form fields, table cells
     Small    14        captions, tags, notes
     Label    13        uppercase eyebrows and table headers
   Rules: minimum 16px for anything people read in sentences, 16px inputs
   (stops iOS zoom), headings 600 weight, tight tracking on large sizes,
   45 to 75 characters per line for reading text.
   ===================================================================== */

:root {
  --fs-h1: clamp(2.25rem, 1.2rem + 3.9vw, 4.5rem);
  --fs-h2: clamp(1.875rem, 1.1rem + 2.6vw, 3rem);
  --fs-h3: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  --fs-h4: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-title: 1.25rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1.125rem;
  --fs-ui: 1rem;
  --fs-small: 0.875rem;
  --fs-label: 0.8125rem;

  --lh-h1: 1.05;
  --lh-h2: 1.1;
  --lh-h3: 1.2;
  --lh-h4: 1.3;
  --lh-title: 1.35;
  --lh-body: 1.7;
  --lh-ui: 1.55;

  --track-h1: -0.03em;
  --track-h2: -0.025em;
  --track-h3: -0.02em;
  --track-h4: -0.01em;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--track-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--track-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--track-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: var(--track-h4); }

/* Headline roles that sit one level down: sub-headings inside articles, titles on cards */
.article h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: var(--track-h4); }
.project-card h3, .how-card h4, .rebate-tile-form h4, .mega-promo h4 { font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: -0.005em; }
.footer-col h5 { font-size: var(--fs-ui); font-weight: 600; letter-spacing: 0; }
.callout h4 { font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4; }

/* The home hero is sized to fit the screen height as well as the width */
.sdn-intro .sdn-orig h1 { font-size: min(var(--fs-h1), 8.4vh); }
.sdn-copy .sdn-h { font-size: min(var(--fs-h2), 5.4vh); line-height: var(--lh-h2); letter-spacing: var(--track-h2); }
.sdn-orig .hero-sub, .sdn-copy .sdn-sub { font-size: clamp(1rem, min(var(--fs-lead), 2.4vh), 1.25rem); line-height: 1.5; }

/* Line length for headlines: keep them from stretching into one long line */
.page-hero h1, .page-hero p.lede { max-width: 18em; }
.page-hero p.lede { max-width: 38em; }

/* ---------- Reading text ---------- */
.article p, .article li { font-size: var(--fs-body); line-height: var(--lh-body); max-width: 70ch; text-wrap: pretty; }
.lede, .page-hero p.lede, .section-heading p, .section-heading-split > p, .savings-content > p, .finance-content > p, .area-content > p {
  font-size: var(--fs-lead); line-height: 1.55; text-wrap: pretty;
}

/* ---------- Interface text ---------- */
td, li, .faq-a, .product-desc, .audience-card li, .how-card p, .project-card p { font-size: var(--fs-ui); }
td { line-height: var(--lh-ui); }
th { font-size: var(--fs-small); }
.faq-q, .faq-item summary { font-size: var(--fs-title); }
.btn, .btn-ghost, .aud-cta, .hero-postcode button, .area-search button, .newsletter-form button, .contact-form-card button { font-size: var(--fs-ui); }
input, select, textarea { font-size: var(--fs-ui); }
.product-tag, .chip { font-size: var(--fs-small); }
.overline, .aud-overline, .tile-overline, .stat-label, .contact-detail-label, .bill-label, .trust-label, .hero-stat-label, .bill-note { font-size: var(--fs-label); }
.hero-stat-label, .stat-label, .trust-label { font-size: var(--fs-small); }
.footer-legal { font-size: var(--fs-label); }

/* Statements and key numbers inside tiles and cards use the scale too */
.tile-big, .rebate-tile .tile-big, .finance-tile .tile-big, .callout .big { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--track-h3); text-wrap: balance; }
.hero-stat-num, .bill-card .bill-amount { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: var(--track-h2); }
.trust-num { font-size: var(--fs-h4); }
.project-savings .stat-num { font-size: var(--fs-title); }

/* Headlines longer than about 70 characters step down one size so they stay at 3 lines or fewer */
h2.h-long { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--track-h3); }

/* Nothing on the site is smaller than 13px */
.hero-micro, .trusted-logo span, .fine-print, .rebate-tile-form .field span, .field > span, .ph-label, .ph-dim { font-size: var(--fs-label); }
.hero-micro { font-size: var(--fs-small); }

/* ---------- Mega menus: titles and rows line up across columns, one-line subtitles, image promo ---------- */
.mega-panel .mega-grid { gap: 0 24px; grid-template-rows: auto repeat(var(--lrows, 1), auto) 1fr; min-height: 252px; align-items: stretch; }
.mega-panel .mega-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.35fr); }
.mega-panel .mega-grid.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
.mega-panel .mega-grid.cols-company { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.mega-panel .cols-company .mega-promo:nth-child(2) { grid-column: 2; }
.mega-panel .cols-company .mega-promo:nth-child(3) { grid-column: 3; }
.mega-panel .mega-grid > div:not(.mega-promo) { display: grid; grid-row: span var(--rows, 1); grid-template-rows: subgrid; row-gap: 2px; min-width: 0; }
.mega-panel .mega-links { display: contents; }
.mega-panel .mega-link { padding: 9px 12px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.mega-panel .mega-link .mega-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-panel .mega-promo { grid-row: 1 / -1; grid-column: -2 / -1; min-height: 0; contain: size; overflow: hidden; justify-content: flex-start; padding: 16px; gap: 12px; }
.mega-panel .mega-promo > div:first-child { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.mega-panel .mega-promo-image { flex: 1 1 0; min-height: 0; max-height: 190px; aspect-ratio: auto; padding: 0; border: 0; background: #0b1a2b; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.mega-panel .mega-promo-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega-panel .mega-promo p { display: none; }
.mega-panel { padding: 28px 32px; }

/* ---------- Home hero: tighter intro so the roof shows on the first screen ---------- */
.sdn-intro { padding-top: calc(var(--hdr) + 28px); padding-bottom: 10px; }

/* Logo turns light while the dark night scene is behind the header */
body.home-hero .site-header.hdr-dark:not(.is-solid) .logo-img { content: url(logo-light.svg); }

/* ---------- Footer: night scene ---------- */
.site-footer.ft-night { background: #070A1C; color: #fff; overflow: hidden; padding: 96px 24px 0; }
.ft-night .ft-bg { position: absolute; inset: 0; background: url(hero/night-100.webp) center 70% / cover; }
.ft-night .ft-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(7, 10, 28, 0.92) 0%, rgba(7, 10, 28, 0.55) 38%, rgba(7, 10, 28, 0.88) 78%, #070A1C 100%); }
.ft-night .ft-hd { position: relative; text-align: center; max-width: 880px; margin: 0 auto 64px; }
.ft-night .ft-hd h3 { color: #fff; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; margin: 0; }
.ft-night .ft-hd h3 em { color: #7CF0A6; font-style: normal; }
.ft-night .ft-hd p { color: rgba(255, 255, 255, 0.82); font-size: var(--fs-lead); max-width: 42rem; margin: 16px auto 28px; }
.ft-night .ft-btn { display: inline-flex; align-items: center; gap: 12px; border-radius: 999px; background: #4EAE6C; color: #07130d; font-weight: 600; font-size: 16px; padding: 10px 10px 10px 26px; transition: background 0.2s; }
.ft-night .ft-btn:hover { background: #3d9a5a; }
.ft-night .ft-btn span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #07130d; color: #fff; }
.ft-night .ft-glass { position: relative; max-width: 1240px; margin: 0 auto; background: rgba(11, 26, 43, 0.55); border: 1px solid rgba(255, 255, 255, 0.14); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 40px 44px 0; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.ft-night .footer-inner { padding: 0; max-width: none; }
.ft-night .footer-legal { max-width: none; padding: 22px 0; margin: 30px 0 0; }
@media (max-width: 760px) { .site-footer.ft-night { padding: 64px 16px 0; } .ft-night .ft-glass { padding: 28px 20px 0; border-radius: 22px 22px 0 0; } .ft-night .ft-hd { margin-bottom: 40px; } }

/* ---------- Phone number with an icon ---------- */
.header-phone { display: inline-flex; align-items: center; gap: 10px; }
.header-phone::before { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B5E3F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / 13px no-repeat, rgba(27, 94, 63, 0.1); transition: background-color 0.3s ease; }
body.home-hero .site-header.hdr-dark:not(.is-solid) .header-phone::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237CF0A6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / 13px no-repeat, rgba(124, 240, 166, 0.16); }
.footer-contact a[href^="tel"] { display: inline-flex; align-items: center; gap: 8px; }
.footer-contact a[href^="tel"]::before { content: ""; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237CF0A6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 1100px) { .header-phone::before { width: 26px; height: 26px; } }

/* ---------- Motion ---------- */
html.motion .rv { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 90ms), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 90ms); will-change: opacity, transform; }
html.motion .rv.rv-in { opacity: 1; transform: none; }
html.motion .rv-img { opacity: 0; transform: scale(1.08); clip-path: inset(7% round 22px); transition: opacity 1s ease 0.15s, transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s, clip-path 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s; }
html.motion .rv-img.rv-in { opacity: 1; transform: none; clip-path: inset(0 round 0); }

/* Hover polish */
.audience-card, .how-card, .product-item, .rebate-item, .trust-cell { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease, background-color 0.3s ease; }
@media (hover: hover) {
  .audience-card:hover, .how-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
}
.btn .btn-arrow, .aud-cta .btn-arrow, .ft-btn span { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.btn:hover .btn-arrow, .aud-cta:hover .btn-arrow, .ft-btn:hover span { transform: translateX(4px); }

/* Night footer slowly breathes */
@keyframes ft-drift { from { transform: scale(1.04) translate3d(-1.2%, 0, 0); } to { transform: scale(1.12) translate3d(1.2%, -1%, 0); } }
.ft-night .ft-bg { animation: ft-drift 38s ease-in-out infinite alternate; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .ft-night .ft-bg { animation: none; } }

/* ---------- Logo (730 x 160 wordmark) ---------- */
.logo-img { height: 50px; width: auto; }
@media (max-width: 1100px) { .logo-img { height: 42px; } }
.footer-brand .logo-img { height: 60px; }

/* ======================= Dark theme ======================= */
:root { --on-dark: #ffffff; }
html[data-theme="dark"] {
  color-scheme: dark;
  --white: #111c17;
  --ivory: #0a110e;
  --mint: #0e1813;
  --mint-2: #0c1511;
  --gray-50: #0d1511;
  --gray-100: #15211b;
  --ink: #e9f1ed;
  --ink-soft: #c5d3cb;
  --muted: #94a69d;
  --muted-2: #6c7e75;
  --border: rgba(255, 255, 255, 0.1);
  --green-tint: #12281f;
  --green: #1F7A4D;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.45), 0 20px 60px rgba(0, 0, 0, 0.5);
  --gradient-hero: linear-gradient(180deg, #0f2a1e 0%, #0c1813 50%, #0a110e 100%);
}
html[data-theme="dark"] body { background: var(--ivory); color: var(--ink); }
html[data-theme="dark"] .site-header .logo-img { content: url(logo-light.svg); }
html[data-theme="dark"] body.home-hero .site-header { --hdr-rgb: 10, 17, 14; }
/* Over the pale first hero screen the header keeps its light-theme look */
html[data-theme="dark"] body.home-hero .site-header:not(.is-solid):not(.hdr-dark) {
  --ink: #131614; --green: #1B5E3F; --muted: #6B7368; --border: #E8E8E4; --white: #ffffff;
}
html[data-theme="dark"] body.home-hero .site-header:not(.is-solid):not(.hdr-dark) .logo-img { content: url(logo.svg); }
html[data-theme="dark"] .header-phone { color: #7CF0A6; }
html[data-theme="dark"] .header-phone::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237CF0A6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / 13px no-repeat, rgba(124, 240, 166, 0.14); }
html[data-theme="dark"] body.home-hero .site-header:not(.is-solid):not(.hdr-dark) .header-phone { color: #1B5E3F; }

/* Theme toggle */
.theme-toggle { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background-color 0.25s ease, transform 0.25s ease; }
.theme-toggle:hover { background: rgba(127, 127, 127, 0.14); transform: rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }
body.home-hero .site-header.hdr-dark:not(.is-solid) .theme-toggle { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.theme-toggle.t-mobile { display: none; }
@media (max-width: 1100px) { .theme-toggle.t-desktop { display: none; } .theme-toggle.t-mobile { display: grid; margin-left: auto; margin-right: 10px; } }
html, body, .site-header, .section, .audience-card, .mega-panel { transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease; }

/* Dark theme: component fixes */
html[data-theme="dark"] .sdn-intro { --ink: #131614; --ink-soft: #2c3b52; --muted: #55657c; --border: #E8E8E4; --white: #ffffff; --green: #1B5E3F; }
html[data-theme="dark"] .rebate-tile, html[data-theme="dark"] .finance-tile { --ink: #0b1a14; --ink-soft: #17352a; --muted: #35574a; --white: #ffffff; --border: rgba(11, 26, 20, 0.16); --green: #1B5E3F; }
html[data-theme="dark"] .overline, html[data-theme="dark"] .rebate-item-value, html[data-theme="dark"] .product-tag, html[data-theme="dark"] .product-num, html[data-theme="dark"] .product-toggle, html[data-theme="dark"] .finance-content h2 .accent, html[data-theme="dark"] .section-heading h2 .accent, html[data-theme="dark"] .section-heading-split h2 .accent { color: #5FCF93; }
html[data-theme="dark"] .overline::before { background: #5FCF93; }
html[data-theme="dark"] .bill-card.after .bill-label, html[data-theme="dark"] .bill-card.after .bill-note { color: rgba(255, 255, 255, 0.78); }

/* Tick marks in the two-path cards: drawn inside the circle, same in both themes */
.audience-card li::after { display: none; }
.audience-card li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1a14' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-size: 12px; background-repeat: no-repeat; background-position: center; background-color: var(--lime); }
html[data-theme="dark"] h1 .accent, html[data-theme="dark"] h2 .accent, html[data-theme="dark"] h3 .accent { color: #5FCF93; }
html[data-theme="dark"] .sdn-intro h1 .accent { color: #4EAE6C; }

/* ---------- Compact menu bar: smaller elements, same positions ---------- */
.logo-img { height: 42px; }
.nav-item > button, .nav-item > a { font-size: 14px; }
.nav-caret { width: 9px; height: 9px; }
.header-phone { font-size: 14px; gap: 8px; }
.header-phone::before { width: 26px; height: 26px; background-size: 13px, auto; }
.header-cta { gap: 16px; }
.header-cta .btn { padding: 6px 6px 6px 20px; font-size: 14px; gap: 8px; }
.header-cta .btn .btn-arrow { width: 28px; height: 28px; }
.header-cta .btn .btn-arrow svg { width: 12px; height: 12px; }
.theme-toggle { width: 32px; height: 32px; }
.theme-toggle svg { width: 15px; height: 15px; }
@media (min-width: 1360px) {
  .header-inner .logo { flex: 0 0 228px; }
  .header-inner .header-cta { flex: 0 0 433px; justify-content: flex-end; }
}
@media (max-width: 1100px) {
  .logo-img { height: 36px; }
  .nav-toggle { transform: scale(0.88); transform-origin: right center; }
  .theme-toggle { width: 30px; height: 30px; }
}
html[data-theme="dark"] .header-phone::before, body.home-hero .site-header.hdr-dark:not(.is-solid) .header-phone::before { background-size: 13px, auto; }
