/* =====================================================================
   LJ Consultants — Editorial industrial site
   Type: Instrument Serif (display) + Geist (body) + JetBrains Mono
   Color: warm paper, near-black ink, deep forest accent, rust secondary
===================================================================== */

:root {
  /* Palette sourced from LJ namecard: cool off-white paper + deep navy */
  --paper: oklch(0.955 0.004 250);
  --paper-2: oklch(0.925 0.005 250);
  --paper-3: oklch(0.88 0.006 250);
  --ink: oklch(0.24 0.035 255);
  --ink-2: oklch(0.38 0.028 255);
  --ink-3: oklch(0.56 0.015 255);
  --rule: oklch(0.82 0.008 250);
  --rule-soft: oklch(0.88 0.006 250);

  --accent: oklch(0.30 0.045 255);       /* namecard navy */
  --accent-2: oklch(0.50 0.08 40);       /* warm secondary */
  --accent-ink: oklch(0.96 0.006 250);

  --serif: 'Instrument Serif', 'Noto Serif Thai', 'EB Garamond', Georgia, serif;
  --sans: 'Geist', 'Noto Sans Thai', 'Söhne', -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'Noto Sans Thai', 'IBM Plex Mono', ui-monospace, monospace;

  --step: 8px;
  --gutter: clamp(16px, 3vw, 40px);
  --page-pad: clamp(20px, 4vw, 56px);
  --max: 1440px;

  --fs-hero: clamp(56px, 9vw, 150px);
  --fs-section: clamp(42px, 6vw, 96px);
  --fs-eyebrow: 11px;
  --fs-body: 16px;
  --fs-lede: clamp(18px, 1.4vw, 22px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Text rules */
h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.section-ref,
.meta-dot ~ span,
.svc-tab-num,
.nav-idx,
.hero-meta,
.hero-ref,
.figure-label,
.figure-caption,
.marquee,
.footer-head,
.foot-key,
.cred-label,
.progress-num,
.summary-key,
.form-progress,
.std-code,
.std-sector,
.step-num,
.step-weeks,
.hero-stats dt + dd,
.cite-role {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--fs-eyebrow);
}

/* ==========  Layout shell  ========== */
.site {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.section {
  padding: clamp(80px, 10vw, 160px) 0;
  border-top: 1px solid var(--rule);
  position: relative;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gutter);
  margin-bottom: clamp(40px, 5vw, 72px);
  align-items: end;
}

.section-ref {
  color: var(--ink-3);
  grid-column: 1;
}

.section-title {
  font-family: var(--serif);
  font-size: var(--fs-section);
  line-height: 0.96;
  grid-column: 1 / -1;
  letter-spacing: -0.025em;
}

.section-lede {
  grid-column: 2;
  grid-row: 3;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: var(--fs-lede);
  line-height: 1.45;
}

/* ==========  Nav  ========== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, background 0.2s;
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  border-bottom-color: var(--rule);
  background: color-mix(in oklch, var(--paper) 94%, transparent);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  line-height: 1;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--accent);
  background: var(--paper);
}
.brand-word {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1;
}
.brand-primary {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.brand-sub {
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0; margin: 0;
  font-size: 14px;
}
.nav-links li { display: flex; }
.nav-links a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 14px;
  background: #294666;
  color: var(--paper);
  border-right: 1px solid color-mix(in oklch, var(--paper) 18%, transparent);
  transition: background 0.15s;
  position: relative;
  text-align: left;
  min-width: 96px;
}
.nav-links li:last-child a { border-right: none; }
.nav-links a:hover { background: color-mix(in oklch, #294666 88%, white); color: var(--paper); }
.nav-links a.active { background: color-mix(in oklch, #294666 82%, white); color: var(--paper); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--paper);
}
.nav-idx {
  color: color-mix(in oklch, var(--paper) 70%, transparent);
  font-size: 9px;
}
.nav-links a.active .nav-idx { color: var(--paper); }
.nav-label {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: none;
  color: var(--paper);
}
.nav-blink {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: #ff4d4d;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
  animation: navBlink 1.2s infinite;
}
@keyframes navBlink {
  0%   { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
  70%  { opacity: 0.4; box-shadow: 0 0 0 8px rgba(255, 77, 77, 0); }
  100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-blink { animation: none; }
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: #294666;
  color: var(--paper);
  border-radius: 2px;
  font-size: 14px;
  transition: background 0.15s;
}
.nav-cta:hover { background: oklch(0.38 0.05 255); }
.nav-cta span[aria-hidden] { transition: transform 0.2s; }
.nav-cta:hover span[aria-hidden] { transform: translateX(3px); }

@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ==========  Hero  ========== */
.hero {
  padding: clamp(60px, 8vw, 120px) 0 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto auto auto;
  gap: 24px var(--gutter);
  align-items: start;
}

.hero-meta {
  grid-column: 1;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 8px;
}
.meta-dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 20%, transparent);
}
.hero-ref {
  grid-column: 2;
  justify-self: end;
  color: var(--ink-3);
}

