/* =========================================================
   Color Trend 2027 — "Layers"
   Tokens
   ========================================================= */
:root {
  /* Jazeera design system tokens (Figma "01. Design System") */
  --ink: #000E16;            /* Gray/100 */
  --bone: #F4F4F4;           /* Gray/20 */
  --g80: #525252; --g70: #6F6F6F; --g60: #8D8D8D; --g40: #C6C6C6; --g30: #E0E0E0;
  --cool50: #C6CEDA; --cool40: #DAE0EE; --cool30: #E9ECF3; --cool20: #F8FAFF;
  --blue: #0081CA;           /* Blue/100, primary actions */
  --red: #B3261E;            /* Red/100 */
  --green: #12805C; --green60: #DCF5F0;
  --line: var(--cool50);
  --radius: 4px;

  /* DS type: Montserrat for English, Noto Sans Arabic for Arabic, line-height 1.5 */
  --font-display: "Noto Sans Arabic", "Montserrat", sans-serif;
  --font-body: "Noto Sans Arabic", "Montserrat", system-ui, sans-serif;
  --font-mono: "Montserrat", "Noto Sans Arabic", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 64px;

  --chip-w: clamp(46px, 8vw, 118px);
  --chip-h: clamp(170px, 70vh, 760px);
  --chip-gap: clamp(8px, 1.1vw, 16px);
  --card-h: clamp(300px, 62vh, 700px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html[lang="en"] {
  --font-display: "Montserrat", "Noto Sans Arabic", sans-serif;
  --font-body: "Montserrat", "Noto Sans Arabic", system-ui, sans-serif;
}
html[lang="en"] .hero-title, html[lang="en"] .pal-name, html[lang="en"] .take-name, html[lang="en"] .outro-title, html[lang="en"] .mixer-title, html[lang="en"] .novel-title { font-weight: 600; letter-spacing: -0.02em; }
html[lang="ar"] .hero-title, html[lang="ar"] .pal-name, html[lang="ar"] .take-name { font-weight: 700; }
/* "Lively Atmospheres" is wider than the old title: let the English hero title use a wider box and a size that fits */
html[lang="en"] .hero-title { font-size: clamp(2.6rem, min(11vw, 15vh), 10rem); max-width: 12ch; text-wrap: balance; }
html[lang="ar"] .hero-title { font-size: clamp(2.6rem, min(9.5vw, 14vh), 8.5rem); max-width: 12ch; text-wrap: balance; }

/* ARABIC SAFE LINE-HEIGHT: Arabic dots, hamza and descenders need more room than Latin text.
   Rule of thumb for the whole site: display type >= 1.5, text >= 1.7, small labels >= 1.5, plus
   a little block padding so the glyphs never touch (or get clipped by) the next row. */
html[lang="ar"] body { line-height: 1.8; }
html[lang="ar"] :is(.hero-title, .pal-name, .take-name, .outro-title, .mixer-title, .novel-title, .cat-title, .book-title b) { line-height: 1.5; padding-block: 0.06em 0.12em; }
html[lang="ar"] :is(.hero-line, .hero-sub, .pal-tagline, .ccard-body b, .manifesto-text) { line-height: 1.6; }
html[lang="ar"] :is(.pal-story, .take-desc, .take-story, .take-combo-desc, .combo-item-desc, .outro-text, .novel-text, .cat-text) { line-height: 1.8; }
html[lang="ar"] :is(.chip-label, .eyebrow, .pal-index, .take-meta, .combo-item-title, .take-combo-title, .light-btn, .shop-copy) { line-height: 1.6; }
html[lang="ar"] .take-copy { gap: 18px; }
/* DS: small labels are 13px regular, no tracking */
.eyebrow, .pal-index, .year, .lang, .rail-item, .take-story, .chip-label i, .combo-item-title, .take-combo-title, .cs-date, .light-btn, .shop-copy .eyebrow { letter-spacing: 0.02em; text-transform: none; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; overflow-x: clip; scrollbar-width: none; }
html::-webkit-scrollbar { width: 0; height: 0; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.no-cursor * { cursor: none !important; }
img, video, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.07;
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1%); }
  66% { transform: translate(1%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Nav (difference blend: readable on any paint) ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(10px, 2vw, 24px);
  padding: 0 var(--gutter);
  color: var(--nav-fg, #fff);
  transition: color 0.5s var(--ease-out);
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; white-space: nowrap; display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; transition: filter 0.5s var(--ease-out); }
html.nav-dark .brand img { filter: brightness(0) invert(1); }
.foot p { display: flex; align-items: center; gap: 14px; }
.foot-logo { height: 30px; width: auto; filter: brightness(0) invert(1); }
.years { display: flex; gap: 6px; justify-self: center; overflow-x: auto; max-width: 100%; scrollbar-width: none; padding: 4px; }
.years::-webkit-scrollbar { display: none; }
.year {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em;
  padding: 6px 12px; border-radius: 999px; border: 1px solid currentColor;
  white-space: nowrap; opacity: 0.75;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out), opacity 0.3s;
}
.year:hover { opacity: 1; }
.year.is-active { background: var(--blue); color: #fff; border-color: var(--blue); opacity: 1; }
.lang { font-family: var(--font-mono); font-size: 0.85rem; padding: 6px 10px; border: 1px solid currentColor; border-radius: 999px; opacity: 0.75; transition: color 0.4s; }
.lang:hover { opacity: 1; }

/* ---------- Atmosphere rail (bottom strip) ---------- */
.rail {
  position: fixed; left: 0; right: 0; bottom: 16px; z-index: 60;
  display: flex; justify-content: center; align-items: center; gap: clamp(10px, 2vw, 26px);
  padding: 0 var(--gutter);
  color: var(--nav-fg, #fff);
  opacity: 0; transition: opacity 0.4s, color 0.5s var(--ease-out); pointer-events: none;
}
.rail.is-visible { opacity: 1; pointer-events: auto; }
.rail-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 0.78rem; opacity: 0.5; transition: opacity 0.3s; white-space: nowrap; }
.rail-item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; transform: scale(0.7); transition: transform 0.3s; }
.rail-item:hover { opacity: 0.85; }
.rail-item.is-active { opacity: 1; font-weight: 500; }
.rail-item.is-active::before { transform: scale(1.4); }
.rail-item span { display: none; }
@media (min-width: 900px) { .rail-item span { display: inline; } }

/* ---------- Sections ---------- */
.sec { position: relative; min-height: 100vh; min-height: 100svh; background: var(--bg, var(--ink)); color: var(--fg, var(--bone)); }
.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: inherit; }
/* a section that follows a pinned one starts one viewport early: its top reaches the top of the
   screen exactly when the previous pin (and its pour) ends, so there is no empty scroll between scenes */
.after-pin { margin-top: -100vh; margin-top: -100svh; }
.sec { position: relative; }

.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; margin: 0; }

/* ---------- Hero ---------- */
.hero-media {
  position: absolute; inset: 0; margin: auto;
  width: 100vw; height: 100vh; height: 100svh;
  overflow: hidden; border-radius: 0;
  transform-origin: center;
  will-change: width, height, border-radius, transform;
}
.hero-media .liquid, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  /* legibility scrim for the title and the nav over a bright photo; fades as the video shrinks into its card */
  background:
    radial-gradient(70% 48% at 50% 50%, rgba(14,12,10,0.46), transparent 72%),
    linear-gradient(180deg, rgba(14,12,10,0.72) 0, rgba(14,12,10,0.2) 18%, rgba(14,12,10,0.14) 30%, rgba(14,12,10,0.22) 55%, rgba(14,12,10,0.6) 100%);
  opacity: var(--scrim, 1);
}

