/* ----------------------------------------------------------------
   PDM Advisory — minimal Swiss
   ---------------------------------------------------------------- */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Single accent — taken from the icon. Swap here to recolor the site. */
  --accent: oklch(0.66 0.10 250);

  /* Paper theme (the one we ship). */
  --bg:        oklch(0.965 0.01 80);
  --bg-soft:   oklch(0.94 0.012 80);
  --fg:        oklch(0.2 0.015 60);
  --fg-muted:  oklch(0.45 0.01 60);
  --fg-faint:  oklch(0.65 0.01 60);
  --line:      oklch(0.2 0.015 60 / 0.18);
  --line-soft: oklch(0.2 0.015 60 / 0.08);

  --rule: 1px;
  --container: 1140px;
  --gutter: clamp(20px, 3.5vw, 56px);
  /* Column gap for 12-col grids — must shrink on narrow viewports or
     11 × 32px of fixed gap budget overflows the available width. */
  --col-gap: clamp(8px, 2.4vw, 32px);
  --topbar-h: 68px;
}

@media (max-width: 560px) {
  :root { --gutter: 20px; --topbar-h: 60px; }
}

/* -------- base -------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* tabular figures everywhere keep numbers visually aligned */
  font-variant-numeric: tabular-nums;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--bg); }

