/* Double Check Handyman — single stylesheet. Mobile-first. */

:root {
  --paper: #fbfaf7;
  --paper-2: #f3f0e9;
  --ink: #1c2b36;
  --ink-soft: #55656f;
  --orange: #c65d08;
  --orange-bright: #ff9a1f;
  --check: #2f7a4f;
  --rule: #e0dacf;
  --max: 68rem;
  --pad: 1.25rem;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3, h4, .brand-name, .btn {
  font-family: Archivo, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 { font-size: clamp(1.95rem, 6.2vw, 3.1rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.4rem, 4.2vw, 1.9rem); margin: 2.4rem 0 .7rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
h4 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
p  { margin: 0 0 1.1rem; max-width: 64ch; }
a  { color: var(--orange); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--orange-bright);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- header ---------- */

.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: .8rem 0 .9rem;
}
.site-header a { color: var(--paper); }

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
}
.brand img { width: 46px; height: 46px; border-radius: 2px; flex: none; }
.brand-name { font-size: 1.15rem; line-height: 1.1; }
.brand-tag {
  display: block;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .01em;
  color: #a9b6c0;
  margin-top: .15rem;
}

/* big tap-to-call: full width on mobile, inline on desktop */
.call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .8rem;
  padding: .85rem 1rem;
  background: var(--orange-bright);
  color: var(--ink) !important;
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  text-decoration: none;
  border-radius: var(--radius);
}
.call-btn:hover { background: #ffad45; color: var(--ink) !important; }
.call-btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }

/* nav: always visible, wraps on small screens — no JS, no toggle */
.nav { width: 100%; margin-top: .85rem; }
.nav ul {
  list-style: none;
  margin: 0;
  padding: .45rem 0 0;
  border-top: 1px solid #2c3d4a;
  display: flex;
  flex-wrap: wrap;
  gap: .1rem 1.25rem;
}
.nav a {
  display: block;
  padding: .5rem 0;
  text-decoration: none;
  font-size: .98rem;
  color: #d7dee3;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: var(--orange-bright); font-weight: 700; }

/* ---------- hero ---------- */


.hero-kicker {
  font-size: .9rem;
  font-weight: 600;
  color: var(--orange);
  margin: 0 0 .9rem;
}
.hero-lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; }

