/* Shared styles for every page. The look follows the hero: light grey paper, black type, white pills,
   yellow buttons, and the orange trail seen through ribbed glass. Layout rules come from the Hirael
   agency-landing template (docs/inspiration/blueprint.md). */

:root {
  --paper: #efefef;
  --ink: #000;
  --ink-2: rgb(0 0 0 / .58);
  --ink-3: rgb(0 0 0 / .38);
  --line: rgb(0 0 0 / .1);
  --card: #fff;
  --primary: #f4b854;
  --primary-fg: #211201;
  --flame: #ff5f03;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --sheet: cubic-bezier(.32, .72, 0, 1);
  --pad: 20px;
  /* Ribbed glass, same 31 degree angle as the hero */
  --ribs: repeating-linear-gradient(59deg,
    rgb(255 255 255 / .55) 0px, rgb(255 255 255 / 0) 26px,
    rgb(0 0 0 / .035) 54px, rgb(255 255 255 / .55) 60px);
  color-scheme: light;
  --solid: #000;                        /* black buttons, the GA mark, number circles */
  --solid-fg: #fff;
  --pill-bg: rgb(255 255 255 / .55);
  --pill-line: rgb(0 0 0 / .12);
  --soft: rgb(0 0 0 / .08);
  --frame: #e5e5e5;
  --note-bg: rgb(255 255 255 / .9);
  --shadow: rgb(0 0 0 / .08);
  --dot-line: rgb(0 0 0 / .22);
  --word: rgb(0 0 0 / .07);
  --slab-a: #fff; --slab-b: #f2f2f2; --slab-left: #d7d7d7; --slab-right: #c4c4c4;
  --slab-ink: rgb(0 0 0 / .32); --slab-edge: rgb(0 0 0 / .06); --slab-on-a: #fff; --slab-on-b: #fff1e6;
}
/* Dark mode: the same design at night. Chosen with the button in the header, or the system setting until someone picks. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e0e0f;
  --ink: #f2f2f2;
  --ink-2: rgb(255 255 255 / .62);
  --ink-3: rgb(255 255 255 / .4);
  --line: rgb(255 255 255 / .1);
  --card: #1a1a1c;
  --solid: #f2f2f2;
  --solid-fg: #0e0e0f;
  --pill-bg: rgb(255 255 255 / .06);
  --pill-line: rgb(255 255 255 / .14);
  --soft: rgb(255 255 255 / .1);
  --frame: #17171a;
  --note-bg: rgb(18 18 20 / .94);
  --shadow: rgb(0 0 0 / .45);
  --dot-line: rgb(255 255 255 / .25);
  --word: rgb(255 255 255 / .06);
  --slab-a: #2e2e32; --slab-b: #232326; --slab-left: #19191c; --slab-right: #111113;
  --slab-ink: rgb(255 255 255 / .38); --slab-edge: rgb(255 255 255 / .08); --slab-on-a: #36261b; --slab-on-b: #241710;
  --ribs: repeating-linear-gradient(59deg,
    rgb(255 255 255 / .06) 0px, rgb(255 255 255 / 0) 26px,
    rgb(0 0 0 / .28) 54px, rgb(255 255 255 / .06) 60px);
}
@media (min-width: 640px) { :root { --pad: 32px; } }
@media (min-width: 1024px) { :root { --pad: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Film grain over the whole site, like the hero */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 3px solid rgb(255 95 3 / .55); outline-offset: 3px; border-radius: 8px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--solid); color: var(--solid-fg); padding: 10px 16px; border-radius: 999px; font-size: 14px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; }
.px { padding-left: var(--pad); padding-right: var(--pad); }

