/* Yeldan blog article — premium dark editorial.
   Headings: Schibsted Grotesk. Body: Spectral.
   Palette: near-black bg + #242B30 slate panels (landing gradient dark band) + light/white
   interactive accents (matching the landing's white CTAs). */
:root {
  --bg: #0a0a0b;
  --panel: #242b30;           /* secondary surface — matches landing hero gradient dark band */
  --ink: #f1f1f3;
  --body: #c9cace;            /* long-form body, ~10:1 on --bg */
  --muted: #8a8b92;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #eceef1;          /* light interactive: CTA, list marks, progress, quote */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 680px;
  --pad: clamp(20px, 5vw, 48px);
  --shell: calc((100vw - 1080px) / 2 + var(--pad)); /* aligns nav with the content column */
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* No CSS scroll-behavior: smooth — Lenis (loaded in article.js, same lib as the landing) owns
   the smooth/inertia scroll; CSS smooth fights it. Falls back to native scroll without JS. */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--serif); font-size: 19px; line-height: 1.8;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* reading progress — scaleX (compositor-only) instead of animating width (which paints every frame) */
.progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%; background: var(--accent); z-index: 60;
  transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }

/* nav — content held inside the 1080px shell so it doesn't stretch edge-to-edge */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 58px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(var(--pad), var(--shell)); font-family: var(--sans); line-height: 1;
  border-bottom: 1px solid transparent; transition: background .3s ease, border-color .3s ease; }
.nav .brand, .nav .links, .nav .links a { height: auto; max-height: 34px; }
.nav.scrolled { background: rgba(10, 10, 11, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: var(--line); }
.nav .brand { display: inline-block; width: 86px; height: 34px; overflow: hidden; text-indent: 100%; white-space: nowrap;
  background: url("/yeldan-legal-lockup.png") left center / contain no-repeat; text-decoration: none; }
.nav .links { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 6px; }
.nav .links a { font-size: 14.5px; color: rgba(255, 255, 255, 0.72); text-decoration: none; padding: 8px 15px; border-radius: 999px; transition: color .2s, background .2s; }
.nav .links a:hover { color: #fff; }
.nav .links a.cta { background: var(--accent); color: #14181c; font-weight: 600; }
.nav .links a.cta:hover { background: #fff; }

/* hero — full-bleed image, title overlaid */
.hero { position: relative; min-height: min(66vh, 640px); display: flex; align-items: flex-end; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.hero::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(10,10,11,.5) 0%, rgba(10,10,11,.2) 32%, rgba(10,10,11,.82) 78%, var(--bg) 100%); }
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--pad) clamp(36px, 5vw, 64px); }
.tag { display: inline-block; font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--accent); background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.14); padding: 6px 14px; border-radius: 999px; margin: 0 0 22px; }
.hero h1 { font-family: var(--serif); font-weight: 700; color: #fff; margin: 0 0 22px;
  font-size: clamp(2.05rem, 5.6vw, 4rem); line-height: 1.04; letter-spacing: -.025em; max-width: 17ch; text-wrap: balance; }
.byline { display: flex; align-items: center; gap: 11px; font-family: var(--sans); font-size: 14.5px; color: rgba(255, 255, 255, 0.72); }
.byline .who { color: #fff; font-weight: 600; }
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }

