:root {
  --ivory: #f4efe6;
  --paper: #faf7f1;
  --sand: #c9b089;
  --jute: #b0895a;
  --ink: #1c1712;
  --ink-soft: #3a322a;
  --muted: #6d6358;
  --line: rgba(28, 23, 18, 0.12);
  --navy: #1d3557;
  --leather: #4a3226;
  --white: #fffcf7;
  --shadow: 0 24px 60px rgba(28, 23, 18, 0.08);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Outfit", "Helvetica Neue", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

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

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

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(250, 247, 241, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.04em;
}

.logo span {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--ivory);
  padding: 13px 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s ease;
}

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

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.btn.ghost:hover { background: var(--ink); color: var(--ivory); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 56px;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 78px);
  margin: 14px 0 20px;
}

.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.hero-visual {
  background: var(--ivory);
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat { padding: 22px 8px; }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}
.stat span { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }

/* Sections */
section { padding: 88px 0; }
.section-head { margin-bottom: 36px; max-width: 62ch; }
.section-head h2 { font-size: clamp(32px, 4vw, 52px); margin-top: 8px; }

.grid-9 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-img {
  aspect-ratio: 1 / 1;
  background: var(--ivory);
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body { padding: 18px 18px 22px; }
.card-body h3 { font-size: 26px; margin: 6px 0 8px; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; }

.pill {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}

/* Split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split p { color: var(--ink-soft); }

.checks { list-style: none; padding: 0; margin: 22px 0 0; }
.checks li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

/* Product page */
.pdp {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  padding: 48px 0 80px;
}

.pdp-photo {
  background: var(--ivory);
  box-shadow: var(--shadow);
}

.pdp-photo img { width: 100%; }

.meta { margin: 22px 0; }
.meta dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}
.meta dd { margin: 4px 0 0; }

.related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Form */
.form {
  display: grid;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px;
}

label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.styles-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.styles-pick label {
  display: flex;
  gap: 8px;
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--paper);
}
.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 0; word-break: break-word; }
.facts a { text-decoration: underline; text-underline-offset: 3px; }

.note {
  font-size: 13px;
  color: var(--muted);
}
.success {
  display: none;
  padding: 16px;
  border: 1px solid var(--sand);
  background: var(--ivory);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 13px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.site-footer a:hover { color: var(--ink); }

.banner {
  background: var(--ink);
  color: var(--ivory);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 16px;
}

@media (max-width: 900px) {
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .hero, .split, .pdp, .grid-9, .related, .stats, .foot-grid, .row-2 {
    grid-template-columns: 1fr;
  }
  .grid-9 { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    inset: 72px 0 auto 0;
    background: var(--paper);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  section { padding: 56px 0; }
}

@media (max-width: 560px) {
  .grid-9, .styles-pick { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
}

/* v15: responsive pictures, product gallery, 4-step grid */
picture { display: block; }
.card-img picture, .hero-visual picture { width: 100%; height: 100%; }
.pdp-photo picture img, .gallery-main img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.gallery { background: none; box-shadow: none; }
.gallery-main { margin: 0; position: relative; background: var(--ivory); box-shadow: var(--shadow); overflow: hidden; touch-action: pan-y; }
.gallery-main img { transition: opacity 0.25s ease; }
.gallery-main.is-swapping img { opacity: 0.35; }
.gallery-cap {
  position: absolute; left: 14px; bottom: 12px;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); background: rgba(250, 247, 241, 0.86); padding: 5px 9px;
}
.gallery-cap:empty { display: none; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery-thumb {
  width: 76px; height: 76px; padding: 0; border: 1px solid var(--line);
  background: var(--ivory); cursor: pointer; opacity: 0.72;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb[aria-pressed="true"] { opacity: 1; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gallery-thumb:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .pdp { gap: 28px; padding-top: 28px; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .gallery-thumb { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-main img, .card { transition: none; } }

/* v17: spec + comparison tables, company block, how-to-order steps, prose */
.spec-table, .compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table { margin: 8px 0 6px; }
.spec-table caption { text-align: left; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; }
.spec-table th, .spec-table td, .compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.spec-table th { width: 34%; font-weight: 500; color: var(--ink-soft); }
.compare-table thead th { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.compare-table tbody th { font-weight: 500; }
.compare-table tbody th a { text-decoration: underline; text-underline-offset: 3px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { min-width: 720px; }
.sample-line { font-size: 14px; color: var(--ink-soft); margin: 12px 0 0; }
.sample-line a { text-decoration: underline; text-underline-offset: 3px; }
.company-block p { margin: 8px 0 0; }
.company-block a { text-decoration: underline; text-underline-offset: 3px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 0; max-width: 760px; }
.steps li { counter-increment: step; position: relative; padding: 18px 0 18px 56px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 18px; font-family: var(--serif); font-size: 26px; color: var(--navy); }
.steps h3 { font-size: 26px; margin: 0 0 6px; }
.steps p, .prose p { margin: 0; color: var(--ink-soft); }
.prose { max-width: 70ch; }
.prose h3 { font-size: 24px; margin: 26px 0 6px; }
.prose p + p { margin-top: 12px; }
.gallery-thumbs { flex-wrap: wrap; }
@media (max-width: 560px) { .gallery-thumbs { flex-wrap: nowrap; gap: 8px; } .gallery-thumb { flex: 1 1 0; width: auto; height: auto; aspect-ratio: 1 / 1; max-width: 64px; } }
@media (max-width: 900px) { .nav-links a { padding: 4px 0; } }