/* Scrollbar — match the paper palette, tint to accent on hover. */
html {
  scrollbar-width: thin;
  scrollbar-color: oklch(0.2 0.015 60 / 0.32) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: oklch(0.2 0.015 60 / 0.28);
  border: 2px solid var(--bg);
  background-clip: padding-box;
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  border: 2px solid var(--bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* Anchored sections sit under the sticky topbar — give them headroom. */
:target,
section[id] { scroll-margin-top: calc(var(--topbar-h) + 24px); }

/* Visible, consistent focus ring for keyboard users. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--col-gap);
  row-gap: 0;
}

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Skip-to-content for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 200;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 16px;
  top: 16px;
  outline: none;
}

/* Subtle grain overlay — warms the flat paper background. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* -------- top bar -------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: var(--rule) solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h);
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap;
  font-size: 15px;
}
.topbar__cta { white-space: nowrap; }
.brand__mark {
  width: 28px; height: 28px; display: grid; place-items: center;
  overflow: hidden;
}
.brand__mark img { width: 22px; height: 22px; object-fit: contain; }
.brand__name { font-size: 15px; }
.brand__slash { color: var(--fg-faint); margin: 0 2px; }
.brand__person { color: var(--fg-muted); font-weight: 400; }

.topbar nav { display: flex; gap: 28px; }
.topbar nav a {
  font-size: 14px; color: var(--fg-muted);
  padding: 4px 0;
  border-bottom: var(--rule) solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.topbar nav a:hover { color: var(--fg); border-bottom-color: var(--accent); }
.topbar nav a[aria-current="true"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.topbar__cta {
  font-size: 14px;
  padding: 8px 14px;
  border: var(--rule) solid var(--fg);
  color: var(--fg);
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.topbar__cta:hover { background: var(--fg); color: var(--bg); }
.topbar__cta:active { transform: translateY(1px); }

@media (max-width: 800px) {
  .topbar nav { display: none; }
}
/* When the row gets too tight for "PDM Advisory / Dan Paull" + CTA,
   stack the brand text vertically inside the brand block (name above
   person, slash hidden) instead of dropping the CTA to a second row. */
@media (max-width: 460px) {
  .brand__text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
  }
  .brand__slash { display: none; }
  .topbar__cta { padding: 7px 10px; font-size: 13px; }
}

/* ==================== HERO ==================== */
.hero {
  padding: clamp(24px, 9vw, 56px) var(--gutter) clamp(56px, 8vw, 56px);
  border-bottom: var(--rule) solid var(--line);
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero > * { max-width: 100%; }
.hero__label {
  display: flex; gap: 16px; align-items: center;
  margin-bottom: clamp(16px, 5vw, 32px);
}
.hero__label .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}

.hero--statement h1 {
  grid-column: 1 / span 12;
  font-size: clamp(44px, 7.2vw, 80px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 clamp(40px, 5vw, 72px);
  text-wrap: balance;
}
.hero--statement h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero--statement .hero__meta {
  grid-column: 1 / span 4;
}
.hero__meta-label { margin-bottom: 8px; }
.hero__meta-name  { font-size: 18px; font-weight: 500; }
.hero__meta-loc   { margin-top: 16px; color: var(--fg-faint); }

.hero--statement .hero__intro {
  grid-column: 6 / span 7;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--fg);
  max-width: 54ch;
  text-wrap: pretty;
}
.hero--statement .hero__intro p + p { margin-top: 1em; }

@media (max-width: 900px) {
  .hero--statement .hero__meta,
  .hero--statement .hero__intro { grid-column: 1 / -1; }
  .hero--statement .hero__meta { margin-bottom: 28px; }
}

/* ==================== SECTION SHELL ==================== */
.section {
  padding: clamp(56px, 9vw, 128px) 0 clamp(64px, 10vw, 144px);
  border-bottom: var(--rule) solid var(--line);
}
.section__head {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section__num { grid-column: 1 / span 3; }
.section__title {
  grid-column: 4 / span 9;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
  max-width: 22ch;
}
.section__title em { font-style: normal; color: var(--accent); }

@media (max-width: 800px) {
  .section__num { grid-column: 1 / -1; margin-bottom: 16px; }
  .section__title { grid-column: 1 / -1; }
}

/* ==================== SERVICES (stacked editorial rows) ==================== */
.services--stacked .svc {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap);
  padding: 48px 0;
  border-top: var(--rule) solid var(--line);
}
/* head (num + title stacked) on the left, body on the right.
   Single grid row keeps title visually anchored just below num. */
.services--stacked .svc__head { grid-column: 1 / span 5; }
.services--stacked .svc__body { grid-column: 6 / span 6; }

.services--stacked .svc__num .n {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.services--stacked .svc__title { margin-top: 14px; }
.services--stacked .svc__title h3 {
  font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1;
  letter-spacing: -0.02em; font-weight: 500; margin: 0; text-wrap: balance;
}
.services--stacked .svc__body p {
  margin: 0 0 14px; font-size: 16px; line-height: 1.55; color: var(--fg);
}
.services--stacked .svc__body p.muted { color: var(--fg-muted); font-size: 14px; }

/* Tabular hairline list — replaces the bordered tag pills */
.services--stacked .svc__points {
  list-style: none; padding: 0;
  margin: 22px 0 0;
  border-top: var(--rule) solid var(--line-soft);
}
.services--stacked .svc__points li {
  display: flex; gap: 14px;
  padding: 10px 0;
  border-bottom: var(--rule) solid var(--line-soft);
  font-size: 14px; color: var(--fg); line-height: 1.4;
}
.services--stacked .svc__points li .k {
  font-family: var(--f-mono); color: var(--fg-faint);
  font-size: 11px; width: 22px; flex-shrink: 0;
}

@media (max-width: 900px) {
  .services--stacked .svc__head,
  .services--stacked .svc__body { grid-column: 1 / -1; }
  .services--stacked .svc__head { margin-bottom: 16px; }
  .services--stacked .svc__title { margin-top: 6px; }
}

/* ==================== PRINCIPLES ==================== */
/* Same structural rhythm as Services: head (kicker + title) on the left,
   body (description + hairline points list) on the right. */
.principles__list {
  border-top: var(--rule) solid var(--line);
}
.principles__item {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--col-gap);
  padding: 48px 0;
  border-bottom: var(--rule) solid var(--line);
}
.principles__item:last-child { border-bottom: 0; }

.principles__head { grid-column: 1 / span 5; }
.principles__body { grid-column: 6 / span 6; }

.principles__item .n {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.principles__head h3 {
  margin: 14px 0 0;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
.principles__body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  text-wrap: pretty;
}
.principles__points {
  list-style: none; padding: 0;
  margin: 22px 0 0;
  border-top: var(--rule) solid var(--line-soft);
}
.principles__points li {
  display: flex; gap: 14px;
  padding: 10px 0;
  border-bottom: var(--rule) solid var(--line-soft);
  font-size: 14px; color: var(--fg); line-height: 1.4;
}
.principles__points li .k {
  font-family: var(--f-mono); color: var(--fg-faint);
  font-size: 11px; width: 22px; flex-shrink: 0;
}

@media (max-width: 900px) {
  .principles__head,
  .principles__body { grid-column: 1 / -1; }
  .principles__head { margin-bottom: 16px; }
  .principles__head h3 { margin-top: 6px; }
}

/* ==================== CONTACT ==================== */
/* The .section class handles padding + border-bottom. */
.contact__grid {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap);
}
.contact__email { grid-column: 1 / span 6; }
.contact__email a {
  font-family: var(--f-sans);
  font-size: clamp(22px, 3.2vw, 40px);
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  display: inline-block;
  word-break: break-word;
  max-width: 100%;
}
.contact__note {
  margin: 22px 0 0;
  color: var(--fg-muted);
  max-width: 50ch;
  line-height: 1.55;
  font-size: 15px;
}
.contact__meta {
  grid-column: 8 / span 5;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px;
  align-self: end;
}
.contact__meta .cell .k {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.contact__meta .cell .v { font-size: 15px; color: var(--fg); }
@media (max-width: 900px) {
  .contact__email, .contact__meta { grid-column: 1 / -1; }
  .contact__meta { margin-top: 32px; }
}

/* ==================== FOOTER ==================== */
.foot {
  border-top: var(--rule) solid var(--line);
}
.foot__inner {
  padding: 32px var(--gutter);
  font-family: var(--f-mono); font-size: 11px; color: var(--fg-muted);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  text-transform: uppercase; letter-spacing: 0.04em;
  max-width: var(--container);
  margin: 0 auto;
}
.foot a:hover { color: var(--accent); }
.foot__legal { display: grid; gap: 4px; }
@media (max-width: 560px) {
  .foot__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
