/* Shared styles for the public storefront (index, materials, flooring). Everything is light:
   white nav, header bands and footer on a warm off-white page, with large dark text. */
:root {
  --bg: #f5f2ed;
  --panel: #ffffff;
  --panel-2: #ece8e0;
  --line: #d8d1c5;
  --line-strong: #b9b1a2;
  --text: #1c222b;
  --muted: #566070;
  --accent: #1d5fd3;
  --accent-dark: #164aa8;
  --accent-soft: #e5eefc;
  --good: #0f7a45;
  --good-soft: #e1f4ea;
  --warn: #9a6200;
  --warn-soft: #fbf0d9;
  --bad: #9b3030;
  --bad-soft: #f8e4e4;
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: clamp(18px, 5vw, 64px);
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
h2.section { font-size: clamp(38px, 5.4vw, 64px); margin: 10px 0 14px; }
.eyebrow { font-family: var(--body); font-weight: 700; font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; width: 30px; height: 3px; background: var(--accent); border-radius: 2px; }
.lede { color: var(--muted); max-width: 56ch; font-size: 19px; }

/* ── NAV ── */
nav.top { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 3px solid var(--accent); box-shadow: 0 2px 12px rgba(28,34,43,.08); }
nav.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { font-family: var(--head); font-weight: 800; font-size: 28px; text-transform: uppercase; letter-spacing: .02em; line-height: 1; display: flex; flex-direction: column; color: var(--text); }
.brand small { font-family: var(--body); font-weight: 500; font-size: 11.5px; letter-spacing: .08em; color: var(--muted); margin-top: 4px; text-transform: uppercase; }
.nav-search { flex: 1; max-width: 300px; position: relative; }
.nav-search input { width: 100%; background: var(--bg); border: 1.5px solid var(--line-strong); color: var(--text); border-radius: 6px; padding: 11px 12px 11px 36px; font: 15px var(--body); }
.nav-search input::placeholder { color: #747d8c; }
.nav-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #747d8c; font-size: 13px; }
.links { margin-left: auto; display: flex; gap: 28px; font-size: 14.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.links a { color: #343d4b; padding: 8px 0; border-bottom: 3px solid transparent; transition: .15s; }
.links a:hover, .links a.current { color: var(--accent); border-color: var(--accent); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line-strong); color: var(--text); width: 44px; height: 44px; border-radius: 6px; font-size: 18px; cursor: pointer; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--body); font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; padding: 16px 28px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: var(--panel); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 11px 18px; font-size: 13.5px; }

/* ── STATUS ── */
.st { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.st::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.st.in { color: var(--good); } .st.low { color: var(--warn); } .st.out { color: var(--bad); }

/* ── FORMS ── */
.qf label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.qf input, .qf select, .qf textarea { width: 100%; background: #fff; border: 1.5px solid var(--line-strong); color: var(--text); border-radius: 6px; padding: 14px 14px; font: 17px var(--body); transition: border-color .15s, box-shadow .15s; }
.qf textarea { min-height: 140px; resize: vertical; }
.qf input:focus, .qf select:focus, .qf textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,95,211,.18); }
.qf .hp { position: absolute; left: -9999px; }
#qmsg { display: none; padding: 14px 16px; border-radius: 6px; font-size: 16px; font-weight: 500; }
#qmsg.ok { display: block; background: var(--good-soft); color: var(--good); border: 1.5px solid #9bd5b5; }
#qmsg.err { display: block; background: var(--bad-soft); color: var(--bad); border: 1.5px solid #e2aaaa; }

/* ── FOOTER ── */
footer.site { background: var(--panel-2); color: var(--muted); border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 15px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; }
footer.site a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 1100px) { .nav-search { display: none; } }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border-bottom: 3px solid var(--accent); box-shadow: 0 10px 20px rgba(28,34,43,.10); padding: 6px var(--gutter) 14px; margin: 0; }
  .links.open { display: flex; }
  .links a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ── PHOTO BANDS ──
   Header areas (home hero, Materials header, Flooring header). They show a photo when one exists
   — public/hero.jpg, hero-materials.jpg, hero-flooring.jpg — via bandPhoto() in site.js. A white
   gradient on the left keeps the dark headline readable over any photo. Without a photo they get a
   light blueprint grid and a soft blue glow so they never look like a flat empty bar. */
.photo-band { position: relative; overflow: hidden; background-color: #fff;
  background-image: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.88) 44%, rgba(255,255,255,.28) 100%), var(--band-img, none);
  background-size: cover; background-position: center; }
.photo-band::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(29,95,211,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(29,95,211,.07) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 78%); mask-image: linear-gradient(90deg, #000 0%, transparent 78%); }
.photo-band::after { content: ''; position: absolute; right: -8%; top: -30%; width: 55%; height: 160%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(29,95,211,.13), transparent 70%); }
.photo-band > .wrap { position: relative; z-index: 1; }

/* Optional looping video behind a band (see bandVideo in site.js). The same white fade keeps the headline readable. */
.photo-band .band-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.photo-band .band-fade { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.88) 44%, rgba(255,255,255,.28) 100%); }
.photo-band.has-video::before, .photo-band.has-video::after { display: none; }