/* Type */
.display { font-size: clamp(2.1rem, 8vw, 4.2rem); line-height: 1.08; font-weight: 500; letter-spacing: -.03em; }
@media (min-width: 640px) { .display { font-size: clamp(2.5rem, 5vw, 4.2rem); } }
.mega { font-size: clamp(2.6rem, 10vw, 7.5rem); line-height: 1; font-weight: 500; letter-spacing: -.045em; }
.lead-h { font-size: clamp(1.6rem, 4vw, 3.2rem); line-height: 1.12; font-weight: 500; letter-spacing: -.02em; }
.lede { max-width: 52ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
@media (min-width: 640px) { .lede { font-size: 19px; } }
.br-sm { display: none; }
@media (min-width: 640px) { .br-sm { display: block; } }
.label { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* Buttons: the label rolls up on hover, the arrow turns 45 degrees */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap; border-radius: 999px; font-weight: 500;
  padding: 8px 8px 8px 20px; font-size: 14px;
  transition: transform .5s var(--spring);
}
@media (min-width: 640px) { .btn { padding-left: 24px; font-size: 15px; } }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); transition-duration: .1s; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-dark { background: var(--solid); color: var(--solid-fg); padding: 6px 6px 6px 20px; font-size: 14px; }
.roll { display: block; height: 20px; overflow: hidden; }
.roll > span { display: flex; flex-direction: column; transition: transform .5s var(--ease); }
.roll > span > span { display: block; height: 20px; line-height: 20px; }
.btn:hover .roll > span { transform: translateY(-50%); }
.dot { display: flex; align-items: center; justify-content: center; border-radius: 999px; width: 28px; height: 28px; }
@media (min-width: 640px) { .dot { width: 32px; height: 32px; } }
.btn-primary .dot { background: var(--primary-fg); color: var(--primary); }
.btn-dark .dot { width: 24px; height: 24px; background: var(--solid-fg); color: var(--solid); }
.dot svg { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.btn-dark .dot svg { width: 14px; height: 14px; }
.btn:hover .dot svg { transform: rotate(-45deg); }

/* Marker: a circle (number or GA) plus a pill label */
.marker { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
@media (min-width: 640px) { .marker { margin-bottom: 32px; } }
.num {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px;
  background: var(--solid); color: var(--solid-fg); font-size: 11px; font-weight: 600;
}
.num.ga { font-size: 9px; font-weight: 700; letter-spacing: -.02em; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 1px solid var(--pill-line); background: var(--pill-bg);
  border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 500;
}
@media (min-width: 640px) { .num { width: 28px; height: 28px; font-size: 12px; } .num.ga { font-size: 10px; } .pill { padding: 6px 16px; font-size: 13px; } }

/* Header: the white pill stays at the top of every page, hides while scrolling down */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 40; padding: 8px; transition: transform .6s var(--out); }
@media (min-width: 640px) { .top { padding: 12px; } }
.top.hide { transform: translateY(-120%); }
.top:focus-within { transform: none; }
.bar {
  max-width: 1416px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 999px; background: var(--card); padding: 5px;
  transition: box-shadow .5s var(--ease);
}
.top.scrolled .bar { box-shadow: 0 10px 40px var(--shadow); }
.bar-l, .bar-r { display: flex; align-items: center; gap: 24px; }
.bar-r { gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; }
.mark {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--solid); color: var(--solid-fg); font-size: 12px; font-weight: 700; letter-spacing: -.02em;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.025em; }
@media (min-width: 640px) { .mark { width: 40px; height: 40px; font-size: 13px; } .brand-name { font-size: 16px; } }
.links, .bar-r { display: none; }
.links a { position: relative; font-size: 14px; transition: color .3s; }
.links a:hover { color: var(--ink-2); }
.links a[aria-current="page"]::before {
  content: ""; position: absolute; left: 50%; bottom: -9px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 999px; background: var(--flame);
}
.status { display: none; font-size: 13px; color: var(--ink-2); }
.menu-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--solid); color: var(--solid-fg); }
.menu-btn svg { width: 18px; height: 18px; }
/* The theme button and the menu button sit together at the right end of the bar */
.bar-x { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.theme-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; background: var(--soft); color: var(--ink);
  transition: background-color .3s var(--ease), transform .5s var(--spring);
}
.theme-btn:hover { transform: rotate(-12deg); }
.theme-btn svg { position: absolute; width: 18px; height: 18px; transition: opacity .4s var(--ease), transform .6s var(--out); }
.theme-btn .i-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] .theme-btn .i-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="dark"] .theme-btn .i-sun { opacity: 1; transform: none; }
@media (min-width: 768px) {
  .links, .bar-r { display: flex; }
  .links { gap: 24px; }
  .menu-btn { display: none; }
  .bar-r { margin-left: auto; }
  .bar-x { margin-left: 12px; }
}
@media (min-width: 1024px) { .status { display: block; } }

