/* =====================================================================
   Brandywine Blinds — "The Showroom"
   Gallery-white palette, geometric headings (Space Grotesk) + Inter body.
   Vanilla CSS, fully responsive, accessible.
   ===================================================================== */

/* ----------------------------- Design tokens ----------------------------- */
:root {
  --bg:        #ffffff;          /* gallery white */
  --bg-soft:   #f6f5f2;          /* warm off-white */
  --bg-panel:  #f0efea;
  --ink:       #1a1a18;          /* near-black text */
  --ink-soft:  #55534d;          /* muted text */
  --line:      #e3e1da;          /* hairline borders */
  --accent:    #b07a3c;          /* refined warm brass accent */
  --accent-dk: #8c5e29;
  --accent-tint:#f4ece1;
  --white:     #ffffff;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(26,26,24,.05), 0 12px 32px -16px rgba(26,26,24,.22);
  --shadow-lg: 0 24px 60px -28px rgba(26,26,24,.45);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

/* ----------------------------- Reset / base ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.08; font-weight: 600; letter-spacing: -.02em; }

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

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

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 50%; top: -100px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 10px;
  z-index: 1000; transition: top .2s ease;
}
.skip-link:focus { top: 0; }

.eyebrow {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .18em;
  font-size: .74rem; font-weight: 600; color: var(--accent-dk); margin-bottom: .85rem;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 500; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }

/* ----------------------------- Header / Nav ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-head); }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-text { font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; }
.brand-accent { color: var(--accent); }

.primary-nav { display: flex; align-items: center; gap: clamp(.6rem, 1.6vw, 1.55rem); }
.primary-nav a { font-size: .95rem; color: var(--ink-soft); font-weight: 500; transition: color .15s ease; }
.primary-nav a:hover { color: var(--ink); }
.nav-cta { background: var(--accent); color: #fff !important; padding: .55rem 1.05rem; border-radius: 999px; }
.nav-cta:hover { background: var(--accent-dk); }
.nav-phone { font-family: var(--font-head); font-weight: 600; color: var(--ink) !important; }

/* Mobile menu toggle (hidden on desktop) */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: .5rem; cursor: pointer;
}
.nav-toggle-bar { width: 26px; height: 2px; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------- Hero ----------------------------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero-copy h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 1.1rem; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--ink-soft); max-width: 46ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.4rem; }

.hero-stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 4vw, 2.6rem); border-top: 1px solid var(--line); padding-top: 1.6rem; }
.hero-stats strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); }
.hero-stats span { font-size: .85rem; color: var(--ink-soft); }

.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.hero-badge {
  position: absolute; left: -10px; bottom: 26px; background: var(--white); color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  padding: .7rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow); border: 1px solid var(--line);
}

/* ----------------------------- Brands strip ----------------------------- */
.brands { background: var(--bg-soft); border-block: 1px solid var(--line); padding: 2.2rem 0; }
.strip-title { text-align: center; font-size: .8rem; text-transform: uppercase; letter-spacing: .2em; color: var(--ink-soft); font-weight: 600; margin-bottom: 1.3rem; }
.brand-logos {
  list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: clamp(1.4rem, 5vw, 3.4rem);
}
.brand-logos li {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  color: var(--ink); letter-spacing: .01em; opacity: .72; transition: opacity .2s ease, color .2s ease;
}
.brand-logos li:hover { opacity: 1; color: var(--accent-dk); }

/* ----------------------------- Section heads ----------------------------- */
.section-head { max-width: 60ch; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: .7rem; }
.section-sub { color: var(--ink-soft); font-size: 1.06rem; }

/* ----------------------------- Catalog + tabs ----------------------------- */
.catalog { padding: clamp(3rem, 7vw, 5.5rem) 0; }

.tabs {
  display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--line); padding-bottom: 1.3rem;
}
.tab {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line);
  padding: .6rem 1.15rem; border-radius: 999px; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.tab:hover { color: var(--ink); border-color: var(--ink-soft); }
.tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.1rem, 2.5vw, 1.7rem);
}
.product-grid:focus-visible { outline-offset: 6px; }

/* Product card */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card.is-hidden { display: none; }

.card-media { overflow: hidden; aspect-ratio: 4/3; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.06); }

.card-body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card-tag {
  align-self: flex-start; font-family: var(--font-head); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .12em; font-weight: 600; color: var(--accent-dk); background: var(--accent-tint);
  padding: .25rem .6rem; border-radius: 999px;
}
.card-body h3 { font-size: 1.22rem; }
.card-body p { color: var(--ink-soft); font-size: .95rem; }
.card-notes { list-style: none; padding: 0; margin-top: auto; display: flex; flex-wrap: wrap; gap: .4rem; }
.card-notes li {
  font-size: .78rem; color: var(--ink-soft); background: var(--bg-soft);
  border: 1px solid var(--line); padding: .25rem .6rem; border-radius: 7px;
}

