/* ============================================================
   Timber Trace USA — stylesheet
   Palette: bark brown · warm paper · ember accent
   No external fonts or CDNs, so the site is fully self-contained.
   ------------------------------------------------------------
   Contracts other files depend on — do not rename:
     --header-h            (scroll-padding + mobile menu offset)
     900px nav breakpoint  (NAV_BREAKPOINT in script.js)
     .reveal/.is-visible   (scroll animation, script.js)
     16px form controls    (iOS zoom guard)
   ============================================================ */

:root {
  /* ---- colour ---- */
  --bark:        #1C1714;   /* darkest — dark sections, footer */
  --bark-2:      #241D18;
  --bark-3:      #33291F;

  --ink:         #2A211A;   /* body text on paper — 14.9:1 */
  --ink-soft:    #6B5A4A;   /* secondary text on paper — 6.2:1, on sand 5.6:1 */

  --paper:       #FBF8F3;   /* page background */
  --sand:        #F3ECE1;   /* alternating section background */
  --sand-2:      #E7DACA;   /* borders, chips */

  /* Ember is the single accent, in three weights so contrast holds everywhere.
     Measured, not estimated:
       --ember        solid FILLS only. White on it = 5.0:1 (AA).
                      As TEXT it is only 4.3:1 on --sand and 3.8:1 on the
                      tint chips, so it must not be used for small text.
       --ember-deep   accent TEXT on any light background — 6.2:1 on sand,
                      6.9:1 on paper, 5.6:1 on the tint chips.
       --ember-bright dark backgrounds only — 8.2:1 on --bark. */
  --ember:       #B0561F;
  --ember-deep:  #8A4217;
  --ember-bright:#E8A06A;
  --ember-tint:  rgba(176, 86, 31, 0.09);

  --line:        rgba(42, 33, 26, 0.12);
  --line-dark:   rgba(255, 248, 240, 0.11);

  /* ---- shape & depth ---- */
  --radius:      20px;
  --radius-sm:   12px;
  --shadow-xs:   0 1px 2px rgba(42, 33, 26, 0.05);
  --shadow:      0 1px 2px rgba(42, 33, 26, 0.05), 0 22px 46px -24px rgba(42, 33, 26, 0.35);
  --shadow-deep: 0 30px 60px -28px rgba(20, 14, 10, 0.6);

  /* ---- layout ---- */
  --maxw:        1180px;
  --gutter:      clamp(1.1rem, 4vw, 2.5rem);
  --header-h:    72px;

  /* ---- type ---- */
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "SF Mono", "Roboto Mono", monospace;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 3px; }
.on-dark :focus-visible { outline-color: var(--ember-bright); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--bark); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* Wood-grain texture, drawn in CSS so there is no image to load.
   Deliberately faint — it should read as material, not as stripes. */
.grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(96deg,
      rgba(255,255,255,.030) 0px, rgba(255,255,255,.030) 1px,
      transparent 1px, transparent 7px),
    repeating-linear-gradient(93deg,
      rgba(0,0,0,.045) 0px, rgba(0,0,0,.045) 2px,
      transparent 2px, transparent 23px);
  opacity: .5;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(28, 23, 20, .92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line-dark);
  color: #F6EFE6;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ember-bright); }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-size: 1.02rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #F6EFE6;
}
.brand-sub { font-size: .68rem; letter-spacing: .34em; text-transform: uppercase; color: var(--ember-bright); }

