/* Dragan Basta — portfolio. Quiet editorial system.
   Cormorant Garamond for display, Hanken Grotesk for text, one oxblood accent, hairline rules. */

:root {
  --paper: #f8f7f4;
  --paper-2: #efede7;
  --ink: #1b1a19;
  --soft: #55514c;
  --faint: #6a655e;
  --hair: #dcd8d0;
  --accent: #7a2331;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --script: "Mrs Saint Delafield", "Snell Roundhand", cursive;
  --gut: 40px;
  --max: 1200px;
  --grain-op: .045; --grain-blend: multiply; --wash: #7a2331; --wash-op: .07;
  --ease-out: cubic-bezier(.16,1,.3,1); --ease-ink: cubic-bezier(.2,.7,.2,1); --ease-inout: cubic-bezier(.65,0,.35,1); --ease-pen: cubic-bezier(.45,.05,.35,1);
  --d-l: 1000ms; --stagger: 70ms; --rise: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131417; --paper-2: #1a1b1f; --ink: #ece8e1; --soft: #b8b2a9; --faint: #9e988f;
    --hair: #2c2d31; --accent: #d2a676; --grain-op: .035; --grain-blend: screen; --wash: #d2a676; --wash-op: .06; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131417; --paper-2: #1a1b1f; --ink: #ece8e1; --soft: #b8b2a9; --faint: #9e988f;
  --hair: #2c2d31; --accent: #d2a676; --grain-op: .035; --grain-blend: screen; --wash: #d2a676; --wash-op: .06; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.75 var(--sans); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--paper); }
a { color: inherit; text-decoration: none; }
p a, .link { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; }
p a:hover, .link:hover { color: var(--accent); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
/* Decorative text lives in data-deco (see decor() in build.py): visible, but not read aloud, copied or shown in reader mode */
[data-deco]::before { content: attr(data-deco); }
[data-deco] { user-select: none; }
.motif, .ph { user-select: none; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
@media (max-width: 700px) { :root { --gut: 20px; } body { font-size: 16.5px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.caps { font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rn { font-family: var(--serif); font-style: italic; color: var(--accent); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair); }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; gap: 16px; }
.top nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.top nav.right ul { justify-content: flex-end; }
.top nav a, .toggle { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.top nav a:hover, .toggle:hover { color: var(--accent); }
.monogram { font-family: var(--serif); font-size: 22px; letter-spacing: .08em; color: var(--ink); }
.monogram i { color: var(--accent); font-style: normal; padding: 0 2px; }
.toggle { background: none; border: 0; cursor: pointer; padding: 0; font-family: var(--sans); }
@media (max-width: 820px) {
  .top .wrap { grid-template-columns: auto 1fr; }
  .top nav.left { display: none; }
  .top nav.right li:not(.keep) { display: none; }
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 120px; padding-bottom: 96px; }
.portrait { position: relative; width: 208px; height: 208px; margin: 0 auto 44px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; border-radius: 50%; display: block; }
/* open hairline ring around the photo, with a small accent mark like a pen tick */
.portrait::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid var(--hair);
  -webkit-mask: conic-gradient(from 200deg, transparent 0 28deg, #000 28deg); mask: conic-gradient(from 200deg, transparent 0 28deg, #000 28deg); }
.portrait::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  left: 50%; top: 50%; transform: rotate(138deg) translate(118px) ; transform-origin: 0 0; }
@media (max-width: 700px) { .portrait { width: 168px; height: 168px; } .portrait::after { transform: rotate(138deg) translate(98px); } }
@media (prefers-reduced-motion: no-preference) {
  .mo .portrait::before { animation: ring-open 1.6s var(--ease-inout) .5s both; }
  @keyframes ring-open { from { transform: rotate(-90deg); opacity: 0; } }
}
.hero .caps { display: block; margin-bottom: 28px; }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 9vw, 124px); line-height: .95; letter-spacing: -0.01em; }
.hero .tagline { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; color: var(--soft); max-width: 30ch; margin: 30px auto 0; }
.hero .tagline em { color: var(--accent); }
.hero .intro { max-width: 58ch; margin: 28px auto 0; color: var(--soft); }
.hero .actions { display: flex; justify-content: center; gap: 36px; margin-top: 40px; flex-wrap: wrap; }
.hero .actions a { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.hero .actions a:hover { color: var(--accent); border-color: var(--accent); }

.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin-top: 88px; text-align: center; }
.facts-row div { padding: 30px 16px; }
.facts-row div + div { border-left: 1px solid var(--hair); }
.facts-row b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.6vw, 48px); line-height: 1; }
.facts-row span { display: block; margin-top: 12px; font-size: 13.5px; color: var(--soft); line-height: 1.5; max-width: 22ch; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) {
  .hero { padding-top: 64px; padding-bottom: 56px; }
  .facts-row { grid-template-columns: 1fr 1fr; margin-top: 56px; }
  .facts-row div:nth-child(3) { border-left: 0; }
  .facts-row div:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
}

/* ---------- Section heads ---------- */
.section { padding-top: 128px; }
.head { text-align: center; margin-bottom: 72px; }
.head .rn { display: block; font-size: 22px; margin-bottom: 14px; }
.head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.005em; }
.head h2 em { font-style: italic; }
.head p { color: var(--soft); max-width: 56ch; margin: 18px auto 0; }
@media (max-width: 760px) { .section { padding-top: 88px; } .head { margin-bottom: 48px; } }

