/*
  Pegboard Home Repair (N4): color system
  Harmony: analogous blue to green (hues ~200, ~185, ~165). Taken straight from the shoot:
  the cerulean pegboard wall, the teal shadows of the workshop and the deep spruce of the
  denim and dark corners. Handyman sites usually shout orange and yellow; this one feels
  calm, tidy and trustworthy instead.
  60% dominant  --frost    #EDF4F4  page background
  30% secondary --spruce   #0C3436  dark sections, text, ticket header
  support       --peg      #CFE7F1  light blue surfaces / --teal #1F9E96 small marks
  10% accent    --blue     #1478AB  buttons, pegboard panel, live total
  Contrast (WCAG): spruce on frost 12.08 | white on blue (buttons) 4.88 | blue on frost 4.95
  frost on spruce 12.08 | spruce on peg 10.48 | muted #4C6B6D on frost 5.19 | sky #7FD6F5 on spruce 8.23
*/
:root {
  --frost: #EDF4F4;
  --spruce: #0C3436;
  --spruce-2: #134447;
  --peg: #CFE7F1;
  --teal: #1F9E96;
  --blue: #1478AB;
  --blue-bright: #1B86BD;
  --sky: #7FD6F5;
  --muted: #4C6B6D;
  --white: #FFFFFF;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Albert Sans", system-ui, sans-serif;
  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --max: 1320px;
  --dots: radial-gradient(circle, rgba(237, 244, 244, .38) 2.2px, transparent 2.6px) 0 0 / 22px 22px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--frost); color: var(--spruce); font: 400 1.0625rem/1.6 var(--body); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 99; background: var(--spruce); color: var(--frost); padding: .6rem 1rem; }
.skip:focus { left: .5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; }
section { scroll-margin-top: 80px; }
.h2 { font: 700 clamp(1.9rem, 3.8vw, 3.2rem)/1.05 var(--display); letter-spacing: -.03em; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: .85rem 1.5rem; border-radius: 8px; font: 700 1rem/1.1 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--blue { background: var(--blue); color: var(--white); box-shadow: 0 4px 0 var(--spruce); }
.btn--blue:hover { background: #106591; }
.btn--blue:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--spruce); }
.btn--ghost { border-color: var(--spruce); }
.btn--ghost:hover { background: var(--spruce); color: var(--frost); }
.btn--full { width: 100%; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: .8rem var(--pad); background: var(--frost); border-bottom: 2px solid var(--spruce); }
.logo { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font: 800 1.2rem/1 var(--display); letter-spacing: -.02em; }
.logo small { display: block; font: 600 .78rem/1.2 var(--body); letter-spacing: .02em; color: var(--muted); }
.logo__dots { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 38px; height: 38px; padding: 7px; background: var(--blue); border-radius: 8px; }
.logo__dots i { border-radius: 50%; background: var(--frost); }
.nav__links { display: flex; align-items: center; gap: 1.7rem; font-weight: 600; }
.nav__links a { text-decoration: none; padding: .4rem 0; }
.nav__links a:not(.nav__cta):hover { color: var(--blue); }
.nav__cta { background: var(--spruce); color: var(--frost); padding: .65rem 1.1rem !important; border-radius: 8px; }
.nav__toggle { display: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 66px); }
.hero__copy { padding: clamp(3rem, 7vw, 6rem) var(--pad); display: flex; flex-direction: column; justify-content: center; }
.hero__loc { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--blue); margin-bottom: 1.4rem; }
.pin { width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--teal); }
.hero__title { font: 800 clamp(2.9rem, 6vw, 5.6rem)/.98 var(--display); letter-spacing: -.045em; margin-bottom: 1.6rem; max-width: 11ch; }
.hero__lede { font-size: 1.18rem; max-width: 33rem; color: var(--muted); margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.4rem; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 2rem; }
.hero__facts li { font-weight: 600; color: var(--muted); }
.hero__facts strong { display: block; font: 800 1.6rem/1.1 var(--display); color: var(--spruce); }
.board { position: relative; background: var(--blue-bright); overflow: hidden; display: grid; place-items: center; padding: 3rem 2rem; }
.board::before { content: ""; position: absolute; inset: 0; background: var(--dots); }
.board__photo { position: relative; width: min(74%, 420px); transform: rotate(1.5deg); animation: hang 1s cubic-bezier(.2, .9, .3, 1.15) both; }
.board__photo::before { content: ""; position: absolute; left: 50%; top: -26px; width: 14px; height: 14px; border-radius: 50%; background: var(--spruce); box-shadow: 0 0 0 4px var(--frost); transform: translateX(-50%); z-index: 2; }
.board__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; border: 10px solid var(--frost); box-shadow: 0 30px 60px rgba(4, 30, 32, .45); }
@keyframes hang { from { transform: translateY(-30px) rotate(-4deg); opacity: 0; } to { transform: rotate(1.5deg); opacity: 1; } }
.tags { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; background: var(--frost); color: var(--spruce); font: 700 .95rem/1 var(--body); padding: .7rem 1rem .7rem 1.8rem; border-radius: 4px 999px 999px 4px; box-shadow: 0 8px 18px rgba(4, 30, 32, .3); animation: tagin .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.tag::before { content: ""; position: absolute; left: .7rem; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-bright); transform: translateY(-50%); }
.tag--1 { left: 6%; top: 16%; transform: rotate(-6deg); animation-delay: .5s; }
.tag--2 { right: 5%; top: 30%; transform: rotate(5deg); animation-delay: .65s; }
.tag--3 { left: 4%; bottom: 22%; transform: rotate(4deg); animation-delay: .8s; }
.tag--4 { right: 7%; bottom: 10%; transform: rotate(-4deg); animation-delay: .95s; }
@keyframes tagin { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }

