:root {
  --bg-canvas: #f3e9d8;
  --bg-surface: #fffaf2;
  --bg-surface-hover: #f7efe2;
  --text-primary: #262626;
  --text-muted: #574f47;
  --accent-primary: #9a4d25;
  --accent-secondary: #763718;
  --border-subtle: #d5c5ae;
  --border-strong: #b69f82;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: none;
  --glow-accent: none;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: 0.85rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

p, ul, ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-secondary);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: cover;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.reading-col {
  max-width: 70ch;
}

.reading-centered {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-primary);
  color: var(--bg-surface);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: static;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.header-tagline-bar {
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.45rem 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-tagline-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent-primary);
  background: var(--bg-canvas);
  color: var(--accent-primary);
  font-size: 1rem;
  font-weight: 700;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.desktop-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s var(--ease-kinetic), color 0.25s var(--ease-kinetic);
}

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

.mobile-menu-btn {
  display: none;
  background: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  align-items: center;
  justify-content: center;
}

.mobile-drawer {
  display: none;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-drawer a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer a[aria-current="page"] {
  color: var(--accent-primary);
}

/* Buttons */
.pill-btn {
  display: inline-block;
  background: var(--accent-primary);
  color: var(--bg-surface);
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-kinetic), background-color 0.25s var(--ease-kinetic);
}

.pill-btn:hover {
  background: var(--accent-secondary);
  color: var(--bg-surface);
  transform: translateY(-2px);
}

.pill-btn-muted {
  background: var(--text-primary);
  color: var(--bg-surface);
}

.pill-btn-muted:hover {
  background: var(--accent-primary);
}

/* Section Transitions (Diagonal / Curved) */
.band-sand {
  background: var(--bg-canvas);
  padding: 3.5rem 0;
}

.band-cream {
  background: var(--bg-surface);
  padding: 4.5rem 0;
  clip-path: polygon(0 28px, 100% 0, 100% calc(100% - 28px), 0 100%);
  margin: -1.5rem 0;
}

.band-cream-arch {
  background: var(--bg-surface);
  padding: 4.5rem 0;
  clip-path: ellipse(125% 100% at 50% 100%);
}

.band-cream-flat {
  background: var(--bg-surface);
  padding: 3.5rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Hero Section */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 1.5rem;
}

.hero-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-top: 1.75rem;
}

.hero-meta-cell {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border-subtle);
}

.hero-meta-cell:last-child {
  border-right: 0;
}

.hero-meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.hero-meta-val {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.media-frame {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 0.6rem;
}

.media-frame figcaption {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.55rem;
}

.ratio-16x9 { aspect-ratio: 16 / 9; width: 100%; }
.ratio-4x3 { aspect-ratio: 4 / 3; width: 100%; }
.ratio-1x1 { aspect-ratio: 1 / 1; width: 100%; }

/* Bento Cabinet Grids */
.bento-cabinet {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.bento-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.35rem;
  box-shadow: none;
  border-radius: 0;
  transition: background-color 0.25s var(--ease-kinetic), transform 0.25s var(--ease-kinetic);
}

.band-cream .bento-tile {
  background: var(--bg-canvas);
}

.bento-tile:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-3px);
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.fluid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.specimen-tag {
  display: inline-block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.75rem;
  background: var(--bg-canvas);
}

.band-cream .specimen-tag {
  background: var(--bg-surface);
}

.split-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.25rem;
  align-items: center;
}

/* Texture Comparison Rows & Scale Diagrams */
.comparison-list {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.comparison-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.5fr;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  align-items: start;
}

.comparison-row:last-child {
  border-bottom: 0;
}

.comparison-head {
  background: var(--bg-canvas);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scale-diagram {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1.25rem;
}

.scale-bar-row {
  margin-bottom: 1rem;
}

.scale-bar-row:last-child {
  margin-bottom: 0;
}

.scale-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.scale-track {
  width: 100%;
  height: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}

.scale-fill {
  height: 100%;
  background: var(--accent-primary);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin: 1.25rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th, td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.93rem;
}

th {
  background: var(--bg-canvas);
  font-family: Georgia, "Times New Roman", serif;
}

tr:last-child td {
  border-bottom: 0;
}

/* Disclosures / FAQ */
.disclosure-group {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

details {
  border-bottom: 1px solid var(--border-subtle);
}

details:last-child {
  border-bottom: 0;
}

summary {
  padding: 1rem 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--accent-primary);
  font-size: 1.25rem;
  line-height: 1;
}

details[open] summary::after {
  content: "−";
}

.disclosure-body {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
}

/* Editorial Page Layout */
.page-banner {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.75rem 0 2.25rem;
}

.editorial-split {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.aside-panel {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1.25rem;
}

/* Contact Specimen Tool */
.specimen-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.form-panel, .preview-panel {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1.5rem;
}

.field-group {
  margin-bottom: 1rem;
}

.field-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 0;
}

.preview-output {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  min-height: 220px;
  margin-bottom: 1rem;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.status-note {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--accent-primary);
  min-height: 1.3em;
}

/* Footer Cabinet */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-cabinet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}

.footer-drawer {
  padding: 1.25rem;
  border-right: 1px solid var(--border-subtle);
}

.footer-drawer:last-child {
  border-right: 0;
}

.footer-drawer h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
  color: var(--accent-primary);
}

.footer-drawer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-drawer li {
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.footer-drawer a {
  color: var(--text-primary);
  text-decoration: none;
}

.footer-drawer a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .reveal-visible {
    transition: none;
  }
  .pill-btn:hover, .bento-tile:hover {
    transform: none;
  }
}

/* Breakpoints */
@media (max-width: 1024px) {
  .span-8, .span-7, .span-5, .span-4, .span-3 {
    grid-column: span 6;
  }
  .editorial-split {
    grid-template-columns: 1fr;
  }
  .footer-cabinet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-drawer:nth-child(2) {
    border-right: 0;
  }
  .footer-drawer:nth-child(1),
  .footer-drawer:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-grid,
  .split-card,
  .specimen-tool-grid,
  .comparison-row {
    grid-template-columns: 1fr;
  }
  .span-12, .span-8, .span-7, .span-6, .span-5, .span-4, .span-3 {
    grid-column: span 12;
  }
  .hero-meta-strip {
    grid-template-columns: 1fr;
  }
  .hero-meta-cell {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .hero-meta-cell:last-child {
    border-bottom: 0;
  }
  .band-cream {
    clip-path: polygon(0 14px, 100% 0, 100% calc(100% - 14px), 0 100%);
  }
}

@media (max-width: 480px) {
  .footer-cabinet-grid {
    grid-template-columns: 1fr;
  }
  .footer-drawer {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .footer-drawer:last-child {
    border-bottom: 0;
  }
}