/* Carson's Handyman Service: slate lap siding, white door casing, van red */
:root {
  --slate: #38424F;
  --slate-deep: #2A323C;
  --red: #CF3F22;
  --red-dark: #AE3118;
  --ink: #1C2229;
  --mute: #595E66;
  --wall: #E5E8EB;
  --line: #CDD2D8;
  --cedar: #C4884A;
  --white: #FFFFFF;
  --on-slate: #E8ECF0;
  --head: "Urbanist", "Segoe UI", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1200px;
  --gutter: 40px;
  --lap-dark: repeating-linear-gradient(to bottom, transparent 0 51px, rgba(0, 0, 0, .2) 51px 52px, rgba(255, 255, 255, .06) 52px 53px);
  --lap-light: repeating-linear-gradient(to bottom, transparent 0 51px, rgba(40, 50, 60, .07) 51px 52px, rgba(255, 255, 255, .6) 52px 53px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote, table { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(34px, 4.2vw, 58px); }
h3 { font-size: 26px; letter-spacing: -0.01em; line-height: 1.15; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.hero :focus-visible, .about :focus-visible, .foot :focus-visible, .lightbox :focus-visible, .sticky-book :focus-visible { outline-color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 200; background: var(--ink); color: #fff; padding: 12px 16px; font-family: var(--head); font-weight: 700; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 12px 26px; border: 2px solid transparent; border-radius: 3px;
  font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--slate-deep); border-color: #fff; }
.btn--slate { background: var(--slate); color: #fff; }
.btn--slate:hover { background: var(--slate-deep); }
.btn--full { width: 100%; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 60; background: var(--white); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 32px; min-height: 72px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; font-family: var(--head); margin-right: auto; }
.brand__name { font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.brand__sub { font-weight: 700; font-size: 17px; color: var(--mute); }
.nav { display: flex; gap: 28px; }
.nav a { font-family: var(--head); font-weight: 700; font-size: 16.5px; text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--red); }
.top__phone { font-family: var(--head); font-weight: 800; font-size: 19px; text-decoration: none; color: var(--red-dark); white-space: nowrap; padding: 10px 0; }
.top__phone:hover { text-decoration: underline; }
.menu-btn { display: none; width: 52px; height: 52px; border: 0; background: transparent; cursor: pointer; padding: 14px 11px; }
.menu-btn span { display: block; height: 3px; background: var(--ink); margin: 5px 0; }

.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(28, 34, 41, .55); }
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(86vw, 340px);
  background: var(--white); padding: 84px 24px 24px; display: flex; flex-direction: column; gap: 24px; overflow-y: auto;
}
.mobile-menu[hidden], .scrim[hidden] { display: none; }
.mobile-menu__close { position: absolute; top: 12px; right: 14px; width: 52px; height: 52px; border: 0; border-radius: 3px; background: var(--wall); font-size: 34px; line-height: 1; cursor: pointer; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--head); font-size: 20px; font-weight: 700; text-decoration: none; }

/* Door casing: the one motif. White trim on three sides, cedar threshold below. */
.door { position: relative; background: #fff; padding: 10px 10px 0; border-bottom: 9px solid var(--cedar); box-shadow: 0 0 0 1px rgba(28, 34, 41, .14); }
.door img { width: 100%; height: 100%; object-fit: cover; }
.door__tag {
  position: absolute; left: 22px; top: 22px; z-index: 1;
  background: #fff; color: var(--ink); padding: 5px 12px 4px;
  font-family: var(--head); font-weight: 800; font-size: 15px; line-height: 1.2; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(28, 34, 41, .2);
}

/* Hero */
.hero { background-color: var(--slate); background-image: var(--lap-dark); color: #fff; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 56px; align-items: end; }
.hero__text { padding: 72px 0 76px; align-self: center; }
.hero h1 { font-size: clamp(44px, 5.4vw, 80px); line-height: .98; letter-spacing: -0.03em; text-wrap: balance; }
.hero__lead { margin-top: 24px; font-size: 20px; line-height: 1.55; color: var(--on-slate); max-width: 33em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__rating { margin-top: 26px; font-family: var(--head); font-weight: 700; font-size: 17px; color: var(--on-slate); }
.stars { color: #F2B544; letter-spacing: 2px; margin-right: 6px; }
.hero__doors { display: flex; align-items: flex-end; justify-content: flex-end; gap: 26px; padding-top: 48px; }
.hero__doors .door { border-bottom-width: 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), -14px 0 28px rgba(0, 0, 0, .18); }
.door--before { width: 39%; aspect-ratio: 570 / 940; }
.door--after { width: 50%; aspect-ratio: 700 / 1180; }

/* Facts: the porch slab the two doors stand on */
.facts { background: var(--white); border-bottom: 1px solid var(--line); }
.facts__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts__list li { padding: 22px 24px 22px 0; }
.facts__list li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.facts__list strong { display: block; font-family: var(--head); font-weight: 800; font-size: 18.5px; line-height: 1.25; }
.facts__list span { display: block; color: var(--mute); font-size: 16px; line-height: 1.4; margin-top: 3px; }

/* Section heads */
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: end; margin-bottom: 56px; }
.sec-head p { color: var(--mute); max-width: 36em; }

/* Doors */
.doors { background-color: var(--wall); background-image: var(--lap-light); padding: 104px 0 112px; }
.doors .sec-head p { color: #474C54; }
.job { display: grid; gap: 56px; align-items: end; }
.job--front { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.job--garage { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); margin-top: 96px; }
.job__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
.job__pair--wide .door { aspect-ratio: 4 / 3; }
.job__text { padding-bottom: 12px; }
.job__text p { margin-top: 14px; max-width: 30em; }
.job__text blockquote { margin-top: 26px; padding-left: 18px; border-left: 4px solid var(--red); }
.job__text blockquote p { margin: 0; font-family: var(--head); font-weight: 700; font-size: 23px; line-height: 1.3; letter-spacing: -0.01em; }
.job__text cite { display: block; margin-top: 8px; font-style: normal; font-size: 16px; color: #474C54; }

.trio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.2fr); gap: 48px; align-items: start; margin-top: 96px; }
.trio__item h3 { margin-top: 22px; font-size: 23px; }
.trio__item p { margin-top: 8px; color: #474C54; }
.trio .door { height: 400px; }
.trio .job__pair { align-items: stretch; }

.storm { margin-top: 88px; padding: 36px 40px; background: #fff; border-bottom: 9px solid var(--cedar); box-shadow: 0 0 0 1px rgba(28, 34, 41, .14); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 48px; align-items: center; }
.storm p { grid-column: 1; max-width: 40em; }
.storm .btn { grid-column: 2; grid-row: 1 / span 2; }

/* Services */
.services { padding: 104px 0; }
.services__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; }
.services__cols h3 { padding-bottom: 14px; border-bottom: 3px solid var(--ink); }
.plain li { padding: 13px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.services__note { margin-top: 20px; color: var(--mute); }
.steps { margin-top: 72px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .7fr); gap: 20px; align-items: end; }
.steps figure { position: relative; }
.steps img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.steps figcaption { position: absolute; left: 12px; top: 12px; background: #fff; padding: 5px 12px 4px; font-family: var(--head); font-weight: 800; font-size: 15px; line-height: 1.2; border-radius: 2px; }
.steps p { padding: 0 0 6px 20px; font-family: var(--head); font-weight: 700; font-size: 21px; line-height: 1.3; }

/* Gallery */
.work { padding: 0 0 104px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 250px; grid-auto-flow: dense; gap: 10px; }
.gallery__item { padding: 0; border: 0; background: var(--wall); cursor: zoom-in; overflow: hidden; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }

/* Reviews */
.reviews { background: var(--wall); padding: 104px 0; }
.reviews__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
.reviews__score { position: sticky; top: 104px; }
.score { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.score__num { font-family: var(--head); font-weight: 800; font-size: 96px; line-height: .9; letter-spacing: -0.04em; color: var(--red-dark); }
.score__of { font-family: var(--head); font-weight: 700; font-size: 17px; line-height: 1.35; }
.textlink { display: inline-block; margin-top: 22px; padding: 6px 0; font-family: var(--head); font-weight: 700; color: var(--ink); text-underline-offset: 4px; }
.textlink:hover { color: var(--red-dark); }
.quote figcaption { margin-top: 12px; font-family: var(--head); font-weight: 700; font-size: 16px; color: #474C54; }
.quote--lead blockquote { font-size: clamp(23px, 2.3vw, 30px); line-height: 1.4; }
.quote--lead { padding-bottom: 40px; border-bottom: 1px solid #B9BFC6; }
.quotes { columns: 2; column-gap: 48px; margin-top: 40px; }
.quotes .quote { break-inside: avoid; margin-bottom: 36px; }

/* About */
.about { background-color: var(--slate); background-image: var(--lap-dark); color: #fff; padding: 104px 0; }
.about__in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.about__photo { background: #fff; padding: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.about__photo img { width: 100%; }
.about__text > p { margin-top: 20px; color: var(--on-slate); max-width: 32em; }
.creds { margin-top: 32px; border-top: 1px solid rgba(255, 255, 255, .28); }
.creds div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .28); }
.creds dt { font-family: var(--head); font-weight: 800; font-size: 18px; }
.creds dd { color: var(--on-slate); font-size: 17px; line-height: 1.45; }

/* Contact */
.contact { padding: 104px 0; }
.contact__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: start; }
.contact__info > p { margin-top: 18px; color: var(--mute); max-width: 26em; }
.contact__phone { display: inline-block; margin-top: 26px; font-family: var(--head); font-weight: 800; font-size: clamp(34px, 3.6vw, 48px); letter-spacing: -0.02em; line-height: 1.1; color: var(--red-dark); text-decoration: none; }
.contact__phone:hover { text-decoration: underline; }
.contact__mail { display: block; margin-top: 8px; padding: 6px 0; overflow-wrap: anywhere; text-underline-offset: 4px; }
.hours { margin-top: 30px; width: 100%; max-width: 380px; border-collapse: collapse; font-size: 17px; }
.hours caption { text-align: left; font-family: var(--head); font-weight: 800; font-size: 20px; padding-bottom: 8px; }
.hours th, .hours td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.hours tr.is-today th::after { content: " (today)"; color: var(--mute); font-weight: 400; }

.form { background: #fff; padding: 36px 36px 30px; border-bottom: 9px solid var(--cedar); box-shadow: 0 0 0 1px rgba(28, 34, 41, .22); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--head); font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.field label span { font-weight: 600; color: var(--mute); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 12px 14px; border: 2px solid #8C939B; border-radius: 3px; background: #fff;
  font: inherit; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--red); outline-offset: 1px; border-color: var(--ink); }
.form__err { color: var(--red-dark); font-weight: 600; margin-bottom: 14px; }
.form__hint { margin-top: 12px; font-size: 16px; color: var(--mute); text-align: center; }

/* Footer */
.foot { background: var(--slate-deep); color: var(--on-slate); padding: 44px 0; font-size: 17px; }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 40px; align-items: start; }
.foot__name { font-family: var(--head); font-weight: 800; font-size: 21px; color: #fff; }
.foot a { display: inline-block; padding: 4px 0; text-underline-offset: 4px; }
.foot__copy { color: #B8C0C9; font-size: 16px; }

.sticky-book { display: none; }

/* Lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(24, 29, 35, .97); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox img { max-width: min(92vw, 1280px); max-height: 80vh; width: auto; height: auto; object-fit: contain; }
.lightbox__cap { position: absolute; left: 16px; right: 16px; bottom: 22px; text-align: center; font-size: 17px; color: var(--on-slate); }
.lightbox__close, .lightbox__nav { position: absolute; width: 56px; height: 56px; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--red); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Tablet */
@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .nav { display: none; }
  .menu-btn { display: block; }
  .top__in { gap: 12px; }
  .hero__in { grid-template-columns: 1fr; gap: 0; }
  .hero__text { padding: 56px 0 8px; }
  .hero__doors { justify-content: flex-start; padding-top: 40px; max-width: 620px; }
  .facts__list { grid-template-columns: 1fr 1fr; }
  .facts__list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts__list li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sec-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 44px; }
  .job--front, .job--garage { grid-template-columns: 1fr; gap: 28px; }
  .job--garage .job__text { order: 2; }
  .trio { grid-template-columns: 1fr 1fr; }
  .trio__item--pair { grid-column: 1 / -1; max-width: 560px; }
  .trio .door { height: 380px; }
  .trio__item--pair .door { height: 440px; }
  .services__cols { gap: 32px; }
  .reviews__in { grid-template-columns: 1fr; gap: 40px; }
  .reviews__score { position: static; }
  .about__in { grid-template-columns: 1fr; gap: 40px; }
  .contact__in { grid-template-columns: 1fr; gap: 48px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
}

/* Phone */
@media (max-width: 700px) {
  :root { --gutter: 16px; }
  body { padding-bottom: 76px; }
  h3 { font-size: 24px; }
  .top__in { min-height: 64px; }
  .brand { flex-direction: column; gap: 0; align-items: flex-start; }
  .brand__name { font-size: 22px; line-height: 1.05; }
  .brand__sub { font-size: 14px; line-height: 1.2; }
  .top__phone { font-size: 17px; }
  .hero__text { padding: 40px 0 0; }
  .hero__lead { font-size: 18px; margin-top: 18px; }
  .hero__cta { margin-top: 24px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__rating { margin-top: 20px; }
  .hero__doors { gap: 14px; padding-top: 32px; }
  .hero__doors .door { padding: 7px 7px 0; border-bottom-width: 9px; }
  .door--before { width: 43%; }
  .door--after { width: 57%; }
  .door { padding: 7px 7px 0; }
  .door__tag { left: 14px; top: 14px; font-size: 14px; padding: 4px 9px 3px; }
  .facts__list { grid-template-columns: 1fr; }
  .facts__list li, .facts__list li + li { padding: 14px 0; border-left: 0; }
  .facts__list li + li { border-top: 1px solid var(--line); }
  .doors, .services, .reviews, .about, .contact { padding: 64px 0; }
  .work { padding-bottom: 64px; }
  .job__pair { gap: 10px; }
  .job--garage { margin-top: 64px; }
  .job--garage .job__pair--wide { grid-template-columns: 1fr; }
  .job__text blockquote p { font-size: 21px; }
  .trio { grid-template-columns: 1fr; gap: 48px; margin-top: 64px; }
  .trio .door, .trio__item--pair .door { height: auto; }
  .trio__item--pair .door { aspect-ratio: 3 / 5; }
  .trio__item:nth-child(2) .door { aspect-ratio: 3 / 4; }
  .trio__item:nth-child(3) .door { aspect-ratio: 6 / 5; }
  .storm { margin-top: 56px; padding: 26px 20px; grid-template-columns: 1fr; }
  .storm .btn { grid-column: 1; grid-row: auto; margin-top: 12px; }
  .services__cols { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 48px; }
  .steps p { grid-column: 1 / -1; padding: 8px 0 0; font-size: 19px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 8px; }
  .gallery__item:nth-child(7) { grid-row: auto; }
  .gallery__item:nth-child(7) img { object-position: 50% 30%; }
  .gallery__item:nth-child(8) { grid-column: auto; }
  .score__num { font-size: 80px; }
  .quotes { columns: 1; }
  .quote--lead { padding-bottom: 30px; }
  .creds div { grid-template-columns: 1fr; gap: 4px; }
  .form { padding: 22px 16px 20px; }
  .foot__in { grid-template-columns: 1fr; gap: 20px; }
  .lightbox__nav { top: auto; bottom: 70px; transform: none; }

  .sticky-book {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--slate-deep); box-shadow: 0 -2px 14px rgba(0, 0, 0, .25);
    transform: translateY(110%); transition: transform .2s ease;
  }
  .sticky-book.is-visible { transform: none; }
  .sticky-book .btn { min-height: 52px; padding: 10px 12px; }
}

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