/* Mobile menu: a sheet that slides up from the bottom */
.sheet { position: fixed; inset: 0; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .5s; }
.sheet.is-open { opacity: 1; pointer-events: auto; }
.sheet-bg { position: absolute; inset: 0; background: rgb(0 0 0 / .6); }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 12px;
  border-radius: 16px; background: var(--card); padding: 24px;
  transform: translateY(100%); transition: transform .5s var(--sheet);
}
.sheet.is-open .sheet-panel { transform: none; }
.sheet-links { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.sheet-links a { font-size: 28px; line-height: 32px; font-weight: 500; }
.sheet-links a[aria-current="page"] { color: var(--flame); }
@media (min-width: 768px) { .sheet { display: none; } }

/* The shader canvas used in the hero, page headers and the footer */
.fx { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* Home hero */
.hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; }
.hero-in, .phead-in { position: relative; z-index: 2; padding-bottom: 56px; will-change: transform; }
@media (min-width: 640px) { .hero-in, .phead-in { padding-bottom: 64px; } }
@media (min-width: 1024px) { .hero-in, .phead-in { padding-bottom: 80px; } }
.kicker { display: block; margin-bottom: 20px; font-size: 13px; font-weight: 400; letter-spacing: .025em; }
@media (min-width: 640px) { .kicker { margin-bottom: 32px; font-size: 14px; } }
.ctas { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
@media (min-width: 640px) { .ctas { margin-top: 48px; flex-direction: row; align-items: center; gap: 20px; } }

/* Page header on inner pages: a shorter version of the hero */
.phead { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 72vh; min-height: 72svh; overflow: hidden; padding-top: 120px; }
@media (min-width: 1024px) { .phead { min-height: 78svh; } }
.phead .lede { margin-top: 24px; }
@media (min-width: 640px) { .phead .lede { margin-top: 32px; } }

/* Sections */
.sec { padding: 96px 0; }
@media (min-width: 1024px) { .sec { padding: 144px 0; } }
.sec + .sec { padding-top: 0; }
.sec-h { margin-bottom: 40px; }
@media (min-width: 640px) { .sec-h { margin-bottom: 56px; } }
@media (min-width: 1024px) { .sec-h { margin-bottom: 72px; } }

/* Frames: empty photo or screenshot slots, a small still of the hero (orange glow behind ribbed glass) */
.frame {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 16px; background: var(--frame);
}
@media (min-width: 640px) { .frame { border-radius: 20px; } }
.frame::before {
  content: ""; position: absolute; inset: -30%; z-index: -1;
  background: radial-gradient(32% 30% at var(--bx, 70%) var(--by, 65%), rgb(255 95 3 / .9), rgb(255 95 3 / 0) 70%);
  filter: blur(18px);
  transition: transform 1.2s var(--out);
}
.frame::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ribs); }
.frame-tag {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; background: var(--note-bg); padding: 6px 12px;
  font-size: 12px; font-weight: 500; color: var(--ink-2);
}
/* A photo or video sits inside its frame with a small gap all round, so the glass shows as a thin rim.
   Inner radius = frame radius minus the gap, so the corners stay parallel. */
.frame > img, .frame > video {
  position: absolute; inset: var(--gap, 8px);
  width: calc(100% - 2 * var(--gap, 8px)); height: calc(100% - 2 * var(--gap, 8px));
  object-fit: cover; border-radius: calc(16px - var(--gap, 8px));
  box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 12px 30px rgb(0 0 0 / .08);
}
@media (min-width: 640px) { .frame { --gap: 10px; } .frame > img, .frame > video { border-radius: calc(20px - var(--gap)); } }
.frame:has(> img, > video) .frame-tag { display: none; }
.js [data-reveal="frame"] > img, .js [data-reveal="frame"] > video { transform: scale(1.08); transition: transform 1.6s var(--out); transition-delay: var(--d, 0ms); }
.js [data-reveal="frame"].in > img, .js [data-reveal="frame"].in > video { transform: none; }

/* Empty text slots */
.ph { color: var(--ink-3); }

