/* Blue Spruce Cabinet Company - site concept
   Design language: Nordic Minimal (type/spacing/composition/motion only)
   Palette: Blue Spruce's real colors. Primary accent sampled from their own
   logo (blue spruce trees, #487890 / #0c486c); warm secondary from their site
   CSS accent hsl(24,37%,81%) and wood photography; darks from their matte
   cabinetry photography. Nothing from the stock library palette. */

:root {
  /* Backgrounds */
  --snow:        #fafaf8;
  --cloud:       #efece5;   /* their lightAccent hsl(40,8%,93%) */
  --sand:        #e1ccbe;   /* their CSS accent hsl(24,37%,81%) */
  --spruce-ink:  #21272a;   /* their matte cabinetry, cool spruce-charcoal */
  --spruce-slate:#2b3236;

  /* Accent: their sand hue deepened within family + their timber photography */
  --timber:        #8a5f3d;
  --timber-deep:   #6e4a2e;
  --timber-bright: #c19666;
  --timber-muted:  rgba(138, 95, 61, 0.16);

  /* Primary accent: their logo's spruce blue (#487890 dominant, #0c486c script),
     deepened within family for small-text contrast */
  --spruce:        #487890;
  --spruce-deep:   #2e5a72;
  --spruce-bright: #8fb6ca;
  --spruce-muted:  rgba(72, 120, 144, 0.16);

  /* Text */
  --text-dark:   #23201c;
  --text-body:   #4e4a44;
  --text-muted:  #7d766c;
  --text-light:  rgba(250, 250, 248, 0.94);
  --text-light-muted: rgba(250, 250, 248, 0.6);

  /* Type */
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", -apple-system, sans-serif;

  /* Layout (Nordic: tighter, mathematical) */
  --pad-y: clamp(3.5rem, 7vw, 6rem);
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --nav-h: 76px;

  /* Motion (Nordic: subtle, quick) */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-body);
  background: var(--snow);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container { width: min(88%, 1000px); margin-inline: auto; }
.container-wide { width: min(92%, 1200px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--text-dark); line-height: 1.12; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: clamp(1.2rem, 3vw, 2rem); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--spruce-deep);
  margin-bottom: 1.1rem;
}
.eyebrow--light { color: var(--spruce-bright); }

/* Buttons: slim pill, thin rule aesthetic */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 400;
  text-decoration: none;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn__icon {
  display: inline-flex;
  width: 1.35rem; height: 1.35rem;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(250,250,248,0.16);
  transition: transform 0.35s var(--ease);
}
.btn__icon svg { width: 0.8rem; height: 0.8rem; }
.btn:hover .btn__icon { transform: translateX(3px); }
.btn--solid { background: var(--spruce-ink); color: var(--text-light); }
.btn--solid:hover { background: var(--spruce-deep); }
.btn--ghost { border-color: rgba(35,32,28,0.25); color: var(--text-dark); }
.btn--ghost:hover { border-color: var(--spruce); color: var(--spruce-deep); }
.btn--outline { border-color: var(--spruce); color: var(--spruce-deep); }
.btn--outline:hover { background: var(--spruce-deep); color: var(--text-light); }
.btn--outline .btn__icon { background: var(--spruce-muted); }
.btn--light { background: var(--snow); color: var(--text-dark); }
.btn--light:hover { background: var(--sand); }
.btn--light .btn__icon { background: rgba(35,32,28,0.08); }
.btn--ghost-light { border-color: rgba(250,250,248,0.35); color: var(--text-light); }
.btn--ghost-light:hover { border-color: var(--spruce-bright); color: var(--spruce-bright); }
.btn--nav { background: var(--spruce-ink); color: var(--text-light); padding: 0.55rem 1.15rem; font-size: 0.85rem; }
.btn--nav:hover { background: var(--spruce-deep); }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 60;
  background: rgba(250,250,248,0.88);
  backdrop-filter: blur(8px);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.is-solid { background: rgba(250,250,248,0.94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(35,32,28,0.08); }
.nav__inner {
  width: min(94%, 1280px);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text-dark); min-height: 44px; padding-block: 0.35rem; }
.nav__mark { width: 1.35rem; height: auto; color: var(--spruce); flex-shrink: 0; }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav__brand-name { font-family: var(--font-display); font-size: 1.18rem; }
.nav__brand-sub { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-muted); }
.nav__links { display: flex; gap: clamp(1.1rem, 2.4vw, 2rem); }
.nav__links a {
  font-size: 0.9rem; font-weight: 400; text-decoration: none; color: var(--text-dark);
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.nav__links a:hover { color: var(--spruce-deep); border-color: var(--spruce); }
.nav__right { display: flex; align-items: center; gap: 0.9rem; }
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer;
  position: relative; z-index: 80;
}
.nav__burger span { display: block; width: 24px; height: 1.5px; background: var(--text-dark); transition: transform 0.35s var(--ease), opacity 0.35s var(--ease); }
.nav__burger.is-open span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Mobile menu */
.mmenu {
  position: fixed; inset: 0;
  z-index: 70;
  background: var(--snow);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 1rem) 8% 3rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.mmenu.is-open { opacity: 1; visibility: visible; }