/* body */
.article { max-width: var(--maxw); margin: 0 auto; padding: clamp(44px, 7vw, 76px) var(--pad) 36px; }
.lede { font-size: 1.3rem; line-height: 1.65; color: var(--ink); margin: 0 0 34px; }
.article p { margin: 0 0 24px; text-wrap: pretty; }
.article h2 { font-family: var(--sans); font-weight: 700; color: #fff; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 3.2vw, 1.95rem); line-height: 1.18; margin: 54px 0 16px; text-wrap: balance; }
.article h3 { font-family: var(--sans); font-weight: 600; color: #fff; font-size: 1.24rem; margin: 34px 0 12px; }
.article strong { color: var(--ink); font-weight: 600; }
.article a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.32); transition: text-decoration-color .2s; }
.article a:hover { text-decoration-color: #fff; }
.article ul, .article ol { margin: 0 0 24px; padding: 0; list-style: none; }
.article li { position: relative; padding-left: 30px; margin: 0 0 13px; }
.article ul li::before { content: ""; position: absolute; left: 7px; top: .8em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.article ol { counter-reset: li; }
.article ol li { counter-increment: li; padding-left: 38px; }
.article ol li::before { content: counter(li); position: absolute; left: 0; top: .1em; width: 23px; height: 23px;
  display: flex; align-items: center; justify-content: center; font-family: var(--sans); font-size: 12.5px; font-weight: 700;
  color: var(--accent); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; line-height: 1; }

/* pull quote (no side-stripe) */
.article blockquote { margin: 38px 0; padding: 34px 0 0; position: relative; font-family: var(--serif); font-style: italic; font-size: 1.5rem; line-height: 1.45; color: #fff; }
.article blockquote::before { content: "\201C"; position: absolute; top: -8px; left: -2px; font-family: Georgia, serif; font-size: 4.2rem; line-height: 1; color: var(--accent); }

/* comparison table */
.cmp-wrap { margin: 6px 0 28px; overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15.5px; }
table.cmp th, table.cmp td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.cmp thead th { color: #fff; font-weight: 700; border-bottom-color: rgba(255, 255, 255, 0.28); }
table.cmp td:first-child, table.cmp thead th:first-child { color: var(--muted); }
table.cmp tbody tr:hover { background: rgba(255, 255, 255, 0.025); }

/* CTA */
.cta { max-width: var(--maxw); margin: 52px auto; padding: 0 var(--pad); }
.cta-inner { border-radius: 22px; padding: clamp(28px, 4vw, 40px); background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.1); }
.cta-inner h3 { font-family: var(--sans); font-weight: 700; color: #fff; font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 10px; }
.cta-inner p { font-family: var(--serif); color: var(--body); font-size: 1.05rem; margin: 0 0 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 15px;
  background: var(--accent); color: #14181c; text-decoration: none; padding: 14px 24px; border-radius: 999px; transition: transform .15s ease, background .2s ease; }
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* related + footer */
.related { max-width: var(--maxw); margin: 0 auto; padding: 8px var(--pad) 0; font-family: var(--sans); }
.related .label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.related a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0;
  border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 1.06rem; transition: color .2s, transform .2s; }
.related a:last-child { border-bottom: 1px solid var(--line); }
.related a::after { content: "\2192"; color: var(--muted); transition: transform .2s, color .2s; }
.related a:hover { color: #fff; transform: translateX(6px); }
.related a:hover::after { color: #fff; transform: translateX(3px); }
footer.site { border-top: 1px solid var(--line); margin-top: 60px; padding: 30px max(var(--pad), var(--shell)); font-family: var(--sans); }
footer.site .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
footer.site a { color: rgba(255, 255, 255, 0.6); text-decoration: none; }
footer.site a:hover { color: #fff; }

/* hero entrance — CSS-driven (fires on load, reads fine for crawlers/no-JS) */
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1.04); } }
.hero > img { animation: heroZoom 1.6s cubic-bezier(.16, 1, .3, 1) both; }
.hero .tag { animation: riseIn .7s cubic-bezier(.16, 1, .3, 1) both; }
.hero h1 { animation: riseIn .8s cubic-bezier(.16, 1, .3, 1) .08s both; }
.hero .byline { animation: riseIn .8s cubic-bezier(.16, 1, .3, 1) .18s both; }
/* page open: gentle whole-page fade so the full-page navigation eases in instead of snapping ("tak").
   NOTE: the per-element scroll-driven reveal (animation-timeline: view() on every .article child)
   was removed — it kept the compositor animating many elements on every scroll frame, which made
   scrolling stutter on real GPUs. The on-load hero entrance below + hover micro-interactions keep
   the page feeling crafted, while the body content scrolls smoothly. */
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageFade .5s ease both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .hero > img, .hero .tag, .hero h1, .hero .byline { animation: none; }
  .article > *, .cta-inner, .related a { animation: none; }
  .hero > img { transform: scale(1.04); }
  .btn:hover { transform: none; }
}

@media (max-width: 640px) {
  body { font-size: 17.5px; }
  .hero { min-height: 64vh; }
  .lede { font-size: 1.16rem; }
  .nav .links a:not(.cta) { display: none; }
}

/* ---- Waitlist modal (same component as the main landing; opens in-page from the nav
   "Waitlist" button + in-article CTAs). Frosted glass; blur is static (only while open). ---- */
#yeldan-wl-backdrop {
  position: fixed; inset: 0; z-index: 2147483600; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(8, 8, 10, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(120%); backdrop-filter: blur(8px) saturate(120%);
  opacity: 0; transition: opacity 0.28s ease; font-family: var(--sans);
}
#yeldan-wl-backdrop.is-open { opacity: 1; }
#yeldan-wl-backdrop[hidden] { display: none !important; }
#yeldan-wl-card {
  position: relative; width: min(92vw, 430px); box-sizing: border-box;
  padding: 32px 30px 30px; border-radius: 24px; color: #fff; overflow: hidden;
  background: rgba(22, 26, 30, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(185%); backdrop-filter: blur(28px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(18px) scale(0.96); transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
#yeldan-wl-backdrop.is-open #yeldan-wl-card { transform: none; }
#yeldan-wl-main, #yeldan-wl-success { position: relative; z-index: 1; }
#yeldan-wl-badge {
  display: inline-flex; align-items: center; padding: 5px 12px; margin: 0 0 20px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7);
}
#yeldan-wl-card h2 { margin: 0 0 12px; font-family: var(--sans); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: #fff; }
#yeldan-wl-card p { margin: 0 0 28px; font-family: var(--sans); font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, 0.55); }
#yeldan-wl-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: flex;
  align-items: center; justify-content: center; z-index: 2; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%; background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.7); font-size: 17px;
  line-height: 1; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
#yeldan-wl-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
#yeldan-wl-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.yeldan-wl-field { position: relative; display: flex; align-items: center; }
.yeldan-wl-field > svg { position: absolute; left: 15px; width: 17px; height: 17px; color: rgba(255, 255, 255, 0.42); pointer-events: none; }
.yeldan-wl-field input {
  width: 100%; box-sizing: border-box; padding: 14px 16px 14px 43px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: #fff; font-family: inherit;
  font-size: 15px; outline: none; transition: border-color 0.16s ease, background 0.16s ease;
}
.yeldan-wl-field input::placeholder { color: rgba(255, 255, 255, 0.36); }
.yeldan-wl-field input:focus { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.07); }
#yeldan-wl-submit {
  position: relative; isolation: isolate; overflow: hidden; width: 100%; padding: 14px 18px; margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; cursor: pointer; font-family: inherit;
  background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  transition: color 0.28s ease, border-color 0.28s ease;
}
#yeldan-wl-submit::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff; transform: translateX(-101%); transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1); }
#yeldan-wl-submit::after { content: "→"; display: inline-block; margin-left: 8px; transform: translateX(0); transition: transform 0.28s ease; }
#yeldan-wl-submit:hover { color: rgb(17, 22, 30); border-color: #fff; }
#yeldan-wl-submit:hover::before { transform: translateX(0); }
#yeldan-wl-submit:hover::after { transform: translateX(4px); }
#yeldan-wl-submit:active { transform: scale(0.985); }
#yeldan-wl-submit:disabled { opacity: 0.55; cursor: default; color: #fff; border-color: rgba(255, 255, 255, 0.22); }
#yeldan-wl-submit:disabled::before { transform: translateX(-101%); }
#yeldan-wl-submit:disabled::after { opacity: 0; }
#yeldan-wl-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 22px 0 0; font-family: var(--sans); font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, 0.4); }
#yeldan-wl-note > svg { width: 13px; height: 13px; flex: none; color: rgba(255, 255, 255, 0.4); }
#yeldan-wl-error { margin-top: 12px; font-family: var(--sans); font-size: 13px; color: #ff8b8b; }
#yeldan-wl-success { text-align: center; padding: 6px 0; }
#yeldan-wl-success svg { margin: 0 auto 14px; display: block; }
#yeldan-wl-success h2 { margin-bottom: 6px; }
#yeldan-wl-error[hidden], #yeldan-wl-success[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  #yeldan-wl-backdrop, #yeldan-wl-card, #yeldan-wl-submit::before, #yeldan-wl-submit::after { transition: none; }
}
