/* Shared stylesheet — every page in this demo (index, about, contact, the
   8 department pages) links this one file rather than repeating a
   <style> block per page, so the design system stays in exactly one
   place as the site grows past a single homepage. */

@view-transition {
  navigation: auto;
}

:root{
  --green: #2F5233;
  --green-light: #3E6B45;
  --barn-red: #B23A2F;
  --rust: #D9722C;
  --off-white: #FBF8F2;
  --sand: #F1EBDD;
  --white: #FFFFFF;
  --ink: #25291F;
  --slate: #5A5F52;
}
*{margin:0;padding:0;box-sizing:border-box;}
body{
  font-family:'Inter',sans-serif;
  background:var(--off-white);
  color:var(--ink);
  line-height:1.5;
}
h1,h2,h3{font-family:'Fraunces',serif;font-weight:600;line-height:1.15;}
a{color:inherit;text-decoration:none;}
img{display:block;max-width:100%;}
.wrap{max-width:1180px;margin:0 auto;padding:0 24px;}

/* ---------- HEADER ---------- */
header{
  background:var(--off-white);
  border-bottom:1px solid #e6ddc9;
  position:sticky;top:0;z-index:50;
  view-transition-name:site-header;
}
.nav-inner{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 24px;max-width:1180px;margin:0 auto;
}
.logo{
  display:flex;align-items:center;gap:10px;
  font-family:'Fraunces',serif;font-weight:700;font-size:1.3rem;color:var(--green);
}
.logo-mark{
  width:40px;height:40px;flex-shrink:0;
}
.logo-sub{
  display:block;font-family:'Inter',sans-serif;font-weight:500;font-size:0.65rem;
  color:var(--barn-red);letter-spacing:0.06em;text-transform:uppercase;
}
nav ul{display:flex;gap:32px;list-style:none;}
nav a{
  font-weight:600;font-size:0.95rem;color:var(--ink);
  padding:6px 2px;border-bottom:2px solid transparent;
  transition:border-color .15s ease, color .15s ease;
}
/* Mobile dropdown panel — same <nav> element, no duplicated markup: below
   900px it becomes an absolutely-positioned panel toggled by the
   hamburger via a `nav-open` class on <header> (see main.js). Real
   working menu, not just a decorative button. */
