/* ============================================================
   daudgrewal.com — shared design system
   "Editorial founder dossier": warm paper, Fraunces display +
   Inter body, single Tripshepherd teal accent. Self-hosted fonts.
   ============================================================ */

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-display.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  font-optical-sizing: auto;
}
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
/* Metric-matched fallback so the Inter swap produces ~no layout shift */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.20%; descent-override: 22.48%; line-gap-override: 0.00%; size-adjust: 107.40%;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --paper: #fbfaf7;
  --ink: #16130e;
  --muted: #5c5346;
  --accent: #0e7490;          /* links, rule, numerals, primary CTA fill — AA on paper */
  --accent-soft: rgba(14,116,144,.08);
  --line: #e7e2d8;
  --cta-bg: #0e7490; --cta-fg: #ffffff;
  --sel-bg: #0e7490; --sel-fg: #ffffff;
  --nav-bg: rgba(251,250,247,.82);

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --step-0: 1.05rem;
  --step-1: 1.2rem;
  --step-2: 1.55rem;
  --step-3: clamp(1.9rem, 4vw, 2.55rem);
  --display: clamp(2.9rem, 8vw, 4.7rem);

  --wrap: 720px;
  --section: clamp(3.5rem, 8vw, 5.5rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14120e;
    --ink: #ece7dd;
    --muted: #a39a8b;
    --accent: #22d3ee;        /* contrast-safe cyan on warm near-black */
    --accent-soft: rgba(34,211,238,.10);
    --line: #2a2620;
    --cta-bg: #0e7490; --cta-fg: #ffffff;
    --sel-bg: #22d3ee; --sel-fg: #14120e;
    --nav-bg: rgba(20,18,14,.78);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-feature-settings: 'cv11', 'ss01';
  color: var(--ink);
  background: var(--paper);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--sel-bg); color: var(--sel-fg); }
::-moz-selection { background: var(--sel-bg); color: var(--sel-fg); }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
    transition: color .15s cubic-bezier(.2,0,0,1), text-decoration-thickness .15s cubic-bezier(.2,0,0,1); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.4rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Sticky masthead nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px -24px rgba(0,0,0,.5); }
.nav-inner {
  max-width: var(--wrap); margin-inline: auto; padding: 0.85rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-name { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 1.15rem; flex-wrap: wrap; }
.nav-links a { font-family: var(--sans); font-size: 0.92rem; font-weight: 600; color: var(--ink); text-decoration: none; opacity: .82; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); opacity: 1; }
@media (max-width: 460px) { .nav-name { font-size: 1rem; } .nav-links { gap: .85rem; } .nav-links a { font-size: .86rem; } }

/* ---------- Sections ---------- */
main { display: block; }
section { padding-block: var(--section); border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
section > .wrap > h2 { font-size: var(--step-3); margin-bottom: 1.35rem; }
p { margin-bottom: 1rem; } p:last-child { margin-bottom: 0; }
.lead { font-size: var(--step-1); color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4rem); border-bottom: 1px solid var(--line); }
.portrait {
  position: relative; width: 184px; height: 184px; border-radius: 22px; overflow: hidden;
  margin-bottom: 1.75rem; background: var(--cta-bg);
  box-shadow: 0 30px 60px -34px rgba(14,116,144,.55);
}
.portrait::before {
  content: "DG"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); color: #fff; font-weight: 600; font-size: 3.4rem; letter-spacing: -1px;
}
.portrait img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait.img-missing img { display: none; }

.hero h1 { font-size: var(--display); margin: 0.4rem 0 0; }
.hero .rule { border: 0; height: 2px; width: 54px; background: var(--accent); margin: 1.25rem 0; }
.hero .positioning { font-size: var(--step-1); color: var(--ink); max-width: 36ch; }
.hero .positioning .sub { color: var(--muted); }
.avail { font-size: 0.88rem; color: var(--muted); margin-top: 1rem; }
.avail strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.7rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem; text-decoration: none;
  padding: 0.74rem 1.3rem; border-radius: 10px; border: 1px solid transparent;
  transition: transform .15s cubic-bezier(.2,0,0,1), opacity .15s, background .15s, border-color .15s;
}
.btn .arrow { transition: transform .15s cubic-bezier(.2,0,0,1); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--cta-bg); color: var(--cta-fg); }
.btn-primary:hover { transform: translateY(-1px); opacity: .94; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); text-decoration: none; }