.hero-title {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-size: var(--fs-hero);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-top: clamp(24px, 3vw, 48px);
}
.hero-title .line {
  display: block;
  line-height: 1.05;
  padding: 0.03em 0;
}
.hero-title .line.rotating-wrap { padding: 0; }
.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-feature-settings: "ss01";
}

.rotating-wrap {
  display: block;
  color: var(--ink-3);
  font-size: 0.32em;
  letter-spacing: -0.015em;
  margin-top: clamp(56px, 6vw, 96px);
  font-family: var(--sans);
  font-style: normal;
  line-height: 1.3;
  padding: 0;
}
.rotating {
  display: inline-block;
  position: relative;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  min-width: 8ch;
}
.rotating-word {
  display: inline-block;
  color: var(--ink);
  animation: rotateIn 0.45s cubic-bezier(.3,.9,.3,1) both;
}
@keyframes rotateIn {
  from { opacity: 0; transform: translateY(0.2em); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-lede {
  grid-column: 1 / span 1;
  max-width: 46ch;
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--ink-2);
  margin-top: 32px;
}

.hero-ctas {
  grid-column: 2 / -1;
  grid-row: 4;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 2px;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  font-family: var(--sans);
}
.btn-primary {
  background: #294666;
  color: var(--paper);
}
.btn-primary:hover { background: oklch(0.38 0.05 255); }
.btn-primary .arrow { transition: transform 0.2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-primary.small { padding: 10px 14px; font-size: 13px; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hero-stats dt {
  font-family: var(--serif);
  font-size: clamp(36px, 3.6vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-stats dd {
  margin: 10px 0 0;
  color: var(--ink-3);
}

.hero-figure { grid-column: 1 / -1; margin-top: 40px; }
.figure-frame {
  border: 1px solid var(--rule);
  padding: 20px;
  background: var(--paper-2);
  position: relative;
  color: var(--accent);
}
.figure-label {
  color: var(--ink-3);
  margin-bottom: 12px;
}
.figure-svg {
  width: 100%;
  max-height: 420px;
  display: block;
}
.figure-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Marquee */
.marquee {
  margin-top: clamp(60px, 8vw, 100px);
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  color: var(--ink-3);
}
.marquee-track {
  display: flex;
  gap: 36px;
  width: max-content;
  animation: scroll 45s linear infinite;
}
.marquee-group {
  display: inline-flex;
  gap: 36px;
  align-items: center;
  padding-right: 36px;
}
.marquee em {
  font-style: normal;
  color: var(--accent);
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% / 3)); }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-ref { display: none; }
  .hero-ctas { justify-content: flex-start; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .section-head { grid-template-columns: 1fr; }
  .section-lede { grid-column: 1; grid-row: auto; }
}

/* ==========  Services  ========== */
.services .svc-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}
.svc-tab {
  text-align: left;
  padding: 24px;
  background: #294666;
  border: none;
  border-right: 1px solid color-mix(in oklch, var(--paper) 18%, transparent);
  color: var(--paper);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.svc-tab:last-child { border-right: none; }
.svc-tab:hover { background: color-mix(in oklch, #294666 88%, white); color: var(--paper); }
.svc-tab.active { background: color-mix(in oklch, #294666 82%, white); color: var(--paper); }
.svc-tab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--paper);
}
.svc-tab-num { color: color-mix(in oklch, var(--paper) 70%, transparent); }
.svc-tab.active .svc-tab-num { color: var(--paper); }
.svc-tab-label {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: none;
  color: var(--paper);
}

.svc-panel {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(32px, 5vw, 72px);
  animation: fadeUp 0.4s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.svc-panel-head { }
.svc-panel-meta {
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}
.svc-panel-title {
  font-family: var(--serif);
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.svc-panel-lede {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: var(--fs-lede);
  line-height: 1.45;
  max-width: 36ch;
}

.svc-bullets {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 0;
}
.svc-bullets li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.svc-bullets li:last-child { border-bottom: 1px solid var(--rule); }
.bullet-idx {
  font-family: var(--mono);
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.bullet-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.bullet-desc {
  color: var(--ink-2);
  font-size: 15px;
}

.svc-panel-foot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--gutter);
  align-items: end;
  padding-top: 28px;
  margin-top: 16px;
  border-top: 1px solid var(--ink);
}
.foot-key { color: var(--ink-3); margin-bottom: 6px; }
.foot-val {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}

@media (max-width: 820px) {
  .services .svc-tabs { grid-template-columns: 1fr; }
  .svc-tab { border-right: none; border-bottom: 1px solid var(--rule); }
  .svc-panel { grid-template-columns: 1fr; }
  .svc-panel-foot { grid-template-columns: 1fr; align-items: start; }
}

/* ==========  Standards  ========== */
.std-list { list-style: none; padding: 0; margin: 0; }
.std-row {
  border-top: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.2s;
}
.std-row:last-child { border-bottom: 1px solid var(--rule); }
.std-row:hover { background: var(--paper-2); }
.std-row.open { background: var(--paper-2); }
.std-row-main {
  display: grid;
  grid-template-columns: 220px 140px 1fr 40px;
  gap: 24px;
  align-items: center;
  padding: 28px 8px;
}
.std-code { display: flex; align-items: baseline; gap: 2px; }
.std-code-name {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 44px);
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.std-code-year {
  font-family: var(--mono);
  color: var(--ink-3);
  font-size: 13px;
}
.std-sector { color: var(--ink-3); }
.std-title {
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.std-toggle { justify-self: end; }
.plus {
  position: relative;
  display: inline-block;
  width: 24px; height: 24px;
  border: 1px solid var(--rule);
  border-radius: 50%;
}
.plus span {
  position: absolute;
  background: var(--ink);
  transition: transform 0.3s;
}
.plus span:first-child {
  left: 6px; right: 6px; top: 50%; height: 1px; transform: translateY(-50%);
}
.plus span:last-child {
  top: 6px; bottom: 6px; left: 50%; width: 1px; transform: translateX(-50%);
}
.plus.open span:last-child { transform: translateX(-50%) rotate(90deg); }

.std-row-detail {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(.4,.1,.1,1);
}
.std-detail-inner {
  padding: 0 8px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}
.std-blurb {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.35;
  max-width: 48ch;
  letter-spacing: -0.01em;
}
.std-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.std-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-2);
}

/* Accent bars per standard */
.std-row.accent-a .std-code-name { color: var(--accent); }
.std-row.accent-b .std-code-name { color: var(--ink); }
.std-row.accent-c .std-code-name { color: var(--accent); }
.std-row.accent-d .std-code-name { color: var(--accent-2); }
.std-row.accent-e .std-code-name { color: var(--ink); }

@media (max-width: 820px) {
  .std-row-main { grid-template-columns: 1fr 40px; gap: 10px; padding: 20px 4px; }
  .std-sector, .std-code-year { display: none; }
  .std-detail-inner { grid-template-columns: 1fr; }
  .std-tags { justify-content: flex-start; }
}

/* ==========  Process  ========== */
.process-track {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gutter);
}
.process-step {
  position: relative;
  padding-top: 36px;
  animation: fadeUp 0.5s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i) * 80ms);
}
.step-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.step-num { color: var(--accent); }
.step-weeks { color: var(--ink-3); }
.step-name {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.step-desc {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.step-line {
  position: absolute;
  top: 16px; left: 0; right: calc(-1 * var(--gutter));
  height: 1px;
  display: flex;
  align-items: center;
}
.step-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  transform: translateX(-4px);
}
.step-bar {
  flex: 1;
  height: 1px;
  background: var(--rule);
  margin-left: 0;
}
.process-step:last-child .step-line { right: 0; }

@media (max-width: 820px) {
  .process-track { grid-template-columns: 1fr; gap: 40px; }
  .step-line { display: none; }
}

/* ==========  About  ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 6vw, 96px);
  margin-bottom: clamp(60px, 8vw, 100px);
}
.about-left .section-ref { margin-bottom: 32px; }
.about-lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 28px;
}
.about-body {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.6;
  max-width: 58ch;
}

.about-creds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.cred-label { color: var(--ink-3); margin-bottom: 6px; }
.cred-value {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.testimonial {
  border-top: 1px solid var(--ink);
  padding-top: 40px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}
.quote-mark {
  font-family: var(--serif);
  font-size: 120px;
  line-height: 0.8;
  color: var(--accent);
}
blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.quote-cite { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.cite-name {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: normal;
}
.cite-role { color: var(--ink-3); }

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-creds { grid-template-columns: 1fr; }
  .testimonial { grid-template-columns: 1fr; }
  .quote-mark { font-size: 72px; }
}

/* ==========  Contact  ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 96px);
}
.contact-meta {
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.contact-meta dt {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.contact-meta dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.contact-form {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-progress {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
}
.progress-step {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding-right: 24px;
  color: var(--ink-3);
  transition: color 0.2s;
}
.progress-step.active { color: var(--ink); }
.progress-step.active .progress-num { color: var(--accent); }
.progress-step.done { color: var(--ink-2); }
.progress-step.done .progress-num::after { content: ' ✓'; color: var(--accent); }
.progress-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-step {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.3s cubic-bezier(.2,.8,.2,1) both;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form label > span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-form input,
.contact-form textarea {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  border-radius: 2px;
  resize: vertical;
  transition: border-color 0.15s, background 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}

.pick-label { }
.pick-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pick {
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.pick:hover { border-color: var(--ink-2); }
.pick.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.form-summary {
  margin-top: 8px;
  padding: 16px;
  background: var(--paper);
  border: 1px dashed var(--rule);
}
.summary-key { color: var(--ink-3); margin-bottom: 8px; }
.summary-line {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.8;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.form-sent {
  padding: 40px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  text-align: center;
}
.sent-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: grid; place-items: center;
  font-size: 24px;
  margin: 0 auto 20px;
}
.form-sent h3 {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.form-sent p { color: var(--ink-2); margin-bottom: 20px; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-meta { grid-template-columns: 1fr; }
}

/* ==========  Footer  ========== */
.site-footer {
  border-top: 1px solid var(--rule);
  background: #294666;
  color: var(--paper);
  padding: clamp(60px, 7vw, 100px) var(--page-pad) 40px;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gutter);
  padding-bottom: 60px;
}
.footer-brand .brand-word { margin-bottom: 16px; }
.footer-brand .brand-primary { color: var(--paper); font-size: 26px; }
.footer-brand .brand-sub { color: color-mix(in oklch, var(--paper) 50%, transparent); }
.footer-blurb {
  max-width: 32ch;
  color: color-mix(in oklch, var(--paper) 65%, transparent);
  font-size: 14px;
  line-height: 1.55;
}
.footer-head {
  color: color-mix(in oklch, var(--paper) 50%, transparent);
  margin-bottom: 18px;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
.footer-col a, .footer-col li {
  color: color-mix(in oklch, var(--paper) 85%, transparent);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--paper); }

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid color-mix(in oklch, var(--paper) 18%, transparent);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: color-mix(in oklch, var(--paper) 60%, transparent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-legal { display: flex; gap: 10px; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: left; }
}

/* ==========  Tweaks panel  ========== */
.tweaks-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 100;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 20px;
  min-width: 280px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.25);
  font-family: var(--sans);
  font-size: 13px;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tweak-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tweak-row > span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tweak-options { display: flex; gap: 4px; flex-wrap: wrap; }
.tweak-opt {
  padding: 6px 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
}
.tweak-opt:hover { border-color: var(--ink-2); }
.tweak-opt.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }

