/* Koss Woodwork — built on the Claude Design handoff.
   Values from design/tokens.css; structure adapted to the live catalogue (six products,
   multi-image product pages, before/after pairs). Mobile first, one breakpoint. */

:root {
  --paper:#F6F1E8; --surface:#FDFBF7; --placeholder:#E7DCC9;
  --ink:#231E18; --ink-soft:#5B5148; --ink-faint:#5E5040;
  --accent:#8A5222; --accent-deep:#6B3E19;
  --band:#3A2A1B; --band-text:#DCCDB8;
  --rule:#E2D8C7; --rule-strong:#C9B99F; --edge:#D6C7AE;

  --grain-page:url("/assets/textures/grain-page.png");
  --grain-card:url("/assets/textures/grain-card.png");
  --grain-dark:url("/assets/textures/grain-dark.png");
  --grain-size:520px 520px;

  --font-display:"Fraunces",Georgia,serif;
  --font-body:"Work Sans",system-ui,sans-serif;

  --step-h1:38px; --step-h1-sub:36px; --step-h2:28px; --step-h3:20px;
  --step-lede:16px; --step-body:15px; --step-small:14px; --step-fine:13px; --step-eyebrow:16px;
  --lh-display:1.06; --lh-heading:1.18; --lh-body:1.62; --track-display:-0.015em;

  --gutter:20px; --section-y:44px; --gap:14px; --measure:640px;
  --radius:2px; --tap-min:44px; --input-h:50px; --header-h:64px;
}

@media (min-width:900px) {
  :root {
    --step-h1:62px; --step-h1-sub:50px; --step-h2:40px; --step-h3:22px;
    --step-lede:19px; --step-body:17px; --step-eyebrow:18px;
    --gutter:96px; --section-y:100px; --gap:32px;
    --input-h:46px; --header-h:88px;
  }
}

*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; font-family:var(--font-body); font-size:var(--step-body);
  line-height:var(--lh-body); color:var(--ink);
  /* NB: background-color longhand — the shorthand would reset background-image and the
     grain would silently vanish. */
  background-color:var(--paper); background-image:var(--grain-page); background-size:var(--grain-size);
  font-variation-settings:"opsz" 38,"SOFT" 50,"WONK" 1;
  -webkit-text-size-adjust:100%;
}
h1,h2,h3 { font-family:var(--font-display); font-weight:400; margin:0; }
h1,h2 { font-variation-settings:"opsz" 124,"SOFT" 42,"WONK" 1; letter-spacing:var(--track-display); }
h3 { font-variation-settings:"opsz" 60,"SOFT" 52,"WONK" 1; }
h1 { font-size:var(--step-h1); line-height:var(--lh-display); }
h2 { font-size:var(--step-h2); line-height:var(--lh-heading); }
h3 { font-size:var(--step-h3); line-height:var(--lh-heading); }
p { margin:0 0 1em; }
img { display:block; max-width:100%; }
a { color:var(--accent); text-decoration:none; }
a:hover { color:var(--accent-deep); }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
summary:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
[x-cloak] { display:none !important; }

.wrap { width:min(1280px,100%); margin-inline:auto; padding-inline:var(--gutter); }
.measure { max-width:var(--measure); }
.eyebrow { font-family:var(--font-display); font-style:italic; font-size:var(--step-eyebrow);
           color:var(--accent); margin:0 0 .5rem; }
.lede { font-size:var(--step-lede); max-width:var(--measure); }
.muted { color:var(--ink-soft); }
.fine { font-size:var(--step-fine); color:var(--ink-soft); }
section { padding-block:var(--section-y); }

/* ---------- surfaces ---------- */
.card { background-color:var(--surface); background-image:var(--grain-card);
        background-size:var(--grain-size); border:1px solid var(--rule); border-radius:var(--radius); }
.band { background-color:var(--band); background-image:var(--grain-dark);
        background-size:var(--grain-size); color:var(--band-text); }
.band h2 { color:var(--surface); }

/* ---------- controls ---------- */
.btn { display:inline-block; text-align:center; font-family:var(--font-body); font-size:16px;
       font-weight:500; border-radius:var(--radius); padding:16px 30px; min-height:var(--tap-min);
       border:0; cursor:pointer; line-height:1.2; }
