/* MilvadoPower website — v2, Oct 2026
   Layout: left-aligned editorial grid on warm paper; navy bands for emphasis;
   the electricity bill is the recurring visual motif. Brand tokens from the logo kit. */
:root {
  --navy: #0F1E3C;
  --green: #1E5E3B;
  --slate: #5B6575;
  --paper: #F7F6F2;
  --white: #FFFFFF;

  --bg: var(--paper);
  --surface: var(--white);
  --ink: var(--navy);
  --body: var(--slate);
  --accent: var(--green);
  --accent-ink: #FFFFFF;
  --line: #DEDCD3;
  --band: var(--navy);
  --band-ink: #F7F6F2;
  --band-muted: #AEB6C6;
  --band-line: #26375A;
  --seg-1: #0F1E3C;
  --seg-2: #1E5E3B;
  --seg-3: #4F7F63;
  --seg-4: #8FAE99;
  --seg-5: #C9C6BA;

  --font: 'Montserrat', Arial, Helvetica, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.75rem + 2.8vw, 4rem);

  --wrap: 72rem;
  --radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1630; --surface: #12213F; --ink: #F2F1EC; --body: #B4BCCB;
    --accent: #6DBA8E; --accent-ink: #0B1630; --line: #22345A;
    --band: #060E20; --band-ink: #F2F1EC; --band-muted: #9AA4B8; --band-line: #1D2C4C;
    --seg-1: #E8E6DE; --seg-2: #6DBA8E; --seg-3: #4C8F6A; --seg-4: #35664C; --seg-5: #3A4866;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1630; --surface: #12213F; --ink: #F2F1EC; --body: #B4BCCB;
  --accent: #6DBA8E; --accent-ink: #0B1630; --line: #22345A;
  --band: #060E20; --band-ink: #F2F1EC; --band-muted: #9AA4B8; --band-line: #1D2C4C;
  --seg-1: #E8E6DE; --seg-2: #6DBA8E; --seg-3: #4C8F6A; --seg-4: #35664C; --seg-5: #3A4866;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--font); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; text-wrap: balance; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; max-width: 64ch; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

.eyebrow {
  font-size: var(--step--1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); display: flex; align-items: center; gap: 0.75rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 2px; background: currentColor; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--body); }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.5rem; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.brand { display: block; line-height: 0; }