/* ==========  Theme variants (controlled by Tweaks)  ========== */
body[data-theme="forest"] {
  --paper: oklch(0.97 0.012 80);
  --paper-2: oklch(0.94 0.015 80);
  --paper-3: oklch(0.90 0.018 80);
  --accent: oklch(0.38 0.06 150);
  --accent-2: oklch(0.55 0.12 45);
}
body[data-theme="navy"] {
  --paper: oklch(0.955 0.004 250);
  --paper-2: oklch(0.925 0.005 250);
  --paper-3: oklch(0.88 0.006 250);
  --ink: oklch(0.24 0.035 255);
  --ink-2: oklch(0.38 0.028 255);
  --ink-3: oklch(0.56 0.015 255);
  --rule: oklch(0.82 0.008 250);
  --rule-soft: oklch(0.88 0.006 250);
  --accent: oklch(0.30 0.045 255);
  --accent-2: oklch(0.50 0.08 40);
}
body[data-theme="rust"] {
  --accent: oklch(0.50 0.13 40);
  --accent-2: oklch(0.38 0.06 150);
}
body[data-theme="amber"] {
  --paper: oklch(0.14 0.01 80);
  --paper-2: oklch(0.18 0.012 80);
  --paper-3: oklch(0.22 0.014 80);
  --ink: oklch(0.96 0.01 80);
  --ink-2: oklch(0.80 0.008 80);
  --ink-3: oklch(0.58 0.006 80);
  --rule: oklch(0.30 0.01 80);
  --rule-soft: oklch(0.26 0.01 80);
  --accent: oklch(0.78 0.15 70);
  --accent-2: oklch(0.65 0.11 25);
}

