/* ==========================================================================
   Donnie's Woodworking — single stylesheet
   No CDN, no webfont request, no external origin. Opens from file://.

   REBRAND SURFACE: change the three tokens marked REBRAND below plus
   assets/mark.svg. Never hard-code a colour in the HTML.
   ========================================================================== */

:root {
  /* --- REBRAND: cedar brown, used for headings, links and rules ---------- */
  --brand: #8a4b1c;          /* 6.3:1 on --paper */
  /* --- REBRAND: the deep ink everything is read in ----------------------- */
  --brand-ink: #241a12;      /* 16:1 on --paper */
  /* --- REBRAND: firehouse red, the call-to-action ------------------------ */
  --accent: #b03a2e;         /* 6.0:1 against white button text */

  --paper: #fbf7f1;
  --paper-2: #f3ebe0;
  --paper-3: #e8dccb;
  --ink: var(--brand-ink);
  --ink-soft: #58483b;       /* 7.4:1 on --paper */
  --accent-dark: #8c2c22;
  --line: #d9c9b3;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --maxw: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(36, 26, 18, .07), 0 8px 24px rgba(36, 26, 18, .09);
  --shadow-lift: 0 2px 4px rgba(36, 26, 18, .09), 0 16px 40px rgba(36, 26, 18, .14);

  /* Fluid type. Body starts large on purpose — the audience skews older. */
  --step--1: clamp(1rem, .97rem + .15vw, 1.075rem);
  --step-0: clamp(1.125rem, 1.09rem + .18vw, 1.225rem);
  --step-1: clamp(1.3rem, 1.22rem + .4vw, 1.55rem);
  --step-2: clamp(1.55rem, 1.4rem + .75vw, 2.05rem);
  --step-3: clamp(1.9rem, 1.62rem + 1.4vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.8rem + 2.5vw, 4rem);

  --space-s: clamp(.75rem, .6rem + .5vw, 1rem);
  --space-m: clamp(1.25rem, 1rem + 1vw, 2rem);
  --space-l: clamp(2rem, 1.5rem + 2.2vw, 3.5rem);
  --space-xl: clamp(3.25rem, 2.4rem + 3.6vw, 6rem);

  --motion-ok: 0;
}

@media (prefers-reduced-motion: no-preference) {
  :root { --motion-ok: 1; }
}

/* --- Reset ---------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-wrap: break-word;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

/* <picture> is auto-height, so a child img{height:100%} has nothing to resolve
   against and the photo stops short of its container. Make the wrapper fill. */
.hero__media picture,
.card__media picture,
.split__media picture {
  width: 100%;
  height: 100%;
}

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }

main:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

ul { padding-left: 1.15em; }
li { margin-bottom: .4em; }

/* --- Layout --------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-xl); }
.section--paper2 { background: var(--paper-2); }

.section__head { max-width: 46rem; margin-bottom: var(--space-l); }
.section__head p { color: var(--ink-soft); font-size: var(--step-1); }

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .75rem;
}

.vh {
  position: absolute;
  clip-path: inset(50%);
  width: 1px; height: 1px;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  clip-path: inset(50%);
  width: 1px; height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 100;
  clip-path: none;
  width: auto; height: auto;
  padding: .8rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  text-decoration: none;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.25rem;
  padding: .85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: var(--step-1);
  padding: 1rem 1.9rem;
}
.btn--primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--paper-2); color: var(--accent-dark); }

.btn__icon { flex: none; width: 1.15em; height: 1.15em; fill: currentColor; }

.cta-row--spaced { margin-top: var(--space-m); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  align-items: center;
}

/* Measured overflow: 46px at 320px on contact.html. Cause was min-content width -
   a grid item defaults to min-width:auto and "info@donwoodworking.com" is one
   unbreakable token, so the card could not shrink. overflow-wrap:anywhere is the
   property that actually lowers min-content (break-word does not). */
