/* Jay Trainer — shared site system (warm editorial). Linked by every page. */
:root {
  --paper: #f5f1ea; --paper-2: #efe9df; --card: #fff;
  --ink: #211b16; --ink-2: #5b5147; --warm-3: #9b9085;
  --clay: #b8492e; --clay-soft: #d9836a;
  --blue: #b8492e; --blue-hover: #a33d24; --blue-soft: #f0cdb6;
  --line: #e0d8cc;
  --display: "Instrument Serif", Georgia, serif;
  --sans: "Hanken Grotesk", sans-serif;
  --shadow-lg: 0 30px 70px -34px rgb(60 40 25 / 0.40);
  --shadow-md: 0 12px 30px -16px rgb(60 40 25 / 0.28);
}
body { background: #f7f7f5; color: var(--ink-2); font-family: var(--sans); font-size: 16px; overflow-x: clip; }
.wrap { width: min(100%, 1184px); margin: 0 auto; padding: 0 clamp(20px, 4vw, 44px); }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; transform: translateY(-160%); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700; transition: transform .16s ease; }
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* fill-mode is "backwards", not "both": "forwards"/"both" would make body
     permanently retain the final keyframe's transform: translateY(0). A transform
     on <body> is a transformed ancestor of the sticky .nav, which breaks the
     header's backdrop-filter for text (it blurs images but lets text show through
     sharply). "backwards" keeps the entrance slide/fade but leaves no resting
     transform, so the header frost works uniformly. */
  body { animation: page-in .42s cubic-bezier(.2,.7,.2,1) backwards; }
  body.page-exit { opacity: 0; transform: translateY(8px); transition: opacity .22s ease, transform .22s ease; }
  .motion-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .72s cubic-bezier(.2,.7,.2,1), transform .72s cubic-bezier(.2,.7,.2,1); transition-delay: var(--reveal-delay, 0ms); will-change: opacity, transform; }
  .motion-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }
  /* Once the reveal animation finishes, drop the compositing layer. A lingering
     will-change/transform keeps the element on its own GPU layer, which excludes
     it from the sticky header's backdrop-filter snapshot — making text punch
     through the frost sharply while same-region images blur correctly. */
  .motion-ready .reveal.is-settled { will-change: auto; transform: none; }
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Frost the sticky header. backdrop-filter must live on .nav itself:
     a transformed ancestor (e.g. translateZ) neutralizes backdrop-filter on
     descendants in Chromium, which previously left scrolled text showing
     through too sharply. The 0.6 background is also a graceful fallback so
     text stays obscured anywhere backdrop-filter is unsupported. */
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border-bottom: 1px solid rgba(224,216,204,0.86);
}
.nav-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mark { display: inline-flex; align-items: center; color: var(--ink); transition: color .15s; }
.mark svg { height: 30px; width: 30px; display: block; fill: currentColor; }
.mark:hover { color: var(--clay); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 14px; color: var(--ink-2); transition: color .15s; white-space: nowrap; }
.nav-links a:hover { color: var(--clay); }
.nav-links a.active { color: var(--ink); }

