/* =========================================================
   Bta3 Anime | بتاع أنمي
   Design tokens derived from the channel logo:
   blood red brush circle, parchment 8-point star, ink charcoal.
   Single committed dark theme (cinematic, matches the brand world).
   ========================================================= */
:root {
  color-scheme: dark;
  --ink: #141111;          /* page ground */
  --ink-2: #1c1716;        /* raised surface */
  --ink-3: #2b2321;        /* hairlines */
  --ink-4: #3a2f2c;
  --blood: #9b0000;        /* logo red */
  --ember: #d63a34;        /* interactive red, chart marks (3:1+ on ink) */
  --ember-hot: #ef5a45;
  --parch: #ebcfa8;        /* logo star */
  --bone: #f3eee6;         /* primary text */
  --muted: #b8ab9c;        /* secondary text */
  --faint: #928679;        /* captions (4.5:1 on ink) */

  /* English (default): unchanged pairing */
  --f-num: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-display: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-sub: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --f-jp: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;

  --r-lg: 18px;            /* one radius scale: 18 / 12 / pill */
  --r-md: 12px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1360px;
  --nav-h: 68px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Arabic typography ----------
   Headings: Kufam (geometric Kufi)
   Sub-headings + body: Cairo
   Numbers and English keep Reem Kufi / IBM Plex. */
:root[lang="ar"] {
  --f-display: "Kufam", "Reem Kufi", "Cairo", sans-serif;
  --f-sub: "Cairo", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-body: "Cairo", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}
[lang="ar"] .display { line-height: 1.3; font-weight: 800; }
[lang="ar"] .hero__title { font-size: clamp(3rem, 6.4vw, 6.1rem); line-height: 1.3; }
[lang="ar"] .h2 { font-size: clamp(2.2rem, 4.8vw, 4.2rem); }
[lang="ar"] .h-intro .h2 { font-size: clamp(2.4rem, 4.4vw, 4.3rem); white-space: nowrap; }
[lang="ar"] .h-intro { width: min(640px, 84vw); }
[lang="ar"] .w { padding-block: .22em .26em; margin-block: -.22em -.26em; }
[lang="ar"] .footer__big { line-height: 1.2; }
[lang="ar"] .footer__tag { margin-top: 24px; }
[lang="ar"] .brand { font-size: 1.2rem; font-weight: 800; }
.contact .display { font-size: 1.6rem; }
[lang="ar"] .contact .display { font-size: 2rem; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
[lang="en"] body { line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--parch); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
::selection { background: var(--blood); color: var(--bone); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.display { font-family: var(--f-display); font-weight: 700; line-height: 1.15; letter-spacing: 0; margin: 0; text-wrap: balance; }
[lang="en"] .display { letter-spacing: -0.02em; line-height: 1.05; }
.h2 { font-size: clamp(2.1rem, 4.6vw, 4rem); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 58ch; margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .82rem; font-weight: 600; color: var(--parch);
  letter-spacing: .04em;
}
[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; }
.eyebrow svg { width: 14px; height: 14px; }
.jp { font-family: var(--f-jp); font-weight: 700; letter-spacing: .08em; }
.num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
.caption { font-size: .82rem; color: var(--faint); }

/* word split (words stay whole so Arabic letters keep joining) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .18em .14em; margin-block: -.18em -.14em; }
.w > .wi { display: inline-block; will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ember); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  min-height: 52px; padding: 0 1.5em; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 1rem; white-space: nowrap;
  transition: background .25s var(--ease-out), box-shadow .25s var(--ease-out);
  box-shadow: 0 10px 30px -12px rgba(214, 58, 52, .6);
}
.btn:hover { --bg: var(--ember-hot); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--ghost { --bg: transparent; --fg: var(--bone); box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.btn--ghost:hover { --bg: rgba(235, 207, 168, .08); box-shadow: inset 0 0 0 1.5px var(--parch); }
.btn--sm { min-height: 42px; padding: 0 1.1em; font-size: .92rem; }
.btn .btn-label { position: relative; z-index: 1; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- Grain + progress ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.progress {
  position: fixed; top: env(safe-area-inset-top, 0px); inset-inline: 0; height: 3px; z-index: 80;
  background: transparent; pointer-events: none;
}
.progress__bar {
  height: 100%; background: linear-gradient(90deg, var(--blood), var(--ember));
  transform: scaleX(0); transform-origin: left center;
}
[dir="rtl"] .progress__bar { transform-origin: right center; background: linear-gradient(-90deg, var(--blood), var(--ember)); }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
}
.loader__mark { position: relative; width: 132px; height: 132px; }
.loader__enso { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(0); }
.loader__star { position: absolute; inset: 30%; width: 40%; height: 40%; overflow: visible; }
.loader__star path { fill: none; stroke: var(--parch); stroke-width: 6; stroke-linejoin: round; }
.loader__jp { position: absolute; bottom: 14%; inset-inline: 0; text-align: center; color: var(--faint); font-size: .85rem; }
.reduced .loader, .loaded .loader { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); inset-inline: 0; z-index: 70;
  height: var(--nav-h);
  transition: transform .45s var(--ease-out), background .3s, box-shadow .3s;
}
.nav.is-solid { background: rgba(20, 17, 17, .86); box-shadow: 0 1px 0 var(--ink-3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__in { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.nav__links { display: flex; gap: 26px; margin-inline-start: auto; font-size: .95rem; color: var(--muted); }
.nav__links a { position: relative; padding-block: 6px; transition: color .2s; white-space: nowrap; }
.nav__links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--ember); transform: scaleX(0); transition: transform .35s var(--ease-out); }
.nav__links a:hover { color: var(--bone); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ink-4); font-weight: 600; font-size: .9rem; transition: box-shadow .2s, color .2s;
}
.lang:hover { box-shadow: inset 0 0 0 1.5px var(--parch); color: var(--parch); }
.burger { display: none; width: 44px; height: 44px; place-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.burger svg { width: 22px; height: 22px; }
.mnav {
  position: fixed; inset: 0; z-index: 69; background: rgba(20, 17, 17, .97);
  padding: calc(var(--nav-h) + 24px + env(safe-area-inset-top, 0px)) var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 6px;
}
.mnav a { font-family: var(--f-sub); font-size: 2rem; font-weight: 600; padding-block: 8px; border-bottom: 1px solid var(--ink-3); }
.mnav .btn { margin-top: 24px; align-self: flex-start; font-family: var(--f-body); font-size: 1rem; border: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; min-height: 100dvh;
  display: grid; align-items: center; overflow: hidden; isolation: isolate;
  padding-block: calc(var(--nav-h) + 24px) 120px;
  --mx: 50%; --my: 40%;
}
.hero__sky {
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(60% 45% at 50% 78%, rgba(155, 0, 0, .38), transparent 70%),
    radial-gradient(35% 30% at var(--mx) var(--my), rgba(239, 90, 69, .16), transparent 70%),
    linear-gradient(180deg, #0f0c0c 0%, #1b1110 55%, #2a1310 80%, var(--ink) 100%);
}
.hero__dunes { position: absolute; inset-inline: 0; bottom: 0; height: 46%; z-index: -2; pointer-events: none; }
.hero__dunes svg { position: absolute; inset-inline: -5%; bottom: 0; width: 110%; height: 100%; }
.hero__embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero__copy { display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 2; }
.hero__title { font-size: clamp(2.9rem, 6.4vw, 6rem); }
.hero__title .accent { color: var(--ember); }
.hero__sub { font-size: clamp(1.05rem, 1.35vw, 1.22rem); color: var(--muted); max-width: 44ch; margin: 0; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 620px; justify-self: center; }
.stage .layer { position: absolute; will-change: transform; }
.portrait { border-radius: 50%; }
.portrait img { width: 100%; height: 100%; object-fit: contain; filter: saturate(.55) brightness(.9) contrast(1.05); transition: filter .6s var(--ease-out); }
.portrait:hover img, .portrait.is-lit img { filter: saturate(1.1) brightness(1.02) contrast(1.05); }
.p-main { inset: 14% 12% 12% 14%; z-index: 3; }
.p-main img { filter: saturate(.8) brightness(.95); }
.p-a { width: 30%; aspect-ratio: 1; top: 0; inset-inline-end: 0; z-index: 2; }
.p-b { width: 27%; aspect-ratio: 1; bottom: 2%; inset-inline-start: 0; z-index: 4; }
.p-c { width: 19%; aspect-ratio: 1; top: 6%; inset-inline-start: 8%; z-index: 1; opacity: .75; }
.p-c img { filter: saturate(.3) brightness(.6) blur(1.5px); }
.ring { position: absolute; inset: 8%; z-index: 2; width: 84%; height: 84%; overflow: visible; pointer-events: none; }
.ring circle { fill: none; stroke: var(--parch); stroke-width: 1.2; stroke-linecap: round; opacity: .55; }
.ring .r2 { stroke: var(--ember); stroke-width: 2.2; opacity: .8; }
.stage__star { position: absolute; width: 11%; aspect-ratio: 1; bottom: 16%; inset-inline-end: 6%; z-index: 5; color: var(--parch); }
.stage__jp {
  position: absolute; top: 34%; inset-inline-end: -2%; z-index: 5;
  writing-mode: vertical-rl; font-size: clamp(.9rem, 1.2vw, 1.1rem); color: var(--parch); opacity: .85; letter-spacing: .3em;
}
.hero__scroll-hint { display: none; }

/* ---------- Section rhythm ---------- */
.section { position: relative; padding-block: clamp(96px, 12vw, 180px); overflow-x: clip; }
.section__head { display: flex; flex-direction: column; gap: 18px; margin-bottom: clamp(40px, 5vw, 72px); max-width: 780px; }

/* ---------- Stats ---------- */
.stats { overflow: hidden; }
.stats__star { position: absolute; width: min(70vw, 760px); aspect-ratio: 1; top: 50%; inset-inline-start: -12%; translate: 0 -50%; color: var(--ink-3); opacity: .7; pointer-events: none; }
.stats__star path { fill: none; stroke: currentColor; stroke-width: .6; }
.stats__grid { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px 24px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-family: var(--f-num); font-weight: 700; font-size: clamp(3.2rem, 7vw, 6.4rem); line-height: 1; color: var(--bone); display: flex; align-items: baseline; gap: .18em; }
.stat__unit { font-size: .38em; color: var(--ember); font-family: var(--f-body); font-weight: 600; }
.stat__label { color: var(--muted); font-size: 1.02rem; }
.stat__rule { height: 2px; background: linear-gradient(90deg, var(--ember), transparent); width: 100%; max-width: 260px; margin-top: 12px; transform-origin: left; }
[dir="rtl"] .stat__rule { transform-origin: right; background: linear-gradient(-90deg, var(--ember), transparent); }
.stat--1 { grid-column: 1 / span 6; }
.stat--2 { grid-column: 8 / span 5; padding-top: 72px; }
.stat--3 { grid-column: 2 / span 5; }
.stat--4 { grid-column: 8 / span 5; padding-top: 48px; }
.stats__minor { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink-3); }
.minor { padding: 22px 0 0; display: flex; flex-direction: column; gap: 2px; }
.minor + .minor { padding-inline-start: 22px; border-inline-start: 1px solid var(--ink-3); }
.minor b { font-size: 1.6rem; font-weight: 600; color: var(--parch); }
.minor span { color: var(--faint); font-size: .92rem; }

/* ---------- Khalid (horizontal) ---------- */
.khalid { padding-block: 0; background: linear-gradient(180deg, var(--ink), #1a0f0e 40%, var(--ink)); }
.h-wrap { position: relative; height: 100svh; height: 100dvh; overflow: hidden; display: flex; align-items: center; }
.h-track { display: flex; gap: clamp(20px, 3vw, 44px); padding-inline: var(--gutter); width: max-content; align-items: center; will-change: transform; }
.h-intro { width: min(560px, 82vw); flex: none; display: flex; flex-direction: column; gap: 20px; padding-inline-end: 3vw; }
.h-intro .h2 { font-size: clamp(2.6rem, 5.4vw, 5rem); }
.h-intro__stat { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.h-intro__stat b { font-family: var(--f-num); font-size: 2.6rem; color: var(--ember); line-height: 1; }
.h-intro__stat span { color: var(--muted); }
.chapter {
  position: relative; flex: none; width: min(58vh, 490px, 80vw); display: flex; flex-direction: column; gap: 16px;
}
.chapter__media { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-2); }
.chapter__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transform-origin: 50% 0; transition: filter .5s; filter: saturate(.95); }
.chapter:hover .chapter__media img { filter: saturate(1.1); }
.chapter__media img.is-still { transform: none; }
.chapter__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 72%, rgba(20, 17, 17, .55)); }
/* the chapter art already carries its Arabic label, so the pill only shows in English */
:root[lang="ar"] .chapter__no { display: none; }
.chapter__no { position: absolute; top: 18px; inset-inline-end: 18px; z-index: 2; font-family: var(--f-sub); font-weight: 700; font-size: .95rem; padding: 6px 14px; border-radius: 999px; background: rgba(20, 17, 17, .72); color: var(--parch); }
.chapter__play { position: absolute; z-index: 2; bottom: 20px; inset-inline-end: 20px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ember); color: #fff; transform: scale(.85); opacity: .9; transition: transform .35s var(--ease-out), background .2s; }
.chapter__play svg { width: 20px; height: 20px; }
.chapter:hover .chapter__play { transform: scale(1); background: var(--ember-hot); }
.chapter__title { font-family: var(--f-sub); font-weight: 700; font-size: clamp(1.45rem, 2.2vw, 2rem); line-height: 1.25; margin: 0; }
.chapter__meta { color: var(--muted); font-size: .98rem; }
.h-progress { position: absolute; bottom: 40px; inset-inline: var(--gutter); height: 2px; background: var(--ink-3); }
.h-progress i { position: absolute; inset: 0; background: var(--ember); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .h-progress i { transform-origin: right; }

/* image fallback when a thumbnail cannot load */
.noimg { background:
  radial-gradient(70% 60% at 50% 40%, rgba(155, 0, 0, .55), transparent 70%),
  repeating-conic-gradient(from 22.5deg, rgba(235, 207, 168, .05) 0 12.5%, transparent 0 25%),
  var(--ink-2) !important; }
.noimg img { display: none; }
.noimg::before { content: ""; position: absolute; inset: 22%; background: url("../assets/hero/enso.webp") center / contain no-repeat; opacity: .28; filter: saturate(.8); }

/* ---------- Works bento ---------- */
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(230px, 26vw);
  grid-template-areas:
    "a a b c"
    "a a d d"
    "e f g h";
}
@media (min-width: 1360px) { .bento { grid-auto-rows: 340px; } }
.tile {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-2);
  transform-style: preserve-3d; transform: perspective(900px); isolation: isolate;
  --mx: 50%; --my: 50%;
}
.tile:nth-child(1) { grid-area: a; } .tile:nth-child(2) { grid-area: b; } .tile:nth-child(3) { grid-area: c; } .tile:nth-child(4) { grid-area: d; }
.tile:nth-child(5) { grid-area: e; } .tile:nth-child(6) { grid-area: f; } .tile:nth-child(7) { grid-area: g; } .tile:nth-child(8) { grid-area: h; }
.tile__img { position: absolute; inset: 0; z-index: -2; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1s var(--ease-out), filter .6s; filter: saturate(.8) brightness(.85); }
.tile:hover .tile__img img { transform: scale(1.1); filter: saturate(1.05) brightness(.95); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 17, 17, .05) 30%, rgba(20, 17, 17, .94) 100%); }
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1.5px;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(239, 90, 69, .95), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .35s;
}
.tile:hover::after { opacity: 1; }
.tile a.tile__link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.tile__body { position: absolute; inset-inline: 0; bottom: 0; padding: clamp(16px, 2vw, 28px); display: flex; flex-direction: column; gap: 6px; transform: translateZ(40px); }
.tile__tag { color: var(--parch); font-size: .85rem; font-weight: 600; }
.tile__title { font-family: var(--f-sub); font-weight: 700; font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.3; margin: 0; }
.tile:nth-child(1) .tile__title { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.tile__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.tile__meta b { color: var(--bone); font-weight: 600; }
.tile__dur { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(20, 17, 17, .75); }
.tile__play { position: absolute; top: 50%; left: 50%; z-index: 2; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: var(--ember); color: #fff; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .45s var(--ease-out); }
.tile__play svg { width: 22px; height: 22px; }
.tile:hover .tile__play { opacity: 1; transform: scale(1); }

/* ---------- Worlds accordion ---------- */
.worlds__row { display: flex; gap: 12px; height: clamp(440px, 62vh, 620px); }
.world {
  position: relative; flex: 1; min-width: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-2);
  transition: flex-grow .8s var(--ease-out); text-align: start; isolation: isolate;
}
.world.is-open { flex-grow: 3.4; }
.world img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: saturate(.5) brightness(.55); transition: filter .8s var(--ease-out), transform 1.2s var(--ease-out); transform: scale(1.08); }
.world.is-open img { filter: saturate(1) brightness(.75); transform: scale(1); }
.world::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(20, 17, 17, .95)); }
.world__inner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(18px, 2.4vw, 32px); gap: 10px; }
.world__title { font-family: var(--f-sub); font-weight: 700; font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.25; margin: 0; transition: font-size .5s var(--ease-out); }
.world.is-open .world__title { font-size: clamp(1.4rem, 2.3vw, 2.1rem); }
.world__text { margin: 0; color: var(--muted); max-width: 40ch; opacity: 0; transform: translateY(12px); transition: opacity .5s .15s, transform .6s .15s var(--ease-out); }
.world.is-open .world__text { opacity: 1; transform: none; }
.world__icon { width: 34px; height: 34px; color: var(--parch); }