.mmenu__links { display: flex; flex-direction: column; gap: 0.4rem; }
.mmenu__links a {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  color: var(--text-dark); text-decoration: none;
  padding-block: 0.45rem;
  border-bottom: 1px solid rgba(35,32,28,0.08);
}
.mmenu__links a:hover { color: var(--spruce-deep); }
.mmenu__foot { margin-top: 2.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.mmenu__foot a { font-size: 1rem; color: var(--text-body); text-decoration: none; padding-block: 0.5rem; }

/* Hero: split composition */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--snow);
}
.hero__text {
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem)) clamp(1.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}
.hero__title {
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  margin-bottom: 1.4rem;
}
.hero__sub { font-size: clamp(1rem, 1.4vw, 1.12rem); max-width: 34rem; margin-bottom: 2rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.hero__rule { width: 3.5rem; height: 1px; background: var(--spruce); margin-bottom: 1rem; }
.hero__note { font-size: 0.78rem; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.hero__media { position: relative; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* Commitments strip */
.commit { background: var(--spruce-ink); padding-block: var(--pad-y); }
.commit__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.commit__item { border-top: 1px solid rgba(250,250,248,0.16); padding-top: 1.2rem; }
.commit__item h3 { font-size: 1.18rem; color: var(--text-light); line-height: 1.3; }
.commit__num { display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; color: var(--spruce-bright); margin-bottom: 0.7rem; }

/* Intro */
.intro { padding-block: var(--pad-y); }
.intro__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.intro__copy p:not(.eyebrow) { margin-bottom: 1.2rem; max-width: 34rem; }
.intro__copy .btn { margin-top: 0.8rem; }
.intro__media { position: relative; }
.intro__media::before {
  content: "";
  position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 1px solid var(--sand);
  z-index: 0;
}
.intro__media img { position: relative; z-index: 1; aspect-ratio: 4/5; object-fit: cover; }

/* Panels: expanding split (signature) */
.build { background: var(--cloud); padding-block: var(--pad-y); }
.panels {
  display: flex;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  height: clamp(420px, 60vh, 560px);
}
.panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.65s var(--ease);
  background: var(--spruce-ink);
}
.panel.is-active { flex: 2.4; }
.panel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.5s var(--ease);
  opacity: 0.85;
}
.panel.is-active img { opacity: 1; }
.panel__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,24,26,0.88) 0%, rgba(20,24,26,0.25) 45%, rgba(20,24,26,0.05) 100%);
}
.panel__head {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex; align-items: baseline; gap: 0.7rem;
  width: 100%;
  padding: 1.4rem 1.5rem 0.4rem;
  min-height: 44px;
  background: none; border: none; cursor: pointer; text-align: left;
}
.panel__index { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; color: var(--spruce-bright); }
.panel__title {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  color: var(--text-light);
  white-space: nowrap;
}
.panel__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 3.6rem 1.5rem 1.5rem;
  opacity: 0;
  transition: opacity 0.5s var(--ease) 0.15s;
  pointer-events: none;
}
.panel.is-active .panel__body { opacity: 1; }
.panel__body p { color: var(--text-light-muted); font-size: 0.95rem; max-width: 30rem; }
.panel.is-active .panel__head { position: absolute; bottom: auto; top: 1.2rem; padding-top: 0; }
.panel:not(.is-active) .panel__title { font-size: 1.05rem; }

/* Showroom */
.showroom { padding-block: var(--pad-y); }
.showroom__grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.showroom__media img { aspect-ratio: 4/5; object-fit: cover; }
.showroom__copy p:not(.eyebrow):not(.showroom__meta) { margin-bottom: 1.2rem; max-width: 34rem; }
.showroom__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0.4rem 0 1.6rem; }
.showroom__tags li {
  font-size: 0.85rem; font-weight: 400;
  padding: 0.42rem 0.95rem;
  border: 1px solid rgba(110,74,46,0.35);
  border-radius: 999px;
  color: var(--timber-deep);
}
.showroom__meta { font-size: 0.95rem; color: var(--text-muted); border-top: 1px solid rgba(35,32,28,0.1); padding-top: 1.2rem; }
.showroom__meta a { color: var(--spruce-deep); text-decoration: none; }
.showroom__meta a:hover { text-decoration: underline; }