/* BUTTONS */
.btn { box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; line-height: 1; border-radius: 999px; padding: 12px 22px; cursor: pointer; border: 1px solid transparent; transition: all .16s ease; font-family: var(--sans); }
.hero-cta .btn { min-height: 42px; }
.btn-fill { background: var(--clay); color: #fff; }
.btn-fill:hover { background: #a33d24; transform: translateY(-1px); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); transform: translateY(-1px); }
.btn-line { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: #e9e9e9; transform: translateY(-1px); }
.btn-outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.45); }
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* BLOBS (reusable hero background) */
.hero, .page-head, .cs-head, .article-head { isolation: isolate; background: #f7f7f5; }
.hero .wrap, .page-head .wrap, .cs-head > .wrap, .article-head > .wrap, .article-head > .article-wrap { position: relative; z-index: 2; }
.blobs { position: absolute; inset: -4% 0 auto 0; height: 600px; z-index: 0; pointer-events: none; filter: blur(72px); opacity: .8; }
.hero .blobs, .page-head .blobs, .cs-head .blobs, .article-head .blobs { top: -72px; height: 672px; }
.blob { position: absolute; border-radius: 50%; }
.b1 { width: 520px; height: 520px; left: 42%; top: -110px; background: radial-gradient(circle, #f0cdb6, transparent 70%); animation: drift1 30s ease-in-out infinite; }
.b2 { width: 412px; height: 412px; left: 60%; top: 0px; background: radial-gradient(circle, rgba(42,99,166,0.22), transparent 70%); filter: blur(24px); animation: drift2 36s ease-in-out infinite; }
.b3 { width: 348px; height: 348px; left: 32%; top: 72px; background: radial-gradient(circle, #dfe2d2, transparent 70%); animation: drift3 42s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(56px,40px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-46px,32px)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(28px,-26px)} }
@media (prefers-reduced-motion: reduce){ .blob{animation:none} }

/* TYPE UTILITIES */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--clay); margin: 0 0 26px; }
section { padding: 66px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.sec-head + .next-card { margin-top: 24px; }
.sec-label { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--warm-3); }
.sec-head h2 { font-family: var(--display); font-size: 34px; font-weight: 400; color: var(--ink); margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--warm-3); transition: color .15s; }
.back-link:hover { color: var(--clay); }

/* FOOTER + CONTACT FORM */
.foot { background: #0a0a0a; color: #f3ece2; border-radius: 32px 32px 0 0; margin-top: 70px; }
.foot-inner { padding-top: clamp(58px, 8vw, 84px); padding-bottom: 42px; }
.foot .eyebrow { color: var(--clay-soft); }
.foot-top { display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: start; }
.foot h2 { font-family: var(--display); font-size: 64px; font-weight: 400; line-height: 1.0; margin: 22px 0 0; color: #fff; }
.foot h2 em { font-style: italic; color: var(--clay-soft); }
.foot .btn-white { margin-top: 44px; }
.contact-form { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 18px; padding: 26px 24px; }
.contact-form .ftitle { font-family: var(--display); font-size: 24px; color: #fff; margin: 0 0 18px; }
.contact-form .field { margin-bottom: 11px; }
.contact-form label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(243,236,226,0.5); margin: 0 0 6px; }
.contact-form input, .contact-form textarea { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: 10px; padding: 11px 13px; color: #fff; font-family: var(--sans); font-size: 14px; transition: border-color .15s; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(243,236,226,0.32); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); }
.contact-form textarea { resize: vertical; min-height: 58px; }
.contact-form button { width: 100%; margin-top: 6px; cursor: pointer; }
.form-done { color: var(--clay-soft); font-size: 14px; margin: 14px 0 0; display: none; }
.foot-cols { display: flex; justify-content: space-between; margin-top: 80px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.13); }
.foot-cols .col { display: flex; flex-direction: column; gap: 12px; }
.foot-cols a { font-size: 14px; color: rgba(243,236,226,0.6); }
.foot-cols a:hover { color: #fff; }
.foot-copy { display: flex; justify-content: space-between; font-size: 13px; color: rgba(243,236,226,0.4); margin-top: 56px; }

@media (max-width: 880px) {
  .foot-top { grid-template-columns: 1fr; gap: 40px; }
}

@media (min-width: 1440px) {
  section { padding: 78px 0; }
}

@media (max-width: 1040px) {
  .nav-links { gap: 22px; }
}

@media (max-width: 760px) {
  section { padding: 48px 0; }
  .nav { position: sticky; }
  .nav-inner { height: auto; min-height: 64px; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
  .nav-links { display: flex; flex: 1 1 100%; order: 3; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
  .nav-links a.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .nav-inner > .btn { padding: 9px 14px; font-size: 13px; }
  .mark svg { width: 28px; height: 28px; }
  .eyebrow, .sec-label { letter-spacing: 0.13em; }
  .sec-head { display: grid; gap: 8px; align-items: start; }
  .sec-head h2 { font-size: clamp(28px, 9vw, 34px); }
  .blobs { inset-inline: -180px; opacity: .58; overflow: hidden; }
  .blob { max-width: 72vw; max-height: 72vw; }
  .foot { border-radius: 24px 24px 0 0; margin-top: 46px; }
  .foot h2 { font-size: clamp(42px, 13vw, 58px); }
  .foot-cols, .foot-copy { display: grid; gap: 22px; }
  .foot-copy { gap: 10px; }
  .contact-form { padding: 22px 18px; }
  .hero { padding-top: 58px !important; padding-bottom: 52px !important; }
  .hero h1, .page-head h1, .cs-head h1, .article-head h1 { font-size: clamp(40px, 12vw, 54px) !important; line-height: 1.02 !important; max-width: 100% !important; }
  .hero-sub, .page-head p, .page-head .dek, .cs-head .dek, .article-head .dek { font-size: 17px !important; line-height: 1.62 !important; }
  .feature, .featured, .featured-post, .intro, .about { gap: 30px !important; }
  .feature h3, .featured h2, .featured-post h2 { font-size: clamp(32px, 9vw, 40px) !important; }
  .manifesto p, .cs-quote p { font-size: clamp(30px, 9vw, 38px) !important; max-width: 26ch !important; }
  .tl-row { padding: 28px 0 !important; }
  .post-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }
}

@media (max-width: 560px) {
  .wrap, .article-wrap, .cover-wide, .cover-cap, .author { padding-inline: 20px !important; }
  .btn { justify-content: center; }
  .nav-inner { justify-content: flex-start; }
  .nav-inner > .btn { display: none; }
  .nav-links { flex-basis: auto; order: 2; }
  .nav-links a { padding-inline: 11px; }
  .hero-cta, .intro .bio .cta { align-items: stretch; flex-direction: column; }
  .ix-row { grid-template-columns: 42px 1fr !important; gap: 10px 14px !important; padding: 22px 0 !important; }
  .ix-row:hover { padding-left: 0 !important; }
  .ix-row .meta { grid-column: 2; }
  .ix-row .arr { grid-column: 2; width: max-content; }
  .glance, .outcomes { grid-template-columns: 1fr !important; }
  .glance .g, .glance .g:last-child, .outcomes .o, .outcomes .o:last-child { border-right: 0 !important; border-bottom: 1px solid var(--line); padding: 20px 0 !important; }
  .glance .g:last-child, .outcomes .o:last-child { border-bottom: 0; }
  .next-card { display: grid !important; gap: 22px; padding: 28px 24px !important; }
  .next-card h3 { font-size: 29px !important; }
  .featured-post .cover, .cover-wide image-slot { height: 260px !important; }
  .cs-card .cover, .post-card .cover, .rel-card .cover { min-height: 170px; }
  .prose p, .prose li, .cs-body p, .cs-body li, .intro .bio p { font-size: 16.5px !important; }
  .prose h2 { font-size: 31px !important; }
  .author-card { align-items: flex-start !important; text-align: left !important; padding: 24px 20px !important; }
  .filters { overflow-x: auto; flex-wrap: nowrap !important; padding-bottom: 6px !important; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