.btn-primary { background:var(--accent); color:var(--surface); }
.btn-primary:hover { background:var(--accent-deep); color:var(--surface); }
.btn-secondary { background:transparent; color:var(--ink); border:1px solid var(--rule-strong); padding:15px 28px; }
.btn-secondary:hover { color:var(--ink); border-color:var(--ink-soft); }
.btn-on-band { background:var(--paper); color:var(--ink); }
.btn-on-band:hover { background:var(--surface); color:var(--ink); }
.btn:disabled { opacity:.55; cursor:not-allowed; }
.btn-sm { padding:10px 18px; min-height:0; font-size:var(--step-small); }

/* ---------- header ---------- */
header.site { position:sticky; top:0; z-index:40; border-bottom:1px solid var(--rule);
              background-color:var(--paper); background-image:var(--grain-page);
              background-size:var(--grain-size); }
header.site .inner { display:flex; align-items:center; gap:12px; min-height:var(--header-h); }
.brand { font-family:var(--font-display); font-size:19px; color:var(--ink);
         font-variation-settings:"opsz" 60,"SOFT" 46,"WONK" 1; margin-right:auto; }
.brand:hover { color:var(--ink); }
nav.desk { display:none; gap:26px; margin-right:26px; }
nav.desk a { color:var(--ink-soft); font-size:var(--step-small); }
nav.desk a:hover,nav.desk a.on { color:var(--ink); }
.menu-btn { display:grid; place-items:center; width:var(--tap-min); height:var(--tap-min);
            background:none; border:0; cursor:pointer; color:var(--ink); }
@media (min-width:900px) { nav.desk { display:flex; } .menu-btn { display:none; } }
.drawer { border-top:1px solid var(--rule); }
.drawer a { display:block; padding:14px 0; color:var(--ink); border-bottom:1px solid var(--rule); }

/* ---------- hero ---------- */
.hero { padding-block:36px var(--section-y); }
.hero h1 { margin-bottom:.35rem; }
.flourish { display:block; width:132px; height:12px; margin:.5rem 0 1.25rem; color:var(--accent); }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:1.5rem; }
.hero-actions .btn { flex:1 1 auto; }
@media (min-width:900px) {
  .hero-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--gap); align-items:start; }
  .hero-actions .btn { flex:0 0 auto; }
}

/* ---------- figures ---------- */
figure { margin:0; }
.shot { position:relative; border:1px solid var(--edge); background:var(--placeholder); }
.shot img { width:100%; height:100%; object-fit:cover; }
figcaption { font-size:var(--step-small); color:var(--ink-soft); margin-top:.6rem; }
.tilt-a { transform:rotate(-0.35deg); } .tilt-b { transform:rotate(0.45deg); }
.tilt-c { transform:rotate(-0.3deg); }  .tilt-d { transform:rotate(0.3deg); }

/* ---------- process ---------- */
.steps { display:grid; gap:34px; margin-top:2rem; }
@media (min-width:900px) { .steps { grid-template-columns:repeat(3,1fr); gap:var(--gap); } }
.step .num { font-family:var(--font-display); font-size:13px; letter-spacing:.06em;
             color:var(--accent); display:block; margin-bottom:.4rem; }
.step h3 { margin-bottom:.5rem; }
.step .shot { aspect-ratio:4/3; margin-top:.9rem; }

/* ---------- selected work ---------- */
.selected { display:grid; gap:26px; margin-top:1.75rem; }
@media (min-width:900px) { .selected { grid-template-columns:repeat(3,1fr); gap:var(--gap); } }
.selected .shot { aspect-ratio:4/3; }
.selected h3 { margin-top:.75rem; font-size:var(--step-h3); }

/* ---------- product lines ---------- */
.lines { border-top:1px solid var(--rule); margin-top:1.75rem; }
.line { display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--rule);
        color:var(--ink); min-height:var(--tap-min); }
.line:hover { color:var(--ink); }
.line:hover .line-name { color:var(--accent); }
.line img { width:76px; height:76px; object-fit:cover; border:1px solid var(--edge); flex:none; }
.line-body { flex:1; min-width:0; }
.line-name { font-family:var(--font-display); font-size:var(--step-h3); line-height:1.2;
             font-variation-settings:"opsz" 60,"SOFT" 52,"WONK" 1; }