.catalog-foot { margin-top: 2rem; color: var(--ink-soft); font-size: .98rem; }
.catalog-foot a { color: var(--accent-dk); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* No-results message injected by JS */
.no-results {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--ink-soft);
  font-family: var(--font-head);
}

/* ----------------------------- Shop by Room ----------------------------- */
.rooms { padding: clamp(3rem, 7vw, 5.5rem) 0; background: var(--bg-soft); border-block: 1px solid var(--line); }
.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.room-card {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4;
  box-shadow: var(--shadow); isolation: isolate;
}
.room-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.room-card:hover img { transform: scale(1.07); }
.room-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.25rem; color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(20,18,15,.82) 100%);
}
.room-overlay h3 { font-size: 1.4rem; margin-bottom: .25rem; }
.room-overlay p { font-size: .88rem; opacity: .92; }

/* ----------------------------- Materials gallery ----------------------------- */
.materials { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.material-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: clamp(.8rem, 2vw, 1.3rem); }
.swatch { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow); }
.swatch img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.swatch:hover img { transform: scale(1.08); }
.swatch figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem;
  font-family: var(--font-head); font-size: .82rem; font-weight: 500; color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(20,18,15,.8));
}

/* ----------------------------- Why us ----------------------------- */
.why { padding: clamp(3rem, 7vw, 5.5rem) 0; background: var(--bg-soft); border-block: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1rem, 2.5vw, 1.6rem); }
.why-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.5rem; transition: transform .2s ease, box-shadow .2s ease; }
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.why-item h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.why-item h3::before { content: ""; display: block; width: 34px; height: 3px; background: var(--accent); border-radius: 3px; margin-bottom: .9rem; }
.why-item p { color: var(--ink-soft); font-size: .95rem; }

/* ----------------------------- Consultation / form ----------------------------- */
.consult { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.consult-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 5vw, 4rem); align-items: start; }
.consult-copy h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: 1rem; }
.consult-copy > p { color: var(--ink-soft); margin-bottom: 1.4rem; }
.consult-points { list-style: none; padding: 0; margin-bottom: 1.5rem; display: grid; gap: .55rem; }
.consult-points li { position: relative; padding-left: 1.8rem; color: var(--ink); }
.consult-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #fff; background: var(--accent);
  width: 1.25rem; height: 1.25rem; border-radius: 50%; font-size: .72rem;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.consult-area, .consult-hours, .consult-call { font-size: .96rem; color: var(--ink-soft); margin-bottom: .6rem; }
.consult-call a { color: var(--accent-dk); font-weight: 600; }

.consult-form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); display: grid; gap: 1.05rem;
}
.field { display: grid; gap: .4rem; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: .9rem; }
.optional { color: var(--ink-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: .75rem .85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); transition: border-color .15s ease, box-shadow .15s ease; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.field textarea { resize: vertical; }
.field-error { color: #b3261e; font-size: .82rem; }
.field input[aria-invalid="true"], .field[aria-invalid="true"] input { border-color: #b3261e; }

.form-fineprint { font-size: .78rem; color: var(--ink-soft); text-align: center; }
.form-success {
  background: var(--accent-tint); border: 1px solid var(--accent); color: var(--accent-dk);
  border-radius: var(--radius-sm); padding: 1rem 1.1rem; font-size: .95rem; text-align: center;
}

/* ----------------------------- Footer ----------------------------- */
.site-footer { background: var(--ink); color: #cfcdc6; padding-top: clamp(2.5rem, 6vw, 4rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-brand .brand-text { color: #fff; font-size: 1.3rem; }
.footer-brand .brand-accent { color: var(--accent); }
.footer-brand p { margin-top: .8rem; max-width: 38ch; font-size: .92rem; }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: .5rem; }
.site-footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: #fff; margin-bottom: .4rem; }
.footer-nav a, .footer-contact a { color: #cfcdc6; font-size: .94rem; transition: color .15s ease; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact p { font-size: .94rem; }
.social { display: flex; gap: 1rem; margin-top: .5rem; }
.social a { font-family: var(--font-head); font-weight: 500; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.4rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem;
  font-size: .82rem; color: #908e87;
}

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media img { aspect-ratio: 16/10; }
  .consult-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  /* Mobile nav: collapse into a panel toggled by the hamburger */
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.1rem;
    box-shadow: var(--shadow);
    /* hidden by default; revealed when .is-open is added */
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
  .nav-cta { text-align: center; margin-top: .6rem; border-bottom: 0 !important; }
  .nav-phone { border-bottom: 0 !important; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.4rem; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
}
