/* Khanh Ngo — rebuild of the ngokhanh.com layout.
   Tokens first; everything else reads from them. */
:root {
  --teal: #2ec4b6;          /* accent: icons, rules, active nav on dark */
  --teal-ink: #0d7d71;      /* teal that passes 4.5:1 with white text / on white */
  --teal-ink-hover: #0a6a60;
  --green: #22a45d;
  --red: #e5484d;
  --ink: #26282d;           /* headings */
  --text: #4a4d55;          /* body on white */
  --muted: #6b6f78;
  --line: #e6e8ec;
  --paper: #ffffff;
  --tint: #f6f7f9;
  --nav: #161616;
  --footer: #1d2233;
  --footer-deep: #161a28;
  --on-dark: #eef0f4;
  --on-dark-muted: #b9bfcc;
  --copper: #c9713f;

  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-head: "Varela Round", "Nunito", system-ui, sans-serif;
  --font-quote: "Montserrat", "Nunito", system-ui, sans-serif;

  --container: 1140px;
  --narrow: 900px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 6px;
  --shadow: 0 10px 30px -12px rgba(20, 24, 36, .28);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1rem/1.75 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--teal-ink-hover); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; color: var(--ink); line-height: 1.25; margin: 0 0 .6em; text-wrap: balance; }