.chev { flex:none; color:var(--ink-soft); }

/* ---------- CTA band ---------- */
.band .inner { padding-block:var(--section-y); }
.band p { max-width:var(--measure); }

/* ---------- work gallery ---------- */
.filters { display:flex; flex-wrap:wrap; gap:10px; margin:1.5rem 0 1rem; }
.filters button { font-family:var(--font-body); font-size:var(--step-small); padding:11px 18px;
                  min-height:var(--tap-min); border:1px solid var(--rule-strong); background:transparent;
                  color:var(--ink); border-radius:var(--radius); cursor:pointer; }
.filters button[aria-pressed="true"] { background:var(--accent); color:var(--surface); border-color:var(--accent); }
.count { font-size:var(--step-small); color:var(--ink-soft); }
.gallery { display:grid; grid-template-columns:repeat(2,1fr); gap:var(--gap); align-items:start; margin-top:1rem; }
@media (min-width:900px) { .gallery { grid-template-columns:repeat(4,1fr); } }
.gallery .shot { width:100%; }
.gallery h3 { font-size:var(--step-body); margin-top:.6rem; }
.gallery .cap { font-size:var(--step-small); color:var(--ink-soft); }

/* ---------- piece detail ---------- */
.back { display:inline-block; font-size:var(--step-small); margin:1.25rem 0 .5rem; }
.piece-hero { aspect-ratio:4/3; border:1px solid var(--edge); background:var(--placeholder); }
.piece-hero img { width:100%; height:100%; object-fit:cover; }
.thumbs-row { display:flex; gap:10px; margin-top:10px; overflow-x:auto; padding-bottom:4px; }
.thumbs-row button { flex:none; width:96px; height:72px; padding:0; border:1px solid var(--edge);
                     background:var(--placeholder); cursor:pointer; border-radius:var(--radius); }
.thumbs-row button[aria-current="true"] { outline:2px solid var(--accent); outline-offset:1px; }
.thumbs-row img { width:100%; height:100%; object-fit:cover; }
.piece h1 { font-size:var(--step-h1-sub); margin:.35rem 0 .75rem; }
.page-title { font-size:var(--step-h1-sub); line-height:var(--lh-heading); }
.price-line { display:flex; flex-wrap:wrap; align-items:baseline; gap:.6rem; margin-top:1.5rem;
              padding-top:1.5rem; border-top:1px solid var(--rule); }
.price-line .price { font-family:var(--font-display); font-size:26px;
                     font-variation-settings:"opsz" 60,"SOFT" 46,"WONK" 1; }
.spec { width:100%; border-collapse:collapse; margin:1.25rem 0; }
.spec th,.spec td { text-align:left; padding:11px 0; border-bottom:1px solid var(--rule);
                    font-weight:400; font-size:var(--step-body); }
