:root {
  /* Palette: Bone & Oxblood */
  --bg-canvas: #F6F1E9;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F0EFEA;
  --text-primary: #1F1A17;
  --text-muted: #6B6158;
  --accent-primary: #7A1F2B;
  --accent-secondary: #B08D57;
  --border-subtle: #DDD3C4;

  /* Typography */
  --font-display: Cambria, "Hoefler Text", serif;
  --font-body: Calibri, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Shape & Rhythm */
  --radius-card: 12px;
  --space-unit: 12px;
  
  /* Image Treatment */
  --radius-image: 0px; 

  /* Motion */
  --ease-kinetic: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration: 500ms;
  --shadow-elevation: 0 8px 24px rgba(0, 0, 0, 0.06);

  /* Layout Widths */
  --max-width: 1200px;
  --reading-width: 72ch;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  /* Background Texture: Tonal horizontal bands */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 120px,
    rgba(0, 0, 0, 0.015) 120px,
    rgba(0, 0, 0, 0.015) 240px
  );
  padding: calc(var(--space-unit) * 2);
}

/* Page Frame (Style Direction: thin inset frame with wide margin) */
.page-frame {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  min-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: calc(var(--space-unit) * 1.5);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.75rem); }

p {
  margin-bottom: calc(var(--space-unit) * 2);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: calc(var(--space-unit) * 0.5);
}

/* Links & Buttons */
a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-primary);
  transition: border-width var(--duration) var(--ease-kinetic);
}

a:hover, a:focus {
  border-bottom-width: 2px;
}

/* Primary Button (Roll 9: Solid rectangle in accent color) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: #FFFFFF;
  padding: calc(var(--space-unit) * 1) calc(var(--space-unit) * 2);
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease-kinetic), transform var(--duration) var(--ease-kinetic);
  border-radius: 0; 
}

.btn:hover, .btn:focus-visible {
  background-color: #5d1720;
  border-bottom: none;
  transform: translateY(-2px);
}

.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 4px;
}

/* Header */
.site-header {
  padding: calc(var(--space-unit) * 3);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border-subtle);
  position: static; 
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: calc(var(--space-unit) * 1);
}

.brand:hover { border-bottom: none; }

.brand-icon {
  width: 24px;
  height: 24px;
  fill: var(--accent-primary);
}

.nav-links {
  display: flex;
  gap: calc(var(--space-unit) * 2);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-bottom: none;
  color: var(--text-muted);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Layout: Catalogue Bento Grid & Split Hero */
.main-content {
  flex: 1;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 60vh;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-text {
  padding: calc(var(--space-unit) * 4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--bg-surface);
}

.hero-image-container {
  overflow: hidden;
  position: relative;
  background-color: var(--border-subtle);
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-image);
}

/* Standard Reading Wrapper */
.reading-wrapper {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: calc(var(--space-unit) * 4) calc(var(--space-unit) * 2);
}

/* Catalogue Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: calc(var(--space-unit) * 3);
  padding: calc(var(--space-unit) * 4);
  background-color: var(--bg-canvas);
}

/* Cards & Elements */
.catalogue-plate {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration) var(--ease-kinetic), box-shadow var(--duration) var(--ease-kinetic);
}

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

.plate-image {
  height: 240px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--border-subtle);
}

.plate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-image);
  transition: transform 3s var(--ease-kinetic);
}

.catalogue-plate:hover .plate-image img {
  transform: scale(1.03); /* Roll 7: Slow image zoom */
}

.plate-content {
  padding: calc(var(--space-unit) * 2);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.plate-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: calc(var(--space-unit) * 1);
  margin-top: auto;
}

/* Pull-quote Card (Roll 5: Primary Card) */
.pull-quote-card {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  padding: calc(var(--space-unit) * 3);
  margin: calc(var(--space-unit) * 3) 0;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.pull-quote-card blockquote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: calc(var(--space-unit) * 1);
  color: var(--text-primary);
}

.pull-quote-attribution {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* List Rows (Style Direction fallback) */
.list-row {
  display: flex;
  align-items: flex-start;
  padding: calc(var(--space-unit) * 2) 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: calc(var(--space-unit) * 2);
}

.list-row:last-child {
  border-bottom: none;
}

.list-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  stroke: var(--accent-secondary);
  stroke-width: 2;
  fill: none;
}

/* Accordion Card (Roll 6: Secondary Card) */
.accordion {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  margin-bottom: calc(var(--space-unit) * 1);
  background-color: var(--bg-surface);
}

.accordion-btn {
  width: 100%;
  text-align: left;
  padding: calc(var(--space-unit) * 2);
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-btn:focus-visible { outline-offset: -2px; }

.accordion-content {
  padding: 0 calc(var(--space-unit) * 2);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration) var(--ease-kinetic), padding var(--duration) var(--ease-kinetic);
}

.accordion-content.open {
  padding-bottom: calc(var(--space-unit) * 2);
  max-height: 500px;
}

/* Footer (Roll 15: Centered link row with short note) */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: calc(var(--space-unit) * 4);
  text-align: center;
  background-color: var(--bg-surface);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: calc(var(--space-unit) * 2);
  list-style: none;
  margin-bottom: calc(var(--space-unit) * 2);
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: none;
}

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

.footer-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 auto;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: calc(var(--space-unit) * 2) 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--bg-surface);
}
th, td {
  padding: calc(var(--space-unit) * 1.5);
  border-bottom: 1px solid var(--border-subtle);
}
th {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Forms */
.form-group { margin-bottom: calc(var(--space-unit) * 2); }
label { display: block; margin-bottom: calc(var(--space-unit) * 0.5); font-weight: 600; }
input, textarea {
  width: 100%;
  padding: calc(var(--space-unit) * 1);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

/* Motion Reveal Classes */
.reveal {
  opacity: 0;
  transition: opacity var(--duration) var(--ease-kinetic);
}
.reveal-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; }
}

/* Media Queries */
@media (max-width: 768px) {
  body { padding: 0; }
  .page-frame { border-radius: 0; border: none; }
  .hero-split { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    flex-direction: column;
    padding: calc(var(--space-unit) * 2);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 10;
  }
  .nav-links.mobile-open { display: flex; }
  .mobile-menu-btn { display: block; }
  .site-header { position: relative; }
}