/* The look every inner page shares with the homepage: header, dark hero, the cream
   page body that sits over it, and the footer. Markup comes from tools/shell.py.
   Everything is prefixed wm- so it cannot collide with a page's own styles. */
:root {
  --cream: #F7F4EE; --cream-deep: #EFEAE0; --sand: #ECE3CF;
  --ink: #102A43; --ink-soft: #38465A; --muted: #5B6470;
  --navy: #102A43; --navy-deep: #0B1E32;
  --gold: #C8A45D; --gold-deep: #8A6C29; --gold-light: #E3CB95;
  --line: rgba(16,42,67,0.14);
  --shadow-lg: 0 30px 80px rgba(16,30,52,0.16);
  --serif: 'Lora', Georgia, serif;
  --sans: 'Urbanist', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--navy-deep) !important; overflow-x: hidden; }

/* Paper grain over the page (desktop only). */
@media (hover: hover) and (min-width: 900px) {
  body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .07; mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
}

/* ---------- Buttons ---------- */
.wm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; line-height: 1.3; padding: 17px 26px; border-radius: 3px; cursor: pointer; text-decoration: none; transition: background .25s ease, color .25s ease, border-color .25s ease; border: 1px solid transparent; }
.wm-btn.gold { background: var(--gold); color: var(--navy-deep); }
.wm-btn.gold:hover { background: var(--gold-light); }
.wm-btn.wa { background: #1f7a4d; color: #fff; }
.wm-btn.wa:hover { background: #18613d; }
.wm-btn.line { background: transparent; color: var(--navy); border-color: rgba(16,42,67,0.35); }
.wm-btn.line:hover { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.wm-dark .wm-btn.line { color: #fff; border-color: rgba(255,255,255,.5); }
.wm-dark .wm-btn.line:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }

/* ---------- Header ---------- */
.wm-head { position: fixed; top: 0; left: 0; right: 0; z-index: 50; color: #fff; font-family: var(--sans); transition: background .4s ease, box-shadow .4s ease, color .4s ease, transform .55s var(--ease); }
.wm-head.scrolled, .wm-head.menu-open { background: rgba(247,244,238,0.92); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(16,42,67,0.08); }
.wm-head.menu-open { background: var(--cream); box-shadow: none; }
.motion .wm-head.hide { transform: translateY(-100%); }
.wm-nav { max-width: 1320px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 88px; transition: height .4s ease; }
.wm-head.scrolled .wm-nav { height: 72px; }
.wm-brand { position: relative; display: flex; align-items: center; }
.wm-brand img { height: 52px; width: auto; max-width: none; flex: none; display: block; transition: opacity .4s ease, height .4s ease; }
.wm-head.scrolled .wm-brand img { height: 45px; }
.wm-brand .lockup, .wm-brand .symbol { position: absolute; left: 0; top: 0; opacity: 0; }
.wm-brand .symbol { display: none; }
.wm-head.scrolled .wm-brand .neg, .wm-head.menu-open .wm-brand .neg { opacity: 0; }
.wm-head.scrolled .wm-brand .lockup, .wm-head.menu-open .wm-brand .lockup { opacity: 1; }
.wm-links { display: flex; align-items: center; gap: 14px; }
.wm-links a.navlink { font-size: 14px; font-weight: 500; letter-spacing: 0.03em; color: inherit; text-decoration: none; position: relative; padding: 6px 0; margin-right: 8px; }
.wm-links a.navlink::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.wm-links a.navlink:hover::after { transform: scaleX(1); transform-origin: left; }
.wm-nav .wm-btn { padding: 11px 16px; font-size: 12px; }
.wm-lang { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; color: inherit; text-decoration: none; border: 1px solid rgba(255,255,255,0.4); border-radius: 100px; padding: 8px 15px; transition: border-color .4s ease, background .2s ease, color .2s ease; white-space: nowrap; }
.wm-lang:hover { background: var(--gold-light); color: var(--navy-deep); border-color: var(--gold-light); }
.wm-head.scrolled .wm-lang, .wm-head.menu-open .wm-lang { border-color: var(--line); }
.wm-actions { display: none; align-items: center; gap: 12px; }
.wm-menu-btn { background: none; border: none; cursor: pointer; color: inherit; padding: 8px; }
.wm-menu-btn svg { width: 26px; height: 26px; display: block; }
.wm-mobile { position: fixed; inset: 0; z-index: 49; background: var(--cream); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; transform: translateY(-100%); transition: transform .5s cubic-bezier(.7,0,.2,1), visibility .5s; padding: 80px 28px 44px; visibility: hidden; overflow-y: auto; }
.wm-mobile.open { transform: translateY(0); visibility: visible; }
.wm-mobile a:not(.wm-btn) { font-family: var(--serif); font-size: 25px; color: var(--ink); padding: 9px; text-decoration: none; }
.wm-mobile a:not(.wm-btn):hover { color: var(--gold-deep); }
.wm-mobile .wm-btn { padding: 14px 28px; margin-top: 12px; }
@media (max-width: 1240px) { .wm-links { display: none; } .wm-actions { display: flex; } }
@media (max-width: 700px) {
  .wm-brand img, .wm-head.scrolled .wm-brand img { height: 40px; }
  .wm-brand .lockup { display: none; }
  .wm-brand .symbol { display: block; }
  .wm-head.scrolled .wm-brand .symbol, .wm-head.menu-open .wm-brand .symbol { opacity: 1; }
}
@media (max-width: 600px) { .wm-nav { padding: 0 20px; height: 72px; } .wm-head.scrolled .wm-nav { height: 64px; } }

/* ---------- Hero ---------- */
.wm-hero { position: relative; z-index: 0; overflow: hidden; background: var(--navy-deep); color: #fff; display: flex; align-items: flex-end; min-height: min(78vh, 760px); font-family: var(--sans); }
.wm-hero::before { content: ""; position: absolute; inset: 0; background: url(/assets/hero-poster.jpg) center 40% / cover no-repeat; }
.wm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,20,34,.95) 0%, rgba(8,20,34,.74) 42%, rgba(8,20,34,.42) 74%, rgba(8,20,34,.6) 100%); }
.wm-hero-in { position: relative; z-index: 2; width: 100%; max-width: 1320px; margin: 0 auto; padding: 160px 32px 96px; }
.wm-hero .kicker, .wm-hero .eyebrow { display: block; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-light); font-weight: 500; margin: 0; }
.wm-hero h1 { font-family: var(--serif); color: #fff; font-weight: 400; line-height: 1.1; letter-spacing: -0.015em; font-size: clamp(36px, 5.4vw, 76px); max-width: 19ch; margin: 18px 0 26px; }
.wm-hero .lead { max-width: 60ch; color: rgba(255,255,255,.9); font-size: 19px; font-weight: 300; line-height: 1.65; margin: 0; }
.wm-hero .lead strong { color: #fff; font-weight: 600; }
.wm-hero .offer, .wm-hero .hero-sub { max-width: 60ch; margin: 14px 0 0; font-size: 16.5px; font-weight: 300; color: rgba(255,255,255,.76); }
.wm-hero .offer strong { color: var(--gold-light); font-weight: 600; }
.wm-hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 0; }
.wm-hero .marks { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; font-size: 14.5px; color: rgba(255,255,255,.74); }
.wm-hero .marks span { display: inline-flex; align-items: center; gap: 8px; }
.wm-hero .marks span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
@keyframes wmFade { from { opacity: 0; transform: translateY(16px); } }
.motion .wm-hero-in > * { animation: wmFade 1s var(--ease) both; }
.motion .wm-hero-in > *:nth-child(2) { animation-delay: .12s; }
.motion .wm-hero-in > *:nth-child(3) { animation-delay: .28s; }
.motion .wm-hero-in > *:nth-child(n+4) { animation-delay: .42s; }
/* Safety net: shell.js adds .shown after a moment, so a stalled animation can never leave the title hidden. */
.shown .wm-hero-in > * { animation: none !important; opacity: 1 !important; transform: none !important; }
@media (max-width: 900px) { .wm-hero { min-height: 0; } .wm-hero-in { padding: 128px 22px 76px; } .wm-hero .lead { font-size: 17px; } }
@media (max-width: 560px) { .wm-hero .actions .wm-btn { width: 100%; } }

/* ---------- Page body (sits over the hero) ---------- */
.wm-main { display: flow-root; position: relative; z-index: 2; background: var(--cream); border-radius: 30px 30px 0 0; margin-top: -30px; overflow: clip; box-shadow: 0 -30px 80px rgba(8,20,34,.35); }
.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.motion .reveal.in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.wm-foot { position: relative; z-index: 2; background: var(--navy-deep); color: rgba(251,248,241,0.7); padding: 80px 0 36px; border-top: 1px solid rgba(251,248,241,0.1); font-family: var(--sans); font-size: 15px; line-height: 1.7; }
.wm-foot-in { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.wm-foot a { color: inherit; text-decoration: none; }
.wm-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px; }
.wm-foot .lockup { width: 252px; max-width: 82%; height: auto; display: block; margin-bottom: 24px; }
.wm-foot .brand-p { font-size: 15px; max-width: 320px; font-weight: 300; }
.wm-foot h4 { font-family: var(--sans); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-light); margin: 0 0 20px; font-weight: 500; }
.wm-foot-col a, .wm-foot-col .li { display: block; font-size: 15px; color: rgba(251,248,241,0.7); margin-bottom: 13px; font-weight: 300; transition: color .2s ease; }
.wm-foot-col a:hover { color: var(--gold-light); }
.wm-foot-bottom { margin-top: 60px; padding-top: 28px; border-top: 1px solid rgba(251,248,241,0.12); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; color: rgba(251,248,241,0.5); }
.wm-foot .socials { display: flex; gap: 14px; }
.wm-foot .socials a { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; display: block; transition: transform .25s ease, box-shadow .25s ease; }
.wm-foot .socials img { width: 100%; height: 100%; display: block; }
.wm-foot .socials a:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.32); }
@media (max-width: 980px) { .wm-foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wm-foot-grid { grid-template-columns: 1fr; } .wm-foot-in { padding: 0 22px; } }

/* Shorter hero for article pages (Dr. Talley, blog posts). */
.wm-hero.short { min-height: 0; }
.wm-hero.short .wm-hero-in { padding: 170px 32px 100px; }
.wm-hero.short .lead { font-family: var(--serif); font-style: italic; font-size: 21px; }
@media (max-width: 900px) { .wm-hero.short .wm-hero-in { padding: 128px 22px 80px; } }
/* A page's own outline button, when it sits in the dark hero. */
.wm-hero .btn-line { color: #fff; border-color: rgba(255,255,255,.5); }
.wm-hero .btn-line:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.wm-main > section { scroll-margin-top: 40px; }
