/* ==========================================================================
   Happy Home Inspections LLC — Conway, Arkansas
   Theme: "Rooflines" — navy field, gold porch light, peak motif
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand — sampled directly from the logo */
  --navy:        #020C45;
  --navy-raised: #0A1560;
  --navy-deep:   #010831;
  --gold:        #CCA300;
  --gold-light:  #F5D66E;
  --gold-dim:    #7A6104;

  /* Neutrals */
  --paper:       #FBFAF6;
  --paper-alt:   #F2EFE6;
  --slate:       #5A6178;
  --ink:         #141A2E;
  --line:        #E3DFD2;
  --line-navy:   rgba(245, 214, 110, .18);

  /* Type */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.13rem + .35vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.36rem + .7vw, 1.95rem);
  --step-3:  clamp(1.9rem, 1.62rem + 1.4vw, 2.7rem);
  --step-4:  clamp(2.35rem, 1.85rem + 2.5vw, 3.9rem);
  --step-5:  clamp(2.8rem, 1.95rem + 4.2vw, 5.1rem);

  /* Space */
  --sp-1: .5rem;  --sp-2: 1rem;   --sp-3: 1.5rem;
  --sp-4: 2.25rem; --sp-5: 3.5rem; --sp-6: 5rem;   --sp-7: 7rem;

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 40;
}

/* ---------- Accessibility ---------- */
/* the sticky header is 78px — keep anchored targets clear of it */
:target, h2[id], h3[id], section[id] { scroll-margin-top: 96px; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: var(--navy);
  padding: .75rem 1.25rem; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding-block: var(--sp-6); position: relative; }
.section--tight { padding-block: var(--sp-5); }
.section--navy { background: var(--navy); color: #EDF0FA; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }
.section--alt { background: var(--paper-alt); }

/* ---------- Signature: the roofline rule ----------
   A repeating peak, echoing the two rooftops in the logo.
   Used as the boundary between every major band of the page. */
.roofline {
  display: block; width: 100%; height: 22px;
  color: var(--gold);
}
.roofline svg { width: 100%; height: 100%; }
.roofline--flip { transform: scaleY(-1); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: var(--sp-2);
}
.section--navy .eyebrow,
.hero .eyebrow,
.banner .eyebrow,
.build .eyebrow { color: var(--gold-light); }
.eyebrow::before {
  content: ""; width: 22px; height: 22px; flex: none;
  background: currentColor;
  /* two small roof peaks — the logo's mark, reduced to a label glyph */
  -webkit-mask: no-repeat center/100% auto var(--peak);
  mask: no-repeat center/100% auto var(--peak);
  --peak: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 11 6.5 3 12 11 17.5 3 23 11' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.7rem;
  font-weight: 650; font-size: var(--step-0);
  text-decoration: none; border: 2px solid transparent;
  border-radius: 999px; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .06s; }
.btn--gold {
  background: var(--gold); color: var(--navy);
  box-shadow: 0 8px 24px -10px rgba(204, 163, 0, .9);
}
.btn--gold:hover { background: var(--gold-light); box-shadow: 0 14px 30px -12px rgba(204, 163, 0, 1); }
/* A light sweeps across the primary action on hover — once, not looping. */
.btn--gold::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 38%,
              rgba(255, 255, 255, .55) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .65s var(--ease);
}
.btn--gold:hover::before { transform: translateX(120%); }
@media (prefers-reduced-motion: reduce) {
  .btn--gold::before { display: none; }
}
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-raised); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: rgba(245, 214, 110, .12); }
.section--navy .btn--ghost { color: var(--gold-light); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid var(--line-navy);
  transition: box-shadow .3s var(--ease);
}
.header.is-stuck { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .9); }

/* Reading progress, drawn as a gold rule along the header's base edge.
   scroll-driven where supported, so it costs no JS. */
.header::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px;
  width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
@supports (animation-timeline: scroll()) {
  .header::after {
    animation: progress linear;
    animation-timeline: scroll(root block);
  }
  @keyframes progress { to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) {
  .header::after { animation: none; transform: scaleX(0); }
}
.header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); min-height: 78px;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 46px; height: auto; border-radius: 8px; }

/* ---------- Animated logo mark ----------
   The logo is a house that smiles, so it draws itself on load and grins
   on hover. This is the page's one piece of pure delight; everything
   else stays disciplined. */