/* the checklist: this page's one bold element */
.checklist {
  list-style: none;
  margin: 1.6rem 0 1.8rem;
  padding: 1.1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  max-width: 34rem;
}
.checklist li {
  position: relative;
  padding-left: 2.1rem;
  margin: 0 0 .7rem;
  font-size: 1.02rem;
}
.checklist li:last-child { margin-bottom: 0; }
.checklist .box {
  position: absolute;
  left: 0;
  top: .1rem;
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid var(--rule);
  border-radius: 2px;
  background: #fff;
}
.checklist .done .box { border-color: var(--check); background: var(--check); }
.checklist .done .box::after {
  content: "";
  position: absolute;
  left: .28rem; top: .06rem;
  width: .42rem; height: .72rem;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  animation: tick .32s cubic-bezier(.2,.9,.3,1.2) forwards;
}
.checklist .done:nth-child(1) .box::after { animation-delay: .25s; }
.checklist .done:nth-child(2) .box::after { animation-delay: .5s; }
.checklist .done:nth-child(3) .box::after { animation-delay: .75s; }
.checklist .done { text-decoration: line-through; text-decoration-color: var(--rule); }
.checklist .open { color: var(--ink-soft); font-style: italic; }
@keyframes tick { to { transform: rotate(45deg) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .checklist .done .box::after { animation: none; transform: rotate(45deg) scale(1); }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 1.6rem; }
.btn {
  display: inline-block;
  padding: .8rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1.02rem;
  border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2a3f4e; color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- content ---------- */

main { padding-bottom: 0; }  /* sections own their spacing so bands sit flush */
.page-head { padding-top: 1.9rem; padding-bottom: .4rem; }  /* keep .wrap's side padding */
.page-head h1 { max-width: 30ch; }
.content { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.content h2:first-child { margin-top: 1.2rem; }
.content img {
  display: block;
  max-width: min(100%, 26rem);
  margin: 1.5rem 0;
  padding: .45rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.content ul { padding-left: 1.2rem; }
.content li { margin-bottom: .35rem; }

.framed {
  width: fit-content;
  max-width: 100%;
  margin: 1.8rem 0 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 36px -22px rgba(28, 43, 54, .45);
}
.framed img { display: block; border: 0; padding: 0; margin: 0; border-radius: 2px; }
.framed figcaption {
  font-size: .82rem;
  color: var(--ink-soft);
  padding: .5rem .2rem .1rem;
}

/* post list */
.posts { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.posts li {
  padding: 1.2rem 0;
  border-top: 1px solid var(--rule);
}
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.posts h2 { margin: 0 0 .35rem; font-size: 1.22rem; }
.posts h2 a { text-decoration: none; }
.posts h2 a:hover { text-decoration: underline; }
.posts time { font-size: .83rem; color: var(--ink-soft); }
.posts p { margin: .4rem 0 0; color: var(--ink-soft); font-size: .97rem; }

/* contact + form */
.contact-grid { margin-top: 1.4rem; }
.contact-lines { list-style: none; padding: 0; margin: 0 0 2rem; }
.contact-lines li { margin-bottom: .55rem; }
.contact-lines .label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: .1rem;
}
.contact-lines a { font-size: 1.1rem; font-weight: 600; }

form { max-width: 34rem; }
/* honeypot: hidden from people, visible to bots that fill every field */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
input, textarea {
  width: 100%;
  padding: .7rem .75rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9c2b5;
  border-radius: var(--radius);
}
input:focus, textarea:focus { border-color: var(--orange); }
textarea { min-height: 8rem; resize: vertical; }
button[type="submit"] {
  padding: .85rem 1.4rem;
  font: 700 1.02rem Archivo, system-ui, sans-serif;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}
button[type="submit"]:hover { background: #2a3f4e; }
.form-note {
  font-size: .88rem;
  color: var(--ink-soft);
  background: var(--paper-2);
  border-left: 3px solid var(--orange);
  padding: .7rem .85rem;
  margin: 0 0 1.3rem;
  max-width: 34rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: #c3ced6;
  padding: 2.2rem 0 1.6rem;
  font-size: .95rem;
}
.site-footer h2 {
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: none;
  color: var(--orange-bright);
  margin: 0 0 .6rem;
}
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .4rem; max-width: none; }
.foot-cols { display: grid; gap: 1.8rem; }
.foot-bottom {
  margin-top: 1.9rem;
  padding-top: 1.1rem;
  border-top: 1px solid #2c3d4a;
  font-size: .85rem;
  color: #8d9ca6;
}

/* ---------- desktop ---------- */

@media (min-width: 46rem) {
  .site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  .call-btn { margin-top: 0; margin-left: auto; order: 3; }
  .nav { order: 4; margin-top: .5rem; }
  .nav ul { gap: .1rem 1.6rem; }

  .hero .wrap {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 2.6rem;
    align-items: start;
  }
  .hero { padding: 3rem 0 2.4rem; }
  .framed { margin-top: .4rem; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); gap: 2.2rem; }
}


/* ======================================================================
   Flowing sections: alternating media/text, soft gradients, gentle reveals
   ====================================================================== */

:root {
  --shadow-soft: 0 18px 44px -26px rgba(28, 43, 54, .45);
  --shadow-lift: 0 26px 60px -30px rgba(28, 43, 54, .55);
  --curve: 34px;
}

/* --- hero --------------------------------------------------------- */

.hero {
  position: relative;
  padding: 2.6rem 0 3.2rem;
  background:
    radial-gradient(90% 120% at 12% 0%, rgba(255, 154, 31, .16) 0%, rgba(255, 154, 31, 0) 58%),
    linear-gradient(176deg, #fffdf9 0%, var(--paper) 46%, var(--paper-2) 100%);
}
.hero-grid { display: grid; gap: 2rem; }
.hero-media { margin-top: .4rem; }

/* --- rhythm between sections -------------------------------------- */

.flow { padding: clamp(2.8rem, 8vw, 5.2rem) 0; }
.flow--tint {
  position: relative;
  margin-top: clamp(1.2rem, 4vw, 2.2rem);
  border-radius: var(--curve) var(--curve) 0 0;
  background:
    linear-gradient(177deg, #fffefb 0%, var(--paper-2) 62%, #efeadf 100%);
}
.flow--tint + .flow { padding-top: clamp(2.4rem, 7vw, 4.4rem); }

.cta-band {
  position: relative;
  border-radius: var(--curve) var(--curve) 0 0;
  background:
    radial-gradient(80% 140% at 85% 8%, rgba(255, 154, 31, .22) 0%, rgba(255, 154, 31, 0) 60%),
    linear-gradient(170deg, var(--paper-2) 0%, #f0e7d8 100%);
}
.cta-band h2 { margin-top: 0; }

.measure { max-width: 58rem; }
.measure p { font-size: 1.09rem; }

/* --- media cards: rounded, soft, never upscaled -------------------- */

.media-card {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  /* --natural caps the card at the photo's real width so it is never blown up */
  max-width: min(100%, var(--natural, 100%));
}
.media-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  padding: 0;
  margin: 0;
}
.media-card figcaption {
  font-size: .83rem;
  color: var(--ink-soft);
  padding: .6rem .9rem .75rem;
  background: #fff;
}

/* Uniform crop so rows of photos line up. Only applied where several photos
   sit side by side: a lone photo keeps its natural shape, because forcing a
   ratio on these small originals would scale them up. */
.photo-row .media-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* A photo that introduces the heading directly below it: generous air above,
   tight below, so the pair reads as one unit. Each card is still capped at its
   own --natural width, so these small originals are never blown up - which is
   why they differ in size from one section to the next. */
.media-card--section {
  margin: 2.6rem 0 0;
  /* One display width for every section photo, so the page reads evenly.
     Still capped at each original's own width: the TV shot is only 240px
     wide, so it stays 240 rather than being stretched up to match. */
  max-width: min(300px, var(--natural, 100%));
}
.media-card--section + h2 { margin-top: 1.1rem; }

.duo { display: grid; gap: 1.6rem; }
.duo-copy p:last-child { margin-bottom: 0; }

/* --- reveals ------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease-out, transform .6s ease-out;
  transition-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .checklist .done .box::after { animation: none; transform: rotate(45deg) scale(1); }
}

/* --- desktop ------------------------------------------------------- */

@media (min-width: 46rem) {
  .hero { padding: 3.6rem 0 4.4rem; }
  .hero-grid {
    grid-template-columns: 1.1fr .9fr;
    gap: 3rem;
    align-items: center;
  }
  /* the hero photo laps over the section edge a little */
  .hero-media { margin-bottom: -4.2rem; position: relative; z-index: 2; box-shadow: var(--shadow-lift); }

  .duo {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 3rem;
    align-items: center;
  }
  .duo-media { margin-top: -3.2rem; position: relative; z-index: 2; }
  /* alternate: every other duo puts the photo on the right */
  .duo--flip .duo-media { order: 2; }

  .js .reveal { transform: translateY(26px); }
}


/* ---- interior page heads, photo rows, post list ------------------- */

.page-hero {
  padding: clamp(2.2rem, 6vw, 3.4rem) 0 clamp(1.6rem, 4vw, 2.4rem);
  background:
    radial-gradient(85% 130% at 8% 0%, rgba(255, 154, 31, .14) 0%, rgba(255, 154, 31, 0) 60%),
    linear-gradient(174deg, #fffdf9 0%, var(--paper) 58%, var(--paper-2) 100%);
}
.page-hero h1 { max-width: 24ch; margin-bottom: .35rem; }
.page-hero .hero-lead { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.page-hero + .flow { padding-top: clamp(2rem, 6vw, 3.2rem); }

/* photos laid out as an aligned band. Heights match via a fixed box plus
   object-fit; widths are capped at each photo's own size so none is enlarged. */
.photo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 240px));
  gap: 1.1rem;
  /* centred so the band stays balanced with only two cards in it */
  justify-content: center;
}
.photo-row .media-card { margin: 0; }
.photo-row .media-card img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

/* post list with thumbnails */
.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.posts li {
  display: grid;
  gap: 1rem;
  padding: 0;
  border: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.posts li:last-child { border-bottom: 0; }
/* Fixed thumb column with a fixed ratio: every card lines up, and the column
   is always narrower than the smallest original (251px) so nothing upscales. */
.posts li { grid-template-columns: 110px minmax(0, 1fr); align-items: stretch; }
/* No height:100% here - with aspect-ratio it would derive the WIDTH from the
   row height and blow the thumb past its grid track, upscaling the photo. */
.post-thumb { display: block; aspect-ratio: 4 / 3; align-self: start; }
.post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-text { padding: .95rem 1.1rem 1.05rem 0; }
.posts li:not(:has(.post-thumb)) .post-text { padding-left: 1.1rem; }
.posts h2 { margin: 0 0 .3rem; font-size: 1.18rem; }
.posts h2 a { text-decoration: none; }
.posts h2 a:hover { text-decoration: underline; }

/* a post's own lead photo sits just under the title */
.post-lead { padding-top: 0; padding-bottom: 0; }
.post-hero { margin-top: -1rem; }

@media (min-width: 46rem) {
  .posts li { grid-template-columns: 220px minmax(0, 1fr); }
  .post-text { padding: 1.3rem 1.5rem 1.4rem 0; }
  .posts li:not(:has(.post-thumb)) .post-text { padding-left: 1.5rem; }
  .post-hero { margin-top: -1.6rem; }
}
