:root {
  --bg: #f6f5f0;
  --surface: #ffffff;
  --surface-alt: #efede6;
  --ink: #1a1917;
  --muted: #615e57;
  --border: #e1ded5;
  --accent: #9c4221;
  --accent-hover: #7c3318;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(246, 245, 240, 0.94);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-loc {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 36px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero-lead {
  font-size: 1.03rem;
  color: var(--muted);
  margin: 0 0 20px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: #33312d;
}

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

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: #c9c4b8;
}

.hero-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.75rem;
  margin: 0;
  letter-spacing: -0.015em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Gallery Grid */
.plate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.plate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.plate-thumb {
  overflow: hidden;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.plate-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.plate-card:hover .plate-thumb img {
  transform: scale(1.015);
}

.plate-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.plate-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.plate-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0;
}

.plate-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.plate-actions {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  gap: 10px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* Proofing Workbench */
.workbench-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  align-items: start;
}

.wb-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
}

.dropzone {
  border: 1.5px dashed #c8c3b6;
  background: var(--bg);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: #f2ece4;
}

.dropzone p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.canvas-stage {
  position: relative;
  background: #ebe8df;
  border: 1px solid var(--border);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.canvas-stage canvas {
  max-width: 100%;
  max-height: 460px;
  display: block;
}

.canvas-stage.soft-proof canvas {
  filter: contrast(0.94) saturate(0.92) sepia(0.06);
}

.overlay-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}

.overlay-guides.visible {
  display: block;
}

.overlay-guides::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(156, 66, 33, 0.75);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.spec-cell {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 14px;
}

.spec-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.spec-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 4px;
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 10px 0 20px;
}

.swatch-item {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 4px;
  cursor: pointer;
  text-align: center;
}

.swatch-color {
  height: 36px;
  width: 100%;
  margin-bottom: 4px;
}

.swatch-hex {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.export-controls {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label.field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

select, input[type="range"] {
  width: 100%;
}

select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.88rem;
}

/* Tables */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-alt);
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

/* Editorial Columns */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
}

.note-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.15rem;
  margin: 0 0 8px;
}

.note-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Footer */
.site-footer {
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

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

@media (max-width: 900px) {
  .hero-grid,
  .plate-grid,
  .workbench-layout,
  .three-col {
    grid-template-columns: 1fr;
  }
}