.spec th { color:var(--ink-soft); }
.spec td { text-align:right; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { border:1px solid var(--rule-strong); border-radius:var(--radius); padding:8px 14px;
        font-size:var(--step-small); }
.made { display:grid; gap:26px; margin-top:1.5rem; }
@media (min-width:900px) { .made { grid-template-columns:repeat(3,1fr); gap:var(--gap); } }
.made .shot { aspect-ratio:4/3; }
.made h3 { font-size:var(--step-body); margin-top:.7rem; }
.pinbar { position:fixed; left:0; right:0; bottom:0; z-index:50; border-top:1px solid var(--rule);
          background-color:var(--surface); background-image:var(--grain-card); background-size:var(--grain-size);
          display:flex; align-items:center; gap:12px; padding:10px var(--gutter); }
.pinbar .who { flex:1; min-width:0; }
.pinbar .who b { display:block; font-family:var(--font-display); font-size:16px; font-weight:400; }
@media (min-width:900px) { .pinbar { display:none; } }
.pinbar-pad { height:78px; }
@media (min-width:900px) { .pinbar-pad { display:none; } }

/* ---------- before / after ---------- */
.ba { position:relative; }
.ba .swap { position:absolute; right:10px; bottom:10px; background:var(--surface);
            border:1px solid var(--rule-strong); border-radius:var(--radius); padding:9px 14px;
            font:500 var(--step-small)/1 var(--font-body); color:var(--ink); cursor:pointer;
            min-height:var(--tap-min); }
.ba .tag { position:absolute; left:10px; top:10px; background:var(--band); color:var(--band-text);
           font-size:var(--step-fine); padding:5px 10px; border-radius:var(--radius); }

/* ---------- forms ---------- */
.form-sec { margin-top:2rem; }
.form-sec > h2 { font-size:var(--step-h3); margin-bottom:1rem; }
.form-sec > h2 .num { font-family:var(--font-display); font-size:13px; letter-spacing:.06em;
                      color:var(--accent); margin-right:.55rem; }
.field-row { margin-bottom:1.1rem; }
.field-row label,.field-lbl { display:block; font-size:var(--step-fine); font-weight:500;
                              color:var(--ink-soft); margin-bottom:.4rem; }
input[type=text],input[type=email],input[type=tel],input[type=number],input[type=date],select,textarea {
  width:100%; min-height:var(--input-h); padding:13px 14px; border:1px solid var(--rule-strong);
  border-radius:var(--radius); background:var(--surface); color:var(--ink);
  font-family:var(--font-body); font-size:16px; /* 16px or iOS zooms on focus */
}
textarea { min-height:132px; resize:vertical; line-height:var(--lh-body); }
.two { display:grid; gap:var(--gap); grid-template-columns:1fr 1fr; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.check { display:flex; gap:11px; align-items:flex-start; font-size:var(--step-body); }
.check input { width:20px; height:20px; margin:2px 0 0; flex:none; }

.drop { border:1px dashed var(--rule-strong); border-radius:var(--radius); padding:26px 18px;
        text-align:center; background:var(--surface); cursor:pointer; }
.drop.over { border-color:var(--accent); }
.drop .big { font-family:var(--font-display); font-size:var(--step-h3); display:block; margin-bottom:.35rem;
             font-variation-settings:"opsz" 60,"SOFT" 52,"WONK" 1; }
.thumbs { display:flex; gap:10px; flex-wrap:wrap; margin-top:.9rem; }
.thumbs figure { position:relative; margin:0; }
.thumbs img { width:84px; height:84px; object-fit:cover; border:1px solid var(--edge); }
.thumbs button { position:absolute; top:-9px; right:-9px; width:26px; height:26px; border-radius:50%;
                 border:1px solid var(--rule-strong); background:var(--surface); color:var(--ink);
                 cursor:pointer; font-size:14px; line-height:1; }

.rule-svg { display:block; width:100%; height:9px; color:var(--edge); margin:2rem 0; }
.alert { border:1px solid #C9A99A; background:#F6E9E2; color:#7A3520; padding:13px 15px;
         border-radius:var(--radius); margin-bottom:1.25rem; font-size:var(--step-body); }

.aside { padding:22px; margin-top:2rem; }
.aside h2 { font-size:var(--step-h3); margin-bottom:1rem; }
/* Shared by the request aside and the sent page — both render the same NEXT_STEPS. */
.next-steps { list-style:none; margin:0; padding:0; }
.next-steps li { display:flex; gap:12px; margin-bottom:.9rem; font-size:var(--step-body); }
.next-steps li .n { font-family:var(--font-display); font-size:13px; letter-spacing:.06em;
                    color:var(--accent); flex:none; padding-top:.25rem; }
.sent .next-steps { margin-top:1rem; }
.rates { width:100%; border-collapse:collapse; margin-top:.5rem; }
.rates td { padding:7px 0; font-size:var(--step-small); border-bottom:1px solid var(--rule); }
.rates td:last-child { text-align:right; color:var(--ink-soft); }
@media (min-width:900px) {
  .request-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:var(--gap);
                  align-items:start; }
  .aside { margin-top:0; position:sticky; top:calc(var(--header-h) + 20px); }
}

/* ---------- sent ---------- */
.sent h1 { font-size:var(--step-h1-sub); margin-bottom:.75rem; }
.recap { padding:20px; margin:1.75rem 0; }
.recap dl { display:grid; grid-template-columns:auto 1fr; gap:.55rem 1.25rem; margin:0; font-size:var(--step-body); }
.recap dt { color:var(--ink-soft); }
.recap dd { margin:0; }

/* ---------- footer ---------- */
footer.site { border-top:1px solid var(--rule); padding-block:32px; margin-top:var(--section-y); }
footer.site .brand { font-size:17px; display:block; margin-bottom:.3rem; }
.loading,.failed { padding:5rem var(--gutter); text-align:center; color:var(--ink-soft); }

/* ---------- "what to include" prompts ---------- */
.asks { background-color:var(--surface); background-image:var(--grain-card);
        background-size:var(--grain-size); border:1px solid var(--rule);
        border-left:2px solid var(--accent); border-radius:var(--radius);
        padding:16px 18px; margin:1.5rem 0; }
.asks h4 { margin:0 0 .5rem; font-family:var(--font-display); font-style:italic; font-weight:400;
           font-size:var(--step-small); color:var(--accent); }
.asks ul { margin:0; padding-left:1.1rem; }
.asks li { margin:.25rem 0; font-size:var(--step-body); }
.asks .hint { margin:.7rem 0 0; color:var(--ink-soft); font-size:var(--step-small); }
.asks.compact { margin:0 0 .6rem; padding:12px 14px; border-left-width:2px; }
.asks.compact li { font-size:var(--step-small); color:var(--ink-soft); }

/* ---------- hero carousel ---------- */
.heroshot { position:relative; aspect-ratio:4/3; overflow:hidden; }
.heroshot img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
                opacity:0; transition:opacity 700ms ease; }