/* ---------- Audience ---------- */
.audience__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.insights { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 24px; }
.insight b { display: block; font-family: var(--f-num); font-weight: 700; font-size: clamp(2.4rem, 4.2vw, 3.6rem); line-height: 1; color: var(--bone); }
.insight b small { font-size: .5em; color: var(--ember); margin-inline-start: 2px; }
.insight > span { display: block; margin-top: 8px; color: var(--muted); font-size: .98rem; max-width: 22ch; }
.charts { display: grid; gap: 22px; }
.chart { background: var(--ink-2); border-radius: var(--r-lg); padding: clamp(18px, 2.2vw, 28px); }
.chart__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.chart__title { font-weight: 600; font-size: 1.05rem; margin: 0; }
.bars { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bar { display: grid; grid-template-columns: 7.5em 1fr 3.6em; align-items: center; gap: 12px; font-size: .95rem; border-radius: 8px; padding: 2px 0; }
.bar__label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__track { position: relative; height: 12px; }
.bar__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); background: var(--ember); border-radius: 0 4px 4px 0; transform-origin: left; }
[dir="rtl"] .bar__fill { border-radius: 4px 0 0 4px; transform-origin: right; }
.bar__val { color: var(--bone); font-weight: 600; text-align: end; }
.bar:hover .bar__fill, .col:hover .col__fill { background: var(--ember-hot); }
.bar:hover .bar__label { color: var(--bone); }
.cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 190px; margin: 0; padding: 0; list-style: none; }
.col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: 6px; text-align: center; }
.col__val { font-size: .82rem; font-weight: 600; color: var(--bone); }
.col__track { position: relative; }
.col__fill { position: absolute; inset-inline: 12%; bottom: 0; height: var(--h); background: var(--ember); border-radius: 4px 4px 0 0; transform-origin: bottom; }
.col__label { font-size: .78rem; color: var(--faint); white-space: nowrap; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tip {
  position: fixed; z-index: 95; pointer-events: none; padding: 8px 12px; border-radius: 10px;
  background: var(--bone); color: var(--ink); font-size: .85rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4); opacity: 0; transform: translate(-50%, calc(-100% - 12px)); transition: opacity .15s;
}
.tip.is-on { opacity: 1; }

