/* PlateForge — refined contemporary aesthetic: generous whitespace, restrained
   neutral palette, strong typography, subtle shadows & rounded corners. */

:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #191817;
  --ink-soft: #57534e;
  --ink-faint: #8a8580;
  --line: #e7e2da;
  --accent: #9a7b4f;
  --accent-ink: #7c6034;
  --accent-soft: #f1e9dc;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(25, 24, 23, .05), 0 8px 28px rgba(25, 24, 23, .08);
  --shadow-lg: 0 2px 6px rgba(25, 24, 23, .06), 0 24px 60px rgba(25, 24, 23, .14);
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 245, 241, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--serif); font-size: 23px; font-weight: 700;
  letter-spacing: .01em; color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: #e9dcc3;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; font-family: var(--serif);
}
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fdfcfa; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 14px 30px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary { background: var(--ink); color: #fdfcfa; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-primary:disabled { opacity: .5; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-sm { padding: 9px 20px; font-size: 14px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { padding: 92px 0 60px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 999px; padding: 7px 16px;
  margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(38px, 6vw, 62px); line-height: 1.08;
  letter-spacing: -0.015em; margin: 0 auto 22px; max-width: 17ch;
}
.hero .lede {
  font-size: 19px; color: var(--ink-soft); max-width: 56ch;
  margin: 0 auto 38px;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .fineprint { margin-top: 18px; font-size: 14px; color: var(--ink-faint); }
.price-chip { font-weight: 700; color: var(--ink); }

.hero-figure { margin: 46px auto 0; max-width: 980px; }
.hero-figure img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.hero-figure figcaption { margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); }

.lifestyle-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 42px;
}
.lifestyle-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .lifestyle-row.three { grid-template-columns: 1fr; } }
.lifestyle-row figure { margin: 0; }
.lifestyle-row img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.lifestyle-row figcaption {
  margin-top: 8px; font-size: 13px; color: var(--ink-soft); text-align: center;
}
@media (max-width: 640px) { .lifestyle-row { grid-template-columns: 1fr; } }

.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li {
  border-top: 1px solid var(--line); padding: 14px 4px; font-size: 14.5px;
  color: var(--ink-soft); line-height: 1.55;
}
.spec-list li strong { color: var(--ink); }

/* ── Sections ───────────────────────────────────────────────────────────── */