/* ---------- Leadership note (letter) ---------- */
.letter { background: var(--paper-2); padding-top: 112px; padding-bottom: 112px; }
.letter .caps { display: block; text-align: center; margin-bottom: 18px; }
.letter h2 { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(36px, 4.6vw, 56px); text-align: center; line-height: 1.1; margin-bottom: 56px; }
.letter p { font-family: var(--serif); font-size: clamp(20px, 1.9vw, 23px); line-height: 1.6; color: var(--ink); }
.letter p + p { margin-top: 22px; }
.letter .body > p:first-child::first-letter { float: left; font-size: 4.6em; line-height: .82; padding: 8px 6px 0 0; color: var(--accent); font-weight: 400; }
.signature { margin-top: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.signature .sig { font-family: var(--script); font-size: 64px; line-height: 1; color: var(--ink); transform: rotate(-4deg); transform-origin: left bottom; }
.signature .who { text-align: right; }
.signature .who b { display: block; font-family: var(--serif); font-weight: 500; font-size: 20px; }
.signature .who span { font-size: 13px; color: var(--soft); }
@media (max-width: 760px) { .letter { padding-top: 72px; padding-bottom: 72px; } .signature .sig { font-size: 52px; } }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px var(--gut); }
.principle { border-top: 1px solid var(--hair); padding-top: 24px; }
.principle .rn { font-size: 20px; }
.principle h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 10px 0 12px; }
.principle p { color: var(--soft); font-size: 16px; }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .principles { grid-template-columns: 1fr; gap: 36px; } }
/* "Leading at scale": four story cards, same rhythm as the principles */
.scale { display: grid; grid-template-columns: 1fr 1fr; gap: 56px var(--gut); }
.scale-card { border-top: 1px solid var(--hair); padding-top: 24px; }
.scale-card h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 10px 0 12px; }
.scale-card p { color: var(--soft); font-size: 16px; }
.scale-card p + p { margin-top: 10px; }
@media (max-width: 600px) { .scale { grid-template-columns: 1fr; gap: 36px; } }
/* "In practice" leadership stories: a horizontal swipe carousel (arrows appear when there are 2+) */
.stories { max-width: 760px; margin: 88px auto 0; padding-top: 32px; border-top: 1px solid var(--hair); }
.stories-top { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 32px; }
.stories-nav { display: flex; align-items: center; gap: 14px; }
.stories-nav[hidden] { display: none; }
.stories-top:has(.stories-nav:not([hidden])) { justify-content: space-between; }
.stories-nav button { font: inherit; font-size: 18px; line-height: 1; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hair); background: transparent; color: var(--ink); cursor: pointer; transition: border-color .2s, color .2s; }
.stories-nav button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.stories-nav button:disabled { opacity: .35; cursor: default; }
.stories-count { font-family: var(--sans); font-size: 12.5px; letter-spacing: .14em; color: var(--faint); min-width: 3.2em; text-align: center; }
.stories-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; margin-top: 20px; }
.stories-track::-webkit-scrollbar { display: none; }
.stories-track:focus-visible { outline: 1px solid var(--accent); outline-offset: 8px; }
.story { flex: 0 0 100%; scroll-snap-align: center; text-align: center; padding: 0 8px; box-sizing: border-box; }
.story > .caps { display: block; }
.story-title { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; margin: 14px 0 26px; color: var(--ink); }
.scribble { position: relative; display: inline-block; }
.scribble svg { position: absolute; left: -3%; bottom: -.32em; width: 106%; height: .42em; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.scribble path + path { stroke-width: 1.4; opacity: .7; }
.mo .scribble path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.mo .story-title.in .scribble path { animation: ink-draw .9s var(--ease-pen) .45s forwards; }
.mo .story-title.in .scribble path + path { animation-delay: 1.15s; animation-duration: .6s; }
.story-lede { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.3; color: var(--ink); margin: 0 0 20px; }
.story p:not(.story-lede) { color: var(--soft); margin: 0 auto; max-width: 620px; }
.story p:not(.story-lede) + p { margin-top: 14px; }
@media (max-width: 600px) { .stories { margin-top: 56px; } .story { text-align: left; padding: 0; } .stories-top { justify-content: space-between; } }
@media (prefers-reduced-motion: reduce) { .stories-track { scroll-behavior: auto; } }
.team-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gut); margin-top: 88px; }
.team-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(.35); }
.team-strip figcaption { margin-top: 12px; font-family: var(--serif); font-style: italic; color: var(--soft); text-align: center; }
@media (max-width: 640px) { .team-strip { grid-template-columns: 1fr 1fr; gap: 14px; } }