/* ---------- Process ---------- */
.process__grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(40px, 8vw, 120px); }
.process__path { position: absolute; top: 0; bottom: 0; left: 50%; width: 80px; margin-left: -40px; height: 100%; overflow: visible; pointer-events: none; }
.process__path path { fill: none; stroke: var(--ember); stroke-width: 3; stroke-linecap: round; }
.process__path .ghost { stroke: var(--ink-3); }
.step { position: relative; padding-block: 28px; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.step:nth-of-type(odd) { grid-column: 1; justify-self: end; text-align: end; align-items: flex-end; }
.step:nth-of-type(even) { grid-column: 2; margin-top: 110px; }
.step__no { font-family: var(--f-num); font-size: 3.6rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px var(--parch); }
.step__title { font-family: var(--f-sub); font-size: 1.7rem; font-weight: 700; margin: 0; line-height: 1.25; }
.step__text { margin: 0; color: var(--muted); }

/* ---------- Partner ---------- */
.partner { background: radial-gradient(70% 60% at 85% 20%, rgba(155, 0, 0, .28), transparent 70%), var(--ink); }
[dir="ltr"] .partner { background: radial-gradient(70% 60% at 15% 20%, rgba(155, 0, 0, .28), transparent 70%), var(--ink); }
.partner__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.offers { list-style: none; margin: 0; padding: 0; display: grid; }
.offer { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding-block: 26px; border-top: 1px solid var(--ink-3); }
.offer:last-child { border-bottom: 1px solid var(--ink-3); }
.offer__icon { width: 48px; height: 48px; color: var(--parch); }
.offer h3 { margin: 0 0 4px; font-family: var(--f-sub); font-weight: 700; font-size: 1.4rem; line-height: 1.3; }
.offer p { margin: 0; color: var(--muted); }
.partner__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Footer / contact ---------- */
.footer { padding-block: clamp(80px, 10vw, 140px) 40px; border-top: 1px solid var(--ink-3); }
.footer__big { font-family: var(--f-display); font-weight: 700; font-size: clamp(3.4rem, 13vw, 12rem); line-height: .95; margin: 0; color: var(--bone); letter-spacing: -.01em; }
.footer__big .dot { color: var(--ember); }
.footer__tag { color: var(--parch); font-size: clamp(1.1rem, 2vw, 1.5rem); margin: 18px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; margin-top: clamp(48px, 6vw, 80px); align-items: end; }
.contact { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.contact__lead { margin: 0; color: var(--muted); max-width: 46ch; }
.mailbox {
  display: flex; flex-direction: column; gap: 18px; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(155, 0, 0, .28), rgba(28, 23, 22, .92) 70%);
  box-shadow: inset 0 0 0 1px var(--ink-3);
}
.mailbox__addr {
  align-self: flex-start; max-width: 100%; display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-num); font-weight: 700; font-size: clamp(1.25rem, 2.8vw, 2.3rem); line-height: 1.2; color: var(--bone);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; padding-bottom: 6px; transition: background-size .45s var(--ease-out), color .2s;
}
[dir="rtl"] .mailbox__addr { background-position: 100% 100%; }
.mailbox__addr:hover { background-size: 100% 2px; color: var(--parch); }
.mailbox__addr svg { width: 1.1em; height: 1.1em; flex: none; color: var(--ember); }
.mailbox__addr span { direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.mailbox__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__alt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Video player ---------- */
.vmodal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.vmodal__backdrop { position: absolute; inset: 0; background: rgba(12, 9, 9, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vmodal__panel {
  position: relative; width: min(1120px, 100%, calc((100dvh - 230px) * 1.7778)); min-width: min(100%, 320px);
  background: var(--ink-2); border-radius: var(--r-lg); box-shadow: 0 50px 140px -30px rgba(0, 0, 0, .85), 0 0 0 1px var(--ink-3);
  transform-origin: center;
}
.vmodal__player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; }
.vmodal__loading { position: absolute; inset: 0; display: grid; place-items: center; }
.vmodal__loading img { width: 72px; height: 72px; animation: vmspin 1.4s linear infinite; opacity: .8; }
@keyframes vmspin { to { transform: rotate(360deg); } }
.vmodal__frame, .vmodal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vmodal__frame iframe { opacity: 0; transition: opacity .4s; }
.vmodal__frame iframe.is-ready { opacity: 1; }
.vmodal__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; padding: 16px 20px 18px; border-top: 2px solid var(--blood); }
.vmodal__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 280px; }
.vmodal__tag { color: var(--parch); font-size: .85rem; font-weight: 600; }
.vmodal__title { margin: 0; font-family: var(--f-sub); font-weight: 700; font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.4; }
.vmodal__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vmodal__nav { display: inline-flex; align-items: center; gap: 6px; }
.vmodal__step { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--ink-4); transition: box-shadow .2s, color .2s, opacity .2s; }
.vmodal__step:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--parch); color: var(--parch); }
.vmodal__step:disabled { opacity: .3; cursor: default; }
.vmodal__step svg { width: 18px; height: 18px; }
[dir="ltr"] .vmodal__step svg { transform: scaleX(-1); }
.vmodal__count { min-width: 3.4em; text-align: center; color: var(--muted); font-size: .9rem; }
.vmodal__close {
  position: absolute; top: -54px; inset-inline-end: 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(28, 23, 22, .9); box-shadow: inset 0 0 0 1.5px var(--ink-4); transition: background .2s, transform .3s var(--ease-out);
}
.vmodal__close:hover { background: var(--ember); transform: rotate(90deg); }
.vmodal__close svg { width: 20px; height: 20px; }
body.vm-open { overflow: hidden; }
@media (max-width: 560px) {
  .vmodal { padding-inline: 0; }
  .vmodal__panel { border-radius: 0; width: 100%; }
  .vmodal__player { border-radius: 0; }
  .vmodal__close { inset-inline-end: 12px; }
  .vmodal__actions { width: 100%; justify-content: space-between; }
}
.socials { display: flex; gap: 10px; justify-content: flex-end; }
.footer__side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.footer__side .ytsub { align-self: auto; }