/* Process */
.process { background: var(--cloud); padding-block: var(--pad-y); }
.process__steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.step { border-top: 1px solid rgba(35,32,28,0.14); padding-top: 1.3rem; }
.step__num { display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; color: var(--spruce-deep); margin-bottom: 0.7rem; }
.step h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.step p { font-size: 0.97rem; }
.process__note {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--text-dark);
}

/* Gallery */
.gallery { background: var(--spruce-ink); padding-block: var(--pad-y); }
.gallery h2 { color: var(--text-light); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.gallery__item { overflow: hidden; }
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 4/5;
  transition: transform 0.7s var(--ease);
}
.gallery__item:nth-child(4) img, .gallery__item:nth-child(6) img { aspect-ratio: 4/3.2; }
.gallery__item:hover img { transform: scale(1.035); }

/* Team */
.team { background: var(--cloud); padding-block: var(--pad-y); }
.team__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.member__rule { width: 3.5rem; height: 1px; background: var(--spruce); margin-bottom: 1.2rem; }
.member h3 { font-size: 1.6rem; margin-bottom: 0.7rem; }

/* CTA */
.cta { background: var(--spruce-ink); padding-block: var(--pad-y); text-align: center; }
.cta h2 { color: var(--text-light); }
.cta__sub { color: var(--text-light-muted); max-width: 30rem; margin: 0 auto 2rem; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-bottom: 2rem; }
.cta__addr { font-size: 0.88rem; letter-spacing: 0.04em; color: var(--text-light-muted); }

/* Footer */
.footer { background: #1a1f22; padding-top: clamp(2.5rem, 5vw, 4rem); }
.footer__grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.footer__brand { display: flex; align-items: flex-start; gap: 0.7rem; }
.footer__mark { width: 1.5rem; height: auto; color: var(--spruce-bright); }
.footer__name { font-family: var(--font-display); font-size: 1.35rem; color: var(--text-light); line-height: 1.15; }
.footer__name span { display: block; font-family: var(--font-body); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-light-muted); margin-top: 0.3rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.15rem; }
.footer__links a, .footer__contact a {
  color: var(--text-light-muted); text-decoration: none; font-size: 0.92rem;
  padding-block: 0.3rem;
  transition: color 0.3s var(--ease);
}
.footer__links a:hover, .footer__contact a:hover { color: var(--spruce-bright); }
.footer__contact { display: flex; flex-direction: column; gap: 0.3rem; }
.footer__contact p { color: var(--text-light-muted); font-size: 0.92rem; }
.footer__base { border-top: 1px solid rgba(250,250,248,0.1); padding-block: 1.4rem; }
.footer__base p { font-size: 0.8rem; color: rgba(250,250,248,0.4); }

/* 404 */
.error-section {
  min-height: 100vh; min-height: 100svh;
  background: var(--spruce-ink);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 2rem) 6% 3rem;
}
.error__code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 11rem); color: rgba(143,182,202,0.26); line-height: 1; }
.error__title { color: var(--text-light); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0.5rem 0 1rem; }
.error__body { color: var(--text-light-muted); max-width: 28rem; margin-bottom: 2rem; }

/* Reveal animation base */
.reveal { opacity: 0; }
.no-js .reveal, .reveal.is-visible { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .panels { height: clamp(400px, 52vh, 500px); }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .btn--nav { display: none; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { padding-top: calc(var(--nav-h) + 3rem); }
  .hero__media { height: 58vh; height: 58svh; }

  .intro__grid, .showroom__grid { grid-template-columns: 1fr; }
  .showroom__grid .showroom__media { order: 2; }
  .intro__media::before { inset: 1rem -0.8rem -0.8rem 1rem; }

  .commit__grid { grid-template-columns: 1fr 1fr; }
  .process__steps { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr 1fr; }
  .team__grid { grid-template-columns: 1fr; }

  /* Panels become stacked accordion */
  .panels { flex-direction: column; height: auto; gap: 0.6rem; }
  .panel { min-height: 130px; flex: none; transition: min-height 0.55s var(--ease); }
  .panel.is-active { min-height: 340px; flex: none; }
  .panel:not(.is-active) .panel__title { font-size: 1.2rem; }
  .panel.is-active .panel__head { top: 1rem; }
}

@media (max-width: 640px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .commit__grid { grid-template-columns: 1fr; }
  .hero__media { height: 52vh; height: 52svh; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__links a, .footer__contact a { padding-block: 0.65rem; }
  .cta__actions { flex-direction: column; align-items: center; }
}