.mark { width: 52px; height: 41px; flex: none; overflow: visible; }  /* 463:366 ≈ 1.265 */
.mark path {
  fill: none; stroke: var(--gold);
  stroke-width: 10; stroke-linecap: round; stroke-linejoin: round;
}
.mark__roof, .mark__roof2 { stroke-width: 14; }
.mark__smile { stroke-width: 7; }
.mark .mark__roof  { stroke-dasharray: 132; stroke-dashoffset: 132; animation: draw .55s var(--ease) forwards; }
.mark .mark__roof2 { animation-delay: .1s; }
.mark .mark__ltr   { stroke-dasharray: 230; stroke-dashoffset: 230; animation: draw .4s var(--ease) forwards .3s; }
.mark .mark__ltr2  { animation-delay: .38s; }
.mark .mark__ltr3  { animation-delay: .46s; }
.mark .mark__smile {
  stroke-dasharray: 278; stroke-dashoffset: 278;
  animation: draw .6s var(--ease) forwards .55s;
  transition: d .35s var(--ease);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* The same mark at hero scale, sitting under the trust row. It draws itself
   on load like the header one, just larger and a beat later. */
.mark--hero {
  width: clamp(150px, 15vw, 190px); height: auto;
  margin-top: var(--sp-3);
  opacity: .95;
}
.mark--hero .mark__roof  { animation-delay: .5s; }
.mark--hero .mark__roof2 { animation-delay: .6s; }
.mark--hero .mark__ltr   { animation-delay: .78s; }
.mark--hero .mark__ltr2  { animation-delay: .86s; }
.mark--hero .mark__ltr3  { animation-delay: .94s; }
.mark--hero .mark__smile { animation-delay: 1.05s; }
@media (max-width: 940px) {
  /* centered and larger on phones, where the hero column is full width */
  .mark--hero { width: min(196px, 54%); margin: var(--sp-3) auto 0; }
}

/* Roofs lift and the smile deepens when the brand is hovered or focused.
   Transform-based so it works everywhere (animating `d` does not). */
.mark__roof, .mark__roof2, .mark__smile {
  transition: transform .35s var(--ease);
  transform-box: fill-box; transform-origin: center;
}
.brand:hover .mark__roof,  .brand:focus-visible .mark__roof  { transform: translateY(-4px); }
.brand:hover .mark__roof2, .brand:focus-visible .mark__roof2 { transform: translateY(-7px); }
.brand:hover .mark__smile, .brand:focus-visible .mark__smile { transform: scaleX(1.1) scaleY(1.35); }

@media (prefers-reduced-motion: reduce) {
  .mark path { animation: none !important; stroke-dashoffset: 0 !important; }
}
.brand__name {
  font-family: var(--display); font-weight: 600;
  font-size: 1.12rem; line-height: 1.05; color: #fff;
  letter-spacing: -.01em;
}
.brand__name span { display: block; font-family: var(--body); font-size: .68rem;
  font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

.nav { display: flex; align-items: center; gap: var(--sp-3); }
.nav__list { display: flex; align-items: center; gap: var(--sp-3); list-style: none; padding: 0; }
.nav__link {
  text-decoration: none; color: #D7DCF0; font-weight: 550; font-size: .96rem;
  padding: .4rem 0; position: relative;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--gold); transition: right .3s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: #fff; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { right: 0; }
.nav__phone {
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--gold-light); font-weight: 700;
  white-space: nowrap;
}

.navtoggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: .6rem; color: #fff;
}
.navtoggle svg { width: 26px; height: 26px; }

/* ---------- Mobile call affordances ----------
   The whole positioning is "an inspector who answers his own phone", so the
   number must never be hidden behind a hamburger. Desktop keeps it in the
   nav; below the breakpoint it lives in the bar itself. */