/* ── CATEGORY COLOURS ── Each category gets its own light tint (by position) so sections are easy to tell apart. */
.tone-0 { --tone-bg: #f6efe0; --tone-ink: #86621f; --tone-line: #e1d3b4; }
.tone-1 { --tone-bg: #e3edfb; --tone-ink: #1d5fd3; --tone-line: #bcd0f2; }
.tone-2 { --tone-bg: #e1ede3; --tone-ink: #2a7344; --tone-line: #b8d4be; }
.tone-3 { --tone-bg: #f3e4d9; --tone-ink: #a04622; --tone-line: #e2c3ae; }
.tone-4 { --tone-bg: #e9e8f5; --tone-ink: #544caa; --tone-line: #cbc8e6; }
.tone-5 { --tone-bg: #dff0ee; --tone-ink: #1c7470; --tone-line: #b3d8d4; }

/* ── STICKY CATEGORY BAR (01 Flooring · 02 Vanity …) ── */
.catbar { position: sticky; top: 71px; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(28,34,43,.05); }
.catbar .wrap { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.catbar .wrap::-webkit-scrollbar { display: none; }
.catbar a { flex: none; display: inline-flex; align-items: baseline; gap: 8px; padding: 15px 16px 13px; font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); border-bottom: 3px solid transparent; transition: color .15s, border-color .15s; }
.catbar a i { font: 500 12px var(--mono); font-style: normal; color: var(--tone-ink); }
.catbar a:hover { color: var(--text); }
.catbar a.on { color: var(--text); border-color: var(--tone-ink); }

/* ── MOTION ── scroll reveals, the hero headline, and the plank-laying floor. Reduced-motion visitors get none of it. */
.rv { opacity: 0; }
.rv.in { opacity: 1; animation: rv-up .75s cubic-bezier(.2,.7,.2,1) backwards; }
.rv.rv-l.in { animation-name: rv-left; }
.rv.rv-r.in { animation-name: rv-right; }
@keyframes rv-up    { from { opacity: 0; transform: translateY(28px); } }
@keyframes rv-left  { from { opacity: 0; transform: translateX(-56px); } }
@keyframes rv-right { from { opacity: 0; transform: translateX(56px); } }

/* Planks: each slides in slightly off-angle and "clicks" into place. */
.planks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; transition: opacity .7s ease; }
.planks.out { opacity: 0; }
.planks .pl { position: absolute; display: block; opacity: 0; background:
    repeating-linear-gradient(97deg, rgba(0,0,0,0) 0 9px, rgba(60,40,20,.05) 9px 10px),
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(0,0,0,.07)), var(--c, #c9a572);
  box-shadow: inset 0 0 0 1px rgba(40,25,10,.16); }
.planks .pl.t0 { --c: var(--t0); } .planks .pl.t1 { --c: var(--t1); } .planks .pl.t2 { --c: var(--t2); }
.planks.play .pl { animation: plank-lay .85s cubic-bezier(.25,.8,.3,1) both; animation-delay: var(--d, 0s); }
.planks.static .pl { opacity: 1; }
@keyframes plank-lay {
  0%   { opacity: 0; transform: translate(70px,-16px) rotate(-1.6deg); }
  55%  { opacity: 1; transform: translate(-4px,1px) rotate(.2deg); }
  75%  { transform: translate(2px,0); }
  100% { opacity: 1; transform: none; }
}
.photo-band.has-video .planks { display: none; }

@media (prefers-reduced-motion: reduce) { .rv { opacity: 1 !important; } }

.motion-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: rgba(255,255,255,.94); color: var(--text); font-size: 14px; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(28,34,43,.15); }
.motion-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── PRODUCT SPECS (Site.descHtml): key facts on top, grouped collapsible table below ── */
.detail-desc p { margin: 0 0 10px; }
.spec-key { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.spec-key > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.spec-key small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.spec-key b { display: block; font-size: 15px; font-weight: 700; color: var(--text); margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; }
.spec-sec { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; overflow: hidden; background: #fff; }
.spec-sec summary { cursor: pointer; list-style: none; padding: 11px 14px; font-weight: 700; font-size: 14.5px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.spec-sec summary::-webkit-details-marker { display: none; }
.spec-sec summary::before { content: '\25B8'; color: var(--accent); transition: transform .15s; }
.spec-sec[open] summary::before { transform: rotate(90deg); }
.spec-sec summary em { margin-left: auto; font-style: normal; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.spec-sec table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-sec tr:nth-child(odd) { background: var(--bg); }
.spec-sec th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 14px; width: 48%; vertical-align: top; }
.spec-sec td { font-weight: 600; color: var(--text); padding: 8px 14px 8px 0; overflow-wrap: anywhere; }

.spec-prose { padding: 4px 16px 14px; font-size: 14px; line-height: 1.65; color: #3b4452; }
.spec-prose p { margin: 8px 0; }
.spec-prose ul { margin: 8px 0 4px 18px; }
.spec-prose li { margin: 4px 0; }