@media (max-width:900px){
  nav{
    display:none;position:absolute;top:100%;left:0;right:0;
    background:var(--off-white);border-bottom:1px solid #e6ddc9;
    box-shadow:0 10px 20px rgba(0,0,0,0.08);
  }
  header.nav-open nav{display:block;}
  nav ul{flex-direction:column;gap:0;padding:6px 20px 16px;}
  nav ul li{border-top:1px solid #eee;}
  nav ul li:first-child{border-top:none;}
  nav a{display:block;padding:14px 4px;}
}
nav a:hover{color:var(--green);border-color:var(--green);}
nav a.current{color:var(--green);border-color:var(--rust);}
.nav-actions{display:flex;align-items:center;gap:14px;}
.btn{
  display:inline-block;padding:10px 22px;border-radius:6px;font-weight:600;font-size:0.9rem;
  transition:transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn-primary{background:var(--barn-red);color:var(--off-white);}
.btn-primary:hover{background:#9c3128;transform:translateY(-1px);}
.btn-outline{
  background:transparent;color:var(--green);border:1.5px solid var(--green);
}
.btn-outline:hover{background:var(--green);color:var(--off-white);}
.phone-link{font-weight:700;color:var(--green);font-size:0.95rem;display:none;}
.hamburger{display:none;flex-direction:column;gap:4px;cursor:pointer;background:none;border:none;}
.hamburger span{width:24px;height:2.5px;background:var(--green);border-radius:2px;}
/* "Shop In-Store Today" (header CTA) shortens to "Shop" once the header
   gets tight on a phone — two spans, one hidden at a time, rather than
   swapping text content (keeps it CSS-only, no JS needed for something
   this simple). */
.label-short{display:none;}

/* ---------- HERO ---------- */
.hero{
  position:relative;overflow:hidden;
  background:linear-gradient(160deg, var(--green) 0%, #24401f 100%);
  color:var(--off-white);
  padding:88px 0 100px;
}
.hero::before{
  content:"";position:absolute;inset:0;opacity:0.08;
  background-image:
    repeating-linear-gradient(45deg, var(--off-white) 0 2px, transparent 2px 40px);
  pointer-events:none;
}
.hero-inner{
  position:relative;display:grid;grid-template-columns:1.1fr 0.9fr;gap:50px;align-items:center;
}
.hero-badge{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(251,248,242,0.12);border:1px solid rgba(251,248,242,0.3);
  padding:6px 14px;border-radius:100px;font-size:0.8rem;font-weight:600;
  margin-bottom:22px;
}
.hero-badge svg{width:14px;height:14px;}
.hero h1{font-size:3rem;max-width:560px;margin-bottom:20px;color:var(--off-white);}
.hero h1 span{color:var(--rust);}
.hero p{font-size:1.1rem;max-width:480px;color:#dfe4d8;margin-bottom:34px;}
.hero-ctas{display:flex;gap:16px;flex-wrap:wrap;}
.btn-lg{padding:14px 28px;font-size:1rem;border-radius:8px;}
.btn-ghost-light{
  background:transparent;border:1.5px solid rgba(251,248,242,0.5);color:var(--off-white);
}
.btn-ghost-light:hover{background:rgba(251,248,242,0.12);}

.hero-art{
  position:relative;display:flex;align-items:center;justify-content:center;
  min-height:420px;
}
.hero-illustration{position:relative;z-index:1;width:100%;max-width:510px;height:auto;aspect-ratio:900/874;filter:drop-shadow(0 20px 40px rgba(0,0,0,0.25));}
/* Pixi canvas container — the cinematic-hero module (lib/cinematic_hero_pipeline.mjs)
   fills this with a real WebGL particle layer behind the image. Sized
   generously beyond the image itself so embers have room to drift past
   its edges, not just within its bounding box. */
.hero-art-glow{
  position:absolute;inset:-15% -10%;z-index:0;
  pointer-events:none;
}
/* Live 3D model container — sits above the glow layer, below nothing.
   The flat WebP inside it (.hero-3d-fallback) stays visible until the
   Three.js render actually succeeds, then gets hidden — same graceful-
   degradation discipline as the Pixi glow layer: WebGL/GLB failure must
   never leave an empty hole where the hero art should be. */
.hero-3d{
  position:relative;z-index:1;width:100%;max-width:510px;aspect-ratio:900/874;
  pointer-events:none;
}
.hero-3d canvas{position:absolute;inset:0;width:100%!important;height:100%!important;filter:drop-shadow(0 20px 40px rgba(0,0,0,0.25));}
.hero-3d .hero-3d-fallback{position:absolute;inset:0;max-width:none;}
.hero-3d.dp-3d-loaded .hero-3d-fallback{display:none;}

.hero-stats{
  position:relative;display:flex;gap:36px;margin-top:48px;flex-wrap:wrap;
}
.stat-num{font-family:'Fraunces',serif;font-size:1.8rem;color:var(--rust);}
.stat-label{font-size:0.8rem;color:#c9d1bd;text-transform:uppercase;letter-spacing:0.05em;}

/* ---------- PAGE BANNER (about / contact / department pages) ---------- */
.page-banner{
  position:relative;overflow:hidden;
  background:linear-gradient(160deg, var(--green) 0%, #24401f 100%);
  color:var(--off-white);
  padding:56px 0 60px;
}
.page-banner::before{
  content:"";position:absolute;inset:0;opacity:0.08;
  background-image:
    repeating-linear-gradient(45deg, var(--off-white) 0 2px, transparent 2px 40px);
  pointer-events:none;
}
.page-banner-inner{position:relative;}
.breadcrumb{font-size:0.85rem;color:#c9d1bd;margin-bottom:14px;}
.breadcrumb a{color:#c9d1bd;font-weight:600;}
.breadcrumb a:hover{color:var(--off-white);}
.page-banner-icon{
  width:56px;height:56px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  background:rgba(251,248,242,0.12);margin-bottom:18px;
}
.page-banner-icon svg{width:30px;height:30px;}
.page-banner h1{font-size:2.4rem;max-width:640px;margin-bottom:12px;color:var(--off-white);}
.page-banner p{font-size:1.05rem;max-width:560px;color:#dfe4d8;}
.page-banner-tag{
  display:inline-block;background:rgba(217,114,44,0.22);color:var(--rust);
  font-size:0.78rem;font-weight:700;text-transform:uppercase;letter-spacing:0.04em;
  padding:4px 12px;border-radius:100px;margin-bottom:14px;
}

/* ---------- ARTICLE BODY (about / department write-ups) ---------- */
.article{padding:72px 0;}
.article-inner{max-width:760px;}
.article p{font-size:1.05rem;color:var(--ink);margin-bottom:20px;}
.article p.muted{color:var(--slate);}
.article h2{font-size:1.6rem;color:var(--green);margin:36px 0 16px;}
.find-list{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;margin:20px 0 8px;}
.find-list li{
  display:flex;align-items:flex-start;gap:10px;font-size:0.98rem;color:var(--ink);
  background:var(--white);border:1px solid #eadfc6;border-radius:8px;padding:12px 14px;
}
.find-list li svg{width:18px;height:18px;flex-shrink:0;margin-top:2px;color:var(--rust);}

/* ---------- ABOUT STATS ---------- */
.about-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin:32px 0 40px;}
.about-stats .fact{
  background:var(--white);border-radius:10px;padding:20px;border-left:4px solid var(--barn-red);
}

/* ---------- WHY LIST (reused on about + homepage) ---------- */
.why-list{list-style:none;counter-reset:why;margin:24px 0;}
.why-list li{
  counter-increment:why;position:relative;padding-left:44px;margin-bottom:20px;
}
.why-list li::before{
  content:counter(why);position:absolute;left:0;top:0;
  width:30px;height:30px;border-radius:50%;background:var(--green);color:var(--off-white);
  display:flex;align-items:center;justify-content:center;font-family:'Fraunces',serif;font-weight:700;font-size:0.95rem;
}
.why-list strong{display:block;color:var(--ink);margin-bottom:2px;}
.why-list span{color:var(--slate);font-size:0.95rem;}

/* ---------- CONTACT PAGE ---------- */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:8px;}
.contact-card{
  background:var(--white);border-radius:12px;border:1px solid #eadfc6;padding:22px 24px;
  display:flex;gap:14px;align-items:flex-start;
}
.contact-card svg{width:24px;height:24px;flex-shrink:0;color:var(--green);margin-top:2px;}
.contact-card strong{display:block;color:var(--ink);margin-bottom:4px;}
.contact-card span, .contact-card a{color:var(--slate);font-size:0.95rem;}
.contact-card a:hover{color:var(--green);text-decoration:underline;}
.hours-table{width:100%;border-collapse:collapse;margin-top:8px;}
.hours-table td{padding:8px 0;border-bottom:1px solid #eadfc6;font-size:0.95rem;}
.hours-table td:first-child{color:var(--ink);font-weight:600;}
.hours-table td:last-child{color:var(--slate);text-align:right;}

/* ---------- CTA BANNER (bottom of about/contact/department pages) ---------- */
.cta-banner{
  background:var(--sand);border-radius:16px;padding:36px 40px;margin-top:48px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;
}
.cta-banner h3{font-size:1.3rem;color:var(--green);margin-bottom:6px;}
.cta-banner p{color:var(--slate);font-size:0.95rem;}
.cta-banner-actions{display:flex;gap:12px;flex-wrap:wrap;}

/* ---------- SECTION: DEPARTMENTS (homepage grid) ---------- */
.section{padding:88px 0;}
.section-sand{background:var(--sand);}
.section-head{max-width:600px;margin-bottom:52px;}
.eyebrow{
  color:var(--barn-red);font-weight:700;font-size:0.8rem;letter-spacing:0.08em;
  text-transform:uppercase;margin-bottom:12px;display:block;
}
.section-head h2{font-size:2.2rem;color:var(--green);margin-bottom:14px;}
.section-head p{color:var(--slate);font-size:1.05rem;}

.dept-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:24px;
}
.dept-card{
  display:block;background:var(--white);border-radius:14px;padding:30px 26px;
  border:1px solid #eadfc6;
  transition:transform .18s ease, box-shadow .18s ease;
}
.dept-card:hover{transform:translateY(-4px);box-shadow:0 12px 28px rgba(47,82,51,0.12);}
.dept-icon{
  width:56px;height:56px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;background:var(--sand);
}
.dept-icon svg{width:30px;height:30px;}
.dept-card h3{font-size:1.15rem;color:var(--ink);margin-bottom:8px;}
.dept-card p{color:var(--slate);font-size:0.92rem;margin-bottom:14px;}
.dept-tag{
  font-size:0.78rem;font-weight:700;color:var(--rust);text-transform:uppercase;letter-spacing:0.04em;
}
.dept-link{font-size:0.9rem;font-weight:600;color:var(--green);}
.dept-link:hover{text-decoration:underline;}

/* ---------- SECTION: STORY / COMMUNITY ---------- */
.story-inner{
  display:grid;grid-template-columns:0.9fr 1.1fr;gap:64px;align-items:center;
}
.story-art{
  position:relative;background:var(--green);border-radius:20px;padding:44px;
  min-height:380px;display:flex;align-items:center;justify-content:center;
}
.story-art svg{width:100%;max-width:320px;}
.story-content h2{font-size:2.1rem;color:var(--green);margin-bottom:18px;}
.story-content p{color:var(--ink);font-size:1.05rem;margin-bottom:18px;max-width:520px;}
.story-content p.muted{color:var(--slate);}
.story-facts{
  display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:30px 0;
}
.fact{
  background:var(--white);border-radius:10px;padding:18px 20px;border-left:4px solid var(--barn-red);
}
.fact-num{font-family:'Fraunces',serif;font-size:1.5rem;color:var(--green);}
.fact-label{font-size:0.85rem;color:var(--slate);}
.hours-box{
  display:flex;align-items:center;gap:14px;background:var(--sand);border-radius:10px;
  padding:16px 20px;margin-top:8px;
}
.hours-box svg{width:26px;height:26px;flex-shrink:0;color:var(--green);}
.hours-box strong{display:block;color:var(--ink);}
.hours-box span{color:var(--slate);font-size:0.9rem;}

/* ---------- FOOTER ---------- */
footer{background:#1f331f;color:#cfd6c5;padding:64px 0 28px;}
.footer-grid{
  display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;margin-bottom:48px;
}
.footer-brand .logo{color:var(--off-white);margin-bottom:14px;}
.footer-brand p{color:#a9b39a;font-size:0.92rem;max-width:280px;}
.footer-col h4{color:var(--off-white);font-size:0.95rem;margin-bottom:16px;}
.footer-col ul{list-style:none;display:flex;flex-direction:column;gap:10px;}
.footer-col a{color:#a9b39a;font-size:0.92rem;}
.footer-col a:hover{color:var(--rust);}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,0.1);padding-top:24px;
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;
  font-size:0.82rem;color:#8b957c;
}

@media (max-width:900px){
  .nav-actions .btn-outline{display:none;}
  .hamburger{display:flex;}
  .hero-inner{grid-template-columns:1fr;}
  .hero-art{order:-1;}
  .dept-grid{grid-template-columns:repeat(2,1fr);}
  .story-inner{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr 1fr;}
  .contact-grid{grid-template-columns:1fr;}
  .find-list{grid-template-columns:1fr;}
  .about-stats{grid-template-columns:1fr 1fr;}
}
@media (max-width:520px){
  /* "Riverside Hardware" was wrapping mid-name at this width and reading
     as an awkward line break rather than the intentional title/subtitle
     stack it's meant to be — shrink the mark + type and tighten the line
     gap so it reads as one deliberate two-line lockup instead. */
  .nav-inner{padding:12px 16px;}
  .logo{font-size:1.05rem;gap:8px;line-height:1.2;}
  .logo-mark{width:32px;height:32px;}
  .logo-sub{margin-top:2px;}
  .hero h1{font-size:2.2rem;}
  .page-banner h1{font-size:1.9rem;}
  .dept-grid{grid-template-columns:1fr;}
  .story-facts{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr;}
  .cta-banner{flex-direction:column;align-items:flex-start;}
  /* "Shop In-Store Today" -> "Shop" once the header is genuinely
     phone-width — the outline button is already hidden by the 900px
     breakpoint above, so the primary button is the only nav-actions
     item left and doesn't need the long label to justify its width. */
  .label-full{display:none;}
  .label-short{display:inline;}
}