.callnow { display: none; }
@media (max-width: 940px) {
  .callnow {
    display: inline-flex; align-items: center; gap: .35rem;
    margin-left: auto; margin-right: .15rem;
    padding: .5rem .85rem;
    background: var(--gold); color: var(--navy);
    border-radius: 999px; text-decoration: none;
    font-weight: 700; font-size: .88rem; white-space: nowrap;
  }
  .callnow svg { width: 15px; height: 15px; }
  /* the brand must not wrap now that the call button shares the bar */
  .brand { gap: .5rem; min-width: 0; }
  .brand__name { font-size: .98rem; white-space: nowrap; }
  .brand__name span { font-size: .6rem; letter-spacing: .12em; }
  /* header mark only — the hero copy sizes itself below */
  .brand .mark { width: 42px; height: 33px; }
}
@media (max-width: 400px) {
  .callnow span { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .callnow { padding: .5rem .62rem; }
}

/* Sticky bottom bar on phones — the standard trades pattern. Hidden while
   the quote widget is on screen so it can't cover the form's controls. */
.callbar { display: none; }
@media (max-width: 740px) {
  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--navy-deep);
    border-top: 1px solid var(--line-navy);
    box-shadow: 0 -8px 24px -14px rgba(0, 0, 0, .95);
    padding-bottom: env(safe-area-inset-bottom);
    transition: transform .3s var(--ease);
  }
  .callbar.is-hidden { transform: translateY(110%); }
  .callbar a {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 56px; text-decoration: none;
    font-weight: 700; font-size: 1rem;
  }
  .callbar svg { width: 18px; height: 18px; }
  .callbar__call  { color: var(--gold-light); }
  .callbar__quote { background: var(--gold); color: var(--navy); }
  /* keep the footer clear of the bar */
  .footer { padding-bottom: calc(var(--sp-5) + 56px); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--navy); color: #fff;
  padding-block: clamp(2.25rem, 4.5vw, 4rem) 0;
  overflow: hidden;
}
/* porch-light glow behind the headline */
.hero::before {
  content: ""; position: absolute; z-index: 0;
  width: 62vw; height: 62vw; max-width: 780px; max-height: 780px;
  top: -18%; right: -10%;
  background: radial-gradient(circle, rgba(204, 163, 0, .22) 0%, rgba(204, 163, 0, 0) 68%);
  animation: glow 7s ease-in-out infinite;
}
@keyframes glow { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

.hero__inner { position: relative; z-index: 1; display: grid; gap: var(--sp-5); }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: .92fr 1.08fr; align-items: center; gap: var(--sp-5); }
}
.hero h1 {
  font-size: var(--step-4);
  max-width: 15ch;
  margin-bottom: var(--sp-3);
}
.hero h1 em {
  font-style: normal; color: var(--gold);
  position: relative; white-space: nowrap;
}
/* the smile from the logo, drawn under the emphasised word */
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.14em; height: .22em;
  background: no-repeat center/100% 100%
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 26' fill='none'%3E%3Cpath d='M4 5c30 20 162 20 192 0' stroke='%23CCA300' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hero__lede {
  font-size: var(--step-1); color: #C6CDE6; max-width: 46ch; margin-bottom: var(--sp-3);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: .35rem var(--sp-3);
  font-size: var(--step--1); color: #9FA9CC;
}
.hero__meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero__meta svg { width: 15px; height: 15px; color: var(--gold); flex: none; }

/* Hero card — the quote widget or a stat panel */
.hero__panel {
  background: var(--navy-raised);
  border: 1px solid var(--line-navy);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .95);
}
.hero__panel h2 { font-size: var(--step-2); margin-bottom: .6rem; }
.hero__panel p { color: #B9C2E0; font-size: .96rem; margin-bottom: var(--sp-3); }

/* ---------- Hero showcase ----------
   The house, with gold markers naming the systems walked on every
   inspection. The photo explains rather than decorates. */
.showcase {
  position: relative; margin: 0;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, .95);
  /* Deliberately NOT animated. This holds the LCP element, and an entrance
     animation with `backwards` fill keeps it at opacity 0 for the whole
     delay+duration — measured at 1520ms of render delay, ~98% of LCP.
     The tags below animate in instead, which reads the same but paints fast. */
}
.showcase__img { width: 100%; height: auto; display: block; }
/* a navy scrim at the base so the caption stays readable on any photo */
.showcase::after {
  content: ""; position: absolute; inset: auto 0 0; height: 42%;
  background: linear-gradient(to top, rgba(1, 8, 49, .92), rgba(1, 8, 49, 0));
  pointer-events: none;
}
.showcase__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.1rem 1.3rem;
  font-size: .95rem; font-weight: 550; color: #EDF0FA;
}