p { margin: 0 0 1.1em; }
strong { color: var(--ink); font-weight: 700; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only {position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--teal-ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow, .narrow { max-width: var(--narrow); }
.center { text-align: center; }
.section { padding: clamp(56px, 8vw, 96px) 0; position: relative; }
.section.tint { background: var(--tint); }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon-lg { width: 44px; height: 44px; stroke-width: 1.5; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.8em; border-radius: 3px; border: 2px solid transparent;
  font: 700 .82rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--teal-ink); color: #fff; }
.btn-solid:hover { background: var(--teal-ink-hover); color: #fff; box-shadow: 0 8px 20px -10px rgba(13, 125, 113, .8); }
.btn-outline { border-color: var(--teal); color: var(--teal-ink); background: transparent; }
.btn-outline:hover { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.btn-light { color: #fff; border-color: var(--teal); }
.btn-light:hover { color: #fff; }
.btn-sm { padding: .55em 1.1em; font-size: .72rem; }
.btn-lg { padding: 1em 2.4em; font-size: .9rem; }
.btn-block { width: 100%; }
.inline-link { color: var(--teal); font-weight: 700; }
.inline-link:hover { color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-solid, body:not(.page-home) .site-header { background: var(--nav); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; max-width: 1280px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; margin-right: auto; }
.brand img { width: 128px; height: auto; }
.brand span { font-size: .56rem; letter-spacing: .12em; color: var(--on-dark-muted); margin-top: -6px; padding-left: 8px; white-space: nowrap; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 1.8vw, 26px); }
.main-nav a {
  color: #fff; text-decoration: none; font-size: .86rem; font-weight: 600; padding: 6px 0; position: relative; white-space: nowrap;
}
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"], .main-nav a:hover { color: var(--teal); }

.lang-switch { display: flex; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 3px; flex: none; }
.lang-switch a {
  color: #fff; text-decoration: none; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  min-width: 40px; min-height: 30px; padding: 0 12px; display: grid; place-items: center; border-radius: 999px;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.lang-switch a:hover { color: var(--teal); }
.lang-switch a[aria-current="true"] { background: var(--teal); color: #10231f; }

.menu-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; min-width: 44px; min-height: 44px; }
.menu-toggle .icon { width: 26px; height: 26px; }
.menu-toggle .icon-close { display: none; }

@media (max-width: 1080px) {
  .menu-toggle { display: grid; place-items: center; }
  .main-nav ul {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--nav); padding: 8px var(--gutter) 20px; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
    box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .7);
  }
  .main-nav a { display: block; padding: 14px 0; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .main-nav a::after { display: none; }
  .site-header.menu-open .main-nav ul { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .site-header.menu-open { background: var(--nav); }
  .site-header.menu-open .icon-open { display: none; }
  .site-header.menu-open .icon-close { display: block; }
  .header-inner { gap: 10px; }
}

/* ---------- hero slider ---------- */
.hero { position: relative; height: min(100svh, 860px); min-height: 560px; background: #1f2023; color: #fff; overflow: hidden; }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity 1.1s var(--ease); display: grid; place-items: center; }
.slide.is-active { opacity: 1; }
/* portrait photos: blurred copy fills the frame, the sharp photo sits centred */
.slide::before { content: ""; position: absolute; inset: -40px; background: var(--slide) var(--pos, center) / cover no-repeat; filter: blur(28px) brightness(.72); transform: scale(1.1); }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); } /* every slide fills the banner identically */
.slide::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 50% 58%, rgba(0, 0, 0, .45), transparent 75%), linear-gradient(to top, rgba(0, 0, 0, .35), transparent 40%); }
.slide-copy { position: relative; z-index: 2; text-align: center; padding: 0 var(--gutter); margin-top: clamp(80px, 22vh, 240px); }
.hero-quote {
  font: italic 700 clamp(1.5rem, 3.6vw, 2.6rem)/1.3 var(--font-quote);
  color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .55); margin: 0 0 1.1em; letter-spacing: -.01em;
}
.slide.is-active .hero-quote, .slide.is-active .btn { animation: rise 1s var(--ease) both; }
.slide.is-active .btn { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.hero-dots { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; } /* stacked above the press bar */
.hero-dots button { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.hero-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .45); transition: background-color .3s, transform .3s var(--ease); }
.hero-dots button[aria-current="true"]::before { background: var(--teal); transform: scale(1.25); }

/* press bar: pinned inside the bottom of the hero, lifted so it reads as clickable */
.press-wrap { position: absolute; z-index: 5; left: 0; right: 0; bottom: clamp(16px, 3.5vh, 32px); }
.press-bar {
  background: #fff; border-radius: 6px; max-width: 980px; margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: clamp(16px, 3vw, 32px);
  box-shadow: 0 22px 44px -14px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .18);
  animation: press-in .9s var(--ease) .35s both;
}
@keyframes press-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.press-label {
  margin: 0; flex: none; font: 700 .72rem/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal-ink); padding-right: clamp(16px, 3vw, 32px); border-right: 1px solid var(--line); max-width: 9em;
}
.press-bar ul { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; align-items: center; justify-content: space-around; gap: clamp(8px, 2vw, 28px); flex-wrap: wrap; }
/* dividers between logos: equal cells with a hairline between each */
.press-bar li { display: flex; justify-content: center; }
@media (min-width: 641px) {
  .press-bar ul { flex-wrap: nowrap; gap: 0; }
  .press-bar li { flex: 1; padding: 0 clamp(6px, 1.2vw, 16px); }
  .press-bar li + li { border-left: 1px solid #d9dde3; }
}
.press-bar a { display: block; padding: 6px; border-radius: 4px; transition: background-color .25s var(--ease); }
.press-bar img { height: 30px; width: auto; max-width: 136px; object-fit: contain; transition: transform .3s var(--ease); }
.press-bar a:hover { background: var(--tint); }
.press-bar a:hover img, .press-bar a:focus-visible img { transform: translateY(-3px) scale(1.05); }

/* ---------- section titles ---------- */
.section-title { text-align: center; margin-bottom: clamp(32px, 5vw, 52px); }
.section-title h2, .section-title h1 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin-bottom: .3em; }
.section-sub { font-style: italic; font-weight: 700; font-size: .92rem; color: var(--muted); margin: 0 0 18px; }
.section-title .bar { display: block; width: 240px; max-width: 60%; height: 2px; margin: 0 auto; background: linear-gradient(90deg, transparent, #9fded7 20%, #9fded7 80%, transparent); position: relative; }
.section-title .bar::after { content: ""; position: absolute; left: 50%; top: -2px; width: 44px; height: 6px; transform: translateX(-50%); background: var(--teal); border-radius: 3px; }
.section-title.is-light h2 { color: #fff; }
.section-title.is-light .section-sub { color: var(--on-dark-muted); }

/* ---------- home: intro ---------- */
.intro { padding-top: clamp(64px, 8vw, 104px); }
.intro-grid { max-width: 980px; }
/* first three paragraphs beside the photo; the photo is exactly as tall as they are,
   so its bottom always lines up with the end of the third paragraph. The rest runs full width below. */
.intro-top { display: grid; grid-template-columns: 1fr minmax(240px, 34%); gap: clamp(28px, 5vw, 56px); align-items: stretch; }
.intro-text.prose, .intro-rest.prose { max-width: none; }
.intro-text > p:last-child { margin-bottom: 0; }
.intro-photo { margin: 6px 0 0; position: relative; min-height: 320px; box-shadow: var(--shadow); }
/* main.js sizes this column to the photo's own 3:4 shape, so it shows whole with no bars */
.intro-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.intro-rest { margin-top: 1.1em; }
.prose { max-width: 70ch; }
.narrow .prose { max-width: none; } /* Book + Community: text runs as wide as the photos above it */
.prose > * + h2, .prose > * + h3 { margin-top: 1.6em; }
.stats-bar {
  list-style: none; margin: clamp(48px, 7vw, 72px) auto 0; padding: 26px clamp(16px, 4vw, 40px); max-width: 860px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius);
}
.stats-bar li { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon num" "icon label" "icon btn"; column-gap: 14px; align-items: center; justify-content: center; }
.stat-icon { grid-area: icon; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.stat-icon .icon { width: 28px; height: 28px; }
.stat-tiktok { background: #111; }
.stat-facebook { background: #1877f2; }
.stat-youtube { background: #ff0033; }
.stat-num { grid-area: num; font: 700 1.25rem/1.1 var(--font-body); color: var(--ink); }
.stats-bar li.is-live .stat-num::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; vertical-align: middle; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34, 164, 93, .18); } /* live-data dot */
.stat-label { grid-area: label; font-size: .8rem; color: var(--muted); }
.stats-bar .btn { grid-area: btn; justify-self: start; margin-top: 6px; }

/* ---------- dark photo sections ---------- */
.dark-photo { color: var(--on-dark); background: #14161c; overflow: hidden; isolation: isolate; }
.dark-photo::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--bg) center / cover no-repeat; }
.dark-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 16, 24, .92), rgba(14, 16, 24, .74)); }
.dark-photo h2, .dark-photo strong { color: #fff; }

/* ---------- home: book split ---------- */
/* vertical padding lives on the section, so the photo spans exactly heading-top to button-bottom */
.book-split { display: grid; grid-template-columns: 1fr 1fr; background: #fff; padding-block: clamp(40px, 6vw, 80px); }
.book-split-img { margin: 0; background: #2a2b2f; position: relative; min-height: 420px; overflow: hidden; }
/* crossfading book slideshow */
.b-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s var(--ease); }
.b-slide.is-active { opacity: 1; }
.book-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; }
.book-dots button { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.book-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); transition: background-color .3s, transform .3s var(--ease); }
.book-dots button[aria-current="true"]::before { background: var(--teal); transform: scale(1.25); }
.book-split-copy { padding: 0 clamp(24px, 5vw, 72px); align-self: center; max-width: 620px; }
.book-split-copy h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
.check-list { list-style: none; padding: 0; margin: 0 0 1.6em; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon { color: #fff; fill: var(--green); stroke: #fff; width: 22px; height: 22px; margin-top: 3px; }

/* ---------- home: signature intro ----------
   The <html class="sig-intro-on"> flag is set in <head> (build.py INTRO_HEAD); main.js plays the video and
   shrinks it onto the header logo. The wrapper must NOT create a stacking context: the video's
   mix-blend-mode: screen has to blend with the page itself, so its black background disappears. */
.sig-intro { display: none; }
.sig-intro-on .sig-intro { display: block; }
.sig-intro-scrim { position: fixed; inset: 0; z-index: 300; background: rgba(8, 9, 12, .78); transition: opacity .9s var(--ease); }
.sig-intro-video {
  position: fixed; left: 50%; top: 50%; z-index: 301; width: min(78vw, 880px); height: auto;
  transform: translate(-50%, -50%); transform-origin: 0 0; mix-blend-mode: screen; pointer-events: none;
}
.sig-intro-video.is-flying { transition: transform 1s cubic-bezier(.65, 0, .35, 1), opacity .35s ease; }
.sig-intro-skip {
  position: fixed; z-index: 302; right: 20px; bottom: 20px; padding: 8px 16px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
  background: transparent; color: #fff; font: 600 .78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: opacity .3s ease, border-color .2s;
}
.sig-intro-skip:hover { border-color: #fff; }
.sig-intro.is-leaving .sig-intro-scrim, .sig-intro.is-leaving .sig-intro-skip { opacity: 0; }
.sig-intro-on .brand img { opacity: 0; }
.brand img { transition: opacity .35s ease; }

/* ---------- home: testimonials ---------- */
.testimonials { overflow: hidden; }
.watermark {
  position: absolute; inset: 50% 0 auto; transform: translateY(-50%); margin: 0; text-align: center; white-space: nowrap;
  font: 400 clamp(3rem, 8vw, 6rem)/1 var(--font-head); color: #e8f6fb; letter-spacing: .02em; pointer-events: none; text-transform: uppercase;
}
.t-wrap { position: relative; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 12px; max-width: 1000px; }
/* Card deck: the active card sits on top of a fanned stack (data-pos 0/1/2 set by main.js).
   Next throws the top card aside and the deck steps forward. */
.t-track { display: grid; perspective: 1400px; padding: 10px 0 40px; touch-action: pan-y; }
.t-slide {
  grid-area: 1 / 1; margin: 0; display: grid; grid-template-columns: 140px 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; align-content: center; /* cards share the tallest card's height */
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 24px 50px -28px rgba(20, 24, 36, .45); transform-origin: 50% 100%; pointer-events: none;
  opacity: 0; transform: translateY(54px) scale(.84); z-index: 0;
  transition: transform .8s var(--ease), opacity .5s ease;
}
.t-slide > * { transition: opacity .4s ease .45s; }
.t-slide[data-pos="0"], .t-slide.is-active:not([data-pos]) { opacity: 1; transform: none; z-index: 3; pointer-events: auto; }
.t-slide[data-pos="1"] { opacity: 1; transform: translateY(18px) scale(.95) rotate(-1.4deg); z-index: 2; }
.t-slide[data-pos="2"] { opacity: .9; transform: translateY(36px) scale(.9) rotate(1.6deg); z-index: 1; }
.t-slide[data-pos="1"] > *, .t-slide[data-pos="2"] > * { opacity: 0; }
.t-slide.is-thrown {
  opacity: 0; z-index: 4; transform: translateX(-115%) translateY(-20px) rotate(-14deg);
  transition: transform .75s cubic-bezier(.5, 0, .75, 0), opacity .5s ease-in;
}
.t-slide.is-thrown > * { opacity: 1; transition: none; }
.t-dots { display: flex; justify-content: center; gap: 2px; position: relative; z-index: 1; }
.t-dots button { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.t-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 5px; background: #cfd5dc; transition: width .5s var(--ease), background-color .3s; }
.t-dots button[aria-current="true"]::before { width: 24px; background: var(--teal); }
.t-avatar { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.t-mark { width: 34px; height: 34px; color: var(--teal); fill: var(--teal); stroke: none; }
.t-slide blockquote { margin: 8px 0 12px; }
.t-slide blockquote p { font-size: 1.12rem; line-height: 1.65; color: var(--ink); font-weight: 600; margin: 0; }
.t-slide figcaption { font-size: .92rem; color: var(--muted); }
.t-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: color .2s, border-color .2s; position: relative; z-index: 1; }
.t-arrow:hover { color: var(--teal-ink); border-color: var(--teal); }

/* ---------- post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); margin-bottom: 36px; }
.post-card { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.post-card-img { overflow: hidden; aspect-ratio: 1; display: block; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.12rem; margin-bottom: .6em; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--teal-ink); }
.post-card p { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { margin-top: auto; font-size: .85rem; font-weight: 700; }

/* ---------- inner page banner ---------- */
.page-banner {
  position: relative; isolation: isolate; color: #fff; text-align: center;
  padding: calc(var(--header-h) + clamp(56px, 8vw, 88px)) 0 clamp(56px, 8vw, 88px);
  background: #14161c; overflow: hidden;
}
.page-banner::before { content: ""; position: absolute; inset: -20px; z-index: -2; background: var(--banner) center 30% / cover no-repeat; filter: blur(2px); }
.page-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(14, 18, 30, .72); }
.page-banner h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: .25em; }
.page-banner.is-short h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); max-width: 24ch; margin: .3em auto 0; }
/* Community page: the Young & Successful logo stands in for the title. It is an inline SVG traced from
   Khanh's logo video (_build/trace_ys_logo.py), so it is transparent and sharp at any size. The timings
   re-create the video: the gold "&" draws 0.1-2.4 s, the white lettering fades up 0.2-1.9 s, and
   "//VIET NAM" fades in 2.7-3.1 s. */
.has-title-logo .ys-logo { display: block; width: min(100%, 820px); height: auto; margin: 0 auto .2em; }
.ys-white { animation: ys-fade 1.7s cubic-bezier(.5, 0, .9, .6) .2s both; }
.ys-amp-pen { stroke-dasharray: 1; animation: ys-draw 2.3s cubic-bezier(.45, 0, .7, 1) .1s both; } /* fitted to the video's drawn-area curve */
.ys-viet { animation: ys-fade .45s ease-out 2.7s both; }
@keyframes ys-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ys-draw {
  from { stroke-dashoffset: 1; fill-opacity: 0; }
  80% { fill-opacity: 0; }
  to { stroke-dashoffset: 0; fill-opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .ys-logo * { animation: none !important; } }
.banner-sub { color: var(--on-dark-muted); margin: 0 0 .6em; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: .85rem; }
.crumbs li { display: flex; align-items: center; gap: 8px; color: var(--on-dark-muted); }
.crumbs li + li::before { content: "›"; color: var(--teal); }
.crumbs a { color: #fff; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.crumbs a:hover { color: var(--teal); }
.crumbs .icon { width: 14px; height: 14px; }

/* ---------- about ---------- */
/* photo floats beside the text; once the text passes the photo it wraps full width underneath */
.media-row { display: flow-root; }
.media-row > figure { float: left; width: 260px; margin: 0 clamp(28px, 5vw, 48px) 20px 0; }
.media-row.reverse > figure { float: right; width: 300px; margin: 0 0 20px clamp(28px, 5vw, 48px); }
.media-row .prose { max-width: none; }
.circle-photo img { border-radius: 50%; border: 6px solid #fff; box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; }
.media-row > figure.is-small { width: 220px; } /* Biography photo: smaller so more text wraps under it */
.composed-photo img { width: 100%; } /* transparent webp with a white rim (circles.py) */
.quote-box {
  overflow: hidden; /* narrows beside a floated photo instead of sliding under it */
  margin: 1.6em 0; padding: 26px 32px; border: 1px solid var(--teal); background: #fff; position: relative; text-align: center;
  box-shadow: 0 8px 22px -14px rgba(46, 196, 182, .45);
}
.quote-box::before, .quote-box::after { font: 700 4rem/1 Georgia, serif; color: var(--ink); position: absolute; }
.quote-box::before { content: "“"; left: 14px; top: 4px; }
.quote-box::after { content: "”"; right: 14px; bottom: -22px; }
.quote-box blockquote { margin: 0; }
.quote-box p { font-size: 1.15rem; color: var(--ink); margin: 0 0 .4em; line-height: 1.55; }
.quote-box figcaption { color: var(--copper); font-weight: 700; }
.quote-box figcaption::before { content: "– "; }

/* Quote-box entrance (Justin's pick, sampled from khanhngo.com's text animations): the orange border draws
   itself, the quote marks pop in, the quote's spread-out letters tighten, then the author rises. Plays once
   as each box scrolls into view (main.js adds .q-ready, then .is-in). main.js splits the quote into its lines
   first (.q-line, one no-wrap row each), so a wrapped quote tightens line by line without re-wrapping. */
@keyframes q-rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes q-track { from { opacity: 0; letter-spacing: 10px; color: #a1a1a1; } to { opacity: 1; letter-spacing: 0; color: var(--ink); } }
@keyframes q-pop { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; transform: scale(1.15); } 80% { transform: scale(.95); } 100% { opacity: 1; transform: scale(1); } }
@keyframes q-border { from { background-size: 0 1px, 1px 0, 0 1px, 1px 0, auto; } to { background-size: 100% 1px, 1px 100%, 100% 1px, 1px 100%, auto; } }
.quote-box.q-ready {
  border-color: transparent;
  background: linear-gradient(var(--teal), var(--teal)) left top, linear-gradient(var(--teal), var(--teal)) right top,
              linear-gradient(var(--teal), var(--teal)) right bottom, linear-gradient(var(--teal), var(--teal)) left bottom, #fff;
  background-repeat: no-repeat; background-origin: border-box; background-clip: border-box;
  background-size: 0 1px, 1px 0, 0 1px, 1px 0, auto;
}
.quote-box.q-ready.is-in { animation: q-border .8s ease-out both; }
.q-ready:not(.is-in) :is(p, figcaption), .q-ready:not(.is-in)::before, .q-ready:not(.is-in)::after { opacity: 0; }
.q-ready.is-in::before { animation: q-pop .6s ease-out .5s both; }
.q-ready.is-in::after { animation: q-pop .6s ease-out .75s both; }
.q-ready.is-in p { animation: q-track 1s ease .7s both; }
.q-ready.is-in figcaption { animation: q-rise .7s ease 1.4s both; }
.q-line { display: block; white-space: nowrap; } /* while the letters are spread wide; the box clips the overflow */

.video-frame { margin: 0 0 clamp(28px, 4vw, 44px); }
.video-embed { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: #000; }
.video-frame a {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
  background: #111 var(--poster) center 25% / cover no-repeat; color: #fff; text-decoration: none; box-shadow: var(--shadow);
}
.video-frame a::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .25)); }
.video-title { position: absolute; left: 20px; top: 16px; right: 20px; font-weight: 700; z-index: 1; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.video-play { position: relative; z-index: 1; width: 78px; height: 54px; border-radius: 14px; background: #ff0033; display: grid; place-items: center; transition: transform .3s var(--ease); }
.video-play .icon { fill: #fff; stroke: #fff; width: 26px; height: 26px; }
.video-frame a:hover .video-play { transform: scale(1.08); }

/* ---------- book page ---------- */
.book-parts { list-style: none; padding: 0; margin: 1.4em 0 1.8em; display: grid; gap: 14px; counter-reset: none; }
.book-parts li { padding: 16px 20px; background: var(--tint); border-radius: var(--radius); }
.book-parts h3 { font-size: 1.05rem; margin-bottom: .3em; }
.book-parts p { margin: 0; font-size: .95rem; }
.sign-off { text-align: right; font-style: italic; }
.signature { margin: 0 0 32px auto; width: 220px; text-align: center; }
.signature figcaption { font-size: .62rem; letter-spacing: .16em; color: var(--copper); margin-top: -8px; }
.book-gallery { display: grid; grid-template-columns: 1.4fr .9fr 1.4fr; gap: 4px; background: #111; }
.book-gallery img { width: 100%; height: clamp(220px, 30vw, 420px); object-fit: cover; }

/* ---------- community ---------- */
/* Pinned photo sections (Community page, like khanhngo.com): the photo stays put while the text scrolls
   over it. Done with a fixed layer clipped to the section (clip-path) rather than background-attachment:
   fixed, which iPhone/iPad Safari ignores. */
.pinned { position: relative; clip-path: inset(0); color: var(--on-dark); padding-block: clamp(96px, 13vw, 170px); }
.pinned::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(14, 18, 30, .74), rgba(14, 18, 30, .74)), var(--pin) center / cover no-repeat;
}
.pinned .prose, .pinned .prose p { color: var(--on-dark); }

/* Seam between two pinned photos: an angled crossfade (Justin's pick: the fade of option A on the slant of
   option C). The second section overlaps the first by 220px and fades in along a line that rises to the right,
   echoing the collage's diagonal. The first mask sets the slanted fade; the second (intersected) keeps the
   very top edge fully transparent so no horizontal line shows on very wide screens. */
.pinned + .pinned {
  margin-top: -220px; padding-top: calc(clamp(96px, 13vw, 170px) + 220px);
  -webkit-mask-image: linear-gradient(175deg, transparent 0, transparent 30px, #000 210px), linear-gradient(to bottom, transparent 0, #000 60px);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(175deg, transparent 0, transparent 30px, #000 210px), linear-gradient(to bottom, transparent 0, #000 60px);
  mask-composite: intersect;
}
.pinned:has(+ .pinned) { padding-bottom: calc(clamp(96px, 13vw, 170px) + 220px); } /* its text ends before the overlap */
.pinned strong, .pinned em strong { color: #fff; }
.wide-photo { margin: clamp(28px, 4vw, 44px) 0 0; }
.wide-photo img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
/* transparent collage (cutout.py): the shadow follows the photo shapes, not the image box */
.wide-photo.is-cutout img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 10px 18px rgba(20, 24, 36, .22)); }
/* the two photo cards are separate layers stacked exactly; on scroll-in the top one flies in from the left,
   then the bottom one from the right (main.js adds .anim-ready, then .is-in) */
/* [data-reveal="left|right"]: fade in while sliding in from that side (About page photos). main.js adds
   .reveal-ready (hidden), then .is-in when it scrolls into view. A keyframe animation, not a transition, so it
   plays even when the photo is already on screen at load. */
.reveal-ready[data-reveal] { opacity: 0; }
.reveal-ready[data-reveal="left"].is-in { animation: reveal-left 1.2s var(--ease) both; }
.reveal-ready[data-reveal="right"].is-in { animation: reveal-right 1.2s var(--ease) both; }
@keyframes reveal-left { from { opacity: 0; transform: translateX(-80px); } to { opacity: 1; transform: none; } }
@keyframes reveal-right { from { opacity: 0; transform: translateX(80px); } to { opacity: 1; transform: none; } }
.collage { position: relative; }
.clip-x { overflow-x: clip; } /* the fly-in starts off-screen on phones; don't let it widen the page */
.collage .collage-b { position: absolute; inset: 0; }
/* start fully off-screen (100vw always clears the viewport edge), so the area is blank until they arrive */
.collage.anim-ready img { transition: transform 1.3s cubic-bezier(.16, 1, .3, 1); }
.collage.anim-ready .collage-a { transform: translateX(-100vw); }                       /* top: from the left */
.collage.anim-ready .collage-b { transform: translateX(100vw); transition-delay: .5s; } /* bottom: from the right */
.collage.anim-ready.is-in img { transform: none; }

/* ---------- article ---------- */
.article-layout { max-width: 980px; display: grid; grid-template-columns: 280px 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.article-hero { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.article-hero img { width: 100%; box-shadow: var(--shadow); }
.article-body h2 { font-size: 1.35rem; margin-top: 1.6em; }
.article-body figure { margin: 1.8em 0; }
.article-body figure img { width: 100%; border-radius: var(--radius); }
.article-body figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; font-style: italic; }
.article-body ol:not(.steps) { padding-left: 1.3em; display: grid; gap: .8em; }
blockquote.pull { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 1px solid var(--teal); font-size: 1.05rem; color: var(--ink); font-style: italic; }
blockquote.pull p { margin: 0; }
.steps { list-style: none; padding: 0; margin: 0 0 1.6em; display: grid; gap: 14px; }
.steps li { background: var(--tint); border-radius: var(--radius); padding: 18px 22px; }
.step-n { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--teal-ink); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.steps h2 { font-size: 1.1rem; margin: 0 0 .3em !important; }
.steps p { margin: 0; }
.article-sign { text-align: right; font-style: italic; color: var(--muted); }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; max-width: 980px; }
.post-nav a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); max-width: 46%; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, color .2s; }
.post-nav a:hover { border-color: var(--teal); color: var(--teal-ink); }
.post-nav small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.post-nav-next { margin-left: auto; text-align: right; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); max-width: 1000px; }
.contact-grid h2 { font-size: 1.7rem; }
.contact-info h2 + p { max-width: 46ch; }
.contact-info h2:not(:first-child) { margin-top: 1.4em; }
.contact-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 700; color: var(--ink); }
.req { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .newsletter input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); padding: 12px 14px; border: 1px solid #cfd3da; border-radius: 3px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(46, 196, 182, .25); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red); }
.check { display: flex; gap: 10px; align-items: center; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal-ink); }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer); color: var(--on-dark-muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: clamp(28px, 4vw, 48px); padding-top: 64px; padding-bottom: 48px; }
.site-footer h2 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; color: #fff; margin-bottom: 1em; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--teal); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; line-height: 1.45; }
.newsletter { display: flex; margin: 4px 0 20px; }
.newsletter input { background: #2b3146; border-color: #2b3146; color: #fff; border-radius: 3px 0 0 3px; min-width: 0; padding: 10px 12px; font-size: .9rem; }
.newsletter input::placeholder { color: #a2a9b8; }
.newsletter button { flex: none; border: 0; background: var(--teal-ink); color: #fff; font: 700 .75rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: 0 16px; border-radius: 0 3px 3px 0; cursor: pointer; }
.newsletter button:hover { background: var(--teal-ink-hover); }
.footer-social { display: flex; gap: 10px; }
.social-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff !important; transition: background-color .2s, transform .2s var(--ease); }
.social-icon:hover { background: var(--teal-ink); transform: translateY(-2px); }
.social-icon .icon { width: 18px; height: 18px; }
.footer-social.on-light .social-icon { background: var(--ink); }
.footer-social.on-light .social-icon:hover { background: var(--teal-ink); }
.footer-contact { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 12px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: var(--teal); width: 18px; height: 18px; margin-top: 3px; }
.footer-contact.on-light a { color: var(--text); }
.footer-contact.on-light a:hover { color: var(--teal-ink); }
.ys-mark { font: 700 1rem/1.2 var(--font-body); color: #d9a64e; letter-spacing: .06em; text-transform: uppercase; margin-top: 24px; }
.ys-mark span { font-size: .8rem; letter-spacing: .3em; }
.footer-bottom { background: var(--footer-deep); padding: 16px 0; font-size: .8rem; }
.footer-bottom p { margin: 0; }

/* ---------- toast + placeholder review mode ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .92rem; box-shadow: var(--shadow);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.todo-mode [data-todo] { outline: 2px dashed var(--red) !important; outline-offset: 3px; position: relative; }
.todo-mode [data-todo]::after { content: "TODO: " attr(data-todo); position: absolute; left: 0; top: calc(100% + 6px); background: var(--red); color: #fff; font: 700 11px/1.4 monospace; padding: 2px 6px; white-space: nowrap; z-index: 50; text-transform: none; letter-spacing: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .intro-grid, .book-split, .contact-grid { grid-template-columns: 1fr; }
  .intro-top { grid-template-columns: 1fr; }
  .intro-photo { order: -1; max-width: 420px; width: 100%; margin: 0 auto 8px; min-height: 0; aspect-ratio: 3 / 4; }
  .book-split-img { min-height: 0; aspect-ratio: 3 / 2; }
  .book-split { padding-block: 0; }
  .book-split-copy { padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 72px); }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .media-row > figure, .media-row.reverse > figure { float: none; width: auto; max-width: 280px; margin: 0 auto 24px; }
  .article-hero { position: static; }
  .article-layout { grid-template-columns: 1fr; }
  .article-hero { max-width: 420px; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand img { width: 96px; }
  .hero { min-height: 520px; height: 88svh; }
  .watermark { display: none; }
  .press-bar { flex-direction: column; gap: 8px; padding: 12px 14px; }
  .press-label { border-right: 0; padding-right: 0; max-width: none; font-size: .66rem; }
  .press-bar ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 0; width: 100%; }
  .press-bar li { padding: 0 8px; }
  .press-bar li:not(:nth-child(3n + 1)) { border-left: 1px solid #d9dde3; }
  .press-bar img { height: 22px; max-width: 96px; }
  .stats-bar { grid-template-columns: 1fr; justify-items: start; }
  .stats-bar li { justify-content: start; }
  .post-grid, .footer-grid { grid-template-columns: 1fr; }
  .t-wrap { grid-template-columns: 1fr; }
  .t-arrow { display: none; }
  .t-slide { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px 20px; }
  .t-avatar { width: 110px; height: 110px; }
  .book-gallery { grid-template-columns: 1fr; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: none; }
  .quote-box { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Advice page: card entrance animation (border draw) ----------
   JS adds .anim-ready to the grid, then .is-in to each card as it scrolls into view.
   --d staggers cards left to right within a row. Without JS or with reduced motion, cards just show. */
.post-card { position: relative; }
.post-card .edge { display: none; }
.mask { overflow: hidden; }
.mask > * { display: block; }
.mask > .read-more { display: inline-block; }
.anim-ready .post-card { --d: calc(var(--i, 0) * .15s); }

/* a teal line traces the card, then photo and text rise in, then the line fades */
.anim-ready[data-anim="a"] .post-card { border-color: transparent; transition: border-color .6s ease calc(var(--d) + 1.5s), box-shadow .3s var(--ease), transform .3s var(--ease); }
.anim-ready[data-anim="a"] .post-card.is-in { border-color: var(--line); }
.anim-ready[data-anim="a"] .edge { display: block; position: absolute; z-index: 3; background: var(--teal); pointer-events: none; opacity: 0; }
.anim-ready[data-anim="a"] .edge-t { top: 0; left: 0; width: 100%; height: 2px; transform-origin: left; }
.anim-ready[data-anim="a"] .edge-r { top: 0; right: 0; width: 2px; height: 100%; transform-origin: top; }
.anim-ready[data-anim="a"] .edge-b { bottom: 0; right: 0; width: 100%; height: 2px; transform-origin: right; }
.anim-ready[data-anim="a"] .edge-l { bottom: 0; left: 0; width: 2px; height: 100%; transform-origin: bottom; }
.anim-ready[data-anim="a"] .is-in .edge-t { animation: edge-x 2.1s var(--ease) var(--d) both; }
.anim-ready[data-anim="a"] .is-in .edge-r { animation: edge-y 2.1s var(--ease) calc(var(--d) + .25s) both; }
.anim-ready[data-anim="a"] .is-in .edge-b { animation: edge-x 2.1s var(--ease) calc(var(--d) + .5s) both; }
.anim-ready[data-anim="a"] .is-in .edge-l { animation: edge-y 2.1s var(--ease) calc(var(--d) + .75s) both; }
@keyframes edge-x { 0% { opacity: 1; transform: scaleX(0); } 25% { transform: scaleX(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes edge-y { 0% { opacity: 1; transform: scaleY(0); } 25% { transform: scaleY(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scaleY(1); } }
.anim-ready[data-anim="a"] .post-card-img { clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease) calc(var(--d) + .7s); }
.anim-ready[data-anim="a"] .is-in .post-card-img { clip-path: inset(0); }

/* each text line slides up from behind its mask */
.anim-ready[data-anim="a"] .mask > * { translate: 0 110%; transition: translate .8s var(--ease); }
.anim-ready[data-anim="a"] .is-in .mask > * { translate: 0 0; }
.anim-ready[data-anim="a"] .is-in .mask:nth-child(1) > * { transition-delay: calc(var(--d) + 1.05s); }
.anim-ready[data-anim="a"] .is-in .mask:nth-child(2) > * { transition-delay: calc(var(--d) + 1.15s); }
.anim-ready[data-anim="a"] .is-in .mask:nth-child(3) > * { transition-delay: calc(var(--d) + 1.25s); }
