/* ============================================
   Builder Bros Custom Doors — design tokens
   ============================================ */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --font-display: 'Zodiak', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.625rem;

  --wrap: 1200px;
  --wrap-narrow: 820px;
}

/* Light — warm shop cream + tannin accent */
:root,
[data-theme='light'] {
  --color-bg: #f7f3ec;
  --color-surface: #fdfbf7;
  --color-surface-2: #f1ebe1;
  --color-surface-3: #e6ddcf;
  --color-border: #d9cfbe;
  --color-divider: #e4dbcd;

  --color-text: #221a12;
  --color-text-muted: #6d6154;
  --color-text-faint: #9d9385;
  --color-text-inverse: #faf7f1;

  --color-primary: #8f4218;
  --color-primary-hover: #74340f;
  --color-primary-soft: #f0e2d4;

  --color-ink: #241b13;
  --color-ink-soft: #33271c;

  --shadow-sm: 0 1px 2px rgba(45, 32, 20, 0.07);
  --shadow-md: 0 4px 16px rgba(45, 32, 20, 0.09);
  --shadow-lg: 0 18px 48px rgba(45, 32, 20, 0.16);
}

[data-theme='dark'] {
  --color-bg: #16120d;
  --color-surface: #1e1913;
  --color-surface-2: #262019;
  --color-surface-3: #322a20;
  --color-border: #3d342a;
  --color-divider: #2e271f;

  --color-text: #f2ebe0;
  --color-text-muted: #a89c8c;
  --color-text-faint: #776c5e;
  --color-text-inverse: #1a150f;

  --color-primary: #dd8f4e;
  --color-primary-hover: #eda76c;
  --color-primary-soft: #322317;

  --color-ink: #100d09;
  --color-ink-soft: #1c1711;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
}

/* ============================================
   Base
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.wrap-narrow {
  max-width: var(--wrap-narrow);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-12);
}

.section-head h2 {
  font-size: var(--text-xl);
}

.section-head p {
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--color-text-muted);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

[data-theme='dark'] .btn-primary {
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  backdrop-filter: blur(6px);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ============================================
   Header
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--color-divider);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  margin-right: auto;
}

.brand svg {
  flex: none;
  color: var(--color-primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Reads as an attribution line, so italic serif rather than
   the uppercase treatment a subtitle would get. */
.brand-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.12rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 1.0625rem;
  }

  .brand-sub {
    font-size: 0.6875rem;
  }
}

/* The attribution line is long, so claw back space from the
   header chrome on narrow phones rather than truncating it. */
@media (max-width: 400px) {
  .brand-sub {
    font-size: 0.625rem;
  }

  .header-inner {
    gap: var(--space-2);
  }

  .brand {
    gap: 0.45rem;
  }

  .brand svg {
    width: 30px;
    height: 30px;
  }

  .header-actions {
    gap: 0.3rem;
  }
}

/* On the very narrowest phones the attribution can't share the bar with
   the buttons without shrinking tap targets, so drop it here only.
   The footer lockup still carries the full name. */
@media (max-width: 359px) {
  .site-header .brand-sub {
    display: none;
  }

  .brand-name {
    font-size: 0.9375rem;
  }
}

/* Just above the nav-collapse point the nav is inline again and
   competes with the lockup for room. */
@media (min-width: 1001px) and (max-width: 1140px) {
  .site-header .brand-sub {
    font-size: 0.625rem;
  }

  .site-header .brand-name {
    font-size: 1.0625rem;
  }
}

.site-footer .brand-name {
  font-size: 1.1875rem;
}

.site-footer .brand-sub {
  font-size: 0.8125rem;
}

.nav {
  display: flex;
  align-items: center;
  /* Tightens on narrower laptops so seven links plus the CTA stay
     inline instead of falling back to a hamburger too early. */
  gap: clamp(0.9rem, 1.5vw, 1.5rem);
}

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--color-text);
}

.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: #fff;
}