/* ---------- Work ---------- */
.group { display: flex; align-items: center; gap: 20px; margin: 112px 0 56px; }
.group:first-child { margin-top: 0; }
.group::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.group .caps { color: var(--soft); }

.feature { display: grid; grid-template-columns: 7fr 5fr; gap: 72px; align-items: center; }
.feature + .feature { margin-top: 112px; }
.feature.flip { grid-template-columns: 5fr 7fr; }
.feature.flip .media { order: 2; }
.feature .media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.feature .media img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) { .feature .media img, .tile .media img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); } }
.feature:hover .media img, .tile:hover .media img { transform: scale(1.025); }
.feature .rn { font-size: 22px; }
.feature .caps { display: block; margin: 10px 0 14px; }
.feature h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4vw, 54px); line-height: 1.02; }
.feature p { color: var(--soft); margin-top: 20px; }
.feature .meta { margin-top: 22px; font-size: 13.5px; color: var(--faint); }
.feature .links { margin-top: 30px; display: flex; gap: 28px; flex-wrap: wrap; }
.more-link { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid currentColor; }
.more-link:hover { color: var(--accent); }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .media { order: 0; }
  .feature + .feature { margin-top: 72px; }
}

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px var(--gut); }
.tile .media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); margin-bottom: 22px; }
.tile .media img { width: 100%; height: 100%; object-fit: cover; }
.tile .caps { display: block; margin-bottom: 8px; }
.tile h3 { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.15; }
.tile h3 a:hover { color: var(--accent); }
.tile p { color: var(--soft); font-size: 16px; margin: 10px 0 18px; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr; } }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.ledger li { display: grid; grid-template-columns: 4fr 6fr 3fr; gap: var(--gut); padding: 26px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.ledger h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; }
.ledger p { color: var(--soft); font-size: 16px; }
.ledger .caps { text-align: right; }
@media (max-width: 760px) { .ledger li { grid-template-columns: 1fr; gap: 6px; } .ledger .caps { text-align: left; } }

