/* LA/DP site shell — tokens, type, nav, footer.
   Shared by all pages. Tweaks rewrite CSS variables on :root. */

:root {
  /* Palette from brand book */
  --bone: #f4f1ea;
  --bone-2: #ebe6da;
  --bone-3: #dcd4c2;
  --ink: #141210;
  --ink-2: #1e1a15;
  --ink-soft: #5a5248;
  --meta: #8a8074;
  --rule: rgba(20,18,16,0.12);
  --rule-strong: rgba(20,18,16,0.22);
  --accent: #c2572b;     /* rust (default) */
  --accent-soft: #9c3f1c;
  --loam: #2b241c;
  --clay: #c89a70;

  /* Type */
  --f-display: 'Archivo', system-ui, sans-serif;
  --f-edit: 'Fraunces', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Surfaces */
  --bg: var(--bone);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --card: var(--bone-2);
}

:root[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--bone);
  --fg-soft: rgba(244,241,234,0.72);
  --card: var(--ink-2);
  --meta: rgba(244,241,234,0.55);
  --rule: rgba(244,241,234,0.16);
  --rule-strong: rgba(244,241,234,0.28);
}
:root[data-accent="clay"] { --accent: #c89a70; --accent-soft: #a87a50; }
:root[data-accent="forest"] { --accent: #3f5a3a; --accent-soft: #2b4028; }

:root[data-type="serif"] {
  --f-display: 'Fraunces', Georgia, serif;
}
:root[data-type="grotesque"] {
  --f-display: 'Inter', system-ui, sans-serif;
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Layout */
.container { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
.container-wide { max-width: 1600px; margin: 0 auto; padding: 0 48px; }
.container-tight { max-width: 1040px; margin: 0 auto; padding: 0 48px; }

/* Type */
.meta { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--meta); }
.meta-accent { color: var(--accent); }
.edit { font-family: var(--f-edit); font-weight: 300; letter-spacing: -0.025em; }
.edit i, .italic { font-style: italic; }
.wm { font-family: 'Archivo', sans-serif; font-weight: 600; letter-spacing: -0.055em; line-height: 0.92; }
.dot { color: var(--accent); }
.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; }
.h1 { font-size: clamp(56px, 7vw, 120px); }
.h2 { font-size: clamp(40px, 4.4vw, 72px); }
.h3 { font-size: clamp(28px, 2.6vw, 44px); }
.body-lg { font-size: 18px; line-height: 1.6; color: var(--fg-soft); }
.body-md { font-size: 15px; line-height: 1.6; color: var(--fg-soft); }

/* Rules */
.hr { height: 1px; background: var(--rule); border: 0; margin: 0; }
.hr-strong { height: 1px; background: var(--rule-strong); border: 0; margin: 0; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 18px 48px; }
.nav-wm { font-family: 'Archivo', sans-serif; font-weight: 600; letter-spacing: -0.055em; font-size: 24px; line-height: 1; }
.nav-links { display: flex; gap: 32px; }
.nav-link { font-family: var(--f-display); font-size: 14px; font-weight: 500; letter-spacing: -0.005em; color: var(--fg); opacity: 0.8; transition: opacity .2s, color .2s; position: relative; }
.nav-link:hover { opacity: 1; }
.nav-link[aria-current="page"] { opacity: 1; }
.nav-link[aria-current="page"]::before { content: ''; position: absolute; left: -10px; top: 50%; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; transform: translateY(-50%); }
.nav-cta { font-family: var(--f-display); font-size: 14px; font-weight: 500; color: var(--fg); display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--fg); border-radius: 999px; transition: background .2s, color .2s; }
.nav-cta:hover { background: var(--fg); color: var(--bg); }

/* Buttons */
.btn { font-family: var(--f-display); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--fg); color: var(--fg); background: transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--bone); }
.btn-accent:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--bone); }
.btn-ghost { border-color: var(--rule-strong); }
.arrow { display: inline-block; transition: transform .25s; }
a:hover .arrow, .btn:hover .arrow { transform: translate(3px, -3px); }

