/* Dougie's Office — design tokens & base styles */

:root {
  /* Earthy palette — default "Brook Street" */
  --cream: #F4EDE0;
  --cream-deep: #EBE2D0;
  --paper: #FBF7EE;
  --ink: #231F1A;
  --ink-soft: #4A4239;
  --ink-mute: #7A7165;
  --rule: #D8CDB8;
  --terracotta: #B85A3F;
  --terracotta-deep: #9C4A33;
  --sage: #7E8E6D;
  --sage-deep: #5F6E50;

  --font-display: "Newsreader", "Source Serif Pro", Georgia, serif;
  --font-body: "Geist", "Inter", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --max-w: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  font-size: 16px;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Top bar ---------- */
.announce {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 0;
  text-align: center;
}
.announce .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--terracotta);
  border-radius: 50%;
  margin: 0 12px;
  vertical-align: middle;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--cream) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
}
.nav-links a {
  color: var(--ink-soft);
  transition: color 120ms;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 120ms, background 160ms, color 160ms, border 160ms;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: var(--terracotta); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-terracotta {
  background: var(--terracotta);
  color: var(--cream);
}
.btn-terracotta:hover { background: var(--terracotta-deep); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Eyebrows ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: currentColor;
}

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; }
}
.section-title {
  font-size: clamp(40px, 5.4vw, 68px);
  font-style: italic;
  font-weight: 400;
}
.section-lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 0 32px;
}
.footer a { color: var(--cream); opacity: 0.78; }
.footer a:hover { opacity: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .footer-grid > div:first-child { grid-column: span 2; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: color-mix(in oklab, var(--cream) 60%, transparent);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14.5px; }
.footer-bottom {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in oklab, var(--cream) 18%, transparent);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--cream) 55%, transparent);
}
@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ---------- Nav mobile ---------- */
@media (max-width: 640px) {
  .nav-inner { padding: 14px var(--gutter); gap: 16px; }
  .nav-inner > .btn { display: none; }
}

/* ---------- Hairlines & utilities ---------- */
.rule { height: 1px; background: var(--rule); width: 100%; }

.placeholder {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in oklab, var(--ink) 6%, transparent) 14px 15px),
    var(--cream-deep);
  display: grid;
  place-items: center;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 6px;
}

/* ---------- Theme variants (Tweak palettes) ---------- */
body.theme-brook {
  --cream: #F4EDE0; --cream-deep: #EBE2D0; --paper: #FBF7EE;
  --ink: #231F1A; --ink-soft: #4A4239; --ink-mute: #7A7165;
  --rule: #D8CDB8; --terracotta: #B85A3F; --terracotta-deep: #9C4A33;
  --sage: #7E8E6D; --sage-deep: #5F6E50;
}
body.theme-meadow {
  --cream: #EFEDE3; --cream-deep: #E2DFD0; --paper: #F7F5EC;
  --ink: #1F2A20; --ink-soft: #3D4A3D; --ink-mute: #6E7A6C;
  --rule: #CDD3C0; --terracotta: #C77A4F; --terracotta-deep: #A85F37;
  --sage: #6B7F5A; --sage-deep: #485B3B;
}
body.theme-clay {
  --cream: #F5E8DA; --cream-deep: #ECDAC5; --paper: #FBF1E4;
  --ink: #2A1D14; --ink-soft: #523D2E; --ink-mute: #816A56;
  --rule: #DCC6AE; --terracotta: #A14A2E; --terracotta-deep: #823620;
  --sage: #8C8762; --sage-deep: #6B6648;
}
body.theme-fog {
  --cream: #ECE9E2; --cream-deep: #DEDAD0; --paper: #F4F1EA;
  --ink: #1C1F22; --ink-soft: #3D434A; --ink-mute: #6E747B;
  --rule: #CDCFC9; --terracotta: #9F5D49; --terracotta-deep: #834733;
  --sage: #7E8A82; --sage-deep: #5C6862;
}

/* ---------- Font pairings ---------- */
body.font-newsreader {
  --font-display: "Newsreader", "Source Serif Pro", Georgia, serif;
  --font-body: "Geist", "Inter", system-ui, sans-serif;
}
body.font-fraunces-alt {
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}
body.font-cooper {
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}
body.font-mono-mix {
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14.5px;
}