/* Home: intro */
.intro-h { margin-bottom: 48px; }
@media (min-width: 640px) { .intro-h { margin-bottom: 64px; } }
@media (min-width: 1024px) { .intro-h { margin-bottom: 112px; } }
.about-copy p { font-size: 16px; line-height: 1.6; font-weight: 500; max-width: 46ch; }
@media (min-width: 640px) { .about-copy p { font-size: 18px; } }
.about-copy .btn { margin-top: 28px; }
.about-grid { display: flex; flex-direction: column; gap: 32px; }
.about-pics { display: flex; flex-direction: column; gap: 16px; }
/* Ratios match the photos inside: the desk photo is 4:3, the website screenshot 1600 x 889 */
.pic-s { aspect-ratio: 4 / 3; --bx: 30%; --by: 75%; }
.pic-l { aspect-ratio: 1600 / 889; --bx: 72%; --by: 40%; }
.pic-l > img { object-position: 50% 0; } /* keep the screenshot's nav bar, trim the bottom if anything */
@media (min-width: 640px) {
  .about-pics { flex-direction: row; align-items: flex-end; gap: 20px; }
  .about-pics .pic-s { width: 40%; }
  .about-pics .pic-l { width: 60%; }
}
@media (min-width: 1024px) {
  .about-grid { display: grid; grid-template-columns: 24% minmax(0, 1fr) 44%; align-items: end; gap: 28px; }
  .about-pics { display: contents; }
  .about-pics .pic-s, .about-pics .pic-l { width: 100%; }
  .about-pics .pic-s { grid-column: 1; grid-row: 1; }
  .about-copy { grid-column: 2; grid-row: 1; padding-bottom: 4px; }
  .about-pics .pic-l { grid-column: 3; grid-row: 1; }
}

/* Home: one door per page. The orange glow follows the pointer through ribbed glass. */
.doors { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .doors { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (min-width: 1024px) { .doors { gap: 28px; } }
.door {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  min-height: 300px; padding: 24px; border-radius: 20px; background: var(--card);
  transition: transform .6s var(--spring), box-shadow .6s var(--ease);
}
@media (min-width: 640px) { .door { min-height: 380px; padding: 32px; border-radius: 24px; } }
@media (min-width: 1024px) { .door { min-height: 440px; padding: 40px; } }
.door::before {
  content: ""; position: absolute; z-index: -1; width: 420px; height: 420px;
  left: calc(var(--mx, 80%) - 210px); top: calc(var(--my, 80%) - 210px);
  background: radial-gradient(closest-side, rgb(255 95 3 / .85), rgb(255 95 3 / 0));
  filter: blur(10px); opacity: .28; transition: opacity .6s var(--ease);
}
.door::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ribs); opacity: .5; transition: opacity .6s var(--ease); }
.door:hover { transform: translateY(-6px); box-shadow: 0 30px 60px var(--shadow); }
.door:hover::before, .door:hover::after { opacity: 1; }
@media (hover: none) { .door::before { opacity: .5; } .door::after { opacity: 1; } }
.door .marker { margin: 0; }
.door-t { display: block; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.04; font-weight: 500; letter-spacing: -.035em; }
.door-d { display: block; margin-top: 12px; max-width: 34ch; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
@media (min-width: 640px) { .door-d { font-size: 17px; } }
.door-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.door-go {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 999px; background: var(--primary); color: var(--primary-fg);
  transition: transform .6s var(--spring);
}
.door-go svg { width: 18px; height: 18px; transform: rotate(-45deg); transition: transform .5s var(--ease); }
.door:hover .door-go { transform: scale(1.08); }
.door:hover .door-go svg { transform: none; }

/* Work: project cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 40px 20px; }
@media (min-width: 768px) { .cards { grid-template-columns: 1fr 1fr; gap: 56px 24px; } }
@media (min-width: 1024px) { .cards { gap: 72px 28px; } }
.card-shot { aspect-ratio: 4 / 3; }
.card:nth-child(4n+1) .card-shot { --bx: 30%; --by: 70%; }
.card:nth-child(4n+2) .card-shot { --bx: 75%; --by: 35%; }
.card:nth-child(4n+3) .card-shot { --bx: 60%; --by: 80%; }
.card:nth-child(4n) .card-shot { --bx: 25%; --by: 30%; }
.card:hover .card-shot::before { transform: translate(4%, -4%) scale(1.1); }
.card-go {
  position: absolute; right: 16px; bottom: 16px;
  display: flex; align-items: center; height: 40px; width: 40px; overflow: hidden;
  border-radius: 999px; background: var(--solid); color: var(--solid-fg);
  transition: width .4s var(--out);
}
.card-go > span:first-child { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; }
.card-go svg { width: 15px; height: 15px; transform: rotate(-45deg); transition: transform .4s var(--ease); }
.card-go > span:last-child { font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; transition: opacity .3s .1s; }
.card:hover .card-go { width: 138px; }
.card:hover .card-go svg { transform: none; }
.card:hover .card-go > span:last-child { opacity: 1; }
a.card { display: block; color: inherit; text-decoration: none; border-radius: 20px; }
.card-what { margin-top: 18px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.card h3 { margin-top: 4px; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -.02em; }
.card-desc { margin-top: 10px; max-width: 52ch; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
/* The outcome, marked with the same orange dot as the active nav link */
.card-result { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.card-result::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 999px; background: var(--flame); }
.card-stack { margin-top: 10px; font: 500 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-3); }
/* Who built it with me, each name linked to their profile */
.card-team { margin-top: 10px; max-width: 52ch; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.card-team a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* A picture that opens the project's site */
a.card-shot { display: block; border-radius: 16px; }
@media (min-width: 640px) { a.card-shot { border-radius: 20px; } }
.card-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 500; }
.card-links a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.card-links svg { width: 12px; height: 12px; transform: rotate(-45deg); transition: transform .3s var(--ease); }
.card-links a:hover svg { transform: none; }
/* Says what kind of picture it is: demo data, sample data, an illustration */
.shot-note { position: absolute; z-index: 2; left: calc(var(--gap, 8px) + 10px); top: calc(var(--gap, 8px) + 10px); border-radius: 999px; background: var(--note-bg); padding: 5px 10px; font-size: 11.5px; font-weight: 500; color: var(--ink); }
/* The lead project spans the row: picture and text side by side on wide screens */
.card-feature { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .card-feature { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 48px; align-items: center; }
  .card-feature .card-what { margin-top: 0; }
  .card-feature h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
}
.card.ph h3, .card.ph .card-what { color: var(--ink-3); }