.brand img { width: 190px; height: auto; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none !important; } :root:not([data-theme="light"]) .logo-dark { display: block !important; } }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav .btn { color: var(--accent-ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font: 600 0.85rem var(--font); padding: 0.5rem 0.8rem; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0.5rem max(16px, env(safe-area-inset-right, 0px)) 1.25rem max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding-block: 0.7rem; width: 100%; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; width: auto; border-bottom: 0; }
  .brand img { width: 160px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font); font-weight: 600; font-size: 0.95rem;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 0.8rem 1.25rem; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.band .btn-ghost { color: var(--band-ink); border-color: var(--band-line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Sections */
section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
section + section { border-top: 1px solid var(--line); }
.band { background: var(--band); color: var(--band-muted); border-top: 0 !important; }
.band h2, .band h3 { color: var(--band-ink); }
.band .eyebrow { color: var(--seg-4); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 46rem; }

/* Hero */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 { max-width: 16ch; }
.hero .lede { max-width: 38rem; }

/* The bill: hero visual */
.bill { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1.25rem; min-width: 0; }
.bill-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.bill-title { font-size: var(--step--1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink); }
.bill-tag { font-family: var(--mono); font-size: 0.75rem; color: var(--body); }
.bill-bar { display: flex; height: 3.25rem; border-radius: 3px; overflow: hidden; gap: 2px; }
.bill-bar span { display: block; height: 100%; }
.bill-rows { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.bill-rows li { display: grid; grid-template-columns: 0.85rem 1fr auto; gap: 0.75rem; align-items: center; padding-block: 0.55rem; border-bottom: 1px dashed var(--line); font-size: 0.9rem; color: var(--ink); }
.bill-rows li:last-child { border-bottom: 0; }
.bill-rows i { width: 0.85rem; height: 0.85rem; border-radius: 2px; display: block; }
.bill-rows small { display: block; color: var(--body); font-size: 0.78rem; }
.bill-rows .num { font-size: 0.9rem; }
.bill-foot { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.82rem; color: var(--body); border-top: 1px solid var(--line); padding-top: 1rem; }
.bill-foot b { color: var(--accent); font-weight: 600; }
.chip { font-family: var(--mono); font-size: 0.7rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 2px; padding: 0.05rem 0.35rem; white-space: nowrap; }

/* Offer facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); border-top: 1px solid var(--band-line); }
.fact { padding: 1.75rem 1.5rem 1.75rem 0; display: grid; gap: 0.35rem; align-content: start; }
.fact .big { font-family: var(--mono); font-size: var(--step-3); color: var(--band-ink); letter-spacing: -0.03em; line-height: 1; }
.fact p { font-size: 0.9rem; }

/* Columns & cards */
.cols { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 760px) { .cols-2 { grid-template-columns: repeat(2, 1fr); } .cols-3 { grid-template-columns: repeat(3, 1fr); } }
.cols > * { min-width: 0; }
.item { display: grid; gap: 0.75rem; align-content: start; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.band .item { border-top-color: var(--band-ink); }
.item .tag { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.25rem, 2.5vw, 1.75rem); display: grid; gap: 0.85rem; align-content: start; }
.card a.more { font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.card a.more::after { content: " \2192"; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.ticks li { position: relative; padding-left: 1.5rem; font-size: 0.95rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.7rem; height: 2px; background: var(--accent); }

/* Split text */
.split { display: grid; gap: clamp(2rem, 4vw, 4rem); }
@media (min-width: 900px) { .split { grid-template-columns: 0.85fr 1.15fr; } }
.split > * { min-width: 0; }
.prose { display: grid; gap: 1.1rem; }
.prose h3 { margin-top: 0.75rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.band .prose strong { color: var(--band-ink); }

/* Steps (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); color: var(--accent); font-size: 1rem; padding-top: 0.15rem; }
.steps li > div { display: grid; gap: 0.4rem; min-width: 0; }
@media (min-width: 900px) { .steps li { grid-template-columns: 3.5rem 18rem 1fr; } .steps li > div { display: contents; } .steps li h3 { padding-top: 0.05rem; } }
.steps .when { font-family: var(--mono); font-size: 0.75rem; color: var(--body); }

/* Estimator */
.est { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2.25rem); }
@media (min-width: 900px) { .est { grid-template-columns: 1fr 1fr; } }
.est > * { min-width: 0; }
.field { display: grid; gap: 0.5rem; }
.field label { font-weight: 600; color: var(--ink); font-size: 0.95rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.field output { font-family: var(--mono); color: var(--accent); }
.field .hint { font-size: 0.82rem; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.readout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.readout div { padding: 1rem 0.75rem 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.2rem; min-width: 0; }
.readout dt { font-size: 0.8rem; }
.readout dd { margin: 0; font-family: var(--mono); font-size: var(--step-2); color: var(--ink); line-height: 1.1; }
.readout dd small { font-size: 0.8rem; color: var(--body); }
.limit { font-size: 0.85rem; color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, transparent); border-left: 2px solid var(--accent); padding: 0.75rem 1rem; }
.fineprint { font-size: 0.8rem; line-height: 1.55; }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative; font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1.05rem; font-family: var(--mono); font-size: 1.3rem; color: var(--accent); }
.faq details[open] summary::after { content: "\2013"; }
.faq .answer { padding-bottom: 1.5rem; display: grid; gap: 0.75rem; }

/* Insights */
.post { display: grid; gap: 0.75rem; align-content: start; text-decoration: none; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.post .meta { font-family: var(--mono); font-size: 0.75rem; color: var(--body); }
.post h3 { color: var(--ink); }
.post:hover h3 { color: var(--accent); }
.post p { color: var(--body); font-size: 0.95rem; }
article.long { display: grid; gap: 1.1rem; max-width: 44rem; padding-block: 2.5rem; border-top: 1px solid var(--line); }
article.long:first-of-type { border-top: 0; }
article.long h2 { font-size: var(--step-2); }
article.long .meta { font-family: var(--mono); font-size: 0.78rem; }
.sources { font-size: 0.82rem; display: grid; gap: 0.3rem; }

/* Page intro for inner pages */
.page-intro { padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); }
.page-intro .stack-lg { max-width: 48rem; }

/* Forms */
form.enquiry { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-row > * { min-width: 0; }
form.enquiry label { display: grid; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
form.enquiry input, form.enquiry select, form.enquiry textarea {
  font: 400 1rem var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.85rem; width: 100%;
}
form.enquiry textarea { min-height: 8rem; resize: vertical; }
.form-note { font-size: 0.85rem; }
.form-status { font-size: 0.92rem; color: var(--ink); border-left: 2px solid var(--accent); padding: 0.6rem 0.9rem; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.email-line code { font-family: var(--mono); color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 0.35rem 0.6rem; border-radius: var(--radius); user-select: all; }
.copy-btn { font: 600 0.8rem var(--font); background: none; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); padding: 0.4rem 0.7rem; cursor: pointer; }

/* Placeholder marker for text Charles must fill in */
.todo { background: color-mix(in srgb, #E0A100 22%, transparent); color: var(--ink); padding: 0 0.25rem; border-radius: 2px; font-family: var(--mono); font-size: 0.88em; }

/* Closing CTA */
.cta-band .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .cta-band .wrap { grid-template-columns: 1.4fr 1fr; align-items: end; } .cta-band .btn-row { justify-content: flex-end; } }

/* Footer */
.site-footer { background: var(--band); color: var(--band-muted); padding-block: 3.5rem 2rem; font-size: 0.88rem; }
.site-footer .wrap { display: grid; gap: 2.5rem; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.foot-grid img { width: 260px; height: auto; }
.site-footer h4 { color: var(--band-ink); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--band-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.legal { border-top: 1px solid var(--band-line); padding-top: 1.5rem; display: grid; gap: 0.5rem; font-size: 0.8rem; }

.skip { position: absolute; left: -999px; top: 0; z-index: 40; background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* Photography and video. Missing files fall back to the navy ground. */
.hero-media { position: relative; overflow: hidden; background: #0F1E3C; color: #E6E9EF; min-height: min(78vh, 46rem); display: grid; align-items: end; padding-block: clamp(6rem, 14vw, 10rem) clamp(3rem, 6vw, 5rem); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,30,60,0.15) 0%, rgba(15,30,60,0.55) 45%, rgba(15,30,60,0.92) 100%); }
.hero-inner { position: relative; width: 100%; }
.hero-media h1 { color: #FFFFFF; max-width: 15ch; }
.hero-media .lede { color: #E6E9EF; max-width: 38rem; }
.hero-media .eyebrow { color: #9FD3B4; }
.hero-media .btn-ghost { color: #FFFFFF; border-color: rgba(255,255,255,0.45); }
.hero-media .btn-ghost:hover { border-color: #FFFFFF; }
.hero-media + section { border-top: 0; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } .hero-media { background: #0F1E3C url(img/hero.jpg) center / cover; } }
.card.has-photo { padding-top: 0; overflow: hidden; }
.card .photo { margin-inline: calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem)); aspect-ratio: 16 / 10; max-width: none; background: var(--band) center / cover no-repeat; }
.photo-band { min-height: clamp(16rem, 38vw, 30rem); background: var(--band) center / cover no-repeat; padding: 0; border-top: 0 !important; }
.photo-band + section { border-top: 0; }
.split .bill { margin-top: 0.5rem; }
.figure-band { margin: 0; position: relative; background: var(--band); }
.figure-band img { width: 100%; max-height: 40rem; object-fit: cover; }
.figure-band figcaption { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 0.75rem; font-size: 0.72rem; color: #FFFFFF; background: rgba(15,30,60,0.7); padding: 0.25rem 0.6rem; border-radius: 2px; }
.figure-band + section { border-top: 0; }

/* Honeypot field for the enquiry form: hidden from people, filled by bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