/* Placeholder art until real images exist: quiet tonal panel with italic initials */
.ph { width: 100%; height: 100%; display: grid; place-items: center; position: relative;
  background: color-mix(in srgb, var(--c, #7a2331) 14%, var(--paper-2)); }
.ph::before { content: ""; position: absolute; inset: 14px; border: 1px solid color-mix(in srgb, var(--c, #7a2331) 30%, transparent); }
.ph b { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(56px, 7vw, 96px); color: color-mix(in srgb, var(--c, #7a2331) 70%, var(--ink)); letter-spacing: .02em; }

/* ---------- Approach (AI) ---------- */
.approach { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gut); }
.step { border-top: 1px solid var(--ink); padding-top: 22px; }
.step .rn { font-size: 20px; }
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.2; margin: 8px 0 12px; }
.step p { color: var(--soft); font-size: 16px; }
.step code { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }
@media (max-width: 900px) { .approach { grid-template-columns: 1fr 1fr; gap: 48px var(--gut); } }
@media (max-width: 560px) { .approach { grid-template-columns: 1fr; } }

/* ---------- Growth ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.trio div { padding: 40px 36px; text-align: center; }
.trio div + div { border-left: 1px solid var(--hair); }
.trio h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 32px; margin: 10px 0 14px; }
.trio p { color: var(--soft); font-size: 16px; }
@media (max-width: 860px) { .trio { grid-template-columns: 1fr; } .trio div + div { border-left: 0; border-top: 1px solid var(--hair); } .trio div { padding: 32px 8px; } }

/* ---------- CV ---------- */
.cv { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.cv li { display: grid; grid-template-columns: 2fr 4fr 6fr; gap: var(--gut); padding: 30px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.cv .when { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.cv h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; }
.cv .org { display: block; margin-top: 4px; font-size: 14px; color: var(--soft); }
.cv p { color: var(--soft); font-size: 16px; }
@media (max-width: 760px) { .cv li { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Notes ---------- */
.notes-list { list-style: none; margin: 0; padding: 0; }
.notes-list li + li { border-top: 1px solid var(--hair); }
.notes-list a { display: block; padding: 32px 0; text-align: center; }
.notes-list .caps { display: block; margin-bottom: 10px; }
.notes-list b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
.notes-list small { display: block; color: var(--soft); font-size: 16px; margin: 10px auto 0; max-width: 56ch; }
.notes-list a:hover b { color: var(--accent); }

/* ---------- Contact ---------- */
.contact { text-align: center; padding-top: 152px; padding-bottom: 112px; }
.contact h2 { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(48px, 7vw, 96px); line-height: 1; }
.contact p { color: var(--soft); max-width: 52ch; margin: 24px auto 0; }
.contact .email { display: inline-block; margin-top: 40px; font-family: var(--serif); font-size: clamp(24px, 3.2vw, 38px); border-bottom: 1px solid var(--hair); padding-bottom: 6px; }
.contact .email:hover { color: var(--accent); border-color: var(--accent); }
.contact .elsewhere { margin-top: 28px; display: flex; gap: 28px; justify-content: center; }

footer.foot { border-top: 1px solid var(--hair); }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 28px; }
footer.foot span, footer.foot a { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
footer.foot a:hover { color: var(--accent); }

/* ---------- Case study pages ---------- */
.case-head { text-align: center; padding-top: 88px; }
.case-head .back { display: inline-block; margin-bottom: 48px; }
.case-head .back:hover { color: var(--accent); }
.case-head .rn { display: block; font-size: 22px; margin-bottom: 10px; }
.case-head h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(52px, 8vw, 112px); line-height: .98; }
.case-head .lede { font-family: var(--serif); font-style: italic; font-size: clamp(21px, 2.4vw, 28px); line-height: 1.4; color: var(--soft); max-width: 40ch; margin: 28px auto 0; }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 64px 0 0; text-align: center; }
.specs div { padding: 24px 16px; }
.specs div + div { border-left: 1px solid var(--hair); }
.specs dt { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.specs dd { margin: 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 860px) {
  .specs { grid-template-columns: 1fr 1fr; }
  .specs div:nth-child(3) { border-left: 0; }
  .specs div:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
}
.case-hero { margin-top: 64px; display: flex; justify-content: center; }
.case-hero img, .case-hero video { display: block; width: auto; max-width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
.case-body { padding-top: 40px; }
.chapter { padding-top: 64px; }
.chapter .rn { display: block; text-align: center; font-size: 20px; }
.chapter h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 40px); text-align: center; line-height: 1.15; margin: 6px 0 28px; }
.chapter .text p { font-size: 18px; line-height: 1.8; }
.chapter .text p + p, .chapter .text ul + p, .chapter .text p + ul { margin-top: 18px; }
.chapter .text ul { margin: 0; padding: 0; list-style: none; }
.chapter .text li { padding: 14px 0 14px 28px; border-top: 1px solid var(--hair); position: relative; font-size: 17px; }
.chapter .text li:last-child { border-bottom: 1px solid var(--hair); }
.chapter .text li::before { content: "·"; position: absolute; left: 8px; color: var(--accent); font-weight: 700; }
.gallery-wrap { padding-top: 112px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gut); }
.gallery figure:nth-child(3n + 1) { grid-column: 1 / -1; }
.gallery figcaption { margin-top: 12px; text-align: center; font-family: var(--serif); font-style: italic; color: var(--soft); }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }
.next-case { display: block; text-align: center; margin-top: 136px; padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--hair); }
.next-case b { display: block; margin-top: 14px; font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(40px, 6vw, 80px); line-height: 1; }
.next-case:hover b { color: var(--accent); }

/* ---------- Notes (articles) ---------- */
.post { padding-top: 96px; padding-bottom: 64px; }
.post-head { text-align: center; margin-bottom: 56px; }
.post-head .caps { display: block; }
.post h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 6vw, 76px); line-height: 1.02; max-width: 18ch; margin: 22px auto 22px; }
.post .body { font-family: var(--serif); font-size: clamp(19px, 1.8vw, 21.5px); line-height: 1.7; }
.post .body h2 { font-weight: 500; font-size: 28px; margin: 48px 0 12px; line-height: 1.2; }
.post .body p { margin: 0 0 18px; }
.post .body > p:first-of-type::first-letter { float: left; font-size: 4.4em; line-height: .82; padding: 8px 10px 0 0; color: var(--accent); }
.post .body code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; background: var(--paper-2); padding: 1px 5px; }
.post .body blockquote { margin: 40px 0; padding: 28px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); text-align: center; font-style: italic; font-size: clamp(26px, 3vw, 34px); line-height: 1.3; color: var(--accent); }
.post .body .end { font-family: var(--sans); font-size: 15px; border-top: 1px solid var(--hair); padding-top: 22px; margin-top: 48px; color: var(--soft); }


/* =====================================================================
   Layer 2: paper, ink and proof marks (senior UI spec)
   ===================================================================== */

/* Paper grain over everything */
html::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: var(--grain-op); mix-blend-mode: var(--grain-blend); background-size: 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (max-width: 700px) { html::after { mix-blend-mode: normal; opacity: .035; } }

/* Ink wash behind hero and contact */
.hero, .contact { position: relative; isolation: isolate; }
body { overflow-x: clip; }
.hero::before, .contact::before { content: ""; position: absolute; inset: -6% 0 0; z-index: -1; pointer-events: none;
  background: var(--wash); opacity: var(--wash-op);
  -webkit-mask: url(images/ink-wash.svg) center / cover no-repeat; mask: url(images/ink-wash.svg) center / cover no-repeat; }
.contact::before { transform: scaleX(-1); }
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: drift 60s ease-in-out infinite alternate; }
  @keyframes drift { to { transform: translate3d(-2%, 1.5%, 0) scale(1.04); } }
}