/* Story: timeline with an orange line that draws as you scroll */
.tl { position: relative; }
.tl-rail { position: absolute; top: 0; bottom: 0; left: 11px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-fill { position: absolute; inset: 0; background: var(--flame); transform-origin: top; transform: scaleY(0); border-radius: 2px; }
.tl-item { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 20px; padding-bottom: 72px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  grid-column: 1; grid-row: 1 / span 2; justify-self: center; margin-top: 6px;
  width: 14px; height: 14px; border-radius: 999px; background: var(--paper); border: 2px solid var(--dot-line);
  transition: transform .6s var(--spring), background-color .4s, border-color .4s;
}
.tl-item.on .tl-dot { background: var(--flame); border-color: var(--flame); transform: scale(1.25); }
.tl-when { grid-column: 2; display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.tl-body { grid-column: 2; }
.tl-yr { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.tl-age { font-size: 14px; color: var(--ink-2); }
.tl-body h2 { font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: 1.08; font-weight: 500; letter-spacing: -.03em; max-width: 20ch; }
.tl-body p { margin-top: 16px; max-width: 58ch; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
@media (min-width: 640px) { .tl-body p { font-size: 18px; } }
.tl-body .pill { margin-top: 16px; }
.tl-body .btn { margin-top: 24px; }
@media (min-width: 900px) {
  .tl-rail { left: 239px; }
  .tl-item { grid-template-columns: 200px 80px minmax(0, 1fr); gap: 0; padding-bottom: 112px; }
  .tl-when { grid-column: 1; grid-row: 1; flex-direction: column; gap: 6px; margin: 0; padding-top: 2px; }
  .tl-dot { grid-column: 2; grid-row: 1; margin-top: 8px; }
  .tl-body { grid-column: 3; grid-row: 1; }
  .tl-yr { font-size: 22px; }
}

/* Investing and Writing: plain rows */
.split { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) { .split { grid-template-columns: 4fr 8fr; gap: 64px; } }
.memo p { font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.3; font-weight: 500; letter-spacing: -.02em; max-width: 34ch; }
.rows { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 24px; border-top: 1px solid var(--line); padding: 22px 0; }
@media (min-width: 768px) { .row { grid-template-columns: 160px 1fr auto; padding: 28px 0; } }
.row-meta { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
@media (min-width: 768px) { .row-meta { grid-column: auto; } }
.row-t { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: -.015em; }
.row-k { font-size: 13px; color: var(--ink-2); }
.row.ph .row-t, .row.ph .row-meta, .row.ph .row-k { color: var(--ink-3); }

/* Investing: the AI stack. Seven layers drawn as slabs in 3D. The layer you are reading opens up and the rest
   close around it; site.js sets the sizes (--w, --t, --sh) and each slab's height in the stack. */
@property --by { syntax: "<percentage>"; inherits: true; initial-value: 65%; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 64px; }
@media (min-width: 1024px) { .stack { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 0 64px; margin-top: 112px; } }
/* On phones the picture stays pinned at the top while the text scrolls under it */
.stack-vis { position: sticky; top: 0; z-index: 3; padding: 64px 0 12px; background: var(--paper); }
.stack-vis::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 28px; background: linear-gradient(var(--paper), transparent); pointer-events: none; }
@media (min-width: 1024px) {
  .stack-vis { top: max(88px, calc(50vh - var(--sh, 560px) / 2)); align-self: start; padding: 0; background: none; }
  .stack-vis::after { display: none; }
}
.stack-stage { --bx: 34%; --by: 65%; height: var(--sh, 460px); transition: --by 1.1s var(--out); }
.stack-pos { position: absolute; inset: 0; transition: transform .9s var(--out); }
.stack-3d { position: absolute; left: 50%; top: 50%; width: var(--w, 200px); height: var(--w, 200px); margin: calc(var(--w, 200px) / -2) 0 0 calc(var(--w, 200px) / -2); transform-style: preserve-3d; transform: rotateX(60deg) rotateZ(45deg); }
.js .stack-3d { margin: 0; }
.slab { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(calc((6 - var(--i)) * 34px)); transition: transform .9s var(--out); }
.slab > * { transition: opacity .7s var(--ease), color .5s var(--ease), background-color .5s var(--ease), box-shadow .6s var(--ease); }
.slab-top { position: absolute; inset: 0; background: linear-gradient(135deg, var(--slab-a), var(--slab-b)); box-shadow: inset 0 0 0 1px var(--slab-edge); color: var(--slab-ink); }
.slab-top svg { position: absolute; inset: 9%; width: 82%; height: 82%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.slab-top .f { fill: currentColor; fill-opacity: .18; }
/* Light comes from the top left, so the left edge is lighter than the right */
.slab-b { position: absolute; left: 0; top: 100%; width: 100%; height: var(--t, 14px); transform-origin: top; transform: rotateX(-90deg); background: var(--slab-left); }
.slab-r { position: absolute; left: 100%; top: 0; width: var(--t, 14px); height: 100%; transform-origin: left; transform: rotateY(90deg); background: var(--slab-right); }
.slab.on .slab-top { color: var(--flame); background: linear-gradient(135deg, var(--slab-on-a), var(--slab-on-b)); box-shadow: inset 0 0 0 1.5px rgb(255 95 3 / .55), 0 0 80px rgb(255 95 3 / .35); }
.slab.on .slab-b { background: #ff7b2f; }
.slab.on .slab-r { background: #e35300; }
/* Before anyone has scrolled to it, a pulse runs down the stack, the way a question travels down the layers */
.slab-top::after { content: ""; position: absolute; inset: 0; background: rgb(255 95 3 / .45); opacity: 0; }
.stack.in[data-at="0"] .slab-top::after { animation: ping 4.6s var(--ease) infinite; animation-delay: calc(1.4s + var(--i) * .34s); }
@keyframes ping { 0%, 14%, 100% { opacity: 0; } 5% { opacity: 1; } }
/* The slabs drop in one by one, power first, and the labels follow */
.js .stack:not(.in) .slab > *, .js .stack:not(.in) .stack-label { opacity: 0; }
.stack:not(.settled) .slab, .stack:not(.settled) .slab > * { transition-delay: calc((6 - var(--i)) * 90ms); }
.stack-label {
  position: absolute; display: none; align-items: center; gap: 8px; transform: translateY(-50%);
  font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap;
  transition: top .9s var(--out), color .4s var(--ease), opacity .5s var(--ease);
}
.js .stack-label { display: flex; }
.stack-label::before { content: ""; width: 12px; height: 1px; background: currentColor; opacity: .5; }
.stack-label span { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 10px; font-weight: 600; transition: background-color .4s, color .4s; }
.stack-label:hover, .stack-label.on { color: var(--ink); }
.stack-label.on span { background: var(--flame); color: #fff; }
@media (max-width: 1023px) { .stack:not([data-at="0"]) .stack-label:not(.on) { opacity: 0; pointer-events: none; } }
/* The text: one step per layer, the one you are reading is full strength */
.stack-step { display: flex; flex-direction: column; justify-content: center; min-height: 64vh; padding: 40px 0; max-width: 32rem; }
.js .stack-step { opacity: .26; transition: opacity .5s var(--ease); }
.js .stack-step.on { opacity: 1; }
@media (min-width: 1024px) { .stack-step { min-height: 72vh; } }
.step-n { font-size: 13px; color: var(--ink-3); }
.stack-step h3 { margin-top: 6px; font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.1; font-weight: 500; letter-spacing: -.025em; }
.step-role { margin-top: 8px; font-size: 17px; color: var(--ink-2); }
.step-body { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.step-hint { margin-top: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 13px; font-weight: 500; }
.step-hint::after { content: ""; width: 1px; height: 40px; margin-left: 2px; background: linear-gradient(var(--flame), rgb(255 95 3 / 0)); }
.step-qa { margin-top: 24px; display: grid; gap: 16px; }
.step-qa dt { font-size: 13px; font-weight: 600; }
.step-qa dd { margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.step-fact { margin-top: 20px; display: flex; align-items: baseline; gap: 10px; font-size: 14px; line-height: 1.5; font-weight: 500; }
.step-fact::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 999px; background: var(--flame); transform: translateY(-2px); }
.step-cos { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.step-cos li { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--card); padding: 6px 10px 6px 12px; font-size: 13px; font-weight: 500; }
.step-cos span { font: 600 10.5px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; color: var(--ink-3); }
.stack-note { margin-top: 16px; max-width: 60ch; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
@media (min-width: 1024px) { .stack-note { grid-column: 2; } }

/* Footer: the contact block uses the hero effect again, then the links */
.cta { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 80vh; min-height: 80svh; }
.cta-in { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 1024px) { .cta-in { flex-direction: row; align-items: flex-end; justify-content: space-between; padding-bottom: 96px; } }
.cta-act { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
@media (min-width: 640px) { .cta-act { flex-direction: row; align-items: center; } }
@media (min-width: 1024px) { .cta-act { flex-direction: column; align-items: flex-end; } }
.cta-mail { font-size: 14px; color: var(--ink-2); transition: color .3s; }
.cta-mail:hover { color: var(--ink); }
.sheet-mail { display: block; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.foot-in { padding-bottom: 40px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 24px; padding: 56px 0; border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; padding: 80px 0; } }
.foot-brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) { .foot-brand { grid-column: auto; } }
.foot-brand p { max-width: 20rem; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.open { display: inline-flex; align-items: center; gap: 8px; width: fit-content; border: 1px solid var(--pill-line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.open::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--flame); }
.foot nav { display: flex; flex-direction: column; gap: 14px; }
.foot nav ul { display: flex; flex-direction: column; gap: 10px; }
.foot nav a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-2); transition: color .3s; }
.foot nav a svg { width: 14px; height: 14px; opacity: 0; transform: translate(-4px, 4px); transition: opacity .3s var(--ease), transform .4s var(--out); }
.foot nav a:hover { color: var(--ink); }
.foot nav a:hover svg { opacity: 1; transform: none; }
.word { overflow: hidden; border-top: 1px solid var(--line); padding-top: 40px; pointer-events: none; user-select: none; }
.word span { display: block; font-size: 20vw; line-height: .8; font-weight: 500; letter-spacing: -.05em; color: var(--word); white-space: nowrap; }
@media (min-width: 1440px) { .word span { font-size: 288px; } }
.legal { display: flex; flex-direction: column; gap: 12px; padding-top: 32px; font-size: 13px; color: var(--ink-3); }
@media (min-width: 640px) { .legal { flex-direction: row; justify-content: space-between; } }

/* Scroll motion. Only runs when JS is on; without it everything is simply visible. */
.js [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--out), transform 1.2s var(--out); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="frame"] { opacity: 1; transform: none; clip-path: inset(14% 10% 14% 10% round 20px); transition: clip-path 1.4s var(--out); transition-delay: var(--d, 0ms); }
.js [data-reveal="frame"].in { clip-path: inset(0 0 0 0 round 20px); }
.js [data-reveal="frame"]::before { transform: scale(1.25); }
.js [data-reveal="frame"].in::before { transform: none; }
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--out); transition-delay: calc(var(--d, 0ms) + var(--i) * 40ms); }
.js [data-split].in .w > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-split] .w > span { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .slab-top::after { animation: none !important; }
}
.door > .pill { align-self: flex-start; }

/* About and Greek bio pages */
.bio { max-width: 68ch; }
.bio h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; margin: 48px 0 12px; }
.bio h2:first-child { margin-top: 0; }
.bio p, .bio li { font-size: 17px; line-height: 1.6; }
.bio ul { margin-top: 12px; padding-left: 20px; list-style: disc; }
.bio li + li { margin-top: 6px; }
.bio a { text-decoration: underline; text-underline-offset: 3px; }

/* Company analysis articles (/investing/<company>) */
.art > * { min-width: 0; }
.art { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1024px) { .art { grid-template-columns: 4fr 8fr; gap: 64px; } }
.art-side { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
@media (min-width: 1024px) { .art-side { position: sticky; top: 110px; align-self: start; } }
.art-side dl { display: grid; gap: 14px; }
.art-side dt { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.art-side dd { margin-top: 2px; font-size: 15px; color: var(--ink); }
.art-body { max-width: 68ch; }
.art-body h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; margin: 72px 0 16px; scroll-margin-top: 100px; }
.art-body h2:first-child { margin-top: 0; }
.art-body p, .art-body li { font-size: 17px; line-height: 1.65; }
.art-body p + p { margin-top: 16px; }
.art-body ul { margin-top: 16px; padding-left: 20px; list-style: disc; }
.art-body li + li { margin-top: 8px; }
.art-body strong { font-weight: 600; }
.art-body a { text-decoration: underline; text-underline-offset: 3px; }
.art-body .small { font-size: 14px; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 28px 0; border-radius: 16px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact { background: var(--card); padding: 18px; }
.fact b { display: block; font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 500; letter-spacing: -.02em; }
.fact span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.tbl-wrap { margin: 28px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl caption { caption-side: bottom; text-align: left; padding: 12px 16px; font-size: 12px; color: var(--ink-3); }
.tbl th, .tbl td { padding: 12px 16px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child, .tbl .w { text-align: left; white-space: normal; }
.tbl .w { min-width: 16ch; }
.tbl thead th { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .hl td { background: rgb(255 95 3 / .07); font-weight: 600; }
.hbars { margin: 28px 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.hbars-t { font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.hbars-key { display: flex; gap: 16px; margin-bottom: 14px; font-size: 12px; color: var(--ink-2); }
.hbars-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hb-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.hb-row + .hb-row { margin-top: 12px; }
.hb-row > span { color: var(--ink-2); }
.hb-pair { display: grid; gap: 4px; }
.hb { position: relative; height: 18px; border-radius: 4px; width: var(--v); min-width: 2px; background: var(--solid); }
.hb.b2 { background: var(--flame); }
.hb em { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.hb-pair { padding-right: 64px; }
.hbars-note { margin-top: 14px; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.callout { margin: 28px 0; padding: 20px 22px; border-radius: 16px; background: var(--card); border-left: 3px solid var(--flame); }
.callout p { font-size: 17px; line-height: 1.6; }
.watch { counter-reset: w; list-style: none !important; padding-left: 0 !important; }
.watch li { counter-increment: w; position: relative; padding-left: 40px; }
.watch li::before { content: counter(w); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 999px; background: var(--solid); color: var(--solid-fg); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.toc { margin-top: 28px; display: grid; gap: 8px; }
.toc a { font-size: 14px; color: var(--ink-2); transition: color .3s; }
.toc a:hover { color: var(--ink); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); margin-bottom: 20px; }
.back svg { width: 14px; height: 14px; transform: rotate(180deg); }
a.row { transition: background-color .3s var(--ease); }
a.row:hover .row-t { color: var(--flame); }
.row-t { transition: color .3s var(--ease); }
