/* ============================================================
   402 Cabinets — design tokens
   A shop-drawing / spec-sheet visual language: warm wood tones,
   steel hardware grey, dimension lines instead of decoration.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;600;700&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #EFEAE1;
  --bg-panel: #E4DCC9;
  --ink: #211D18;
  --ink-soft: #4A4238;
  --walnut: #5C3A22;
  --oak: #B98849;
  --rust: #AC431C;
  --steel: #45535B;
  --line: #CFC3AA;
  --paper: #F7F4ED;

  --display: 'Roboto Slab', serif;
  --body: 'Public Sans', -apple-system, sans-serif;

  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}

.brand-mark span {
  color: var(--rust);
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--ink-soft);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  display: none;
}

nav.primary {
  display: flex;
  gap: 30px;
}

nav.primary a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

nav.primary a:hover,
nav.primary a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--rust);
}

.nav-toggle { display: none; }

@media (min-width: 720px) {
  .brand-tag { display: inline; }
}

@media (max-width: 719px) {
  .site-header-inner { padding: 16px 20px; }
  nav.primary {
    position: fixed;
    inset: 62px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s, transform .18s;
  }
  nav.primary a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    width: 100%;
  }
  nav.primary a[aria-current="page"] { border-color: var(--line); color: var(--rust); }
  body.nav-open nav.primary {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--ink);
    border-radius: 3px;
    width: 40px;
    height: 34px;
    position: relative;
    cursor: pointer;
  }
  .nav-toggle span,
  .nav-toggle::before,
  .nav-toggle::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--ink);
  }
  .nav-toggle::before { top: 11px; }
  .nav-toggle span { top: 16px; }
  .nav-toggle::after { top: 21px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--rust);
  color: var(--paper);
}
.btn-primary:hover { background: #8f3616; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ---------- Typography helpers ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; max-width: 62ch; }
p.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 52ch; }

.kicker {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--rust);
  margin-bottom: 10px;
}

/* ---------- Hero / spec-tag device ---------- */

.spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--steel);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 5px 10px 5px 8px;
  border-radius: 2px;
}
.spec-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rust);
  flex: none;
}

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section.tight { padding: 44px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.panel {
  background: var(--bg-panel);
}

/* ---------- Hero layout ---------- */

.hero {
  padding: 56px 0 64px;
}

.hero-photo {
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
}

.hero-photo-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 55%;
}

.hero-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(20,17,13,0.92) 0%, rgba(20,17,13,0.87) 40%, rgba(20,17,13,0.55) 66%, rgba(20,17,13,0.18) 100%);
}

.hero-photo-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 100px 0 92px;
  color: var(--paper);
}

.hero-photo-content h1 {
  color: var(--paper);
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.hero-photo-content .lede-light {
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.hero-subline {
  font-family: var(--body);
  font-size: 1.15rem;
  font-weight: 500;
  color: #E7DFD1;
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
  margin: 4px 0 0;
}

.hero-photo-content-centered {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.hero-photo-content-centered .hero-cta-row {
  justify-content: center;
}

.hero-mark {
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  letter-spacing: -0.01em;
}
.hero-mark span {
  color: var(--rust);
}

/* ---------- Hero carousel ---------- */

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 76vh;
  display: flex;
  align-items: flex-end;
}

.hc-track { position: absolute; inset: 0; }

.hc-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 55%;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hc-slide.is-active { opacity: 1; }

.hc-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(18,15,12,0.85) 0%, rgba(18,15,12,0.76) 40%, rgba(18,15,12,0.40) 70%, rgba(18,15,12,0.10) 100%),
    linear-gradient(0deg, rgba(18,15,12,0.8) 0%, rgba(18,15,12,0.48) 48%, rgba(18,15,12,0.08) 78%);
}

.hc-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 120px 0 88px;
  color: var(--paper);
}
.hc-content h1 {
  color: var(--paper);
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.hc-content .lede-light { text-shadow: 0 1px 14px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.9); }

.hc-caption {
  margin: 22px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #DCD2BF;
  letter-spacing: 0.01em;
}