[data-theme='dark'] .nav a.btn-primary,
[data-theme='dark'] .nav a.btn-primary:hover {
  color: var(--color-text-inverse);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  position: relative;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

[data-theme='dark'] .cart-count {
  color: var(--color-text-inverse);
}

.cart-count[hidden] {
  display: none;
}

.nav-toggle {
  display: none;
}

.theme-icon-dark {
  display: none;
}

[data-theme='dark'] .theme-icon-light {
  display: none;
}

[data-theme='dark'] .theme-icon-dark {
  display: block;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: flex-end;
  padding-block: var(--space-24) var(--space-16);
  overflow: hidden;
  background: var(--color-ink);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 50%;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 12, 7, 0.94) 0%,
    rgba(18, 12, 7, 0.72) 38%,
    rgba(18, 12, 7, 0.24) 72%,
    rgba(18, 12, 7, 0.35) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 44rem;
}

.hero .eyebrow {
  color: #e6b083;
}

.hero h1 {
  font-size: var(--text-3xl);
  color: #fff;
}

.hero h1 em {
  font-style: italic;
  color: #e9b98d;
}

.hero p {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.84);
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.hero-facts {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-12);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-fact {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #fff;
  margin-bottom: 2px;
}

/* ============================================
   Marquee strip
   ============================================ */

.strip {
  background: var(--color-ink-soft);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--space-4);
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.strip-track {
  display: flex;
  gap: var(--space-10);
  white-space: nowrap;
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: slide 38s linear infinite;
  width: max-content;
}

.strip-track span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
}

.strip-track span::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.9;
}

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .strip-track {
    animation: none;
  }
}

/* ============================================
   Process / value grid
   ============================================ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-8);
}

.step {
  padding-top: var(--space-5);
  border-top: 2px solid var(--color-text);
}

.step-num {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.step h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.step p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ============================================
   Split feature
   ============================================ */

.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-20));
  align-items: center;
}

.split-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.split-media img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.split ul {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.split ul li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.split ul li svg {
  flex: none;
  margin-top: 4px;
  color: var(--color-primary);
}

.split ul li strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ============================================
   Shop
   ============================================ */

.shop-section {
  background: var(--color-surface-2);
}

.shop-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-10);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
}

.chip:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

.chip[aria-pressed='true'] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--space-8);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-media {
  position: relative;
  background: var(--color-surface-3);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: rgba(18, 12, 7, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px var(--space-3);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.card-kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.card-body h3 {
  font-size: var(--text-lg);
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
}

.price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
}

.price small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

.shop-note {
  margin-top: var(--space-10);
  padding: var(--space-5) var(--space-6);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.shop-note svg {
  flex: none;
  margin-top: 3px;
  color: var(--color-primary);
}

/* ============================================
   Gallery
   ============================================ */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--color-surface-3);
  aspect-ratio: 4 / 5;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery figure:hover img {
  transform: scale(1.05);
}

.gallery .g-wide {
  grid-column: span 2;
  aspect-ratio: 8 / 5;
}

.gallery figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: var(--space-6) var(--space-4) var(--space-3);
  background: linear-gradient(to top, rgba(18, 12, 7, 0.85), transparent);
  color: #fff;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   Testimonials
   ============================================ */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--space-6);
}

.quote {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stars {
  display: flex;
  gap: 2px;
  color: var(--color-primary);
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.35;
}

.quote cite {
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-top: auto;
}

/* ============================================
   Quote form
   ============================================ */

.quote-section {
  background: var(--color-ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.quote-section .eyebrow {
  color: #e6b083;
}

.quote-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(var(--space-8), 5vw, var(--space-20));
  align-items: start;
}

.quote-section h2 {
  font-size: var(--text-xl);
  color: #fff;
}

.quote-intro p {
  color: rgba(255, 255, 255, 0.72);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: var(--space-8) 0 0;
  display: grid;
  gap: var(--space-5);
}

.contact-list li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact-list svg {
  flex: none;
  margin-top: 3px;
  color: #e6b083;
}

.contact-list .label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2px;
}

.contact-list a,
.contact-list span.value {
  color: #fff;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.contact-list a:hover {
  color: #e6b083;
}

.form-card {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  box-shadow: var(--shadow-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.field .req {
  color: var(--color-primary);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.field .hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.field-error {
  font-size: var(--text-xs);
  color: #b3261e;
  display: none;
}

[data-theme='dark'] .field-error {
  color: #f2a09a;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #b3261e;
}

.field.invalid .field-error {
  display: block;
}

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.form-foot .fineprint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  flex: 1;
  min-width: 12rem;
}

.form-success {
  display: none;
  text-align: center;
  padding-block: var(--space-8);
}

.form-success svg {
  color: var(--color-primary);
  margin: 0 auto var(--space-5);
}

.form-success h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.form-success p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 26rem;
  margin: 0 auto var(--space-6);
}

.form-card.sent .form-body {
  display: none;
}

.form-card.sent .form-success {
  display: block;
}

/* ============================================
   FAQ
   ============================================ */

.faq-list {
  border-top: 1px solid var(--color-divider);
}

.faq-item {
  border-bottom: 1px solid var(--color-divider);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding-block: var(--space-5);
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  flex: none;
  color: var(--color-primary);
  transition: transform 0.25s ease;
}

.faq-item[open] summary svg {
  transform: rotate(45deg);
}

.faq-item .answer {
  padding-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 54ch;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-16) var(--space-8);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-divider);
}

