/* Shared design tokens + base styles for all WUDOG pages */
:root {
  /* palette */
  --bg: #F4EFE6;
  --bg-alt: #EAE3D4;
  --bg-card: #FBF8F1;
  --ink: #1F1B16;
  --ink-2: #3C362D;
  --ink-3: #6B6557;
  --line: #D8D0BE;
  --line-soft: #E5DECC;

  --accent: #2F4A3A;
  --accent-ink: #F4EFE6;
  --accent-hover: #253b2e;
  --accent-soft: #E3E8DE;
  --accent-soft-2: #D5DEC9;

  --danger: #8A3A24;
  --danger-soft: #F0DFD5;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --fs-hero: clamp(44px, 6vw, 76px);
  --fs-h2:   clamp(34px, 3.6vw, 52px);
  --fs-h3:   clamp(22px, 1.6vw, 26px);
  --fs-lead: clamp(18px, 1.4vw, 22px);
  --fs-body: 17px;
  --fs-sm:   14px;
  --fs-xs:   12px;

  --measure: 65ch;
  --pad-x: clamp(24px, 5vw, 96px);
  --pad-y: clamp(80px, 9vw, 140px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02";
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.05;
  text-wrap: balance;
  font-variation-settings: "opsz" 48;
}
h1 { font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.measure { max-width: var(--measure); }

.page { max-width: 1440px; margin: 0 auto; }
section { padding: var(--pad-y) var(--pad-x); position: relative; }

/* ===== top bar ===== */
.topbar {
  padding: 10px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(1.2);
}
.brand {
  display: inline-flex; align-items: center;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-logo {
  display: block;
  height: 64px;
  width: auto;
  vertical-align: middle;
}
.topbar-nav { display: flex; align-items: center; gap: 28px; }
.topbar-nav a {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.005em;
  font-weight: 500;
  transition: color .15s ease;
}
.topbar-nav a:hover, .topbar-nav a.active { color: var(--accent); }
.phone {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  line-height: 1.15;
  flex-shrink: 0;
}
.phone-num { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.phone .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
.phone-cta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .topbar { padding: 9px var(--pad-x); }
  .topbar-nav { display: none; }
  .brand-logo { height: 56px; }
}

/* Tighten header for very narrow viewports (~320px) so logo + phone stay on one row */
@media (max-width: 400px) {
  .topbar { padding-left: 16px; padding-right: 16px; gap: 12px; }
}

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 20px 28px;
  border-radius: 2px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.005em;
  min-height: 56px;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
  border: 1px solid var(--accent);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.cta-microcopy {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

/* ===== shared section bits ===== */
.eyebrow-block { display: block; margin-bottom: 14px; }
.divider-label {
  position: absolute;
  top: 24px; right: var(--pad-x);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); font-family: var(--serif); font-weight: 400; font-style: italic; font-variation-settings: "opsz" 18; }

/* ===== footer ===== */
footer {
  padding: 48px var(--pad-x);
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; align-items: flex-start;
  font-size: 13.5px;
  color: var(--ink-3);
}
footer .col { display: flex; flex-direction: column; gap: 6px; max-width: 40ch; }
footer .col strong { color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 15px; }
footer a { color: var(--ink-3); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ===== category picker (homepage) ===== */
.category-picker {
  padding: clamp(40px, 5vw, 80px) var(--pad-x);
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.category-picker-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.category-picker-head h2 {
  font-size: clamp(24px, 2.2vw, 32px);
  max-width: 24ch;
  font-weight: 500;
}
.category-picker-head .hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}
.category-card {
  padding: 36px;
  display: flex; flex-direction: column; gap: 16px;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-card);
  border-right: 1px solid var(--line);
  transition: background .15s ease;
  position: relative;
  min-height: 220px;
  cursor: pointer;
}
.category-card:last-child { border-right: 0; }
.category-card:hover { background: var(--accent); color: var(--accent-ink); }
.category-card:hover .cat-arrow { transform: translateX(6px); color: var(--accent-ink); }
.category-card:hover .cat-eyebrow, .category-card:hover .cat-sub { color: rgba(244,239,230,0.75); }
.cat-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  transition: color .15s ease;
}
.cat-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.cat-title em { font-style: italic; }
.cat-sub {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-top: 2px;
  transition: color .15s ease;
}
.cat-arrow {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent);
  transition: transform .2s ease, color .15s ease;
}
.category-card--wide {
  margin-top: -1px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 44px 48px;
  border: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 0;
}
.category-card--wide .cat-wide-text {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 72ch;
}
.category-card--wide .cat-sub { font-size: 16px; line-height: 1.55; max-width: 68ch; }
.category-card--wide .cat-wide-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  transition: color .15s ease;
}
.category-card--wide .cat-wide-cta .cat-arrow { margin-top: 0; font-size: 18px; }
.category-card--wide:hover .cat-wide-cta { color: var(--accent-ink); }

@media (max-width: 900px) {
  .category-grid { grid-template-columns: 1fr; }
  .category-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .category-card:last-child { border-bottom: 0; }
  .category-card--wide {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px;
  }
  .category-card--wide .cat-wide-cta { justify-content: flex-start; }
}
.cta-secondary {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-top: 6px;
}
.cta-secondary a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  font-weight: 500;
}
.cta-secondary a:hover { color: var(--accent); }