/* Specimen plates */
.ph.has-motif { place-items: stretch; }
.motif { position: absolute; inset: 0; width: 100%; height: 100%; }
.motif rect, .motif path, .motif circle { fill: none; stroke: color-mix(in srgb, var(--c) 70%, var(--ink)); stroke-width: 1; vector-effect: non-scaling-stroke; }
.motif text { font: 10px ui-monospace, Menlo, monospace; fill: var(--accent); stroke: none; }
.motif .mlabel { overflow: visible; }
.motif .mlabel div { font: 10px/14px ui-monospace, Menlo, monospace; color: var(--accent); white-space: nowrap; }
.plate { position: absolute; left: 26px; bottom: 22px; font-family: var(--serif); font-style: italic; font-size: 16px; letter-spacing: .04em; color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.m-wave rect { fill: currentColor; stroke: none; color: color-mix(in srgb, var(--c) 60%, var(--ink)); transform-box: fill-box; transform-origin: center; }
.m-cv .arc { stroke-dasharray: .012 .01; }
.m-cv .bbox { offset-path: path("M70 250Q190 20 320 120"); offset-distance: 58%; offset-rotate: 0deg; }
.m-cv .bbox rect { stroke: var(--accent); }
.m-prose .strike, .m-redline .drift, .m-redline .tick, .m-pose .kp, .m-crystal .facet { stroke: var(--accent); }
.m-pose .kp { fill: var(--accent); }
.m-crystal .facet { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.m-pose .body, .m-pose .rope { transform-box: view-box; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .feature:hover .m-wave rect, .tile:hover .m-wave rect { animation: eq .9s ease-in-out calc(var(--i) * -37ms) infinite alternate; }
  @keyframes eq { to { transform: scaleY(.35); } }
  .m-cv .bbox { transition: offset-distance 1.4s cubic-bezier(.4,0,.2,1); }
  .feature:hover .m-cv .bbox { offset-distance: 96%; }
  .m-prose .strike { stroke-dasharray: 1; stroke-dashoffset: 0; }
  .feature:hover .m-prose .strike { animation: restrike 1.4s var(--ease-ink); }
  @keyframes restrike { from { stroke-dashoffset: 1; } }
  .m-redline .drift { transition: transform .8s var(--ease-out); }
  .tile:hover .m-redline .drift { transform: translate(-4px, -4px); }
  .tile:hover .m-pose .body { animation: hop .5s ease-in-out infinite alternate; }
  .tile:hover .m-pose .rope { animation: swing .5s ease-in-out infinite alternate; transform-origin: 200px 140px; }
  @keyframes hop { to { transform: translateY(-8px); } }
  @keyframes swing { to { transform: scaleY(-1) translateY(-40px); } }
  .m-crystal .facet { transition: transform 1s var(--ease-out); transform-origin: 200px 150px; transform-box: view-box; }
  .tile:hover .m-crystal .facet { transform: rotate(120deg); }
}

/* Hover refinements */
@media (hover: hover) {
  .more-link::after { content: "\2192"; display: inline-block; margin-left: .6em; transition: transform .3s var(--ease-out); }
  .more-link:hover::after { transform: translateX(4px); }
  .ph::before { transition: inset .5s var(--ease-out), border-color .5s; }
  .feature:hover .ph::before, .tile:hover .ph::before { inset: 8px; border-color: color-mix(in srgb, var(--c) 55%, transparent); }
  .feature h3, .tile h3 a { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease-ink); }
  .feature:hover h3, .tile:hover h3 a { background-size: 100% 1px; }
  .tile:hover > .caps { color: var(--accent); }
  .principle { position: relative; }
  .principle::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-ink); }
  .principle:hover::before { transform: scaleX(1); }
  .cv li, .ledger li { position: relative; isolation: isolate; }
  .cv li::before, .ledger li::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gut) / -2); right: calc(var(--gut) / -2); background: var(--paper-2); opacity: 0; z-index: -1; transition: opacity .35s; }
  .cv li:hover::before, .ledger li:hover::before { opacity: 1; }
  .cv .when::before { content: ""; display: inline-block; vertical-align: middle; height: 1px; width: 0; background: currentColor; transition: width .35s, margin .35s; }
  .cv li:hover .when::before { width: 16px; margin-right: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; } }