.showcase__tag {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem;
  width: max-content;
  padding: .42rem .85rem .42rem .6rem;
  background: rgba(2, 12, 69, .86);
  border: 1px solid rgba(245, 214, 110, .45);
  border-radius: 999px;
  font-size: .78rem; font-weight: 600; color: #fff;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(6px);
  animation: tagIn .5s var(--ease) forwards;
}
.showcase__tag i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); flex: none;
  box-shadow: 0 0 0 3px rgba(204, 163, 0, .28);
}
/* Positioned against the photo: the hip roof at upper right, the navy lap
   siding on the left gable, and the grading where the beds meet the lawn. */
.showcase__tag--roof   { top: 20%;    right: 6%;  animation-delay: 1.0s; }
.showcase__tag--siding { top: 44%;    left: 4%;   animation-delay: 1.18s; }
/* sits over the planting beds, clear of the caption at the base */
.showcase__tag--grade  { bottom: 15%; right: 10%; animation-delay: 1.36s; }
@keyframes tagIn { to { opacity: 1; transform: none; } }

@media (max-width: 620px) {
  /* At phone size the photo renders ~350px wide — three pills cover the
     house and read as clutter, so keep one and let the caption carry the
     rest of the message. */
  .showcase__tag { font-size: .7rem; padding: .32rem .62rem .32rem .44rem; }
  .showcase__tag--roof   { top: 8%; right: 4%; left: auto; }
  .showcase__tag--siding,
  .showcase__tag--grade  { display: none; }
  .showcase__cap { font-size: .84rem; padding: .85rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase, .showcase__tag { animation: none; opacity: 1; transform: none; }
}

/* ---------- Hero: a report entry ----------
   The hero shows the artifact a client actually receives — one finding,
   photographed, located, and explained — instead of describing it. */
.report {
  margin: 0;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, .95);
  animation: panel .8s var(--ease) .35s backwards;
}
.report__bar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2);
  padding: .7rem 1.1rem;
  background: var(--navy-deep); color: #C6CDE6;
  font-size: .74rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
.report__id { color: var(--gold); }
.report__shot { position: relative; background: var(--paper-alt); }
.report__shot img { width: 100%; height: auto; }

/* A surveyor's pin marking the defect — pulses once on load, then rests. */
.report__pin {
  position: absolute; left: 83%; top: 45%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 3px solid var(--gold); border-radius: 50%;
}
.report__pin::after {
  content: ""; position: absolute; inset: -9px;
  border: 2px solid var(--gold); border-radius: 50%;
  animation: ping 3.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { transform: scale(.6); opacity: 0; }
  22%  { opacity: .85; }
  60%, 100% { transform: scale(1.5); opacity: 0; }
}

