/* =============================================================
   901 Cabinets — Clean, modern stylesheet
   ============================================================= */

:root {
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --muted: #6b6b6b;
  --line: #e8e4dd;
  --paper: #ffffff;
  --cream: #faf7f2;
  --warm: #f3ede3;
  --accent: #8a6a3b;        /* warm walnut */
  --accent-dark: #6e5129;
  --shadow-sm: 0 1px 2px rgba(20, 15, 10, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 15, 10, 0.08);
  --shadow-lg: 0 20px 60px rgba(20, 15, 10, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --serif: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

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

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.4rem; line-height: 1.25; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--ink-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
}
/* Bigger eyebrow on the home hero so it reads as a tagline, not a label */
.hero .eyebrow {
  font-size: 1.1rem;
  letter-spacing: 0.28em;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ---------- Layout primitives ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 28px; }

.section { padding: 96px 0; }
.section-tight { padding: 36px 0; }
.section-cream { background: var(--cream); }

.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: 1280px;
  margin: 0 auto;
}
.brand {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.brand span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.nav-links a.nav-cta {
  display: inline-block;
  padding: 17px 39px;
  background: var(--ink);
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 5px 15px rgba(20, 15, 10, 0.2);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.nav-links a.nav-cta:hover {
  background: var(--accent-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(20, 15, 10, 0.3);
}
.nav-links a.nav-cta::after { display: none !important; }
@media (max-width: 1000px) {
  .nav-links a.nav-cta { padding: 14px 28px; font-size: 0.82rem; }
}
@media (max-width: 700px) {
  .nav-links a.nav-cta { padding: 12px 22px; font-size: 0.78rem; }
}

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.6rem; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--cream);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.75) 42%, rgba(255,255,255,0.15) 72%, rgba(255,255,255,0) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}
.hero h1 { max-width: 720px; margin-bottom: 22px; }
.hero-lede {
  max-width: 540px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  cursor: pointer;
  border: none;
  font-family: var(--sans);
}
.btn-primary { background: var(--ink); color: #fff !important; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll::after {
  content: "";
  width: 1px;
  height: 36px;
  background: var(--muted);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---------- Section header ---------- */
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.sec-head p { font-size: 1.05rem; }

/* ---------- Cabinet Lines (home) ---------- */
.lines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.line-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease, border-color .35s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.line-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.line-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--warm);
}
.line-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s ease;
}
.line-card:hover .line-card-media img { transform: scale(1.06); }
.line-card-body { padding: 26px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.line-card-body h3 { margin-bottom: 10px; font-size: 1.6rem; }
.line-card-body p { font-size: 0.95rem; margin-bottom: 18px; flex: 1; }
.line-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.line-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.line-card-meta span::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.line-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}
.line-card-cta::after { content: "→"; transition: transform .25s ease; }
.line-card:hover .line-card-cta::after { transform: translateX(4px); }

/* ---------- Style cards (inner line pages) ---------- */
.style-section { margin-bottom: 72px; }
.style-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.style-section-head h2 { font-size: 1.9rem; }
.style-section-head .sub { color: var(--muted); font-size: 0.92rem; }

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.style-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.style-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.style-card-media {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--warm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.style-card-media img { width: 100%; height: 100%; object-fit: contain; }

/* Rotate Premiere finish swatches 90deg so wood strips display vertically.
   Card aspect is 3:4; rotating an aspect-correct image needs a scale factor
   of 4/3 (= ~1.333) so the rotated content fills the card. */
#maple .style-card-media img,
#oak .style-card-media img,
#quartersawn .style-card-media img,
#paint .style-card-media img {
  transform: rotate(90deg) scale(1.333);
  transform-origin: center center;
}
.style-card-body {
  padding: 14px 16px 18px;
}
.style-card-body h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 2px;
}
.style-card-body .style-sub {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- Page header (line pages) ---------- */
.page-header {
  position: relative;
  padding: 110px 0 90px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  background: var(--cream); /* fallback if blur not supported */
}
/* Blurred kitchen backdrop. Use a generous negative inset so the blur
   bleed-edge is hidden outside the section. */
.page-header::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: url("images/hero/hero-main.png") center/cover no-repeat;
  filter: blur(8px) saturate(1.08) brightness(1.02);
  transform: scale(1.02);
  z-index: -2;
}
/* Warm cream-tinted overlay so text stays legible and the look feels classy */
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 252, 247, 0.55) 0%, rgba(250, 247, 242, 0.78) 100%);
  z-index: -1;
}
.page-header > .container { position: relative; z-index: 1; }
.page-header .container { text-align: center; }
.page-header h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  margin-bottom: 16px;
}
.page-header p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.page-header .details {
  display: inline-flex;
  gap: 36px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  justify-content: center;
}
.page-header .detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-header .detail .k {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
}
.page-header .detail .v {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------- About preview ---------- */
.about-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-split img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.about-split .txt p { margin-bottom: 16px; font-size: 1.05rem; }

/* Compact variant — ~half-size, used on the home page Read Our Story teaser */
.section.compact { padding: 56px 0; }
.about-split.compact { gap: 48px; align-items: center; }
.about-split.compact img { aspect-ratio: 5 / 4; max-height: 320px; width: 100%; }
.about-split.compact h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 12px; }
.about-split.compact .txt p { font-size: 0.98rem; margin-bottom: 12px; }