/* =====================================================================
   Layer 3: motion, "ink system" (senior motion spec). Everything is gated on html.mo,
   which is set only when the visitor hasn't asked for reduced motion.
   ===================================================================== */
@keyframes rise { from { opacity: 0; transform: translate3d(0, var(--rise), 0); } }
@keyframes lineUp { from { transform: translate3d(0, 108%, 0); } }
@keyframes draw { from { transform: scaleX(0); } }

/* Hero load */
.mo .hero > .caps, .mo .hero .tagline, .mo .hero .intro, .mo .hero .actions, .mo .portrait, .mo .facts-row span,
.mo .case-head > * { animation: rise var(--d-l) var(--ease-out) both; animation-delay: var(--t, 0ms); }
.mo .hero .tagline { --t: 560ms; } .mo .hero .intro { --t: 700ms; } .mo .hero .actions { --t: 820ms; } .mo .facts-row span { --t: 1150ms; }
.mo .case-head > :nth-child(2) { --t: 80ms; } .mo .case-head > :nth-child(3) { --t: 160ms; } .mo .case-head > :nth-child(4) { --t: 260ms; } .mo .case-head > :nth-child(n+5) { --t: 420ms; }
.hero h1 .ln { display: inline-block; overflow: clip; padding-bottom: .14em; margin-bottom: -.14em; vertical-align: top; }
.mo .hero h1 .ln > span { display: inline-block; animation: lineUp 1.1s var(--ease-out) .12s both; }
.mo .hero h1 .ln:last-child > span { animation-delay: .22s; }
.mo .facts-row { position: relative; border-color: transparent; }
.mo .facts-row::before, .mo .facts-row::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--hair); animation: draw 1.2s var(--ease-inout) .9s both; }
.mo .facts-row::before { top: -1px; } .mo .facts-row::after { bottom: -1px; }
.facts-row b { font-variant-numeric: tabular-nums lining-nums; }
.mo:not(.ready) .hero *, .mo:not(.ready) .hero *::before, .mo:not(.ready) .hero *::after, .mo:not(.ready) .hero::after,
.mo:not(.ready) .case-head > * { animation-play-state: paused !important; }