.heroshot img.on { opacity:1; }
/* Short rules rather than dots — the design system has no pills. */
.hero-dots { display:flex; gap:8px; margin-top:.7rem; }
.hero-dots button { width:30px; height:var(--tap-min); padding:0; border:0; background:none;
                    cursor:pointer; position:relative; }
.hero-dots button::after { content:""; position:absolute; left:0; right:0; top:50%;
                           height:2px; background:var(--rule-strong); transition:background 200ms ease; }
.hero-dots button:hover::after { background:var(--ink-soft); }
.hero-dots button[aria-current="true"]::after { background:var(--accent); height:3px; }
@media (prefers-reduced-motion:reduce) { .heroshot img { transition:none; } }

/* Ampersand only: WONK off. The swash alternate reads as a logo mark in a product name.
   Must restate the whole variation tuple per context — font-variation-settings does not
   merge with the inherited value. */
.amp { font-variation-settings:"opsz" 124,"SOFT" 42,"WONK" 0; }
h3 .amp, .line-name .amp { font-variation-settings:"opsz" 60,"SOFT" 52,"WONK" 0; }
.eyebrow .amp { font-variation-settings:"opsz" 38,"SOFT" 50,"WONK" 0; }

/* ---------- 'whatever you can picture' strip ---------- */
.beyond { display:grid; grid-template-columns:repeat(2,1fr); gap:var(--gap); margin-top:1.5rem;
           align-items:start; }
@media (min-width:900px) { .beyond { grid-template-columns:repeat(4,1fr); } }
.beyond .shot { aspect-ratio:4/3; }
.beyond h3 { font-size:var(--step-body); margin-top:.6rem; }
.beyond .cap { font-size:var(--step-small); color:var(--ink-soft); }

/* A label over a photo — real text, never baked into the JPEG, so it stays legible at
   thumbnail size and is readable by a screen reader. */
.badge { position:absolute; left:8px; bottom:8px; max-width:calc(100% - 16px);
         background-color:var(--band); color:var(--band-text); font-size:12px;
         line-height:1.3; padding:4px 8px; border-radius:var(--radius); }

/* ---------- how it works ---------- */
.how-lede { margin-top:1rem; }
.how-lede figure { margin-top:1.25rem; }
.how-lede .shot { aspect-ratio:4/3; }
@media (min-width:900px) {
  .how-lede { display:grid; grid-template-columns:1fr 1fr; gap:var(--gap); align-items:start; }
  .how-lede figure { margin-top:0; }
}
.steps.four { margin-top:2.25rem; }
@media (min-width:900px) { .steps.four { grid-template-columns:repeat(4,1fr); } }
