:root {
  --navy: #162a43;
  --night: #0e1b2e;
  --gold: #c99232;
  --snow: #f7f4ee;
  --ice: #e4eff7;
  --sun: #f8e3b4;
  --white: #fff;
  --head: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --edge: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font: 400 1.1875rem/1.6 var(--body); color: var(--navy); background: var(--white); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -0.018em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--white); padding: 8px 14px; }

.button {
  display: inline-block; border: 2px solid var(--navy); border-radius: 999px; background: var(--navy);
  color: var(--white); padding: 0.7em 1.5em; font: 700 1rem/1.2 var(--head); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--night); border-color: var(--night); }
.button.quiet { background: transparent; color: var(--navy); }
.button.quiet:hover { background: var(--ice); border-color: var(--navy); }
.button.gold { background: var(--gold); border-color: var(--gold); color: var(--night); }
.button.gold:hover { background: var(--sun); border-color: var(--sun); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--edge); }
.brand img { width: 220px; }
.top nav { display: flex; gap: 6px; }
.top nav a { font: 700 1rem var(--head); text-decoration: none; padding: 8px 16px; border-radius: 999px; }
.top nav a:hover { background: var(--ice); }
.top nav a[aria-current] { background: var(--navy); color: var(--white); }

/* ---- home hero: a wall of postcards from the house ---- */
.hero {
  position: relative; background: var(--ice); margin: 0 12px; border-radius: 28px; overflow: hidden;
  min-height: max(640px, calc(100vh - 112px)); display: grid; place-items: center;
}
.hero-words { position: relative; z-index: 2; text-align: center; width: min(580px, 46vw); padding: 40px 0; }
.hero-mark { margin: 0 auto 22px; width: 108px; }
.hero-words h1 { font-size: clamp(2.3rem, 4.2vw, 3.8rem); }
.hero-words p { margin: 18px auto 0; max-width: 30em; }
.hero-words .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.postcard {
  background: var(--white); padding: 10px 10px 0; border-radius: 6px;
  box-shadow: 0 2px 3px rgb(22 42 67 / 0.12), 0 18px 34px -14px rgb(22 42 67 / 0.4);
}
.postcard img { width: 100%; border-radius: 3px; }
.postcard figcaption { font: 700 1rem var(--head); text-align: center; padding: 10px 4px 12px; }

.wall .postcard {
  position: absolute; width: clamp(150px, min(18vw, 27vh), 290px); rotate: var(--tilt); transition: rotate 0.25s, scale 0.25s;
  animation: drop 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; animation-delay: var(--wait);
}
.wall .postcard:hover { rotate: 0deg; scale: 1.05; z-index: 1; }
.p1 { --tilt: -7deg; --wait: 0.05s; left: 3%; top: 5%; }
.p2 { --tilt: 5deg; --wait: 0.3s; left: 6.5%; top: 36%; }
.p3 { --tilt: -4deg; --wait: 0.15s; left: 2%; bottom: 3%; }
.p4 { --tilt: 6deg; --wait: 0.2s; right: 3.5%; top: 4%; }
.p5 { --tilt: -5deg; --wait: 0.1s; right: 6.5%; top: 35%; }
.p6 { --tilt: 4deg; --wait: 0.35s; right: 2%; bottom: 3%; }
@keyframes drop { from { opacity: 0; translate: 0 -40px; scale: 1.12; } }

.statement { padding: clamp(72px, 11vw, 150px) var(--edge); }
.statement p {
  font: 500 clamp(1.6rem, 3.3vw, 2.75rem)/1.35 var(--head); letter-spacing: -0.015em; max-width: 24em; margin: 0 auto;
}