/* Scroll reveal (site.js adds data-reveal, then .in) */
.mo [data-reveal] { opacity: 0; transform: translate3d(0, var(--rise), 0);
  transition: opacity var(--d-l) var(--ease-out), transform var(--d-l) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
.mo [data-reveal].in { opacity: 1; transform: none; }
.mo [data-reveal="frame"] { opacity: 1; transform: none; clip-path: inset(6%); transition: clip-path 1.3s var(--ease-inout) 120ms; }
.mo [data-reveal="frame"].in { clip-path: inset(0); }
.mo .group::after { transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-inout) .15s; }
.mo .group.in::after { transform: none; }
.mo .step { border-top-color: transparent; position: relative; }
.mo .step::after { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease-inout); }
.mo .step.in::after { transform: none; transition-delay: calc(var(--i, 0) * var(--stagger)); }

/* Proof marks: ring, margin notes, dotted proof underline */
/* The ring svg sits after the full stop, so text extraction doesn't break the sentence before it */
.ringed { position: relative; display: inline-block; font-style: italic; margin-left: .3em; }
.ringed em { margin-right: .32em; }
.ring { position: absolute; left: -9%; top: -28%; width: calc(118% - .67em); height: 156%; overflow: visible; pointer-events: none; }
.ring path, .marg path { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mo .ring path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ink-draw 1.1s var(--ease-inout) 1.35s forwards; }
.mo:not(.ready) .ring path { animation-play-state: paused; }
@keyframes ink-draw { to { stroke-dashoffset: 0; } }
.mo .marg path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease-inout) .6s; }
.mo .in .marg path { stroke-dashoffset: 0; }
.mo .marg i { opacity: 0; transition: opacity .8s var(--ease-out) 1.2s; }
.mo .in .marg i { opacity: 1; }
.proof { background: radial-gradient(circle, var(--accent) .9px, transparent 1.2px) 0 100% / 5px 3px repeat-x; padding-bottom: 3px; }
.letter .body p { position: relative; }
.marg { display: none; }
@media (min-width: 1180px) {
  .marg { display: block; position: absolute; left: calc(100% + 44px); top: .2em; width: 150px;
    font: italic 400 19px/1.2 var(--serif); color: var(--accent); transform: rotate(-3deg); }
  .marg svg { width: 56px; height: 40px; margin: 0 0 4px -40px; display: block; transform: scaleX(-1); }
}

/* Drop cap settles like ink */
.mo .letter .body > p:first-child::first-letter { color: transparent; text-shadow: 0 0 .3em color-mix(in srgb, var(--accent) 65%, transparent);
  transition: color 1.4s var(--ease-ink) .2s, text-shadow 1.8s var(--ease-ink) .2s; }