.hero-copy {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  padding: var(--nav-h) var(--gutter) 0; pointer-events: none;
}
.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.6rem, 14vw, 13rem); line-height: 1.02; margin: 0.05em 0 0;
  letter-spacing: -0.01em; max-width: 8ch; margin-inline: auto;
}
.hero-title .ch { display: inline-block; will-change: transform, opacity; }
.hero-line {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.3rem, min(3.6vw, 5.4vh), 3.2rem); line-height: 1.3; margin: 0.5em 0 0; white-space: pre-line;
  opacity: 0;
}
.hero-sub { max-width: 34ch; margin: 1em auto 0; font-size: clamp(0.9rem, min(1.4vw, 2.1vh), 1.15rem); opacity: 0; }
.scroll-hint {
  position: absolute; bottom: 28px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; opacity: 0.7;
}
.scroll-hint::after {
  content: ""; display: block; width: 1px; height: 36px; margin: 10px auto 0;
  background: linear-gradient(currentColor, transparent);
  animation: drip 1.6s var(--ease-out) infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; opacity: 1; } 100% { transform: scaleY(1); transform-origin: top; opacity: 0; } }

/* ---------- Manifesto ---------- */
.manifesto .stage { display: grid; place-items: center; padding: 0 var(--gutter); }
.manifesto-text {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 3rem); line-height: 1.55; max-width: 22ch; margin: 0; text-align: center;
}
.manifesto-text .w { display: inline-block; opacity: 0.12; transition: none; margin-inline: 0.08em; }
.manifesto-text .w.is-on { opacity: 1; }

/* ---------- Palette sections ---------- */
.palette .stage { isolation: isolate; }
.pal-head {
  position: absolute; inset: var(--nav-h) var(--gutter) auto; z-index: 3; pointer-events: none;
  display: grid; grid-template-columns: 1fr; gap: 6px;
}
.pal-story { max-width: 38ch; font-size: clamp(0.9rem, 1.3vw, 1.05rem); margin: 0; opacity: 0.9; }
.pal-name {
  position: absolute; left: 0; right: 0; top: 46%; z-index: 0; transform: translateY(-50%);
  margin: 0; text-align: center; pointer-events: none;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(6rem, 26vw, 24rem); line-height: 1; opacity: 0.16;
  will-change: transform, opacity;
}
.pal-deck { position: absolute; inset: 0; z-index: 1; }
.pal-card {
  position: absolute; left: 50%; bottom: 7vh; z-index: 2;
  height: var(--card-h); aspect-ratio: 9 / 16;
  transform: translateX(-50%);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.5);
  will-change: transform;
}
.pal-card .liquid, .pal-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chips { position: absolute; inset: 0; z-index: 1; }
.chip {
  position: absolute; left: 50%; bottom: 7vh;
  width: var(--chip-w); height: var(--chip-h); margin-left: calc(var(--chip-w) / -2);
  background: var(--c);
  border-radius: 8px 8px 12px 12px;
  transform-origin: 50% 100%;
  box-shadow: 0 30px 50px -28px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: box-shadow 0.3s;
  text-align: center;
}
.chip::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.12));
  pointer-events: none;
}
.chip-label {
  position: absolute; left: 6px; right: 6px; bottom: 10px;
  display: grid; gap: 2px; opacity: 0; color: var(--lc);
  font-size: clamp(0.62rem, 0.9vw, 0.9rem); line-height: 1.2;
}
.chip-label b { font-family: var(--font-display); font-weight: 700; font-size: 1.15em; }
.chip-label i { font-style: normal; font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.06em; opacity: 0.85; }
.chip.is-laid .chip-label { opacity: 1; transition: opacity 0.4s; }
.chip:hover, .chip:focus-visible { box-shadow: 0 46px 70px -28px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.18); z-index: 5; }
.pal-hint {
  position: absolute; bottom: 40px; left: 0; right: 0; text-align: center; margin: 0;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; opacity: 0; pointer-events: none;
}

/* ---------- Outro (statement in wet paint) ---------- */
.outro .stage { display: grid; place-items: center; text-align: center; }
.smear { position: absolute; inset: 0; width: 100%; height: 100%; }
.outro-copy { position: relative; z-index: 1; pointer-events: none; padding: 0 var(--gutter); }
.outro-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 7.5vw, 7rem); line-height: 1.3; margin: 0.15em auto 0; max-width: 14ch; }
.outro-text { max-width: 46ch; margin: 1.2em auto 0; font-size: clamp(1rem, 1.7vw, 1.35rem); font-family: var(--font-display); font-weight: 400; line-height: 1.5; }
.outro-hint { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; opacity: 0.75; margin: 0; }

/* ---------- Mixer ---------- */
.mixer { padding: calc(var(--nav-h) + 72px) var(--gutter) 64px; overflow-x: clip; }
@media (max-width: 799px) { .mixer { padding-top: calc(var(--nav-h) + 96px); } }
.mixer-head { display: grid; gap: 8px; max-width: 60ch; margin-bottom: 36px; }
.mixer-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 1; margin: 0; }
.mixer-sub { margin: 0; font-size: 1rem; color: var(--g80); max-width: 52ch; }
/* combinations gallery */
.combo-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.combo-tab { font-family: var(--font-display); font-weight: 500; font-size: 0.9rem; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; color: var(--g70); transition: background 0.25s, color 0.25s, border-color 0.25s; }
.combo-tab:hover { color: var(--ink); }
.combo-tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.combo-stage { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .combo-stage { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.combo-photo { position: relative; aspect-ratio: 565 / 663; max-height: 78vh; border-radius: 18px; overflow: hidden; background: #DED9CF; box-shadow: 0 40px 80px -40px rgba(0,0,0,0.4); }
.combo-photo img, .take-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s ease, transform 0.9s var(--ease-out); transform: scale(1.03); }
.combo-photo img.is-on, .take-media img.is-on { opacity: 1; transform: scale(1); }
.take-media { position: relative; aspect-ratio: 565 / 663; max-height: 78vh; }
.take-media img:first-child { opacity: 1; transform: none; }
.take-media img:first-child:not(.is-on) ~ img.is-on { z-index: 1; }
.combo-side { display: grid; gap: 14px; align-content: start; }
.combo-list { display: grid; gap: 10px; }
.combo-list { gap: 8px; }
.combo-item { display: block; text-align: start; width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid transparent; background: transparent; transition: background 0.25s, border-color 0.25s; }
.combo-item:hover { background: rgba(255,255,255,0.5); }
.combo-item.is-active { border-color: var(--cool40); background: #fff; }
.combo-item-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.combo-item-title { font-size: 0.85rem; font-weight: 600; }
.combo-item-n { font-size: 0.75rem; color: var(--g60); }
.combo-item .combo-bar { height: 18px; border-radius: 6px; transition: height 0.3s var(--ease-out); }
.combo-item.is-active .combo-bar { height: 30px; }
.combo-item .combo-seg i { opacity: 0; transition: opacity 0.2s; }
.combo-item.is-active .combo-seg i { opacity: 0.85; }
.combo-item .combo-labels { display: none; }
.combo-item.is-active .combo-labels { display: flex; }
.combo-item-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease-out); }
.combo-item.is-active .combo-item-more { grid-template-rows: 1fr; }
.combo-item-desc { display: block; overflow: hidden; font-size: 0.92rem; line-height: 1.6; color: var(--g80); padding-top: 0; transition: padding 0.3s; }
.combo-item.is-active .combo-item-desc { padding-top: 10px; }
.combo-detail:empty { display: none; }
.chips-title { display: flex; align-items: baseline; gap: 12px; margin: 48px 0 18px; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.chips-title small { font-family: var(--font-mono); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.1em; opacity: 0.6; }
.chip-groups { grid-template-columns: 1fr; }
@media (min-width: 700px) { .chip-groups { grid-template-columns: repeat(2, 1fr); gap: 22px 32px; } }






.chip-groups { display: grid; gap: 22px; }
.chip-group-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.chip-group-title small { font-family: var(--font-mono); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.1em; opacity: 0.6; }
.mini-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mini {
  position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
  transition: transform 0.25s var(--ease-out);
}
.mini:hover, .mini:focus-visible { transform: translateY(-3px) scale(1.04); z-index: 2; }
.mini.is-used::after {
  content: ""; position: absolute; inset: 6px; border-radius: 6px; border: 2px solid var(--lc); opacity: 0.9;
}
.mini .tip {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--bone);
  font-size: 0.72rem; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.mini:hover .tip, .mini:focus-visible .tip { opacity: 1; }

.mixer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 20px; border-radius: var(--radius); border: 1px solid currentColor;
  font-size: 0.95rem; font-weight: 500; transition: background 0.25s, color 0.25s, transform 0.2s, border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-solid:hover { background: #0071B1; border-color: #0071B1; }

/* ---------- Footer ---------- */
.foot { padding: 40px var(--gutter); background: var(--ink); color: var(--bone); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.85rem; opacity: 0.9; }
.foot p { margin: 0; }

/* ---------- Pour canvas (the signature) ---------- */
#pour { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* ---------- Takeover ---------- */
.takeover {
  position: fixed; inset: 0; z-index: 80; background: var(--c); color: var(--lc);
  visibility: hidden; overscroll-behavior: contain; overflow-x: hidden;
  overflow: auto; -webkit-overflow-scrolling: touch;
}
.takeover.is-open { visibility: visible; }
.takeover.is-revealing { background: transparent; }
.take-reveal { position: fixed; z-index: 119; display: none; border-radius: 50%; pointer-events: none; will-change: transform; transform: scale(0); }
body.take-open .nav { transition: none; }
.takeover-inner {
  min-height: 100%; display: grid; grid-template-columns: 1fr; gap: 32px; align-content: center;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 60px;
}
@media (min-width: 900px) { .takeover-inner { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 56px; } }
.take-copy { display: grid; gap: 14px; }
.take-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.4rem, 11vw, 9rem); line-height: 1; margin: 0; }
.take-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.1em; }
.take-hex { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed currentColor; border-radius: var(--radius); padding: 4px 12px; }
.take-desc { max-width: 44ch; font-size: clamp(1rem, 1.6vw, 1.25rem); margin: 0; }
.take-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.take-media { border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,0.5); background: rgba(0,0,0,0.08); }
.take-media img { width: 100%; height: 100%; object-fit: cover; }
.take-close {
  position: fixed; top: 14px; inset-inline-end: var(--gutter); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor;
  display: grid; place-items: center; font-size: 1.2rem; background: transparent;
}
.take-story { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; opacity: 0.8; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), opacity 0.3s;
  opacity: 0;
}
.cursor.is-on { opacity: 1; }
.cursor.is-big { width: 56px; height: 56px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 90;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bone);
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em;
  opacity: 0; transition: opacity 0.25s, transform 0.25s var(--ease-out); pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-hint::after { animation: none; }
  .hero-line, .hero-sub, .pal-hint { opacity: 1; }
  .manifesto-text .w { opacity: 1; }
  .chip-label { opacity: 1; }
}