/* ---------- Gallery ---------- */
/* Flexbox layout: 4 items per row at fixed widths. Partial last rows center
   themselves automatically — no trailing white space, and every item stays
   exactly the same size. */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  flex: 0 0 calc((100% - 14px * 3) / 4);
  aspect-ratio: 4 / 3;
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ---------- Video Gallery ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.video-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.video-card-media {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--ink);
}
.video-card-media video,
.video-card-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.video-card-media .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 15, 10, 0.35);
  transition: background .3s ease;
}
.video-card:hover .play-overlay { background: rgba(20, 15, 10, 0.5); }
.video-card-media .play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  transition: transform .25s ease;
}
.video-card:hover .play-icon { transform: scale(1.08); }
.video-card-media .play-icon::after {
  content: "";
  width: 0; height: 0;
  margin-left: 4px;
  border-left: 18px solid var(--ink);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}
.video-card-body { padding: 18px 22px 22px; }
.video-card-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.video-card-body .video-sub { font-size: 0.88rem; color: var(--muted); margin-bottom: 10px; }
.video-card-body .video-yt-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.video-card-body .video-yt-link:hover { color: var(--accent-dark); }
.video-placeholder-note {
  position: absolute;
  top: 16px; left: 16px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.92);
  color: var(--ink-soft);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info { }
.contact-info h3 { margin-bottom: 22px; font-size: 1.8rem; }
.contact-info-row {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row .label {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-info-row .val { font-size: 1.08rem; color: var(--ink); }

.contact-form {
  background: var(--cream);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ---------- Feature strip ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding: 12px 0;
}
.feature { text-align: center; padding: 0 10px; }
.feature-icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--warm);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.3rem;
}
.feature h4 { margin-bottom: 6px; font-family: var(--sans); font-weight: 600; font-size: 1rem; letter-spacing: 0.02em; }
.feature p { font-size: 0.93rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,0.7); max-width: 560px; margin: 0 auto 28px; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta-band .btn-ghost:hover { background: #fff; color: var(--ink); }
.cta-band .btn-primary { background: var(--accent); color: #fff !important; }
.cta-band .btn-primary:hover { background: var(--accent-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f0e0c;
  color: rgba(255,255,255,0.7);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid a { color: rgba(255,255,255,0.6); font-size: 0.95rem; display: block; padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-brand .brand { color: #fff; font-size: 1.6rem; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.95rem; max-width: 320px; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Subcategory pills ---------- */
.pill-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}
.pill-nav a {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: #fff;
  transition: all .2s ease;
}
.pill-nav a:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-split { grid-template-columns: 1fr; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item { flex-basis: calc((100% - 14px) / 2); aspect-ratio: 4 / 3; }
  .section { padding: 72px 0; }
}

@media (max-width: 700px) {
  .mobile-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 28px 24px;
    gap: 0;
    border-bottom: 1px solid var(--line);
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: none; padding-top: 10px; }
  .nav-links a { padding: 14px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .style-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .style-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .gallery-item { flex-basis: 100%; }
  .hero { min-height: 70vh; }
  .section { padding: 56px 0; }
  .sec-head { margin-bottom: 36px; }
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