.checks { padding: 0 var(--edge) clamp(72px, 9vw, 120px); }
.checks, .area {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 96px); max-width: 1240px; margin: 0 auto;
  padding: 0 var(--edge) clamp(72px, 9vw, 120px); align-items: start;
}
.checks > div > p, .area p { margin-top: 16px; max-width: 26em; }
.check-list { border-top: 2px solid var(--ice); }
.check-list summary { display: flex; align-items: center; gap: 18px; padding: 16px 0; list-style: none; }
.check-list summary::-webkit-details-marker { display: none; }
.check-list summary::after {
  content: ""; width: 10px; height: 10px; margin: -5px 8px 0 auto; border: solid var(--navy);
  border-width: 0 3px 3px 0; rotate: 45deg;
}
.check-list details[open] summary::after { rotate: 225deg; margin-top: 5px; }
.check-list summary:hover .icon { background: var(--sun); }
.icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ice); }
.icon svg { width: 28px; height: 28px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.check-list details p { padding-left: 70px; }

.area { align-items: center; }
.map { display: block; width: 100%; max-width: 540px; height: auto; margin: 0 auto; }
.map .ring { fill: var(--ice); stroke: var(--gold); stroke-width: 5; }
.map .radius { stroke: var(--gold); stroke-width: 4; stroke-dasharray: 4 10; stroke-linecap: round; }
.map .town { fill: var(--navy); }
.map .home { fill: var(--gold); stroke: var(--navy); stroke-width: 5; }
.map text { font: 700 27px var(--head); fill: var(--navy); text-anchor: middle; }
.map text.main { font-size: 33px; font-weight: 800; }
.map text.miles { font-size: 23px; font-weight: 500; text-anchor: start; }

.livemap { width: 100%; max-width: 580px; margin: 0 auto; }
.livemap.ready {
  aspect-ratio: 1; isolation: isolate; overflow: hidden; border-radius: 22px; border: 8px solid var(--white);
  background: var(--ice); font-family: var(--body);
  box-shadow: 0 2px 3px rgb(22 42 67 / 0.12), 0 22px 42px -18px rgb(22 42 67 / 0.4);
}
.livemap .leaflet-tile-pane { filter: saturate(0.75); }
.livemap .town-label { font: 700 0.8rem/1 var(--head); color: var(--navy); border: 0; border-radius: 999px; padding: 6px 10px; }
.livemap .town-label.home { background: var(--navy); color: var(--white); font-size: 0.9rem; }
.livemap .town-label::before { display: none; }
.livemap .leaflet-control-attribution { padding: 1px 6px; }

.about {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 0 var(--edge) clamp(72px, 9vw, 120px);
}
.about img {
  width: 100%; max-width: 380px; justify-self: center; border: 8px solid var(--white); border-radius: 8px; rotate: -1.6deg;
  box-shadow: 0 2px 3px rgb(22 42 67 / 0.12), 0 24px 44px -20px rgb(22 42 67 / 0.45);
}
.about p { margin-top: 16px; max-width: 30em; }
.about .button { margin-top: 28px; }

.prose { max-width: 760px; margin: 0 auto; padding: 56px var(--edge) 96px; }
.prose h2 { font-size: 1.4rem; margin: 36px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p + p, .prose ul + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0 22px; }
.lost img { margin: 0 auto 28px; }
.lost .lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.steps h2 { margin-bottom: 36px; }
.steps { background: var(--sun); padding: clamp(64px, 8vw, 104px) var(--edge); margin: 0 12px; border-radius: 28px; }
.steps ol { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--navy); color: var(--white); font: 800 1.35rem var(--head); margin-bottom: 18px;
}
.steps p { margin-top: 8px; }

.report {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 110px); align-items: center;
  padding: clamp(72px, 10vw, 136px) var(--edge);
}
.report > div p { margin-top: 18px; max-width: 28em; }
.note {
  background: var(--snow); border-radius: 8px; padding: clamp(24px, 3.5vw, 44px); rotate: 1.6deg;
  box-shadow: 0 2px 3px rgb(22 42 67 / 0.12), 0 24px 44px -20px rgb(22 42 67 / 0.45);
}
.note-tag { display: inline-block; background: var(--sun); border-radius: 999px; padding: 2px 14px; font-weight: 700; font-size: 0.95rem; }
.note h3 { font-size: 1.6rem; margin: 14px 0 12px; }
.note dl div { display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid rgb(22 42 67 / 0.16); }
.note dt { font-weight: 700; }
.note > p:last-child { border-top: 1px solid rgb(22 42 67 / 0.16); padding-top: 14px; }

.closer { margin: 0 12px; border-radius: 28px; overflow: hidden; background: var(--navy); color: var(--snow); text-align: center; }
.closer img { width: 100%; max-height: 520px; object-fit: cover; object-position: 50% 70%; }
.closer div { padding: 48px var(--edge) 56px; }
.closer p { margin: 12px 0 26px; }