/* ---------- Hero head / foot (positioned by JS) ---------- */
.hero-head { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; transform-origin: center; will-change: transform; }
.hero-foot { position: absolute; left: 0; right: 0; top: 50%; text-align: center; padding: 0 var(--gutter); pointer-events: none; }
.hero-copy { display: block; padding: 0; }

/* ---------- Placeholder tag on media ---------- */
.ph-tag {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.4); color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.25); backdrop-filter: blur(6px); pointer-events: none;
}
.hero-media .ph-tag { top: auto; bottom: 12px; }

@media (max-width: 799px) {
  :root { --chip-h: clamp(170px, 44vh, 420px); --card-h: clamp(220px, 44vh, 420px); }
  /* phone: short intro so the fan has room; the full story lives in the colour view */
  .pal-head { gap: 4px; }
  .pal-tagline { font-size: 1rem; }
  .pal-story { max-width: none; font-size: 0.82rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pal-tags span { font-size: 0.6rem; padding: 3px 7px; }
  .pal-card, .chip { bottom: 9vh; }
  .hero-line { font-size: clamp(1.15rem, 5.2vw, 1.5rem); margin-top: 0.4em; }
  .hero-sub { font-size: 0.82rem; max-width: 36ch; margin-top: 0.7em; }
  .hero-title { font-size: clamp(2.6rem, 12vw, 4rem); }
}

/* ---------- Story placeholder (stills standing in for the 9:16 video) ---------- */
.story { position: absolute; inset: 0; background: #14120F; }
.story img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.02);
  transition: opacity 1.4s ease;
}
.story img.is-on { opacity: 1; }
.story img.zin.is-on, .story img.zin.is-leaving { animation: zin 6.4s ease-in-out both; }
.story img.zout.is-on, .story img.zout.is-leaving { animation: zout 6.4s ease-in-out both; }
.story-bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; gap: 4px; }
.story-bars i { flex: 1; height: 2px; border-radius: 2px; background: rgba(255,255,255,0.35); overflow: hidden; position: relative; }
.story-bars i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .story-bars i::after { transform-origin: right; }
.story-bars i.is-done::after { transform: scaleX(1); }
.story.is-playing .story-bars i.is-on::after { animation: bar 4.2s linear forwards; }
@keyframes bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes zin { from { transform: scale(1.02); } to { transform: scale(1.14); } }
@keyframes zout { from { transform: scale(1.14); } to { transform: scale(1.02); } }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-1.5%, 2%); } }
.hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: drift 24s ease-in-out infinite alternate; }

/* ---------- Atmosphere head extras ---------- */
.pal-tagline { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 1.7vw, 1.4rem); line-height: 1.3; }
.pal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pal-tags span { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; padding: 4px 9px; border: 1px solid currentColor; border-radius: 999px; opacity: 0.75; }
.pal-texture {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  opacity: 0.16; mix-blend-mode: soft-light;
}

/* ---------- Combination proportion bars (from the brief's colour index) ---------- */
.combo-bar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.combo-seg { flex: 0 0 var(--w); background: var(--c); color: var(--lc); display: grid; place-items: center; min-width: 0; position: relative; transition: flex-basis 0.6s var(--ease-out); }
.combo-seg i { font-style: normal; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; opacity: 0.85; white-space: nowrap; overflow: hidden; max-width: 100%; }
.combo-seg[style*="--w:1"] i, .combo-seg[style*="--w:2%"] i, .combo-seg[style*="--w:3%"] i, .combo-seg[style*="--w:4%"] i, .combo-seg[style*="--w:5%"] i, .combo-seg[style*="--w:8%"] i { display: none; }
.combo-labels { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 0.82rem; }
.combo-labels span { display: inline-flex; align-items: center; gap: 6px; }
.combo-labels b { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }
.combo-labels em { font-style: normal; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; opacity: 0.7; direction: ltr; unicode-bidi: isolate; }
.take-combos { display: grid; gap: 10px; margin-top: 6px; }
.take-combo { display: block; text-align: start; padding: 12px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.12); background: rgba(255,255,255,0.14); transition: background 0.25s, transform 0.25s; }
.take-combo:hover { background: rgba(255,255,255,0.28); transform: translateY(-2px); }
.take-combo .combo-bar { height: 26px; }
.take-combo .combo-labels { display: none; }
.take-combo.is-active { background: rgba(255,255,255,0.34); border-color: currentColor; }
.take-combo-desc { display: none; margin-top: 8px; font-size: 0.85rem; line-height: 1.5; opacity: 0.85; }
.take-combo.is-active .take-combo-desc { display: block; }
.take-combo-title { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; margin-bottom: 8px; opacity: 0.8; }