/* Footer */
.footer { background: var(--ink); color: var(--bone); padding: 80px 0 40px; margin-top: 120px; }
.footer .meta { color: rgba(244,241,234,0.5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(244,241,234,0.1); }
.footer-head { font-family: var(--f-edit); font-style: italic; font-weight: 300; font-size: 46px; line-height: 1; letter-spacing: -0.025em; color: var(--bone); }
.footer-col-title { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244,241,234,0.5); margin-bottom: 16px; }
.footer-link { display: block; font-size: 14px; color: rgba(244,241,234,0.85); padding: 5px 0; transition: color .2s; }
.footer-link:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244,241,234,0.5); }

/* Placeholder imagery (striped SVG stand-ins) */
.placeholder {
  background-color: var(--card);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in oklab, var(--fg) 6%, transparent) 14px 15px);
  position: relative;
  overflow: hidden;
}
.placeholder-label {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--meta);
  background: var(--bg); padding: 4px 8px; border-radius: 2px;
}

/* Section header pattern */
.section { padding: 120px 0; }
.section-head { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: baseline; margin-bottom: 56px; }
.section-head .meta { padding-top: 6px; }

/* Tweaks panel */
#tweaks-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  width: 300px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--rule-strong); border-radius: 8px;
  font-family: var(--f-display); font-size: 13px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  display: none;
}
#tweaks-panel.open { display: block; }
.tweaks-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.tweaks-title { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--meta); }
.tweaks-close { background: none; border: 0; color: var(--fg); cursor: pointer; font-size: 18px; line-height: 1; opacity: 0.6; }
.tweaks-close:hover { opacity: 1; }
.tweaks-body { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.tweak-row .tweak-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--meta); margin-bottom: 8px; }
.tweak-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-btn { padding: 7px 11px; font-size: 12px; border: 1px solid var(--rule-strong); background: transparent; color: var(--fg); border-radius: 4px; cursor: pointer; font-family: var(--f-display); transition: all .15s; }
.tweak-btn:hover { border-color: var(--fg); }
.tweak-btn.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tweak-swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rule-strong); cursor: pointer; padding: 0; }
.tweak-swatch.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--fg); }

/* Reveal on scroll — subtle */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Utility */
.row { display: flex; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.center { align-items: center; }
.baseline { align-items: baseline; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; } .mt-80 { margin-top: 80px; }

/* ═══ MOBILE NAV ══════════��═══════════════════════ */

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
  color: var(--fg);
}
.nav-toggle svg { display: block; }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-overlay-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: 0;
  color: var(--bone);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 10px;
}
.nav-overlay-link {
  font-family: var(--f-edit);
  font-weight: 300;
  font-size: 36px;
  color: var(--bone);
  letter-spacing: -0.025em;
  line-height: 1.5;
  padding: 6px 0;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.nav-overlay-link:hover,
.nav-overlay-link[aria-current="page"] { color: var(--accent); }
.nav-overlay-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(244,241,234,0.35);
  text-transform: uppercase;
  margin-top: 32px;
}

/* ═══ RESPONSIVE · 768px ═════════════════════════ */

@media (max-width: 768px) {
  .container, .container-wide, .container-tight { padding: 0 24px; }

  .nav-inner { padding: 14px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 40px; }

  .footer { padding: 60px 0 32px; margin-top: 80px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-head { font-size: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
  .footer-link { padding: 8px 0; min-height: 44px; display: flex; align-items: center; }

  .btn { padding: 16px 22px; min-height: 44px; }

  #tweaks-panel { right: 12px; bottom: 12px; width: calc(100vw - 24px); max-width: 300px; }
}

/* ═══ RESPONSIVE · 480px ═════��═══════════════════ */

@media (max-width: 480px) {
  .container, .container-wide, .container-tight { padding: 0 20px; }
  .nav-inner { padding: 14px 20px; }

  .section { padding: 60px 0; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-head { font-size: 28px; }

  .body-lg { font-size: 16px; }
}