.contact-grid > * { min-width: 0; }
.contact-card dd a[href^="mailto:"],
.site-footer a[href^="mailto:"] { overflow-wrap: anywhere; }

@media (max-width: 26rem) {
  .btn { max-width: 100%; }
  .btn--primary { font-size: var(--step-0); padding: .9rem 1.1rem; }
  .contact-card { padding: var(--space-s); }
}

/* --- Header / nav --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 241, .95);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 2.5rem; height: 2.5rem; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}
.brand__where {
  display: block;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .5rem .9rem;
  background: transparent;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li { margin: 0; }

.site-nav a {
  display: inline-block;
  padding: .6rem .2rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--brand); border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }

.site-nav .nav-call {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.9rem;
  padding: .55rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  border-bottom: 0;
  white-space: nowrap;
}
.site-nav .nav-call:hover { background: var(--accent-dark); color: #fff; border-bottom-color: transparent; }
.site-nav .nav-call svg { width: 1rem; height: 1rem; fill: currentColor; }

/* Without JS the toggle can never open anything, so the nav must NOT start hidden -
   otherwise a script-blocked phone has no way to reach the other three pages. The
   collapse is therefore gated on .js, exactly like the reveal animation. */
@media (max-width: 56rem) {
  .site-header__inner { flex-wrap: wrap; }

  .nav-toggle { display: none; }
  .js .nav-toggle { display: inline-flex; }

  .site-nav { width: 100%; padding-bottom: var(--space-s); }

  .js .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    width: auto;
    padding: var(--space-s) var(--gutter) var(--space-m);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .js .site-nav[data-open="true"] { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .site-nav a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .site-nav .nav-call { justify-content: center; margin-top: .75rem; }
}

@media (min-width: 56.0625rem) {
  .nav-toggle, .js .nav-toggle { display: none; }
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  margin-left: auto;
  padding: .5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-call:hover { background: var(--accent-dark); color: #fff; }
.header-call svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

@media (min-width: 56.0625rem) {
  .header-call { display: none; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(36, 26, 18, .05), rgba(36, 26, 18, .05)),
    linear-gradient(135deg, var(--paper-2), var(--paper-3));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  /* Gradient sits under the photo so a missing file never shows a broken box. */
  background: linear-gradient(135deg, #c9a878, #8a6a45);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 60%;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(251, 247, 241, .97) 0%,
    rgba(251, 247, 241, .93) 34%,
    rgba(251, 247, 241, .55) 56%,
    rgba(251, 247, 241, .12) 78%);
}

@media (max-width: 46rem) {
  .hero__scrim {
    background: linear-gradient(180deg,
      rgba(251, 247, 241, .68) 0%,
      rgba(251, 247, 241, .93) 40%,
      rgba(251, 247, 241, .99) 62%);
  }
  .hero__media img { object-position: 60% 30%; }
}

.hero__inner {
  position: relative;
  padding-block: clamp(3.5rem, 3rem + 7vw, 8rem);
}
.hero__copy { max-width: 34rem; }
.hero__copy p {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 30rem;
}
.hero__price {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: var(--space-m) 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}
.hero__price li { margin: 0; }
.hero__price strong { color: var(--brand); font-size: var(--step-1); }

.hero--slim .hero__inner { padding-block: clamp(2.5rem, 2rem + 4vw, 4.5rem); }
.hero--slim .hero__copy { max-width: 44rem; }

/* --- Trust band ----------------------------------------------------------- */

.band {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--space-l);
}
.band ul {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  margin: 0; padding: 0;
  list-style: none;
}
.band li { margin: 0; }
.band strong {
  display: block;
  font-family: var(--serif);
  font-size: var(--step-1);
  color: #f0c99b;
  margin-bottom: .2rem;
}
.band span { color: #ded2c6; font-size: var(--step--1); }

/* --- Cards / grids -------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #c9a878, #8a6a45);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }

.card__body { padding: var(--space-m); display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: .35rem; }
.card__price {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 .5rem;
}
.card__body p { color: var(--ink-soft); }
.card__link {
  margin-top: auto;
  padding-top: var(--space-s);
  font-weight: 700;
  text-decoration: none;
}
.card__link::after { content: " \2192"; }
.card__link:hover { text-decoration: underline; }

/* --- Gallery -------------------------------------------------------------- */

.gallery {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}
.gallery figure { margin: 0; }
.gallery .shot {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #c9a878, #8a6a45);
  box-shadow: var(--shadow);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption {
  margin-top: .6rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* --- Split (image + prose) ------------------------------------------------ */

.split {
  display: grid;
  gap: var(--space-l);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--flip .split__media { order: 2; }
}
.split__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #c9a878, #8a6a45);
  box-shadow: var(--shadow);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__copy p { color: var(--ink-soft); }
.split__copy p:first-of-type { color: var(--ink); font-size: var(--step-1); }

/* --- Steps ---------------------------------------------------------------- */

.steps {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  margin: 0; padding: 0;
  list-style: none;
}
.steps li {
  margin: 0;
  padding-top: var(--space-s);
  border-top: 3px solid var(--line);
}
.steps__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  margin-bottom: .6rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
}
.steps h3 { font-size: var(--step-1); margin-bottom: .3rem; }
.steps p { color: var(--ink-soft); font-size: var(--step--1); margin: 0; }

/* --- Spec list ------------------------------------------------------------ */

.specs {
  display: grid;
  gap: 0;
  margin: var(--space-m) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.specs div {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  justify-content: space-between;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.specs dt { font-weight: 700; margin: 0; }
.specs dd { margin: 0; color: var(--ink-soft); text-align: right; }

/* --- Price plate ---------------------------------------------------------- */

.plate {
  padding: var(--space-m);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
}
.plate__amount {
  display: block;
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1;
  color: var(--brand);
}
.plate__note { color: var(--ink-soft); font-size: var(--step--1); margin: .5rem 0 var(--space-m); }

/* --- FAQ ------------------------------------------------------------------ */

.faq { max-width: 48rem; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative;
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: .35rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-family: var(--sans);
  color: var(--brand);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > p { padding-bottom: 1.2rem; color: var(--ink-soft); max-width: 44rem; }

/* --- Closing CTA ---------------------------------------------------------- */

.closer {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.closer h2 { color: var(--paper); }
.closer p { color: #ded2c6; max-width: 38rem; margin-inline: auto; font-size: var(--step-1); }
.closer .cta-row { justify-content: center; margin-top: var(--space-m); }
.closer .btn--ghost { color: #f0c99b; border-color: #5c4a3a; }
.closer .btn--ghost:hover { background: #3a2c20; color: #f7dcc0; }
.closer :focus-visible,
.band :focus-visible { outline-color: #f0c99b; }

/* --- Contact -------------------------------------------------------------- */

.contact-grid {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
  .contact-grid { grid-template-columns: 1.1fr .9fr; }
}

.contact-card {
  padding: var(--space-m);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-card dl { margin: 0; }
.contact-card dt {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: var(--space-m);
}
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd {
  margin: .2rem 0 0;
  font-family: var(--serif);
  font-size: var(--step-1);
}
.contact-card dd a { text-decoration: none; font-weight: 700; }
.contact-card dd a:hover { text-decoration: underline; }

.pending {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-style: italic;
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-l);
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.site-footer__legal { color: var(--ink-soft); width: 100%; margin: 0; padding-top: var(--space-s); border-top: 1px solid var(--line); }

/* --- Reveal (opt-in, motion-gated) ---------------------------------------- */

/* Gated on .js, which main.js sets. Without JS the content is simply visible -
   never hidden behind a script that might not run. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: calc(1 - var(--motion-ok));
    transform: translateY(calc(14px * var(--motion-ok)));
    transition: opacity .5s ease, transform .5s ease;
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}