/* ---------- Support (Buy Me a Coffee) ---------- */
.support { display: inline-flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; padding-inline-start: 8px; padding-inline-end: 18px; border-radius: 999px; background: rgba(255, 95, 95, .08); box-shadow: inset 0 0 0 1px rgba(255, 95, 95, .35); color: var(--bone); transition: background .2s, box-shadow .2s; cursor: pointer; }
.support:hover { background: rgba(255, 95, 95, .16); box-shadow: inset 0 0 0 1px #ff5f5f; }
.support__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #ff5f5f; color: #fff; flex: none; }
.support__icon svg { width: 22px; height: 22px; }
.support__txt { display: flex; flex-direction: column; line-height: 1.3; }
.support__txt b { font-family: var(--f-sub); font-weight: 700; font-size: .98rem; }
.support__txt small { color: var(--muted); font-size: .82rem; }
/* floating widget: wait for the intro, and step aside while a video plays */
#bmc-wbtn { transition: opacity .4s, transform .4s !important; }
html:not(.loaded) #bmc-wbtn, html:not(.loaded) #bmc-wbtn ~ div:not(#bmc-iframe) { opacity: 0 !important; pointer-events: none !important; }
body.vm-open #bmc-wbtn, body.vm-open #bmc-wbtn ~ div:not(#bmc-iframe) { opacity: 0 !important; transform: scale(.6) !important; pointer-events: none !important; }

/* ---------- YouTube subscribe (official embedded button + matching fallback) ---------- */
.ytsub { position: relative; display: inline-flex; align-self: flex-start; width: fit-content; align-items: center; min-height: 54px; max-width: 100%; }
.ytsub__widget { display: flex; align-items: center; min-height: 24px; }
.ytsub:not(.is-live) .ytsub__widget { position: absolute; top: 0; inset-inline-start: 0; opacity: 0; pointer-events: none; }
.ytsub.is-live .ytsub__fallback { display: none; }
.ytsub.is-live { padding: 8px 16px; border-radius: 16px; background: rgba(235, 207, 168, .05); box-shadow: inset 0 0 0 1px var(--ink-4); }
.ytsub__fallback { display: inline-flex; align-items: center; gap: 12px; padding: 7px; padding-inline-start: 8px; border-radius: 999px; background: rgba(235, 207, 168, .05); box-shadow: inset 0 0 0 1px var(--ink-4); color: var(--bone); transition: background .2s, box-shadow .2s; }
.ytsub__fallback:hover { background: rgba(235, 207, 168, .09); box-shadow: inset 0 0 0 1px rgba(235, 207, 168, .45); }
.ytsub__logo img { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ytsub__txt { display: flex; flex-direction: column; line-height: 1.25; padding-inline-end: 6px; }
.ytsub__txt b { font-family: var(--f-sub); font-weight: 700; font-size: .98rem; }
.ytsub__txt small { color: var(--muted); font-size: .82rem; }
.ytsub__btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ember); color: #fff; font-weight: 700; font-size: .95rem; transition: background .2s; }
.ytsub__btn svg { width: 18px; height: 18px; }
.ytsub__fallback:hover .ytsub__btn { background: var(--ember-hot); }
.ytsub--hero { margin-top: 22px; }
.ytsub--sm { min-height: 42px; }
.ytsub--sm .ytsub__fallback { padding: 0; background: none; box-shadow: none; }
.ytsub--sm.is-live { padding: 4px 10px; }
.social { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--ink-4); color: var(--muted); transition: color .2s, box-shadow .2s, background .2s; }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.social:hover { color: var(--bone); background: var(--blood); box-shadow: none; }
.footer__base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--ink-3); color: var(--faint); font-size: .88rem; }