.profiles { display: flex; gap: 1.2rem; margin-top: 1.7rem; flex-wrap: wrap; }
.profiles a { font-family: var(--sans); font-weight: 600; font-size: 0.93rem; text-decoration: none; color: var(--accent); }
.profiles a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Credibility band ---------- */
.proof { background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.25rem; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat .num { font-family: var(--serif); font-weight: 600; font-size: var(--step-2); color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .lbl { display: block; margin-top: 0.45rem; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.02em; }
.proof .context { margin-top: 1.4rem; font-size: 0.84rem; color: var(--muted); }
.featured { margin-top: 1.6rem; display: flex; align-items: baseline; gap: 0.9rem 1.4rem; flex-wrap: wrap; }
.featured .label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.featured a { font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--ink); opacity: .85; }
.featured a:hover { color: var(--accent); opacity: 1; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding-left: 0; }
.timeline li { padding: 0.95rem 0 0.95rem 1.5rem; border-left: 2px solid var(--accent); margin-bottom: 0.5rem; }
.timeline li:last-child { margin-bottom: 0; }
.timeline .year { display: block; font-family: var(--sans); font-weight: 800; color: var(--accent); font-size: 0.9rem; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; margin-bottom: 0.15rem; }

/* ---------- Generic text-link with arrow ---------- */
.text-link { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 600; text-decoration: none; margin-top: 0.4rem; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link .arrow { transition: transform .15s cubic-bezier(.2,0,0,1); }
.text-link:hover .arrow { transform: translateX(3px); }

/* ---------- Topic cards (speaking) ---------- */
.topics { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 660px) { .topics { grid-template-columns: 1fr 1fr; } }
.topic { border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.35rem; background: var(--paper); transition: border-color .15s, transform .15s; }
.topic:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic h3 { font-size: 1.22rem; margin-bottom: 0.5rem; }
.topic .aud { display: block; margin-top: 0.7rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Banner image ---------- */
.banner { width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 1.4rem; }
.banner img { width: 100%; height: auto; display: block; }
.caption { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }

/* ---------- FAQ ---------- */
.faq-item { padding: 1.2rem 0; border-top: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 0; padding-top: 0; }
.faq-item h3 { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; letter-spacing: 0; margin-bottom: 0.4rem; color: var(--ink); }
.faq-item p { color: var(--muted); margin-bottom: 0; }

/* ---------- Press cards ---------- */
.press-item { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.press-item:first-of-type { border-top: 0; padding-top: 0; }
.press-head { font-size: 0.88rem; margin-bottom: 0.25rem; }
.press-head .outlet { font-weight: 700; color: var(--ink); }
.press-head .meta { color: var(--muted); }
.press-item .title-link { font-weight: 600; text-decoration: none; }
.press-item .title-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.press-item .arrow { display: inline-block; transition: transform .15s cubic-bezier(.2,0,0,1); }
.press-item .title-link:hover .arrow { transform: translateX(3px); }
.press-item .nolink { font-weight: 600; color: var(--ink); }

/* ---------- Press / media-kit specifics ---------- */
.contact-card { border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.5rem; background: var(--accent-soft); }
.contact-card .label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact-card .email { font-family: var(--serif); font-size: var(--step-1); }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; padding: 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.97rem; }
.facts th { font-family: var(--sans); font-weight: 600; color: var(--muted); width: 38%; font-size: 0.85rem; letter-spacing: 0.02em; }
.bio-block { border: 1px solid var(--line); border-radius: 12px; padding: 1.15rem 1.25rem; margin-bottom: 1rem; position: relative; }
.bio-block .bio-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.bio-block .bio-len { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.copy-btn { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 7px; padding: 0.3rem 0.65rem; cursor: pointer; transition: border-color .15s, color .15s; }
.copy-btn:hover { border-color: var(--accent); }
.bio-block p { margin-bottom: 0; font-size: 0.98rem; }
.downloads { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 560px) { .downloads { grid-template-columns: 1fr 1fr; } }
.dl-card { display: flex; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.dl-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.dl-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.dl-card .dl-meta { font-size: 0.92rem; } .dl-card .dl-meta small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.expertise { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.expertise li { border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.9rem; color: var(--ink); }

/* ---------- Testimonial / blockquote ---------- */
blockquote { border-left: 3px solid var(--accent); padding-left: 1.2rem; margin: 1.2rem 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.45; }
blockquote cite { display: block; margin-top: 0.6rem; font-family: var(--sans); font-style: normal; font-size: 0.85rem; color: var(--muted); }

/* ---------- Footer ---------- */
footer { padding: 2.6rem 1.4rem 3.2rem; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-direction: column; gap: 0.85rem; }
footer .foot-row { display: flex; gap: 1.1rem; flex-wrap: wrap; }
footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
footer .meta { color: var(--muted); }

/* ---------- Reveal (no-op without JS / reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  html.js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .cta-row, .profiles, .copy-btn { display: none; }
  a { color: #000; } section { border-color: #ccc; } body { background: #fff; color: #000; }
}