body[data-type="editorial"] {
  --serif: 'Instrument Serif', 'EB Garamond', Georgia, serif;
}
body[data-type="classical"] {
  --serif: 'EB Garamond', Georgia, serif;
}
body[data-type="modern"] {
  --serif: 'Fraktion Mono', 'Geist', sans-serif;
}

body[data-density="roomy"] {
  --page-pad: clamp(32px, 6vw, 80px);
}
body[data-density="tight"] {
  --page-pad: clamp(12px, 2vw, 28px);
}

/* ==========  News  ========== */
.news .news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
  border-top: 1px solid var(--rule);
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 2.4vw, 36px);
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  min-height: 280px;
}
.news-card:last-child { border-right: none; }

.news-card.is-skeleton {
  background: linear-gradient(
    100deg,
    var(--paper-2) 30%,
    var(--paper-3) 50%,
    var(--paper-2) 70%
  );
  background-size: 220% 100%;
  animation: news-shimmer 1.4s linear infinite;
}
@keyframes news-shimmer {
  from { background-position: 220% 0; }
  to   { background-position: -120% 0; }
}

.news-date {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.news-card-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.news-excerpt {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  flex: 1;
}

.news-readmore {
  align-self: flex-start;
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.18s ease, color 0.15s ease;
}
.news-readmore:hover { gap: 12px; color: var(--ink); }
.news-readmore .arrow { transition: transform 0.18s ease; }
.news-readmore:hover .arrow { transform: translateX(2px); }

/* Modal */
.news-modal {
  position: fixed;
  inset: 0;
  background: color-mix(in oklch, var(--ink) 75%, transparent);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  animation: news-modal-fade 0.18s ease both;
}
@keyframes news-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.news-modal-card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  width: min(720px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid var(--rule);
  box-shadow: 0 30px 80px -20px color-mix(in oklch, var(--ink) 50%, transparent);
  animation: news-modal-rise 0.24s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes news-modal-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.news-modal-toolbar {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.news-modal-tool {
  background: var(--paper);
  border: 1px solid var(--rule);
  width: 36px;
  height: 36px;
  border-radius: 0;
  font-family: var(--sans, inherit);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.news-modal-tool:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.news-modal-tool:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.news-modal-tool.news-modal-close { font-size: 22px; }

.news-modal-card.is-maxed {
  width: 100%;
  max-width: none;
  max-height: 95vh;
  height: 95vh;
}

.news-modal-meta {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  padding-right: 180px;
}

.news-modal-title {
  font-family: var(--serif);
  font-size: calc(clamp(28px, 3.4vw, 44px) * var(--news-zoom, 1));
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
}

.news-modal-excerpt {
  font-family: var(--serif);
  font-size: calc(clamp(17px, 1.5vw, 19px) * var(--news-zoom, 1));
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  font-style: italic;
  letter-spacing: -0.005em;
}

.news-modal-body {
  font-size: calc(16px * var(--news-zoom, 1));
  line-height: 1.65;
  color: var(--ink-2);
}
.news-modal-body p { margin: 0 0 1em; }
.news-modal-body p:last-child { margin-bottom: 0; }
.news-modal-body h2,
.news-modal-body h3,
.news-modal-body h4 {
  font-family: var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 1.4em 0 0.4em;
  line-height: 1.2;
}
.news-modal-body h2 { font-size: 1.4em; }
.news-modal-body h3 { font-size: 1.2em; }
.news-modal-body ul,
.news-modal-body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.news-modal-body li { margin: 0.3em 0; }
.news-modal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.news-modal-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em 0;
}
.news-modal-body blockquote {
  margin: 1em 0;
  padding: 0.4em 1em;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1em;
}
.news-modal-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 0.1em 0.4em;
}
.news-modal-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: 0.92em;
}
.news-modal-body th,
.news-modal-body td {
  border: 1px solid var(--rule);
  padding: 8px 12px;
  vertical-align: top;
  text-align: left;
  color: var(--ink);
}
.news-modal-body th {
  background: var(--paper-2);
  font-weight: 600;
  font-family: inherit;
}
.news-modal-body table p { margin: 0 0 0.4em; }
.news-modal-body table p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .news .news-grid { grid-template-columns: 1fr; }
  .news-card {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
}