.report__body { padding: 1.4rem 1.5rem 1.6rem; }
.report__severity {
  display: inline-block; margin-bottom: .7rem;
  padding: .28rem .8rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.report__severity--fix { background: #FBE9E4; color: #9E3322; }
.report h2 {
  font-size: var(--step-2); color: var(--navy);
  margin-bottom: .45rem; letter-spacing: -.015em;
}
.report__loc {
  font-size: .84rem; color: var(--slate);
  margin-bottom: .8rem; font-variant-numeric: tabular-nums;
}
.report__note { font-size: .96rem; color: var(--ink); line-height: 1.62; }

@media (prefers-reduced-motion: reduce) {
  .report { animation: none; }
  .report__pin::after { animation: none; opacity: .5; transform: scale(1.2); }
}

/* Hero roofline horizon */
.hero__horizon { position: relative; z-index: 1; margin-top: var(--sp-5); }

/* ---------- Trust bar ---------- */
.trust { background: var(--navy-deep); color: #C6CDE6; padding-block: var(--sp-3); }
.trust__grid {
  display: grid; gap: var(--sp-2) var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  text-align: center;
}
.trust__item { display: flex; align-items: center; justify-content: center; gap: .6rem;
  font-size: .92rem; font-weight: 550; }
.trust__item svg { width: 20px; height: 20px; color: var(--gold); flex: none; }

/* ---------- Section headings ---------- */
.head { max-width: 62ch; margin-bottom: var(--sp-5); }
.head--center { margin-inline: auto; text-align: center; }
.head h2 { font-size: var(--step-3); margin-bottom: var(--sp-2); }
.head p { color: var(--slate); font-size: var(--step-1); }
.section--navy .head p { color: #B9C2E0; }

/* ---------- Cards ---------- */
/* Explicit column counts per breakpoint rather than auto-fit, so a row never
   ends in a lone orphan card at tablet widths. */
.grid { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
/* At two columns, a 3-card set leaves an orphan — let it span the full row. */
@media (min-width: 620px) and (max-width: 979px) {
  .grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 980px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-4);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
/* peak notch — the roof motif, not a generic corner */
.card::before {
  content: ""; position: absolute; top: 0; left: var(--sp-4);
  width: 34px; height: 11px; background: var(--gold);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  transition: width .3s var(--ease);
}
/* Hover raises the roof peak and draws a gold sill along the base — the card
   behaves like the roofline motif rather than floating like every other card. */
.card::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 3px;
  background: var(--gold);
  transition: right .45s var(--ease);
}
.card:hover, .card:focus-within { border-color: var(--gold); }
.card:hover::before, .card:focus-within::before { width: 58px; transform: translateY(-4px); }
.card:hover::after, .card:focus-within::after { right: 0; }
.card::before { transition: width .35s var(--ease), transform .35s var(--ease); }
.card h3 { font-size: var(--step-2); margin: var(--sp-2) 0 .6rem; }
.card p { color: var(--slate); font-size: .97rem; }
.card__icon {
  width: 46px; height: 46px; color: var(--navy);
  margin-bottom: var(--sp-2);
}
.card__icon svg { width: 100%; height: 100%; }
.card__link {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: var(--sp-2);
  font-weight: 650; color: var(--navy); text-decoration: none; font-size: .95rem;
}
.card__link::after { content: "→"; transition: transform .25s var(--ease); }
.card__link:hover::after { transform: translateX(4px); }

.section--navy .card {
  background: var(--navy-raised); border-color: var(--line-navy); color: #C6CDE6;
}
.section--navy .card p { color: #B9C2E0; }
.section--navy .card__icon, .section--navy .card__link { color: var(--gold-light); }
.section--navy .card:hover { box-shadow: 0 22px 44px -24px rgba(0, 0, 0, .9); }

/* ---------- The promise ----------
   A pull quote, set as one. The oversized gold quote mark is drawn from the
   roofline's stroke weight so it belongs to the same family. */
.promise {
  position: relative; margin: 0;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) 3.4rem;
  background: var(--navy-raised);
  border: 1px solid var(--line-navy);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .95);
}
.promise::before {
  content: "\201C";
  position: absolute; left: .85rem; top: 1.1rem;
  font-family: var(--display); font-size: 5.2rem; line-height: 1;
  color: var(--gold); opacity: .55;
}
.promise__quote {
  font-family: var(--display);
  font-size: var(--step-2); line-height: 1.34; color: #fff;
  letter-spacing: -.015em; margin-bottom: var(--sp-3);
}
.promise__quote em {
  font-style: normal; color: var(--gold-light);
  box-shadow: inset 0 -.5em 0 rgba(204, 163, 0, .18);
}
.promise__by {
  font-size: .92rem; color: #9FA9CC; line-height: 1.5;
  padding-top: var(--sp-2); border-top: 1px solid var(--line-navy);
}
.promise__by strong { display: block; color: var(--gold-light); font-weight: 650; }

/* ---------- Feature list ---------- */
.checks { list-style: none; padding: 0; display: grid; gap: .85rem; }
.checks li { display: flex; gap: .75rem; align-items: flex-start; font-size: .99rem; }
.checks svg { width: 21px; height: 21px; color: var(--gold); flex: none; margin-top: .22rem; }

/* ---------- Split media block ---------- */
.split { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.split--reverse > :first-child { order: 2; }
@media (max-width: 859px) { .split--reverse > :first-child { order: 0; } }
.split__media {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--paper-alt);
  aspect-ratio: 4 / 3;
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Process (a real sequence — numbering earns its place) ---------- */
/* ---------- Process ----------
   These steps are a real sequence, so they carry a marker — but the marker
   is the elapsed time (from `data-when`), not a decorative 01/02/03. What
   the reader actually wants to know is how long this takes. */
.steps { display: grid; gap: var(--sp-3); }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: 2.9rem; }
.step::before {
  content: attr(data-when);
  position: absolute; top: 0; left: 0;
  font-family: var(--body); font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
/* the timeline itself — a tick and the rule running to the next step */
.step::after {
  content: ""; position: absolute; top: 1.85rem; left: 0; right: -1.5rem; height: 1px;
  background: var(--line-navy);
}
.section:not(.section--navy) .step::after { background: var(--line); }
.step:last-child::after { right: 0; }
.step > h3 { position: relative; }
.step > h3::before {
  content: ""; position: absolute; top: -1.05rem; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold);
}
@media (max-width: 779px) {
  .step::after { right: auto; width: 100%; }
  .step:last-child::after { display: none; }
}
.step h3 { font-size: var(--step-1); margin-bottom: .45rem; }
.step p { font-size: .95rem; color: #B9C2E0; }
.section:not(.section--navy) .step p { color: var(--slate); }

/* ---------- Quote widget ---------- */
.widget {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  /* the calculator supplies its own generous inner padding */
  padding: clamp(.4rem, 1vw, .75rem) clamp(.4rem, 1vw, .75rem) .5rem;
  box-shadow: 0 24px 50px -32px rgba(2, 12, 69, .55);
}
.widget iframe {
  width: 100%; border: 0; border-radius: 10px; display: block;
  /* Sized to the calculator's own content — too tall and it leaves a band
     of dead white space above the credit line. */
  min-height: 700px;
}
/* The calculator stacks its columns on narrow screens and gets much taller. */
@media (max-width: 900px) { .widget iframe { min-height: 1020px; } }
@media (max-width: 560px) { .widget iframe { min-height: 1320px; } }
.widget__credit { text-align: center; font-size: .78rem; margin-top: .25rem; color: var(--slate); }
.widget__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* The off-ramp for anyone who won't fill in a form — a real alternative,
   not a footnote. A meaningful share of buyers would rather just call. */
.widget__alt {
  max-width: 62ch; margin: var(--sp-3) auto 0;
  padding: 1rem 1.25rem;
  background: var(--paper-alt); border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center; color: var(--slate); font-size: .97rem;
}
.widget__alt strong { color: var(--ink); }
.widget__alt a {
  color: var(--navy); font-weight: 700; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--gold); text-decoration-thickness: 2px;
}

/* ---------- FAQ accordion — native <details>, no JS required ---------- */
.faq { display: grid; gap: .75rem; }
.faq__item {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq__item[open] { border-color: var(--gold); box-shadow: 0 14px 34px -26px rgba(2, 12, 69, .5); }
.faq__q {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2);
  padding: 1.15rem 1.3rem; cursor: pointer; list-style: none;
  font-family: var(--display); font-size: var(--step-1); font-weight: 600; color: var(--navy);
  line-height: 1.3;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--gold-dim); }
/* plus → minus, built from two bars so it needs no icon font */
.faq__sign { position: relative; flex: none; width: 20px; height: 20px; margin-top: .3rem; }
.faq__sign::before, .faq__sign::after {
  content: ""; position: absolute; inset: 50% 0 auto; height: 2.5px; border-radius: 2px;
  background: var(--gold); transform: translateY(-50%);
}
.faq__sign::after { transition: transform .3s var(--ease); transform: translateY(-50%) rotate(90deg); }
.faq__item[open] .faq__sign::after { transform: translateY(-50%) rotate(0deg); }
.faq__a { padding: 0 1.3rem 1.3rem; }
.faq__a p { color: var(--slate); }
.faq__a p + p { margin-top: .8rem; }

/* ---------- Fact bar ----------
   Answer-first: the details a hurried buyer (or an AI answer engine)
   needs before reading a word of prose. */
.factbar {
  display: grid; gap: 1px; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.factbar > div {
  background: #fff; padding: 1.15rem 1.35rem;
  transition: background-color .3s var(--ease);
}
.factbar > div:hover { background: #FFFDF5; }
.factbar dt {
  font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--gold-dim); margin-bottom: .35rem;
}
.factbar dd {
  margin: 0; font-family: var(--display); font-size: var(--step-1);
  font-weight: 600; color: var(--navy); line-height: 1.2;
}

/* ---------- Signature: the mark builds itself on scroll ----------
   One custom property, --build (0 → 1), is written by JS from the section's
   scroll position. Every stroke reads its own slice of that range, so the
   house assembles in build order and the smile lands last. */
@property --build {
  syntax: "<number>"; inherits: true; initial-value: 0;
}
/* --seg must be registered too, or clamp() stays an unevaluated token
   stream and stroke-dashoffset never resolves. */
@property --seg {
  syntax: "<number>"; inherits: false; initial-value: 0;
}
@property --len {
  syntax: "<number>"; inherits: false; initial-value: 300;
}

.build {
  background: var(--navy); color: #EDF0FA;
  padding-block: var(--sp-7);
  overflow: hidden;
}
.build__inner { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 940px) {
  .build__inner { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}
.build__copy h2 {
  font-size: var(--step-3); color: #fff; margin-bottom: var(--sp-3);
  max-width: 18ch;
}
.build__copy p { color: #B9C2E0; margin-bottom: var(--sp-2); max-width: 46ch; }
.build__cta { margin-top: var(--sp-3); }

/* The stroke caps sit outside the viewBox, so leave room for the glow
   and keep the mark inside the column on small screens. */
.build__mark {
  width: 100%; max-width: 460px; height: auto;
  margin-inline: auto; padding: 6px;
  overflow: visible;
}
.bp {
  fill: none; stroke: var(--gold);
  /* The real logo uses two weights: 14 for the roofs, 10 for the
     letterforms. Matching that keeps the built mark identical to logo.png. */
  stroke-width: 10; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: calc(var(--len) * 1px);
  stroke-dashoffset: calc(var(--len) * (1 - var(--seg)) * 1px);
}
.bp--roof, .bp--roof2 { stroke-width: 14; }
.bp--smile { stroke-width: 7; }

/* Each stroke maps --build onto its own window, clamped to 0..1.
   Windows overlap slightly so the assembly reads as continuous. */
.bp--roof  { --len: 132; --seg: clamp(0, calc((var(--build) - .00) / .14), 1); }
.bp--roof2 { --len: 132; --seg: clamp(0, calc((var(--build) - .10) / .14), 1); }
.bp--h1a   { --len: 83;  --seg: clamp(0, calc((var(--build) - .24) / .10), 1); }
.bp--h1b   { --len: 83;  --seg: clamp(0, calc((var(--build) - .30) / .10), 1); }
.bp--h1c   { --len: 58;  --seg: clamp(0, calc((var(--build) - .36) / .08), 1); }
.bp--h2a   { --len: 83;  --seg: clamp(0, calc((var(--build) - .42) / .10), 1); }
.bp--h2b   { --len: 83;  --seg: clamp(0, calc((var(--build) - .48) / .10), 1); }
.bp--h2c   { --len: 58;  --seg: clamp(0, calc((var(--build) - .54) / .08), 1); }
.bp--i     { --len: 83;  --seg: clamp(0, calc((var(--build) - .60) / .10), 1); }
/* the smile is the payoff — slowest, and last */
.bp--smile { --len: 278; --seg: clamp(0, calc((var(--build) - .70) / .28), 1); }

/* Once the smile completes, the whole mark warms up. */
.build__g {
  filter: drop-shadow(0 0 calc(var(--build) * 26px) rgba(204, 163, 0, .38));
}

/* No JS, or reduced motion: show the finished mark. */
.build.is-static .bp { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .bp { stroke-dashoffset: 0 !important; }
  .build__g { filter: none; }
}

/* ---------- Area chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; }
.chips li {
  border: 1px solid var(--line-navy); border-radius: 999px;
  padding: .5rem 1.1rem; font-size: .93rem; font-weight: 550;
  background: rgba(245, 214, 110, .06); color: #D7DCF0;
}
.section:not(.section--navy) .chips li {
  border-color: var(--line); background: #fff; color: var(--ink);
}
.chips li:has(a) { padding: 0; transition: border-color .25s var(--ease), background-color .25s var(--ease); }
.chips li a { display: block; padding: .5rem 1.1rem; color: inherit; text-decoration: none; }
.chips li:has(a):hover { border-color: var(--gold); background: rgba(204, 163, 0, .1); }

/* ---------- CTA band ---------- */
.cta { background: var(--gold); color: var(--navy); text-align: center; }
.cta h2 { font-size: var(--step-3); margin-bottom: var(--sp-2); color: var(--navy); }
.cta p { font-size: var(--step-1); max-width: 54ch; margin: 0 auto var(--sp-4); color: #3B3005; }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #9FA9CC; padding-block: var(--sp-5) var(--sp-3); font-size: .93rem; }
.footer__grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.footer h3 {
  font-family: var(--body); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  margin-bottom: var(--sp-2);
}
.footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer a { text-decoration: none; transition: color .2s var(--ease); }
.footer a:hover { color: var(--gold-light); }
.footer__brand p { max-width: 34ch; margin-top: var(--sp-2); }
.footer__bottom {
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 1px solid var(--line-navy);
  display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: space-between;
  font-size: .84rem; color: #7A85AD;
}

/* ---------- Prose (about / legal) ---------- */
.prose > * + * { margin-top: var(--sp-3); }
.prose h2 { font-size: var(--step-2); margin-top: var(--sp-5); }
.prose h3 { font-size: var(--step-1); margin-top: var(--sp-4); }
.prose p, .prose li { color: var(--slate); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .6rem; }
.prose strong { color: var(--ink); }

/* ---------- Page banner (interior pages) ---------- */
.banner { background: var(--navy); color: #fff; padding-block: var(--sp-5) var(--sp-4); position: relative; overflow: hidden; }
.banner::before {
  content: ""; position: absolute; width: 46vw; height: 46vw; max-width: 560px; max-height: 560px;
  top: -40%; right: -8%;
  background: radial-gradient(circle, rgba(204, 163, 0, .18) 0%, rgba(204, 163, 0, 0) 70%);
}
.banner__inner { position: relative; z-index: 1; }
.banner h1 { font-size: var(--step-4); max-width: 18ch; margin-bottom: var(--sp-2); }
.banner p { color: #C6CDE6; font-size: var(--step-1); max-width: 56ch; }
.crumbs { font-size: .84rem; color: #8E99C0; margin-bottom: var(--sp-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold-light); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero load sequence ----------
   The hero is the thesis, so it arrives in a deliberate order:
   eyebrow, headline, lede, buttons, then the panel sliding in beside it. */
.hero__inner > div > * { animation: rise .45s var(--ease) backwards; }
.hero__inner > div > :nth-child(1) { animation-delay: 0s; }
.hero__inner > div > :nth-child(2) { animation-delay: .06s; }
.hero__inner > div > :nth-child(3) { animation-delay: .12s; }
.hero__inner > div > :nth-child(4) { animation-delay: .18s; }
.hero__inner > div > :nth-child(5) { animation-delay: .24s; }
.hero__panel { animation: panel .6s var(--ease) .2s backwards; }
@keyframes rise  { from { opacity: 0; transform: translateY(16px); } }
@keyframes panel { from { opacity: 0; transform: translateY(24px) scale(.985); } }

/* The roofline draws itself as it scrolls into view. */
.roofline path { stroke-dasharray: 2600; stroke-dashoffset: 2600; }
.roofline.is-in path,
.hero__horizon .roofline path { animation: draw-roof 1.4s var(--ease) forwards; }

@keyframes draw-roof { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero__inner > div > *, .hero__panel { animation: none !important; }
  .roofline path { stroke-dashoffset: 0 !important; animation: none !important; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 940px) {
  .navtoggle { display: block; }
  .nav {
    position: fixed; inset: 78px 0 auto; z-index: 90;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--line-navy);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--sp-2) 1.25rem var(--sp-4);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    /* visibility (not just opacity) so the closed drawer's links leave the
       tab order — otherwise keyboard users hit 7 invisible stops. It must be
       listed in the transition or the open animation jumps. */
    visibility: hidden;
    transition: opacity .28s var(--ease), transform .28s var(--ease),
                visibility .28s var(--ease);
    max-height: calc(100vh - 78px); overflow-y: auto;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: .95rem 0; border-bottom: 1px solid var(--line-navy); font-size: 1.05rem; }
  .nav__link::after { display: none; }
  .nav__phone { padding-top: var(--sp-3); font-size: 1.1rem; }
  .nav .btn { margin-top: var(--sp-2); }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .header, .nav, .cta, .widget, .footer { display: none; }
  body { color: #000; background: #fff; }
}