.mo .letter .body > p:first-child.in::first-letter { color: var(--accent); text-shadow: 0 0 0 transparent; }

/* Signature writes itself, with a pen lift between the two words */
.mo .signature .sig { padding: .15em .4em; margin: -.15em -.4em;
  -webkit-mask: linear-gradient(90deg, #000 33.3%, transparent 50%) 75% 0 / 300% 100% no-repeat;
          mask: linear-gradient(90deg, #000 33.3%, transparent 50%) 75% 0 / 300% 100% no-repeat; }
.mo .signature.in .sig { animation: sign 1.9s var(--ease-pen) .5s forwards; }
@keyframes sign {
  46% { -webkit-mask-position: 25% 0; mask-position: 25% 0; }
  54% { -webkit-mask-position: 25% 0; mask-position: 25% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
.sig { cursor: default; user-select: none; }

/* Header string: vibrates with scroll speed (Gripbeats nod) */
.wave { position: absolute; left: 0; bottom: -6px; width: 100%; height: 12px; pointer-events: none; overflow: visible; }
.wave path { fill: none; stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
@keyframes tick { 30% { transform: translateY(-3px); } }
.beat .monogram i { display: inline-block; animation: tick .5s var(--ease-out) 8; }

/* Belgrade clock colon */
.colon { font-style: normal; }
@media (prefers-reduced-motion: no-preference) { .colon { animation: blink 2s steps(1) infinite; } @keyframes blink { 50% { opacity: 0; } } }

/* Rubber duck */
.duck-wrap { display: inline-flex; align-items: center; gap: 10px; }
.duck { background: none; border: 0; padding: 0; cursor: pointer; color: var(--faint); line-height: 0; }
.duck:hover, .duck:focus-visible { color: var(--accent); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .duck svg { transition: transform .4s var(--ease-out); } .duck:hover svg { transform: rotate(-6deg) translateY(-1px); } }
footer.foot .duck-says { text-transform: none; letter-spacing: .01em; font-family: var(--serif); font-style: italic; font-size: 16px; }
@media (max-width: 600px) { .duck-wrap { order: 3; width: 100%; } }


/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: 88px; align-items: center; }
.about-photo { position: relative; isolation: isolate; aspect-ratio: 3 / 4; max-width: 440px; width: 100%; justify-self: end; }
.about-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--hair); z-index: -1; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: saturate(.9); }
.about-photo:empty, .about-photo:not(:has(img)) { display: none; }
.about-text .rn { display: block; font-size: 22px; margin-bottom: 10px; }
.about-text h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 5vw, 64px); line-height: 1.05; margin-bottom: 24px; }
.about-lede { font-family: var(--serif); font-style: italic; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.4; color: var(--ink); margin-bottom: 20px; }
.about-text p + p { margin-top: 16px; }
.about-text p:not(.about-lede) { color: var(--soft); }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gut); margin: 36px 0 0; border-top: 1px solid var(--hair); }
.about-facts div { padding: 14px 0; border-bottom: 1px solid var(--hair); }
.about-facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.about-facts dt { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.about-facts dd { margin: 4px 0 0; font-family: var(--serif); font-size: 19px; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 56px; }
  .about-photo { justify-self: center; max-width: 360px; }
}
@media (max-width: 480px) { .about-facts { grid-template-columns: 1fr; } }


/* ---------- Growth metrics ---------- */
.trio .metric { margin: 4px 0 18px; }
.trio .metric b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.4vw, 46px); line-height: 1.05; color: var(--accent); }
.trio .metric span { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.trio p + p { margin-top: 12px; }
.trio div { text-align: left; }
.trio h3 { margin-bottom: 8px; }
/* Blanks Dragan still has to fill in. deploy.sh refuses to publish while any remain. */
mark.fill { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); padding: 0 4px; border-bottom: 1px dashed var(--accent); font-style: normal; }

.duck-says:empty { display: none; }
.duck { padding: 6px; margin: -6px; border-radius: 50%; }  /* bigger touch target */

/* ---------- Director variant: org numbers ---------- */
.org-numbers { margin: 0 0 72px; }