.hc-dots {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}
.hc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(247,244,237,0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.hc-dot.is-active {
  background: var(--paper);
  transform: scale(1.15);
}

@media (max-width: 720px) {
  .hero-carousel { min-height: 82vh; }
  .hc-scrim {
    background: linear-gradient(0deg, rgba(18,15,12,0.92) 0%, rgba(18,15,12,0.72) 45%, rgba(18,15,12,0.25) 78%, rgba(18,15,12,0.08) 100%);
  }
  .hc-content { padding: 40px 0 60px; max-width: 100%; }
  .hc-dots { right: 20px; bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-slide { transition: none; }
}

/* ---------- In-page project photo carousel ---------- */

.photo-carousel {
  position: relative;
  overflow: hidden;
  height: 460px;
}

.pc-track { position: absolute; inset: 0; }

.pc-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 50%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.pc-slide.is-active { opacity: 1; }

.pc-dots {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 20px;
  display: flex;
  gap: 10px;
}
.pc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(247,244,237,0.85);
  background: rgba(33,29,24,0.25);
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.pc-dot.is-active {
  background: var(--paper);
  transform: scale(1.15);
}

@media (max-width: 720px) {
  .photo-carousel { height: 320px; }
}

.spec-tag-light {
  background: rgba(247,244,237,0.12);
  border-color: rgba(247,244,237,0.35);
  color: var(--paper);
}

.lede-light { color: #E7DFD1; }

.btn-outline-light {
  color: var(--paper);
  border-color: var(--paper);
}
.btn-outline-light:hover { background: var(--paper); color: var(--ink); }

.hero-notes-light div {
  color: #DCD2BF;
  border-top-color: var(--oak);
}
.hero-notes-light strong { color: var(--paper); }

@media (max-width: 720px) {
  .hero-photo { min-height: 520px; }
  .hero-photo-scrim {
    background: linear-gradient(180deg, rgba(33,29,24,0.55) 0%, rgba(33,29,24,0.88) 55%, rgba(33,29,24,0.95) 100%);
  }
  .hero-photo-content { padding: 40px 0 50px; max-width: 100%; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-cta-row {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-notes {
  display: flex;
  gap: 22px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero-notes div {
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 2px solid var(--oak);
  padding-top: 8px;
  max-width: 160px;
}
.hero-notes strong { display: block; color: var(--ink); font-family: var(--display); font-size: 1.05rem; }

/* ---------- Cards / grids ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.grid-adv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.grid-adv .cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-adv { grid-template-columns: 1fr; }
}

.cell {
  background: var(--paper);
  padding: 30px 28px;
}

.cell .num {
  font-family: var(--display);
  color: var(--oak);
  font-size: 0.95rem;
  margin-bottom: 14px;
  display: block;
}

.cell h3 { margin-bottom: 10px; }
.cell p { margin-bottom: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Comparison strip ---------- */

.compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
}
.compare > div {
  padding: 28px 26px;
  border-left: 1px solid var(--line);
}
.compare > div:first-child { border-left: none; }
.compare .mid {
  background: var(--walnut);
  color: var(--paper);
}
.compare .mid .kicker { color: var(--oak); }
.compare h3 { margin-bottom: 6px; }
.compare .price {
  font-family: var(--display);
  font-size: 1.7rem;
  margin: 10px 0 14px;
}
.compare ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.compare li {
  padding: 7px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  color: var(--ink-soft);
}
.compare .mid li { border-top-color: rgba(255,255,255,0.15); color: #E7DED0; }
.compare li:first-child { border-top: none; }

/* ---------- Swatch / product placeholder blocks ---------- */

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

.swatch {
  border: 1px solid var(--line);
  background: var(--paper);
}

.swatch-face {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.swatch-face svg { width: 100%; height: 100%; display: block; }

.swatch-body {
  padding: 16px 18px 18px;
}
.swatch-body h3 { font-size: 1rem; margin-bottom: 4px; }
.swatch-body p { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

.photo-note {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--steel);
  background: rgba(247,244,237,0.9);
  border: 1px dashed var(--line);
  padding: 4px 7px;
  border-radius: 2px;
}

.swatch-price {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.swatch-price span { color: var(--rust); }

button.swatch-face {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.style-coming-soon {
  border: 1px dashed var(--line);
  padding: 28px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Work gallery grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.work-thumb {
  aspect-ratio: 1/1;
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: none;
}
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.work-thumb:hover img { transform: scale(1.05); }

@media (max-width: 680px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Lightbox ---------- */

.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18,15,12,0.94);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 70px;
}
.lb-overlay.is-open { display: flex; }

.lb-image {
  max-width: 100%;
  max-height: 82vh;
  border: 1px solid rgba(247,244,237,0.2);
  display: block;
}

.lb-caption {
  position: absolute;
  left: 0; right: 0; bottom: 20px;
  text-align: center;
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(247,244,237,0.5);
  color: var(--paper);
  cursor: pointer;
  border-radius: 3px;
}
.lb-close {
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  font-size: 1.5rem;
  line-height: 1;
}
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 2rem;
  line-height: 1;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(247,244,237,0.15); }

@media (max-width: 640px) {
  .lb-overlay { padding: 30px 16px; }
  .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 1.6rem; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}

/* ---------- Steps list ---------- */

.steps {
  border-top: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.step .step-no {
  font-family: var(--display);
  color: var(--oak);
  font-size: 1.6rem;
}
.step h3 { margin-bottom: 6px; }
.step p { margin-bottom: 0; color: var(--ink-soft); }
.step .flag {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--steel);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 2px;
}
@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--walnut);
  color: var(--paper);
}
.cta-band h2 { color: var(--paper); }
.cta-band p.lede { color: #E4D9C8; }
.cta-band .btn-outline {
  color: var(--paper);
  border-color: var(--paper);
}
.cta-band .btn-outline:hover { background: var(--paper); color: var(--walnut); }

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-grid .brand-mark { font-size: 1.15rem; }
footer.site .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
footer.site nav {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
}
footer.site nav a { text-decoration: none; color: var(--ink-soft); }
footer.site nav a:hover { color: var(--rust); }

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--rust);
  outline-offset: 1px;
}
.field textarea { min-height: 120px; resize: vertical; }

.contact-info dl {
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.contact-info dl:first-of-type { border-top: none; padding-top: 0; }
.contact-info dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--steel);
  margin-bottom: 4px;
}
.contact-info dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