.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 38px);
  font-weight: 700; letter-spacing: -0.01em; margin: 0 0 12px;
}
.section-head p { color: var(--ink-soft); font-size: 17px; max-width: 60ch; margin: 0 auto; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 20px 22px; text-align: center;
}
.section.alt .step { background: var(--bg); }
.step .num {
  width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 999px;
  background: var(--ink); color: #ece5d8; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
}
.step h3 { font-size: 16px; margin: 0 0 6px; font-weight: 650; }
.step p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.5; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery a.card { text-decoration: none; color: inherit; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: block;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .thumb {
  background: linear-gradient(160deg, #edeae4, #dedad2);
  padding: 26px 20px; display: flex; align-items: center; justify-content: center;
  min-height: 170px;
}
.card .thumb svg { width: 100%; height: auto; max-height: 150px; }
.card .meta { padding: 16px 20px 18px; }
.card .meta h3 { margin: 0 0 3px; font-size: 16.5px; font-weight: 650; }
.card .meta p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px;
}

/* Footer */
.site-footer { padding: 44px 0 56px; color: var(--ink-faint); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ── Configurator ───────────────────────────────────────────────────────── */

.config-layout {
  display: grid; grid-template-columns: 460px 1fr; gap: 34px;
  align-items: start; padding: 38px 0 80px;
}
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.controls { padding: 8px 26px 26px; }
.control-group { padding: 20px 0 4px; border-bottom: 1px solid var(--line); }
.control-group:last-child { border-bottom: 0; }
.control-group > label.group-label, .group-label {
  display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px;
}

.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl-card {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 10px 8px; cursor: pointer; background: var(--bg);
  text-align: center; transition: border-color .12s ease;
}
.tpl-card:hover { border-color: var(--ink-faint); }
.tpl-card.selected { border-color: var(--ink); background: #fbfaf8; box-shadow: 0 0 0 1px var(--ink); }
.tpl-card svg { width: 100%; height: 54px; }
.tpl-card .tpl-name { font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.tpl-card .tpl-style { font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
input[type="text"], input[type="email"], select {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: var(--sans);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); outline: none;
  transition: border-color .12s ease;
}
input[type="text"]:focus, input[type="email"]:focus, select:focus { border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.seg button {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: var(--sans);
  transition: all .12s ease;
}
.seg button:hover { border-color: var(--ink-faint); }
.seg button.selected { background: var(--ink); color: #fdfcfa; border-color: var(--ink); }

.size-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.size-card {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 12px 10px; text-align: center; cursor: pointer;
  transition: all .12s ease; font-family: var(--sans);
}
.size-card:hover { border-color: var(--ink-faint); }
.size-card.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.size-card .sz-label { font-weight: 700; font-size: 14px; }
.size-card .sz-dims { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.size-card .sz-diag { font-size: 10px; color: var(--accent-ink); font-weight: 600; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; padding: 2px; background: transparent;
}
.swatch .swatch-inner {
  display: block; width: 100%; height: 100%; border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
}
.swatch.selected { border-color: var(--ink); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toggle-row span.lbl { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line);
  transition: background .15s ease; cursor: pointer;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
.switch input:checked + .track { background: var(--ink); }
.switch input:checked + .track::after { transform: translateX(20px); }

input[type="range"] { width: 100%; accent-color: var(--ink); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); width: 52px; text-align: right; }

/* Preview column */
.preview-col { position: sticky; top: 92px; }
.preview-stage {
  background: linear-gradient(165deg, #eceae4 0%, #dcd8d0 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 46px 40px; min-height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.preview-stage svg { width: 100%; height: auto; max-height: 430px; }
.preview-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; font-size: 14px; color: var(--ink-soft); flex-wrap: wrap; gap: 8px;
}
.preview-meta .dims { font-family: var(--mono); font-size: 13px; }
.warnings { margin-top: 10px; }
.warning {
  background: #fdf6e7; border: 1px solid #ecdcb8; color: #7a5c1e;
  font-size: 13.5px; border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 8px;
}

.buy-box {
  margin-top: 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.buy-box .price { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.buy-box .price small { font-size: 13px; color: var(--ink-faint); font-family: var(--sans); font-weight: 500; display: block; }
.notice { font-size: 13px; color: var(--ink-faint); margin-top: 10px; }

/* ── Confirmation / checkout pages ──────────────────────────────────────── */

.narrow { max-width: 660px; margin: 0 auto; padding: 60px 28px 90px; }
.status-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 42px;
}
.status-card h1 { font-family: var(--serif); font-size: 32px; margin: 0 0 10px; letter-spacing: -.01em; }
.status-card .sub { color: var(--ink-soft); margin: 0 0 26px; }
.badge-ok {
  width: 60px; height: 60px; border-radius: 999px; background: #e8f2e8;
  color: #2e6b3a; display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 22px;
}
.kv { border-top: 1px solid var(--line); padding: 20px 0 4px; margin-top: 12px; }
.kv dl { display: grid; grid-template-columns: 190px 1fr; row-gap: 9px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 13.5px; }
.callout {
  background: var(--accent-soft); border: 1px solid #e4d5bb; border-radius: var(--radius-sm);
  padding: 16px 18px; font-size: 14px; margin: 20px 0; line-height: 1.55; color: #5d4a28;
}
.callout strong { color: #46351a; }
.dl-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.mount-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.mount-table td { padding: 5px 8px; border-top: 1px solid #e4d5bb; }
.mount-table td:first-child { font-weight: 600; white-space: nowrap; }
.muted { color: var(--ink-faint); font-size: 13.5px; }
.spinner {
  width: 34px; height: 34px; border-radius: 999px;
  border: 3px solid var(--line); border-top-color: var(--ink);
  animation: spin .8s linear infinite; margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-box {
  background: #fbeeee; border: 1px solid #eccfcf; color: #8a3030;
  border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14.5px;
}

/* Mock checkout */
.mock-banner {
  background: #103c68; color: #cfe3f7; font-size: 13.5px;
  padding: 10px 18px; text-align: center;
}
.mock-banner strong { color: #fff; }
.pay-summary { display: flex; justify-content: space-between; font-size: 15px; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1020px) {
  .config-layout { grid-template-columns: 1fr; }
  .preview-col { position: static; order: -1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .steps, .gallery { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 40px; }
  .nav { gap: 16px; }
  .status-card { padding: 28px 22px; }
  .kv dl { grid-template-columns: 1fr; }
}