/* ---------- Reveal defaults (content stays visible without JS) ---------- */
.js [data-reveal] { will-change: transform, opacity; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .burger { display: inline-grid; }
  .nav__actions { margin-inline-start: auto; }
  .nav__actions .btn { display: none; }
  .audience__grid, .partner__grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 260px; grid-template-areas: "a a" "a a" "b c" "d d" "e f" "g h"; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { padding-block: calc(var(--nav-h) + 12px) 80px; }
  .hero__grid { grid-template-columns: 1fr; }
  .stage { order: -1; max-width: 400px; width: 88%; }
  .stage__jp { display: none; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 40px 20px; }
  .stat--1, .stat--2, .stat--3, .stat--4 { grid-column: auto; padding-top: 0; }
  .stats__minor { grid-template-columns: 1fr 1fr; }
  .minor:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .minor:nth-child(n+3) { border-top: 1px solid var(--ink-3); margin-top: 22px; }
  .h-wrap { height: auto; padding-block: 96px 64px; display: block; }
  .h-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; scrollbar-width: none; }
  .h-track > * { scroll-snap-align: start; }
  .h-intro { width: 80vw; }
  .chapter { width: 74vw; }
  .h-progress { display: none; }
  .worlds__row { flex-direction: column; height: auto; }
  .world { min-height: 240px; flex: none; }
  .world__text { opacity: 1; transform: none; }
  .world__title { white-space: normal; }
  .world img { filter: saturate(.9) brightness(.65); transform: none; }
  .chart-row { grid-template-columns: 1fr; }
  .process__grid { grid-template-columns: 1fr; padding-inline-start: 56px; }
  .process__path { left: auto; right: auto; inset-inline-start: 0; margin: 0; width: 40px; }
  .step:nth-of-type(odd), .step:nth-of-type(even) { grid-column: 1; justify-self: start; text-align: start; align-items: flex-start; margin-top: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .socials { justify-content: flex-start; }
  .footer__side { align-items: flex-start; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: 240px; grid-template-areas: "a" "a" "b" "c" "d" "e" "f" "g" "h"; }
  .stats__grid { grid-template-columns: 1fr; }
  .insights { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .bar { grid-template-columns: 6em 1fr 3.4em; gap: 8px; }
  .cols { gap: 6px; }
  .col__label { font-size: .7rem; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .h-wrap { height: auto; padding-block: 96px 64px; display: block; }
  .h-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
  .h-track > * { scroll-snap-align: start; }
  .h-progress { display: none; }
}
@media (hover: none) {
  .tile__play { opacity: 1; transform: scale(.8); top: auto; bottom: auto; }
  .tile__play { display: none; }
}