.nav-menu { display: flex; align-items: center; gap: .3rem; }
.nav-menu a {
  display: inline-block; padding: .55rem .8rem; border-radius: 999px;
  font-size: .94rem; color: #E4D8C9; transition: color .18s, background-color .18s;
}
.nav-menu a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-cta {
  background: var(--ember); color: #fff !important; font-weight: 600;
  padding: .58rem 1.1rem !important;
}
.nav-cta:hover { background: var(--ember-deep) !important; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #F6EFE6; border-radius: 2px; transition: transform .22s, opacity .22s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* NAV_BREAKPOINT — keep in sync with script.js */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bark); border-bottom: 1px solid var(--line-dark);
    padding: .6rem var(--gutter) 1.2rem;
    transform: translateY(-120%); transition: transform .26s ease;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav-menu.is-open { transform: translateY(0); }
  .nav-menu a { padding: .85rem .4rem; border-radius: var(--radius-sm); font-size: 1.05rem; }
  .nav-cta { text-align: center; margin-top: .5rem; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: transform .16s, background-color .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ember); color: #fff; }
.btn-primary:hover { background: var(--ember-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: rgba(42,33,26,.04); }
.on-dark .btn-ghost { border-color: rgba(255,248,240,.28); color: #F6EFE6; }
.on-dark .btn-ghost:hover { border-color: #F6EFE6; background: rgba(255,255,255,.08); }
.btn-arrow { transition: transform .18s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, var(--bark) 0%, var(--bark-2) 55%, var(--bark-3) 100%);
  color: #F6EFE6;
  padding: clamp(3.2rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 6.5rem);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ember-bright); margin-bottom: 1.1rem;
}
.eyebrow .tick { width: 22px; height: 2px; background: var(--ember-bright); border-radius: 2px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
.hero h1 .accent { color: var(--ember-bright); }
.lede { margin-top: 1.35rem; font-size: clamp(1.06rem, 2vw, 1.22rem); color: #DCCFC0; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.2rem; }
.hero-badges li {
  font-size: .82rem; padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid var(--line-dark); color: #D3C4B3; background: rgba(255,255,255,.03);
}

/* Commission card — a mock work order. Shows what a custom job specifies
   without needing product photography that does not exist yet. */
.spec-card {
  background: rgba(255, 248, 240, .05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.3rem;
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(4px);
}
.spec-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line-dark); }
.spec-title { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ember-bright); font-weight: 700; }
.spec-badge { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #C9B9A6; border: 1px solid var(--line-dark); border-radius: 999px; padding: .25rem .6rem; }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-bottom: 1px dashed var(--line-dark); }
.spec-row:last-of-type { border-bottom: 0; }
.spec-key { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: #A99684; }
.spec-val { font-weight: 600; color: #F6EFE6; text-align: right; }
.spec-foot { margin-top: 1rem; padding-top: .95rem; border-top: 1px solid var(--line-dark); font-size: .88rem; color: #C0AE9B; }

/* ============ STRIP ============ */
.strip { background: var(--bark-3); color: #EFE4D7; padding: clamp(1.6rem, 4vw, 2.2rem) 0; }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 3vw, 2.5rem); }
.strip-item { display: flex; gap: .85rem; align-items: flex-start; }
.strip-num { font-family: var(--mono); font-size: .82rem; color: var(--ember-bright); padding-top: .18rem; }
.strip-item p { font-size: .98rem; color: #DDD0C1; }

/* ============ SECTIONS ============ */
.section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--sand); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-label {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .1em;
  color: var(--ember-deep); margin-bottom: .8rem;
}
.section h2 { font-size: clamp(1.85rem, 4.2vw, 2.9rem); }
.section-intro { margin-top: 1.05rem; font-size: 1.09rem; color: var(--ink-soft); }

/* ============ MAKE GRID ============ */
.make-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.make-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow-xs);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.section-alt .make-card { background: #fff; }
.make-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sand-2); }
.make-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1.1rem;
  display: grid; place-items: center; background: var(--ember-tint); color: var(--ember-deep);
}
.make-card h3 { font-size: 1.22rem; }
.make-card p { margin-top: .6rem; color: var(--ink-soft); font-size: .98rem; }
.make-list { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.make-list li {
  font-size: .8rem; padding: .3rem .7rem; border-radius: 999px;
  background: var(--sand); border: 1px solid var(--sand-2); color: var(--ink-soft);
}
.section-alt .make-list li { background: var(--paper); }

/* ============ STEPS ============ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--mono); font-size: .95rem; font-weight: 700; color: var(--ember-deep);
  background: var(--ember-tint); border-radius: 10px; padding: .3rem .6rem;
}
.step h3 { font-size: 1.15rem; }
.step p { margin-top: .55rem; color: var(--ink-soft); font-size: .98rem; }

/* ============ CRAFT SPLIT ============ */
.craft-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
/* Every paragraph gets top spacing, including the first one after the h2.
   A `p + p` rule alone would leave that first paragraph jammed against the
   heading, because its previous sibling is the heading, not a paragraph. */
.craft-copy p { margin-top: 1.15rem; color: var(--ink-soft); }
.craft-copy .pull { color: var(--ink); font-size: 1.14rem; font-weight: 600; }
.craft-facts { display: grid; gap: .8rem; }
.fact {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem;
}
.section-alt .fact { background: #fff; }
.fact-mark { flex: none; color: var(--ember-deep); margin-top: .15rem; }
.fact h3 { font-size: 1.02rem; }
.fact p { margin-top: .3rem; font-size: .94rem; color: var(--ink-soft); }

/* ============ ETSY BAND ============ */
.shop {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--bark) 0%, var(--bark-3) 100%);
  color: #F6EFE6; padding: clamp(3rem, 7vw, 4.5rem) 0;
}
.shop-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr .6fr; gap: 2.5rem; align-items: center; }
.shop h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.shop p { margin-top: .9rem; color: #DCCFC0; max-width: 52ch; }
.shop-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ============ FAQ ============ */
.faq { display: grid; gap: .7rem; max-width: 860px; }
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 1.2rem; transition: border-color .18s;
}
.section-alt .faq details { background: #fff; }
.faq details[open] { border-color: var(--sand-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 0;
  font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; font-size: 1.35rem; font-weight: 400; color: var(--ember-deep);
  transition: transform .2s; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.15rem; color: var(--ink-soft); max-width: 68ch; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-xs);
}
.section-alt .contact-card { background: #fff; }
.contact-row { display: flex; gap: 1rem; align-items: flex-start; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-row:first-child { padding-top: 0; }
.contact-mark { flex: none; color: var(--ember-deep); margin-top: .2rem; }
.contact-key { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.contact-val { font-weight: 600; word-break: break-word; }
.contact-val a:hover { color: var(--ember-deep); }

/* ============ FOOTER ============ */
.site-footer { background: var(--bark); color: #C9B9A6; padding: clamp(2.5rem, 6vw, 3.5rem) 0 2rem; }
.footer-top { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; padding-bottom: 1.8rem; border-bottom: 1px solid var(--line-dark); }
.footer-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ember-bright); }
.footer-tag { margin-top: .8rem; font-size: .95rem; max-width: 44ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-links a { font-size: .95rem; }
.footer-links a:hover { color: var(--ember-bright); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; padding-top: 1.4rem; font-size: .86rem; color: #9C8A78; }

/* ============ REVEAL (script.js toggles .is-visible) ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  /* The commission sheet stays BELOW the copy when stacked. It only makes
     sense once you know what the shop is, so leading a phone visitor with it
     would put a spec sheet before the introduction. */
  .lede { max-width: none; }
  .craft-split, .contact-grid, .shop-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.8rem; }
  .strip-grid { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 560px) {
  .btn { width: 100%; justify-content: center; }
  .hero-actions, .shop-actions { flex-direction: column; align-items: stretch; }
  .spec-val { font-size: .95rem; }
}