.footer-top p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  max-width: 26rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================
   Cart drawer
   ============================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 12, 7, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 90;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(27rem, 100%);
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}

.drawer-head h2 {
  font-size: var(--text-lg);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

.drawer-foot {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-6);
  background: var(--color-surface);
}

.cart-empty {
  text-align: center;
  padding-block: var(--space-16);
  color: var(--color-text-muted);
}

.cart-empty svg {
  color: var(--color-text-faint);
  margin: 0 auto var(--space-5);
}

.cart-empty p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

.cart-line {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-divider);
}

.cart-line:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.cart-line img {
  width: 68px;
  height: 85px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-line h4 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 2px;
}

.cart-line .meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.cart-line-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-3);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.qty button:hover {
  background: var(--color-surface-3);
}

.qty span {
  min-width: 26px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
}

.cart-line .line-total {
  font-weight: 600;
  font-size: var(--text-sm);
}

.remove {
  background: none;
  border: 0;
  padding: 0;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: underline;
  margin-top: var(--space-2);
}

.remove:hover {
  color: var(--color-primary);
}

.totals {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.totals div {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.totals .grand {
  padding-top: var(--space-3);
  margin-top: var(--space-1);
  border-top: 1px solid var(--color-divider);
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-base);
}

.drawer-foot .fineprint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
  text-align: center;
}

/* ============================================
   Toast
   ============================================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-8);
  transform: translate(-50%, calc(100% + var(--space-10)));
  background: var(--color-ink);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-3) var(--space-6);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 120;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

[data-theme='dark'] .toast {
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
}

.toast.show {
  transform: translate(-50%, 0);
}

.toast svg {
  color: #e6b083;
}

/* ============================================
   Reveal on scroll
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .card:hover,
  .btn:hover {
    transform: none;
  }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1000px) {
  .split,
  .quote-layout,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .split-media {
    order: -1;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery .g-wide {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
  }
}

/* The seven inline nav links plus the CTA and the lockup need about 1000px.
   Below that the nav becomes a dropdown. */
@media (max-width: 1000px) {
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) var(--space-6) var(--space-6);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--color-divider);
    font-size: var(--text-base);
    color: var(--color-text);
  }

  .nav .btn {
    margin-top: var(--space-4);
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 780px) {
  .hero {
    min-height: 90vh;
  }

  .hero-facts {
    gap: var(--space-6);
    margin-top: var(--space-10);
  }

  .hero-fact {
    flex: 1 1 40%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .shop-head {
    align-items: flex-start;
  }
}

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

  .gallery .g-wide {
    grid-column: span 1;
    aspect-ratio: 4 / 5;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* ============================================
   Other woodwork grid
   ============================================ */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.work-media {
  background: var(--color-surface-3);
  overflow: hidden;
}

.work-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-media img {
  transform: scale(1.04);
}

.work-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.work-body h3 {
  font-size: var(--text-lg);
  line-height: 1.2;
}

.work-body p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

.work-tags {
  list-style: none;
  margin: auto 0 0;
  padding: var(--space-4) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.work-tags li {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface-3);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.work-note {
  margin-top: var(--space-10);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.work-note div {
  max-width: 46ch;
}

.work-note h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.work-note p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

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

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

  .work-note {
    flex-direction: column;
    align-items: flex-start;
  }

  .work-note .btn {
    width: 100%;
  }
}