/* ---------- Codes & hex always read left-to-right ---------- */
.chip-label i, .take-meta span, .take-hex, .surface .code, .year, .ph-tag, .rail-item, .pal-index, .eyebrow, .take-story, .chip-group-title small { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .pal-index, [dir="rtl"] .eyebrow, [dir="rtl"] .take-story, [dir="rtl"] .rail-item { direction: rtl; }

@media (max-width: 799px) {
  .chip-label { font-size: 0.5rem; left: 3px; right: 3px; line-height: 1.25; letter-spacing: -0.01em; text-align: center; }
  .chip-label b { font-size: 1.1em; }
  .chip-label i { white-space: nowrap; font-size: 0.7em; }
  .pal-hint { bottom: 34px; }
}

@media (max-width: 999px) {
  .combo-photo { max-height: 52vh; aspect-ratio: 4 / 4.2; }
  .combo-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .combo-tabs::-webkit-scrollbar { display: none; }
  .combo-tab { flex: 0 0 auto; }
  .brand { font-size: 0.95rem; }
  .year { padding: 5px 10px; font-size: 0.74rem; }
  /* the year tabs scroll sideways on phones: fade the cut edges instead of showing a half pill */
  .years { padding-inline: 14px; margin-inline: -10px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
}

/* ---------- Finishing texture chips ---------- */
.chip-texture { background-size: cover; background-position: center; }
.chip-texture::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.45)); pointer-events: none; }
.chip-texture .chip-label { z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.mini-texture { background-size: cover; background-position: center; }
.take-media-texture img { object-fit: cover; }

/* ---------- Shop box ---------- */

/* ---------- Colour view sits above everything, nav hidden while open ---------- */
.takeover { z-index: 120; }
body.take-open .nav, body.take-open .rail { visibility: hidden; }

html.nav-solid .nav { background: color-mix(in srgb, var(--nav-bg, #F3EFE8) 84%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ---------- YouTube embeds inside the cards ---------- */
.pal-card .yt, .hero-media .yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; z-index: 1; }
/* Shorts are 9:16 already; the hero card is 16:9 so the embed is scaled up to cover it */
.hero-media .yt { width: 178vh; height: 100%; left: 50%; transform: translateX(-50%); min-width: 100%; }
.pal-card .yt-wide, .take-media .yt-wide { width: 177.8%; min-width: 100%; height: 100%; left: 50%; transform: translateX(-50%); }
.take-media .yt { position: absolute; inset: 0; border: 0; }
.take-media .yt-wide { pointer-events: auto; }
.take-media-texture:has(.yt) { aspect-ratio: 16 / 9; max-height: none; }

@media (max-height: 760px) { .pal-hint { display: none; } }

/* ---------- Video clips in cards ---------- */
.pal-card .clip, .hero-media .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pal-card .clip-wide { object-fit: cover; }

/* ---------- Colour cards (site style) ---------- */
.mini-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .mini-chips { grid-template-columns: repeat(3, 1fr); } }
.chip-groups { grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .chip-groups { grid-template-columns: repeat(2, 1fr); gap: 40px 48px; } }
@media (min-width: 1400px) { .chip-groups { grid-template-columns: repeat(3, 1fr); } }
.chip-group-title { font-size: 1.5rem; margin-bottom: 14px; }
.ccard {
  display: grid; grid-template-rows: auto auto; text-align: start; width: 100%;
  border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--cool40);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s;
}
.ccard:hover, .ccard:focus-visible { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(0,0,0,0.35); border-color: var(--blue); }
.ccard-swatch { position: relative; display: block; aspect-ratio: 1.55; background: var(--c); background-size: cover; background-position: center; }
.ccard-cart { position: absolute; top: 10px; inset-inline-start: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: rgba(255,255,255,0.85); backdrop-filter: blur(4px); transition: background 0.2s, transform 0.2s, color 0.2s; }
.ccard-cart:hover { color: var(--blue); }
.ccard-cart:hover { background: #fff; transform: scale(1.08); }
.ccard-body { display: grid; gap: 2px; padding: 12px 14px 14px; color: var(--ink); }
.ccard-body b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.ccard-body i { font-style: normal; font-family: var(--font-mono); font-size: 0.8rem; color: var(--g70); direction: ltr; unicode-bidi: isolate; }

/* ---------- Lighting (the same room under different light) ---------- */
.take-media { --veil: transparent; --veil-mode: multiply; }
.take-media img { transition: opacity 0.7s ease, transform 0.9s var(--ease-out), filter 0.8s ease; }
.light-veil { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--veil); mix-blend-mode: var(--veil-mode); transition: background 0.8s ease; }
.take-media[data-light="neutral"] img { filter: none; }
/* warm 3000K: amber, a little deeper, as under a soft sunny bulb */
.take-media[data-light="warm"] img { filter: brightness(1.02) saturate(1.06) sepia(0.14); }
.take-media[data-light="warm"] { --veil: linear-gradient(180deg, rgba(255,176,92,0.34), rgba(255,200,130,0.26)); --veil-mode: soft-light; }
/* snow white 6500K: cool, bright and a touch flatter, as under daylight tubes */
.take-media[data-light="cool"] img { filter: brightness(1.07) saturate(0.88) contrast(1.03) hue-rotate(-6deg); }
.take-media[data-light="cool"] { --veil: linear-gradient(180deg, rgba(176,214,255,0.38), rgba(206,232,255,0.24)); --veil-mode: soft-light; }
.take-thumbs { position: absolute; z-index: 3; top: 14px; inset-inline-start: 14px; display: flex; gap: 6px; padding: 5px; border-radius: 12px; background: rgba(20,18,15,0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.take-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: none; opacity: 0.8; cursor: pointer; transition: opacity 0.2s, border-color 0.2s, transform 0.2s; }
.take-thumb:hover { opacity: 1; transform: translateY(-1px); }
.take-thumb.is-active { border-color: #fff; opacity: 1; }
.take-media .take-thumb img { position: static; width: 100%; height: 100%; object-fit: cover; opacity: 1; transform: none; display: block; }
.lighting { position: absolute; z-index: 3; bottom: 14px; inset-inline-start: 14px; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(20,18,15,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }
.light-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 0.78rem; opacity: 0.75; transition: background 0.25s, opacity 0.25s; }
.light-btn i { display: grid; }
.light-btn span { display: none; }
.light-btn.is-active { background: rgba(255,255,255,0.22); opacity: 1; }
.light-btn.is-active span { display: inline; }
.take-media-texture .lighting { display: none; }

/* ---------- Novel: a room-scale wall with the can in front ---------- */
.novel { padding: 0; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; transition: background 0.8s ease; }
.novel-stage { display: grid; grid-template-columns: 1fr; gap: 24px; width: 100%; padding: calc(var(--nav-h) + 24px) var(--gutter) 56px; }
@media (min-width: 900px) { .novel-stage { grid-template-columns: 0.8fr 1.4fr; gap: 48px; align-items: center; min-height: 100vh; padding-block: calc(var(--nav-h) + 8px) 40px; } }
.novel-copy { display: grid; gap: 16px; justify-items: start; max-width: 52ch; }
.novel-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 5.5vw, 4.8rem); line-height: 1.1; margin: 0; }
.novel-text { margin: 0; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.75; }
.novel-points { margin: 2px 0 6px; padding: 0; list-style: none; display: grid; gap: 8px; }
.novel-points li { position: relative; padding-inline-start: 20px; font-size: 0.95rem; }
.novel-points li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.5em; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.novel-photo { position: relative; margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3.4; box-shadow: 0 40px 80px -40px rgba(0,0,0,0.45); isolation: isolate; }
.novel-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; }
.novel-photo figcaption { position: absolute; inset-inline-start: 16px; bottom: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(20,18,15,0.55); color: #fff; font-size: 0.78rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.novel-visual { position: relative; aspect-ratio: 4 / 3.4; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,0.45); isolation: isolate; }
/* studio product shot: painted backdrop, floor, plinth, can */
.studio { --wall: #DED9CF; --floor: color-mix(in srgb, var(--wall) 70%, #000E16); }
.studio-wall { position: absolute; inset: 0 0 26% 0; background: var(--wall); transition: background 0.8s ease; }
.studio-wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(75% 90% at 50% 20%, rgba(255,255,255,0.28), rgba(255,255,255,0) 60%), linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.16)); }
.studio-floor { position: absolute; inset: 74% 0 0 0; background: linear-gradient(180deg, var(--floor), color-mix(in srgb, var(--floor) 75%, #000E16)); transition: background 0.8s ease; }
.studio-floor::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 26%; background: linear-gradient(180deg, rgba(0,0,0,0.22), rgba(0,0,0,0)); }
.plinth { position: absolute; left: 50%; bottom: 11%; width: 40%; height: 16%; transform: translateX(-50%); }
.plinth-top { position: absolute; inset: 0 0 auto 0; height: 22%; background: linear-gradient(90deg, #ECE9E3, #DAD5CD 55%, #CBC5BB); border-radius: 3px 3px 0 0; }
.plinth-front { position: absolute; inset: 22% 0 0 0; background: linear-gradient(180deg, #CFC9BF, #B9B2A7 70%, #A79F93); box-shadow: 0 30px 40px -18px rgba(0,0,0,0.45); }
.plinth-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%, rgba(0,0,0,0.12)); }
.can-shadow { position: absolute; left: 50%; bottom: calc(11% + 16% * 0.78 - 2%); width: 30%; height: 5%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,0.5), rgba(0,0,0,0) 70%); z-index: 1; }
.novel-can { position: absolute; left: 50%; bottom: calc(11% + 16% * 0.78); width: min(42%, 290px); height: auto; transform: translate(-50%, 0); z-index: 2; filter: drop-shadow(0 14px 14px rgba(0,0,0,0.25)); transition: transform 0.6s var(--ease-out); }
.novel-visual:hover .novel-can { transform: translate(-50%, -4px); }
.novel-swatches { position: absolute; z-index: 2; top: 16px; inset-inline-start: 16px; display: grid; gap: 8px; }
.novel-sw { width: 30px; height: 44px; border-radius: 6px; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,0.12), 0 8px 16px -8px rgba(0,0,0,0.5); position: relative; transition: transform 0.25s var(--ease-out), width 0.25s var(--ease-out); }
.novel-sw:hover { transform: translateX(var(--nudge, 4px)); }
[dir="rtl"] .novel-sw { --nudge: -4px; }
.novel-sw.is-active { width: 40px; outline: 2px solid #fff; outline-offset: 2px; }
.novel-sw span { position: absolute; top: 50%; inset-inline-start: calc(100% + 10px); transform: translateY(-50%); white-space: nowrap; font-size: 0.74rem; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--bone); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.novel-sw:hover span, .novel-sw.is-active span { opacity: 1; }
@media (max-width: 899px) { .novel-visual { aspect-ratio: 4 / 4; } .novel-sw { width: 26px; height: 38px; } .novel-sw.is-active { width: 34px; } .novel-can { width: 48%; } }

/* GSAP pin-spacers overlap the next section by one viewport: let clicks pass through the empty wrapper */
.pin-spacer { pointer-events: none; }
.pin-spacer > .sec { pointer-events: auto; }

/* ---------- Colour view: back control that stays put on phones ---------- */
.take-bar { position: sticky; top: 0; z-index: 3; display: flex; padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 12px; pointer-events: none; }
.take-close { position: static; display: inline-flex; align-items: center; justify-content: center; width: auto; height: 44px; padding: 0 16px 0 12px; border-radius: 999px; gap: 8px; pointer-events: auto; background: rgba(0,0,0,0.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.25); font-size: 0.9rem; line-height: 1; white-space: nowrap; }
/* edge-swipe feedback: the view follows the finger and snaps back or slides away */
.takeover.is-dragging { transition: none; }
.takeover.is-snapping { transition: transform 0.35s var(--ease-out); }
[dir="rtl"] .take-close { padding: 0 12px 0 16px; }
.take-arrow { font-size: 1.1rem; line-height: 1; }
.take-x { display: none; }
@media (min-width: 900px) { .take-back, .take-arrow { display: none; } .take-x { display: inline; } .take-close { width: 44px; padding: 0; justify-content: center; } }
.takeover-inner { padding-top: 8px; }

/* ---------- Catalogue ---------- */
.catalogue { min-height: 0; padding: 64px var(--gutter); }
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; max-width: 1100px; margin: 0 auto; }
@media (min-width: 900px) { .cat-grid { grid-template-columns: auto 1fr; gap: 72px; } }
.book { position: relative; display: block; width: min(78vw, 360px); aspect-ratio: 297 / 210; margin: 0 auto; perspective: 1400px; }
.book-pages { position: absolute; inset: 6px -8px -8px 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, #fff 0 2px, #E0E0E0 2px 3px); box-shadow: 0 30px 50px -30px rgba(0,0,0,0.5); transform: rotateY(-14deg) rotateX(4deg); transform-origin: left center; }
[dir="rtl"] .book-pages { inset: 6px 6px -8px -8px; transform: rotateY(14deg) rotateX(4deg); transform-origin: right center; }
.book-cover { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; background-size: cover; background-position: center; color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding: 16px 18px; transform: rotateY(-14deg) rotateX(4deg); transform-origin: left center; transition: transform 0.6s var(--ease-out), box-shadow 0.6s; box-shadow: 0 40px 70px -30px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.15); }
[dir="rtl"] .book-cover { transform: rotateY(14deg) rotateX(4deg); transform-origin: right center; }
.book-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,14,22,0.3), rgba(0,14,22,0.1) 45%, rgba(0,14,22,0.85)); }
.book-cover::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 10px; background: linear-gradient(90deg, rgba(0,0,0,0.35), rgba(0,0,0,0)); }
[dir="rtl"] .book-cover::after { background: linear-gradient(-90deg, rgba(0,0,0,0.35), rgba(0,0,0,0)); }
.book-cover > * { position: relative; }
.book-cover img { height: 22px; width: auto; filter: brightness(0) invert(1); justify-self: start; }
.book-title { align-self: end; display: grid; gap: 2px; }
.book-title small { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
html[lang="ar"] .book-title small { letter-spacing: 0.03em; text-transform: none; font-size: 0.72rem; }
.book-title b { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 3.4vw, 1.8rem); line-height: 1.15; }
.book-strip { display: flex; gap: 2px; height: 4px; margin-top: 10px; }
.book-strip i { flex: 1; background: var(--c); border-radius: 2px; }
.book:hover .book-cover { transform: rotateY(-22deg) rotateX(4deg) translateX(-4px); box-shadow: 0 50px 80px -30px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.15); }
[dir="rtl"] .book:hover .book-cover { transform: rotateY(22deg) rotateX(4deg) translateX(4px); }
.cat-copy { display: grid; gap: 12px; justify-items: start; max-width: 52ch; }
.cat-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.15; }
.cat-text { margin: 0; font-size: 1.02rem; line-height: 1.7; }
.cat-meta { margin: 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--g70); direction: ltr; unicode-bidi: isolate; }
.cat-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cat-actions .btn { gap: 10px; }