/* ---- pricing and contact ---- */
.page-head { text-align: center; background: var(--ice); margin: 0 12px; border-radius: 28px; padding: clamp(56px, 8vw, 104px) var(--edge); }
.page-head p { margin: 16px auto 0; max-width: 32em; }
.page-head .sample { display: inline-block; background: var(--sun); border-radius: 999px; padding: 6px 20px; font-size: 1rem; font-weight: 600; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 56px var(--edge); max-width: 1320px; margin: 0 auto; }
.plan { border: 2px solid var(--ice); border-radius: 22px; padding: 32px 28px; display: flex; flex-direction: column; }
.plan.suggested { border-color: var(--navy); background: var(--snow); }
.plan h2 { font-size: 1.5rem; }
.price { margin: 14px 0 6px; }
.price strong { font: 800 3.4rem/1 var(--head); letter-spacing: -0.03em; }
.plan ul { list-style: none; margin: 22px 0 28px; flex: 1; }
.plan li { position: relative; padding: 7px 0 7px 30px; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 7px; height: 13px; border: solid var(--gold); border-width: 0 3px 3px 0; rotate: 45deg; }
.plan .button { text-align: center; }

.estimate {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; background: var(--navy);
  color: var(--snow); border-radius: 28px; margin: 0 12px; padding: clamp(44px, 6vw, 80px) var(--edge);
}
.estimate fieldset { border: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.estimate legend { font-weight: 700; margin-bottom: 10px; }
.estimate fieldset label { cursor: pointer; }
.estimate fieldset input { position: absolute; opacity: 0; }
.estimate fieldset span { display: block; border: 2px solid var(--snow); border-radius: 999px; padding: 6px 18px; font-weight: 600; }
.estimate input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--night); }
.estimate input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 3px; }
.months { display: block; font-weight: 700; margin-bottom: 10px; }
#months { width: 100%; max-width: 460px; accent-color: var(--gold); }
.total { text-align: center; }
.total #total { display: block; font: 800 clamp(3.5rem, 9vw, 7rem)/1.05 var(--head); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

.questions { max-width: 800px; margin: 0 auto; padding: clamp(64px, 8vw, 104px) var(--edge); }
.questions h2 { margin-bottom: 24px; }
details { border-bottom: 2px solid var(--ice); }
summary { font: 700 1.2rem/1.35 var(--head); padding: 20px 0; cursor: pointer; }
details p { padding-bottom: 22px; }

.contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 7vw, 100px); max-width: 1180px; margin: 0 auto; padding: 64px var(--edge) 96px; }
form label { display: block; font-weight: 700; margin: 20px 0 6px; }
form > label:first-child { margin-top: 0; }
input:not([type="radio"]):not([type="range"]), select, textarea {
  width: 100%; font: inherit; color: var(--navy); background: var(--white); border: 2px solid #a9bccd;
  border-radius: 12px; padding: 0.6em 0.8em; min-height: 52px;
}
input[aria-invalid="true"] { border-color: #a83226; }
textarea { resize: vertical; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hint { font-size: 1rem; margin-top: 8px; }
#form-status { font-weight: 700; margin: 16px 0; min-height: 1.6em; }
#form-status.error { color: #a83226; }
aside .livemap { max-width: 420px; margin-bottom: 32px; }
aside h2 { font-size: 1.6rem; margin-bottom: 8px; }
aside p + p { margin-top: 16px; }

footer {
  display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; background: var(--night);
  color: var(--snow); margin-top: 12px; padding: 56px var(--edge);
}
footer p + p { margin-top: 10px; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font: 700 1rem var(--head); }

.simply-made-by { grid-column: 1 / -1; justify-self: stretch; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; padding-top: 22px; border-top: 1px solid rgb(128 128 128 / 0.28); font: 700 11px/1 var(--head); letter-spacing: 0.24em; text-transform: uppercase; }
.simply-made-by span { opacity: 0.75; white-space: nowrap; }
.simply-made-by a { display: inline-flex; padding: 8px 6px; opacity: 0.9; transition: opacity 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.simply-made-by a:hover, .simply-made-by a:focus-visible { opacity: 1; transform: translateY(-2px); }
.simply-made-by img { display: block; height: 26px; width: auto; }

@media (max-width: 1000px) {
  .hero { display: block; min-height: 0; padding-bottom: 36px; }
  .hero-words { width: auto; max-width: 600px; margin: 0 auto; padding: 44px 24px 36px; }
  .wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 14px; padding: 0 20px; }
  .wall .postcard { position: static; width: auto; }
  .steps ol { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 620px; }
  .report, .estimate, .contact, .checks, .area, .about { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; justify-items: start; gap: 24px; }
}

@media (max-width: 620px) {
  body { font-size: 1.125rem; }
  .top { flex-direction: column; padding-block: 14px; }
  .brand img { width: 200px; }
  .wall { grid-template-columns: 1fr 1fr; padding: 0 16px; }
  .wall figcaption { font-size: 0.9rem; }
  .steps ol, .pair { grid-template-columns: 1fr; }
  .check-list details p { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