/* Estimator */
.quote { background: var(--white); padding: clamp(4.5rem, 8vw, 7rem) var(--pad); border-top: 2px solid var(--spruce); }
.quote__head, .quote__body { max-width: var(--max); margin: 0 auto; }
.quote__head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: end; margin-bottom: 2.8rem; }
.quote__head p { color: var(--muted); max-width: 32rem; }
.quote__body { display: grid; grid-template-columns: 1.35fr .9fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.tasks { display: grid; gap: 0; border-top: 2px solid var(--spruce); }
.task { display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 1.1rem; padding: 1.05rem .4rem; border-bottom: 1px solid #c8dadb; transition: background-color .2s; }
.task.is-on { background: #f3f9fb; }
.task svg { width: 44px; height: 44px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.task.is-on svg { stroke: var(--blue); }
.task h3 { font: 600 1.1rem/1.25 var(--body); }
.task p { color: var(--muted); font-size: .94rem; }
.task .task__price { font: 700 1.05rem var(--display); color: var(--spruce); }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--spruce); border-radius: 8px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: var(--frost); color: var(--spruce); font: 700 1.3rem/1 var(--body); cursor: pointer; transition: background-color .15s; }
.stepper button:hover { background: var(--peg); }
.stepper button:disabled { color: #9bb3b4; cursor: default; background: var(--frost); }
.stepper output { min-width: 40px; text-align: center; font: 700 1.1rem var(--display); }
.task.is-on .stepper output { color: var(--blue); }
.when { border: 0; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.when legend { font: 700 1.2rem var(--display); letter-spacing: -.02em; margin-bottom: 1rem; padding: 0; }
.when label { cursor: pointer; }
.when input { position: absolute; opacity: 0; }
.when span { display: grid; gap: .1rem; height: 100%; padding: .9rem 1rem; border: 2px solid #c8dadb; border-radius: 10px; transition: border-color .2s, background-color .2s; }
.when small { color: var(--muted); font-size: .9rem; }
.when input:checked + span { border-color: var(--blue); background: var(--peg); box-shadow: inset 0 0 0 1px var(--blue); }
.when input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.ticket { position: sticky; top: 96px; background: var(--frost); border: 2px solid var(--spruce); border-radius: 14px; overflow: hidden; box-shadow: 8px 8px 0 var(--spruce); }
.ticket__top { display: flex; justify-content: space-between; align-items: baseline; background: var(--spruce); color: var(--frost); padding: 1rem 1.3rem; }
.ticket__title { font: 700 1.15rem var(--display); letter-spacing: -.02em; }
.ticket__no { color: var(--sky); font-weight: 600; font-size: .92rem; }
.ticket__lines { padding: 1rem 1.3rem .4rem; display: grid; gap: .45rem; min-height: 120px; }
.ticket__lines li { display: flex; justify-content: space-between; gap: 1rem; font-weight: 500; animation: linein .3s ease both; }
.ticket__lines li span:last-child { font-weight: 700; }
.ticket__lines .empty { color: var(--muted); font-style: italic; }
@keyframes linein { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.ticket__sum { margin: .4rem 1.3rem 0; padding: .8rem 0; border-top: 2px dashed #9fbcbe; display: grid; gap: .35rem; font-size: .95rem; }
.ticket__sum div { display: flex; justify-content: space-between; gap: 1rem; }
.ticket__sum dt { color: var(--muted); }
.ticket__sum dd { font-weight: 600; }
.ticket__total { display: flex; justify-content: space-between; align-items: end; margin: 0 1.3rem; padding: 1rem 0 1.2rem; border-top: 2px solid var(--spruce); }
.ticket__total p:first-child { font-weight: 700; }
.ticket__price { font: 800 clamp(2.4rem, 4vw, 3.2rem)/1 var(--display); letter-spacing: -.04em; color: var(--blue); }
.ticket .btn { width: calc(100% - 2.6rem); margin: 0 1.3rem; }
.ticket__fine { font-size: .88rem; color: var(--muted); padding: .8rem 1.3rem 1.2rem; text-align: center; }
.ticket__price.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.06); } }

/* Why */
.why { background: var(--spruce); color: var(--frost); padding: clamp(4.5rem, 8vw, 7rem) var(--pad); position: relative; }
.why > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.why .h2 { max-width: 16ch; margin-left: 0; }
@media (min-width: 1440px) { .why .h2 { margin-left: calc((100% - var(--max)) / 2); } }
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 3rem; border-top: 1px solid rgba(237, 244, 244, .25); }
.why__grid li { padding: 1.8rem 1.5rem 0 0; }
.why__grid li + li { padding-left: 1.5rem; border-left: 1px solid rgba(237, 244, 244, .25); }
.why__big { display: block; font: 800 clamp(2.4rem, 4vw, 3.4rem)/1 var(--display); color: var(--sky); letter-spacing: -.04em; margin-bottom: 1rem; }
.why h3 { font: 700 1.15rem/1.3 var(--body); margin-bottom: .4rem; }
.why p { color: #b8d0d1; }

/* Crew */
.crew { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: clamp(4.5rem, 8vw, 7rem) var(--pad); }
.crew__intro { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; align-items: end; margin-bottom: 2.6rem; }
.crew__intro p { color: var(--muted); font-size: 1.12rem; max-width: 36rem; }
.crew__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.person img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; border-radius: 10px; margin-bottom: 1rem; filter: saturate(1.05); }
.person figcaption { color: var(--muted); }
.person strong { display: block; font: 700 1.2rem/1.2 var(--display); letter-spacing: -.02em; color: var(--spruce); }

/* Area */
.area { background: var(--peg); padding: clamp(4.5rem, 8vw, 7rem) var(--pad); display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.area__copy { max-width: 600px; justify-self: end; }
.area__copy p { margin: 1rem 0 1.8rem; color: var(--spruce); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: var(--frost); border: 2px solid var(--spruce); border-radius: 999px; padding: .4rem .9rem; font-weight: 600; font-size: .95rem; }
.map { max-width: 440px; }
.map__bg { fill: var(--blue-bright); }
.map__dots { fill: url(#peg); }
.map pattern circle { fill: rgba(237, 244, 244, .35); }
.map__ring { fill: rgba(237, 244, 244, .12); stroke: var(--frost); stroke-width: 3; stroke-dasharray: 8 8; }
.map__ring--in { fill: rgba(237, 244, 244, .15); stroke-dasharray: none; stroke-width: 2; }
.map__river { fill: none; stroke: var(--sky); stroke-width: 8; stroke-linecap: round; opacity: .8; }
.map__home { fill: var(--spruce); stroke: var(--frost); stroke-width: 5; }
.map__label { font: 700 17px var(--body); fill: var(--frost); }
.map__label--s { font-size: 15px; }

/* Book */
.book { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: clamp(4.5rem, 8vw, 7rem) var(--pad); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); }
.book > * { min-width: 0; }
.book__copy p { color: var(--muted); margin-top: 1rem; max-width: 30rem; }
.book__phone a { color: var(--blue); font-weight: 700; }
.form { background: var(--white); border: 2px solid var(--spruce); border-radius: 14px; padding: clamp(1.2rem, 3vw, 2.2rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__wide { grid-column: 1 / -1; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form input, .form textarea { width: 100%; font: 400 1rem var(--body); color: var(--spruce); background: var(--frost); border: 2px solid #bcd3d4; border-radius: 8px; padding: .75rem .9rem; min-height: 50px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); background: var(--white); }
.form [data-estimate] { background: var(--peg); border-color: var(--peg); font-weight: 600; }
.form__done { background: var(--spruce); color: var(--frost); border-radius: 10px; padding: 1.2rem; }
.form__done-title { font: 700 1.3rem var(--display); color: var(--sky); margin-bottom: .3rem; }

/* Footer */
.foot { background: var(--spruce); color: #b8d0d1; padding: 3rem var(--pad); display: grid; grid-template-columns: auto 1fr auto; gap: 1rem 3rem; align-items: center; }
.foot__logo { font: 800 1.4rem var(--display); color: var(--frost); letter-spacing: -.03em; }
.foot__logo span { font: 600 1rem var(--body); color: var(--sky); letter-spacing: 0; }
.foot a { color: var(--frost); font-weight: 600; }
.foot__sep { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); margin: 0 .6rem; vertical-align: middle; }
.foot__credit { grid-column: 1 / -1; font-size: .9rem; border-top: 1px solid rgba(237, 244, 244, .18); padding-top: 1.2rem; }

@media (max-width: 1080px) {
  .quote__body { grid-template-columns: 1fr; }
  .ticket { position: static; }
  .why__grid { grid-template-columns: 1fr 1fr; }
  .why__grid li:nth-child(3) { border-left: 0; padding-left: 0; }
  .why__grid li { padding-bottom: 1.5rem; }
}
@media (max-width: 860px) {
  .nav__toggle { display: grid; gap: 5px; place-content: center; width: 48px; height: 48px; border: 2px solid var(--spruce); border-radius: 8px; background: var(--frost); cursor: pointer; }
  .nav__toggle span:not(.sr) { width: 20px; height: 2px; background: var(--spruce); transition: transform .25s; }
  .nav__toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(3.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-3.5px) rotate(-45deg); }
  .nav__links { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; background: var(--frost); border-bottom: 2px solid var(--spruce); padding: .5rem var(--pad) 1.2rem; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .9rem 0; border-bottom: 1px solid #c8dadb; font-size: 1.1rem; }
  .nav__cta { margin-top: .8rem; text-align: center; border-bottom: 0 !important; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .board { min-height: 520px; }
  .quote__head, .crew__intro, .area, .book, .foot { grid-template-columns: 1fr; }
  .area__copy { justify-self: start; }
  .crew__row { grid-template-columns: 1fr 1fr; }
  .crew__row .person:last-child { grid-column: 1 / -1; }
  .crew__row .person:last-child img { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .task { grid-template-columns: 36px 1fr auto; gap: .2rem .8rem; padding: .9rem .2rem; }
  .task svg { width: 34px; height: 34px; grid-row: span 2; align-self: start; }
  .task .task__price { grid-column: 2; grid-row: 2; font-size: .95rem; }
  .stepper { grid-column: 3; grid-row: 1 / span 2; }
  .stepper button { width: 40px; }
  .stepper output { min-width: 30px; }
  .when { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .why__grid li, .why__grid li + li { border-left: 0; padding-left: 0; border-bottom: 1px solid rgba(237, 244, 244, .2); }
  .crew__row { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .board { min-height: 460px; padding: 2.5rem 1rem; }
  .board__photo { width: 70%; }
  .tag { font-size: .82rem; padding: .55rem .8rem .55rem 1.5rem; }
  .tag::before { left: .55rem; width: 7px; height: 7px; }
  .tag--1 { left: 2%; top: 9%; } .tag--2 { right: 2%; top: 30%; } .tag--3 { left: 2%; bottom: 20%; } .tag--4 { right: 2%; bottom: 6%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