/* back pill: single line inside a fixed-height pill, give Arabic room */
html[lang="ar"] .take-back, html[lang="ar"] .lang, html[lang="ar"] .year { line-height: 1.5; }

/* tabs that scroll sideways on phones fade at the cut edges */
@media (max-width: 799px) { .combo-tabs { padding-inline: 14px; margin-inline: -14px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); } }

/* phones: the colour's photo comes first, short enough that the name and code still show under it */
@media (max-width: 899px) {
  .takeover-inner { align-content: start; gap: 18px; }
  .take-media:not(.take-media-texture) { order: -1; aspect-ratio: 4 / 3; max-height: 36vh; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .story img { animation: none !important; } }

/* text sitting on photos: a soft dark halo so it stays readable on light areas */
.hero-title .ch { text-shadow: 0 2px 28px rgba(10,8,6,0.55), 0 1px 3px rgba(10,8,6,0.45); }
.hero-head .eyebrow { margin-bottom: 0.5em; transform-origin: 50% 100%; opacity: 1; font-size: 0.92rem; text-shadow: 0 1px 14px rgba(10,8,6,0.7), 0 1px 2px rgba(10,8,6,0.6); font-weight: 500; }
.hero-line, .hero-sub { text-shadow: 0 1px 12px rgba(10,8,6,0.35); }
.nav { text-shadow: 0 1px 10px rgba(10,8,6,0.28); }

/* nav pills (white text, class nav-dark) and the scroll hint over a bright photo: a faint dark glass behind them */
html.nav-dark .year:not(.is-active), html.nav-dark .lang { background: rgba(14,12,10,0.3); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0.95; }
.scroll-hint { text-shadow: 0 1px 12px rgba(10,8,6,0.7), 0 1px 2px rgba(10,8,6,0.6); opacity: 1; }


/* ---------- NCS map ---------- */
.ncs { min-height: 0; padding: 72px var(--gutter) 84px; }
.ncs-wrap { max-width: 1100px; margin: 0 auto; display: grid; gap: 28px; }
.ncs-head { max-width: 62ch; }
.ncs-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.15; margin: 0.1em 0 0.3em; }
.ncs-text { margin: 0; opacity: 0.82; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.ncs-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ncs-steps li { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border: 1px solid rgba(243,239,232,0.2); border-radius: 12px; background: rgba(243,239,232,0.05); }
.ncs-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #F3EFE8; color: #2A2829; font-size: 0.8rem; font-weight: 700; }
.ncs-steps b { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-top: 6px; }
.ncs-steps code { font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: 0.04em; direction: ltr; unicode-bidi: isolate; justify-self: start; }
.ncs-steps small { opacity: 0.7; font-size: 0.82rem; line-height: 1.5; }
.ncs-tabs .combo-tab { color: rgba(243,239,232,0.7); }
.ncs-tabs .combo-tab.is-active { background: #F3EFE8; color: #2A2829; }
.ncs-stage { --hue: #5BAA85; --pick: #fff; display: grid; gap: 26px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ncs-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; } }
.ncs-fig { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin-inline: auto; }
.ncs-circle { position: absolute; inset: 0; border-radius: 50%; }
.ncs-circle::before { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0.95;
  background: conic-gradient(from 180deg, rgb(242,201,76), rgb(217,83,79), rgb(79,124,172), rgb(91,170,133), rgb(242,201,76));
  -webkit-mask: radial-gradient(circle, transparent 0 56%, #000 57%); mask: radial-gradient(circle, transparent 0 56%, #000 57%); }
.ncs-ring { background: radial-gradient(circle, rgba(243,239,232,0.06), transparent 56%); border-radius: 50%; }
.ncs-spoke { position: absolute; left: 50%; top: 50%; width: 2px; height: 50%; background: rgba(243,239,232,0.55); transform-origin: top center; transform: translateX(-1px) rotate(var(--a)); transition: transform 0.7s var(--ease-out); pointer-events: none; z-index: 2; }
.ncs-lab { position: absolute; font-style: normal; font-family: var(--font-mono); font-size: 0.8rem; opacity: 0.75; pointer-events: none; z-index: 3; }
.ncs-circle .ly { bottom: -6%; left: 50%; transform: translateX(-50%); } .ncs-circle .lr { left: -7%; top: 50%; transform: translateY(-50%); }
.ncs-circle .lb { top: -6%; left: 50%; transform: translateX(-50%); } .ncs-circle .lg { right: -7%; top: 50%; transform: translateY(-50%); }
.ncs-fig:has(.ncs-circle) { overflow: visible; }
.ncs-tri { aspect-ratio: 1.15; }
.ncs-triangle { position: absolute; inset: 6% 8% 6% 4%; clip-path: polygon(0 50%, 100% 0, 100% 100%);
  background: linear-gradient(90deg, var(--hue) 0%, rgba(255,255,255,0) 92%), linear-gradient(0deg, #FFFFFF, #1B1A1B); transition: background 0.6s ease; }
.ncs-tri .tw { right: 2%; bottom: 0; } .ncs-tri .ts { right: 2%; top: 0; } .ncs-tri .tc { left: 0; top: 46%; }
.ncs-tri .ncs-dot { left: calc(4% + var(--x) * 0.88); top: calc(6% + var(--y) * 0.88); }
.ncs-dot { position: absolute; left: var(--x); top: var(--y); width: 20px; height: 20px; margin: -10px 0 0 -10px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid rgba(255,255,255,0.85); box-shadow: 0 2px 8px rgba(0,0,0,0.45); cursor: pointer; z-index: 4; transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.ncs-dot:hover { transform: scale(1.25); }
.ncs-dot.is-active { transform: scale(1.55); border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.22), 0 4px 14px rgba(0,0,0,0.5); z-index: 5; }
.ncs-side { display: grid; gap: 18px; }
.ncs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ncs-list button { width: 100%; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: rgba(243,239,232,0.05); color: inherit; text-align: start; cursor: pointer; transition: background 0.25s, border-color 0.25s; }
.ncs-list button:hover { background: rgba(243,239,232,0.1); }
.ncs-list button.is-active { border-color: rgba(243,239,232,0.7); background: rgba(243,239,232,0.12); }
.ncs-list i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.ncs-list em { font-style: normal; font-family: var(--font-mono); font-size: 0.78rem; opacity: 0.75; direction: ltr; unicode-bidi: isolate; }
.ncs-info { display: grid; gap: 6px; padding: 16px 18px; border-radius: 12px; background: var(--pick); color: #111; }
.ncs-info b { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.ncs-code { font-family: var(--font-mono); font-size: 0.8rem; opacity: 0.8; direction: ltr; unicode-bidi: isolate; }
.ncs-info dl { margin: 6px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; }
.ncs-info dl div { display: grid; gap: 0; } .ncs-info dt { font-size: 0.72rem; opacity: 0.7; } .ncs-info dd { margin: 0; font-weight: 600; font-size: 0.95rem; }
html[lang="ar"] :is(.ncs-text, .ncs-steps small, .ncs-info dt) { line-height: 1.8; }
html[lang="ar"] .ncs-title { line-height: 1.5; padding-block: 0.06em 0.12em; }
@media (max-width: 899px) { .ncs { padding: 56px var(--gutter) 64px; } .ncs-fig { width: min(78%, 300px); } .ncs-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }


/* ---------- Flip card in the colour view ---------- */
.takeover-inner { position: relative; }
.take-card { position: absolute; z-index: 6; width: 24.7em; height: 35.7em; padding: 0; border: 0; background: none; color: inherit; perspective: 70em; rotate: -4deg; cursor: pointer;
  filter: drop-shadow(0 1.4em 1.6em rgba(0,0,0,0.38)); transition: transform 0.95s var(--ease-out), rotate 0.6s var(--ease-out); -webkit-tap-highlight-color: transparent; }
.take-card:not(.is-ready) { visibility: hidden; pointer-events: none; }
.take-card.is-ready { animation: cardIn 1.05s var(--ease-out) 0.55s backwards; }
.take-card.is-ready .tc-flip { animation: cardHint 1.5s ease-in-out 2.2s 1; }
@keyframes cardIn { from { opacity: 0; translate: 0 9em; scale: 0.86; rotate: -16deg; } 60% { opacity: 1; } }
@keyframes cardHint { 0%, 100% { transform: rotateY(0); } 35% { transform: rotateY(-26deg); } 65% { transform: rotateY(-26deg); } }
.take-card:hover:not(.is-open) { transform: translateY(-5px); rotate: -2deg; }
.take-card.is-open { z-index: 70; rotate: 0deg; transform: translate(var(--dx), var(--dy)) scale(var(--s)); cursor: pointer; filter: drop-shadow(0 2em 3em rgba(0,0,0,0.5)); }
.tc-flip { position: absolute; inset: 0; display: block; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform 0.95s var(--ease-out); }
.take-card.is-open .tc-flip { transform: rotateY(180deg); animation: none; }
.tc-face { position: absolute; inset: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 1.1em; overflow: hidden; }
.tc-front { background: var(--c); color: var(--lc); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.tc-sheen { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 38%, rgba(0,0,0,0.1)); }
.tc-code { position: absolute; left: 1.6em; bottom: 1.5em; font-family: var(--font-mono); font-size: 2.2em; font-weight: 500; letter-spacing: 0.06em; opacity: 0.9; }
.tc-icon { position: absolute; right: 1.2em; top: 1.2em; width: 4.4em; height: 4.4em; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.22); backdrop-filter: blur(4px); }
.tc-icon svg { width: 2.4em; height: 2.4em; }
.tc-back { transform: rotateY(180deg); background: #FFFFFF; color: #5C5C5C; font-family: var(--font-display); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.tc-logo { position: absolute; right: 2em; top: 2em; height: 2.2em; width: auto; }
.tc-titles { position: absolute; left: 0; right: 0; top: 14%; display: grid; gap: 0.1em; text-align: center; font-size: 1.45em; }
.tc-titles b { font-weight: 600; line-height: 1.5; }
.tc-year { position: absolute; left: 0; right: 0; top: 27%; text-align: center; font-size: 3.6em; font-weight: 300; line-height: 1.1; color: #707070; letter-spacing: 0.02em; }
.tc-rule { position: absolute; left: 7.6em; right: 7.6em; top: 44.5%; height: 1px; background: rgba(90,80,140,0.35); }
.tc-atm { position: absolute; left: 0; right: 0; top: 46.5%; text-align: center; display: grid; gap: 0.05em; font-size: 1.1em; line-height: 1.5; color: #7A7A7A; }
.tc-colour { position: absolute; left: 2.4em; right: 2.4em; top: 63.5%; display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.tc-sw { flex: none; width: 5.2em; height: 5.2em; border-radius: 0.7em; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.tc-name { display: grid; gap: 0.1em; justify-items: end; text-align: right; font-size: 1.2em; }
.tc-name b { font-weight: 700; color: #4A4A4A; line-height: 1.5; }
.tc-name em { font-style: normal; font-family: var(--font-mono); font-size: 0.78em; color: #777; }
.tc-scan { position: absolute; left: 2.4em; right: 2.4em; top: 83%; display: flex; align-items: center; gap: 1.1em; }
.tc-qr { flex: none; width: 4.9em; height: 4.9em; border-radius: 0.4em; box-shadow: 0 0 0 1px rgba(0,0,0,0.1); }
.tc-scan-t { flex: 1; display: grid; gap: 0.15em; text-align: right; justify-items: end; font-size: 0.9em; color: #6A6A6A; line-height: 1.5; }
.tc-scan-t b { font-weight: 600; }
.tc-scan-t small { font-size: 0.82em; color: #8A8A8A; line-height: 1.5; }
.take-card-dim { position: fixed; inset: 0; z-index: 65; background: rgba(8,6,4,0.58); opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.take-card-dim.is-on { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .take-card, .tc-flip { transition-duration: 0.01s; animation: none !important; } }

/* ---------- Colour kit ---------- */
/* ---------- Colour kit: pinned scene (box, sleeves, foldout) ---------- */
.kit { min-height: 100vh; height: 100vh; padding: 0; overflow: hidden; --u: min(1.3vw, 2.05vh); }
.kit-stage { position: relative; height: 100%; font-size: var(--u); }
.kit-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 55% at 50% 38%, rgba(255,255,255,0.28), rgba(255,255,255,0) 70%), radial-gradient(90% 60% at 50% 105%, rgba(0,0,0,0.16), rgba(0,0,0,0) 70%); }
.kit-head { position: absolute; z-index: 5; top: clamp(76px, 11vh, 112px); inset-inline-start: var(--gutter); width: min(30em, calc(50% - 11em - var(--gutter))); min-width: 15em; }
.kit-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.2; margin: 0.1em 0 0.3em; }
.kit-text { margin: 0; opacity: 0.75; font-size: clamp(0.85rem, 1.1vw, 1rem); }
.kit-scene { position: absolute; inset: 0; display: grid; place-items: center; transform: translateY(2.5%); }
.kit-scene > * { grid-area: 1 / 1; }
.kit-caps { pointer-events: none; position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); bottom: clamp(26px, 6vh, 56px); height: 9em; }
.kit-cap { position: absolute; inset: 0; margin: 0; text-align: center; font-size: clamp(1.05rem, 1.9vw, 1.55rem); font-family: var(--font-display); font-weight: 500; line-height: 1.5; display: grid; justify-items: center; align-content: end; gap: 0.1em; }
.kit-cap .kit-cta { pointer-events: auto; margin-top: 12px; font-size: 0.9rem; font-family: var(--font-body, inherit); }
.kit-cap code { font-family: var(--font-mono); font-size: 0.8em; padding: 0 0.4em; direction: ltr; unicode-bidi: isolate; }
.kit-cap small { display: block; font-family: var(--font-body, inherit); font-size: 0.62em; font-weight: 400; opacity: 0.7; }
.kit-cap-n { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; margin-inline-end: 0.3em; border-radius: 50%; background: currentColor; color: var(--bg); mix-blend-mode: normal; font-size: 0.75em; }
/* the box */
.kb { position: relative; width: 15em; height: 20em; perspective: 90em; transform-style: preserve-3d; font-size: 1em; color: #F3EFE8; }
.kb-shadow { position: absolute; left: -6%; right: -6%; bottom: -1.6em; height: 2.6em; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,0.5), rgba(0,0,0,0) 70%); pointer-events: none; }
.kb-back { position: absolute; inset: 0; border-radius: 0.7em; background: #1C1A1B; box-shadow: 0 3em 4em -2em rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.05); }
.kb-wall { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; border-radius: 0.2em 0.2em 0.7em 0.7em; background: linear-gradient(180deg, #343031, #2A2728); box-shadow: 0 -0.3em 0.8em rgba(0,0,0,0.35); z-index: 20; }
.kb-notch { position: absolute; top: -0.1em; left: 50%; width: 5em; height: 2.4em; margin-left: -2.5em; border-radius: 0 0 5em 5em; background: #1C1A1B; box-shadow: inset 0 -0.3em 0.6em rgba(0,0,0,0.5); }
.kb-cover { position: absolute; inset: 0; z-index: 30; transform-origin: 50% 100%; transform-style: preserve-3d; }
.kb-front, .kb-inside { position: absolute; inset: 0; border-radius: 0.7em; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.kb-front { background: #333132; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.kb-front::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1.1em; height: 1px; background: rgba(255,255,255,0.08); box-shadow: 0 1px 0 rgba(0,0,0,0.35); }
.kb-front img { position: absolute; left: 50%; top: 20%; height: 3.1em; width: auto; transform: translateX(-50%); }
.kb-titles { position: absolute; left: 0; right: 0; top: 42%; display: grid; gap: 0.1em; justify-items: center; text-align: center; }
.kb-titles b { font-family: var(--font-display); font-weight: 500; font-size: 1.15em; line-height: 1.6; letter-spacing: 0.01em; }
.kb-titles span { margin-top: 1.1em; font-size: 2.3em; font-weight: 500; line-height: 1.2; letter-spacing: 0.04em; }
.kb-tab { position: absolute; right: 2.2em; top: 0; width: 3.4em; height: 1.8em; border-radius: 0.6em 0.6em 0 0; background: #333132; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.kb-inside::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(0,0,0,0.38), rgba(0,0,0,0) 55%); }
.kb-front::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,0.1), rgba(255,255,255,0) 42%); }
.kb-inside { transform: rotateX(180deg); background: #2B2829; padding: 1.5em 1.4em; display: grid; gap: 0.7em; align-content: start; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.kb-inside p { margin: 0; font-size: 0.62em; line-height: 1.7; opacity: 0.85; text-align: justify; }
.kb-qr { width: 4.2em; height: 4.2em; border-radius: 0.3em; margin-top: 0.4em; }
/* a sleeve */
.ks { --sw: calc(13 * var(--u)); position: absolute; left: 50%; top: 50%; width: var(--sw); height: calc(var(--sw) * 1.36); margin: calc(var(--sw) * -0.68) 0 0 calc(var(--sw) * -0.5); z-index: 10; font-size: calc(var(--sw) / 20); color: #F3EFE8; will-change: transform; }
/* the real sleeve: a dark envelope with a half-round notch; the five colour cards stand out of it in steps */
.ks-env { position: absolute; inset: 0; z-index: 2; background: #302D2E; border-radius: 0.5em; padding: 4.2em 1.5em 1.2em; display: grid; align-content: start; gap: 0.1em; box-shadow: 0 1.4em 2em -1em rgba(0,0,0,0.5); -webkit-mask: radial-gradient(circle at 50% 0, transparent 0 3em, #000 3.06em); mask: radial-gradient(circle at 50% 0, transparent 0 3em, #000 3.06em); }
.ks-cards { position: absolute; left: 0; right: 0; top: 0; z-index: 1; height: 0; }
.ks-cards i { position: absolute; left: 6%; right: 6%; bottom: -4.4em; z-index: calc(10 - var(--k)); height: calc(4.4em + (var(--k) + 1) * var(--cs, 1.9em)); border-radius: 0.55em 0.55em 0 0; background: var(--c); box-shadow: 0 -0.15em 0.5em rgba(0,0,0,0.18), inset 0 0 0 1px rgba(255,255,255,0.18); transform: translateY(calc((1 - var(--rise, 0)) * ((var(--k) + 1) * var(--cs, 1.9em) + 0.6em))); }
.ks-tag { margin: 0 0 0.6em; font-size: 0.74em; line-height: 1.5; opacity: 0.72; }
.ks h3 { margin: 0; text-align: right; font-family: var(--font-display); font-size: 1.6em; font-weight: 500; line-height: 1.5; }
.ks-en { margin: 0 0 0.5em; font-family: var(--font-display); font-size: 1.1em; line-height: 1.4; opacity: 0.9; }
.ks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15em; }
.ks li button { width: 100%; display: grid; grid-template-columns: 1.5em 1fr; grid-template-areas: "i n" "i c"; column-gap: 0.8em; align-items: center; padding: 0.3em 0.3em; border-radius: 0.5em; border: 0; background: transparent; color: inherit; text-align: start; cursor: pointer; transition: background 0.25s; }
.ks li button:hover { background: rgba(243,239,232,0.1); }
.ks li i { grid-area: i; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3); }
.ks li span { grid-area: n; font-size: 1.02em; line-height: 1.4; }
.ks li em { grid-area: c; font-style: normal; font-family: var(--font-mono); font-size: 0.74em; line-height: 1.4; opacity: 0.7; }
/* the foldout: nested panels hinged on their left edges, so the fold is a real accordion */
.kf-wrap { display: grid; place-items: center; }
.kf-wrap.is-rtl { transform: scaleX(-1); }
.kf-wrap.is-rtl .kf-face img { transform: scaleX(-1); }
.kf { --fw: calc(15.5 * var(--u)); position: relative; width: var(--fw); height: calc(var(--fw) * 1.347); font-size: calc(var(--fw) / 11); perspective: 160em; transform-style: preserve-3d; color: #2A2829; }
.kf-p { position: absolute; left: 0; top: 0; width: var(--fw); height: 100%; transform-origin: 0 50%; transform-style: preserve-3d; }
.kf-back, .kf-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.kf-back { background: #F1EEE8; transform: rotateY(180deg); }
.kf-back::before, .kf-face::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(10,12,14,var(--sh, 0)) 0%, rgba(10,12,14,calc(var(--sh, 0) * 0.35)) 45%, rgba(255,255,255,calc(var(--sh, 0) * 0.18)) 100%); }
/* a soft highlight band while a leaf is moving reads as the paper bending */
.kf-face::before { background: linear-gradient(90deg, rgba(10,12,14,var(--sh, 0)) 0%, rgba(255,255,255,calc(var(--curl, 0) * 0.22)) 52%, rgba(10,12,14,calc(var(--curl, 0) * 0.12)) 100%); }
.kf-face { background: #fff; }
.kf-face img { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.kf-face::after { content: ""; position: absolute; inset: 0; background: #E9E4DA; opacity: var(--dim, 0); pointer-events: none; }
/* each sleeve's own NCS map, pulled out of its lower edge */
.ks-pull { position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 0; overflow: hidden; background: #302D2E; border-radius: 0 0 0.5em 0.5em; box-shadow: 0 1.4em 2em -1em rgba(0,0,0,0.5); }
.ks-map { height: 9.6em; display: grid; grid-template-columns: 1fr 1fr; gap: 1em; align-items: center; padding: 0.6em 1.7em 1.2em; }
.ks .ncs-fig { width: 100%; }
.ks .ncs-lab { font-size: 0.66em; }
.ks .ncs-dot { width: 0.95em; height: 0.95em; margin: -0.475em 0 0 -0.475em; border-width: 1px; }
.ks .ncs-dot.is-active, .ks .ncs-dot:hover { transform: scale(1.5); }
html[lang="ar"] :is(.kit-text, .kit-cap small, .kb-inside p) { line-height: 1.9; }
html[lang="ar"] .kit-title { line-height: 1.5; padding-block: 0.06em 0.12em; }
html[lang="ar"] .kit-cap { line-height: 1.75; }
@media (max-width: 799px) {
  .kit { --u: min(3.7vw, 1.65vh); }
  .ks { --sw: calc(18.5 * var(--u)); }
  .kf { --fw: calc(16 * var(--u)); }
  .kit-head { width: auto; inset-inline-end: var(--gutter); }
  .kit-text { display: none; }
  .kit-caps { height: 10em; bottom: clamp(40px, 6.5vh, 56px); }
}
/* reduced motion: no scene, just the final state laid out */
.kit.is-static { height: auto; min-height: 0; padding: 64px var(--gutter); }
.kit.is-static .kit-stage { height: auto; display: grid; gap: 28px; }
.kit.is-static .kit-head { position: static; }
.kit.is-static .kit-scene { position: static; transform: none; display: grid; gap: 30px; }
.kit.is-static .kit-caps, .kit.is-static .kb > :not(.ks) { display: none; }
.kit.is-static .kb { position: static; width: auto; height: auto; perspective: none; display: flex; flex-wrap: wrap; gap: 14px; }
.kit.is-static .ks { position: relative; left: auto; top: auto; margin: 0; }
.kit.is-static .ks-pull { position: relative; top: 0; height: auto; margin-top: 1.2em; border-radius: 0.5em; }
.kit.is-static .kf { justify-self: start; }

/* kit: sound button */
.kit-snd { position: absolute; z-index: 6; top: clamp(76px, 11vh, 112px); inset-inline-end: var(--gutter); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--fg) 12%, transparent); color: var(--fg); border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; transition: background 0.25s; }
.kit-snd:hover { background: color-mix(in srgb, var(--fg) 22%, transparent); }
.kit-snd .snd-off, .kit-snd.is-off .snd-on { display: none; } .kit-snd.is-off .snd-off { display: block; }
.kit.is-static .kit-snd { display: none; }
@media (max-width: 799px) { .kit-head { inset-inline-end: calc(var(--gutter) + 56px); } }
/* novel: the product photo is a calm, fixed size on wide screens */
.novel-photo { width: min(100%, 620px); justify-self: center; }

/* the flip card keeps no focus frame, and the colour view never scrolls sideways */
.take-card:focus, .take-card:focus-visible, .take-card:active { outline: none; box-shadow: none; }
.take-card, .tc-flip, .tc-face { -webkit-tap-highlight-color: transparent; }
.take-card:focus-visible:not(.is-open) .tc-front { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7); }
.takeover { overflow-x: hidden; }

/* kit scene: "scroll" cue */
.kit-caps { bottom: clamp(56px, 10vh, 92px); }
.kit-cue { position: absolute; z-index: 6; left: 0; right: 0; bottom: clamp(12px, 2.6vh, 26px); display: grid; justify-items: center; gap: 4px; pointer-events: none; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
html[lang="ar"] .kit-cue { letter-spacing: 0.02em; text-transform: none; font-size: 0.85rem; }
.kit-cue i { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: cueBob 1.6s ease-in-out infinite; }
@keyframes cueBob { 0%, 100% { transform: translateY(-2px) rotate(45deg); opacity: 0.35; } 50% { transform: translateY(4px) rotate(45deg); opacity: 1; } }
.kit.is-static .kit-cue { display: none; }
@media (prefers-reduced-motion: reduce) { .kit-cue i { animation: none; } }

@media (max-width: 799px) { .ks-cards { --cs: 1.45em; } }

/* brand logo: the full-colour lockup only on white; Jazeera's own one-colour files elsewhere (black on light, white on dark) */
.brand img.logo-on-dark { display: none; }
html.nav-dark .brand img.logo-on-light { display: none; }
html.nav-dark .brand img.logo-on-dark { display: block; }
.brand img.logo-on-light, .brand img.logo-on-dark, .kb-front img { filter: none !important; }
