/* ===========================================================================
   Portfolio · client work
   /portfolio picks a project on the Option Wheel; each project then has its own
   case-study page. Sits on top of the site's styles.css (top bar, menu, contact).
   =========================================================================== */

/* ---------- Option Wheel (React Bits OptionWheel, JS-CSS) ---------- */

.option-wheel {
  --ow-text-color: #a6a6a6;
  --ow-active-color: #ffffff;
  --ow-font-size: 3rem;
  --ow-inset: 80px;

  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  outline: none;
}

.option-wheel--dragging {
  cursor: grabbing;
}

/* Each option is absolutely centered, then offset along the curve by the
   rAF loop through transform/opacity/filter, so everything stays in step. */
.option-wheel__item {
  position: absolute;
  top: 50%;
  left: var(--ow-inset);
  white-space: nowrap;
  font-size: var(--ow-font-size);
  line-height: 1;
  font-weight: 300;
  transform-origin: left center;
  cursor: pointer;
  will-change: transform, opacity, filter;
  /* --ow-p goes 0 -> 1 as an option approaches the middle of the wheel */
  color: color-mix(in srgb, var(--ow-active-color) calc(var(--ow-p, 0) * 100%), var(--ow-text-color));
}

.option-wheel--right .option-wheel__item {
  left: auto;
  right: var(--ow-inset);
  transform-origin: right center;
}

.option-wheel__item--selected {
  font-weight: 400;
}

/* ---------- shared ---------- */

.pf, .cs { --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- /portfolio ---------- */

.pf .work__band {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--frame) * 2);
}

.pf__head { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.pf__head .work__eyebrow { margin-bottom: 0; }
.pf__count { font-family: var(--mono); font-size: clamp(12px, 0.85vw, 15px); letter-spacing: 0.08em; color: var(--body); direction: ltr; }
.pf__count b { font-weight: 400; color: #fff; }

.pf__stage {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4.4vw, 88px);
  margin-top: clamp(12px, 2vw, 36px);
}

.pf__wheel {
  --ow-font-size: clamp(48px, 6.4vw, 128px);
  /* the curve carries the outer options about 0.4em to the left: give them that room,
     and pull the wheel back by the same amount so the middle option lines up with the eyebrow */
  --ow-inset: 0.45em;
  --ow-text-color: #4a4b55;
  --ow-active-color: #ffffff;
  height: clamp(380px, 64svh, 760px);
  margin-left: -0.45em;
  font-size: var(--ow-font-size);
  letter-spacing: -0.045em;
  direction: ltr; /* project names are Latin in every language */
  /* the far options dissolve into the band instead of being cut at the edge */
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
}
/* in Arabic the wheel hangs from the right edge and curls away to the right */
.pf__wheel.option-wheel--right { margin-left: 0; margin-right: -0.45em; }
.pf__wheel:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.4); outline-offset: 6px; border-radius: 12px; }

.pf__previews { display: grid; }

.pf-card {
  grid-area: 1 / 1;
  opacity: 0;
  translate: 0 18px;
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.5s var(--expo-out), translate 0.9s var(--expo-out), filter 0.6s var(--expo-out);
}
.pf-card.is-active { opacity: 1; translate: none; filter: none; pointer-events: auto; transition-delay: 0.08s; }

.pf-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(10px, 1vw, 16px);
  background: #17171a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.pf-card__media video, .pf-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--expo-out); }
a.pf-card__media:hover video { scale: 1.03; }

/* a project still being written up: its name, quietly, on a tinted plate */
.pf-card__media--soon {
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%),
    radial-gradient(60% 70% at 0% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    #111114;
}
.pf-card__ghost { font-size: clamp(40px, 5vw, 96px); font-weight: 300; letter-spacing: -0.045em; color: rgba(255, 255, 255, 0.16); direction: ltr; }
.pf-card__chip {
  position: absolute;
  inset-inline-start: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}
.pf-card__chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pf-pulse 2.4s ease-in-out infinite; }
@keyframes pf-pulse { 50% { opacity: 0.3; } }

.pf-card__k {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-top: clamp(18px, 1.8vw, 28px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
}
.pf-card__k::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pf-card__title { margin-top: 12px; font-size: clamp(22px, 1.9vw, 36px); font-weight: 300; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.pf-card__desc { max-width: 34em; margin-top: 12px; font-size: clamp(14px, 1vw, 17px); line-height: 1.6; color: var(--body); }
.pf-card__facts { display: flex; flex-wrap: wrap; gap: 10px clamp(20px, 2.4vw, 40px); margin-top: clamp(16px, 1.6vw, 24px); }
.pf-card__facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #6f707d; }
.pf-card__facts dd { margin-top: 4px; font-size: 14px; color: #e6e6ea; }
.pf-card .project__cta { margin-top: clamp(18px, 1.8vw, 28px); }
.pf-card .project__cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.6s var(--expo-out); }
.pf-card .project__cta:hover svg { transform: translateX(3px); }
[dir="rtl"] .pf-card .project__cta svg { scale: -1 1; }

.pf__hint {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(16px, 2vw, 32px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f707d;
}
.pf__hint svg { width: 14px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.pf__hint svg line { animation: pf-scroll 1.8s var(--expo-out) infinite; }
@keyframes pf-scroll { from { translate: 0 -2px; opacity: 1; } to { translate: 0 4px; opacity: 0; } }

:root[lang="ar"] .pf__count, :root[lang="ar"] .pf-card__k, :root[lang="ar"] .pf-card__facts dt, :root[lang="ar"] .pf__hint, :root[lang="ar"] .pf-card__chip { font-family: inherit; letter-spacing: 0; }

@media (max-width: 860px) {
  .pf__stage { grid-template-columns: 1fr; align-items: start; }
  .pf__wheel { --ow-font-size: clamp(40px, 12vw, 88px); height: clamp(260px, 44svh, 420px); }
}

@media (prefers-reduced-motion: reduce) {
  .pf__hint svg line, .pf-card__chip::before { animation: none; }
}

/* ---------- case study ----------
   The dark band opens with the title and the film; the story then runs on a
   pale sheet in the client's own greys, teals and forest green. */

.cs {
  --cs-ink: #203233;
  --cs-soft: #4a5a5b;
  --cs-muted: #7c8a8b;
  --cs-rule: rgba(32, 50, 51, 0.12);
  --cs-accent: #00beaa;
  --cs-deep: #007f78;
  --cs-sheet: #f4f4f4;
  --cs-media: #e6e8e8;
  --cs-on-ink: #fff;
  --cs-glow-a: rgba(0, 190, 170, 0.18);
  --cs-glow-b: rgba(255, 176, 24, 0.07);
}

/* an all-dark case study: the sheet goes dark with the band (the frame and footer follow below) */
.cs--dark {
  --cs-ink: #eef1f0;
  --cs-soft: #9ba5a2;
  --cs-muted: #6c7673;
  --cs-rule: rgba(255, 255, 255, 0.1);
  --cs-sheet: #0f1211;
  --cs-media: #141716;
  --cs-on-ink: #070808;
}

/* Source Network: near-black, with the brand's green and cyan */
.cs--source {
  --cs-accent: #04b14e;
  --cs-deep: #2fd572;
  --cs-glow-a: rgba(4, 177, 78, 0.2);
  --cs-glow-b: rgba(15, 202, 255, 0.06);
}

/* Flatfile: deep navy, with the brand's indigo light, coral and peach */
.cs--flatfile {
  --cs-accent: #f06d58;
  --cs-deep: #ffd8b8;
  --cs-sheet: #0b1126;
  --cs-media: #111a38;
  --cs-glow-a: rgba(60, 45, 201, 0.36);
  --cs-glow-b: rgba(240, 109, 88, 0.08);
}

/* Gamaya: field green from the product, with the warm light of the satellite maps */
.cs--gamaya {
  --cs-accent: #34a862;
  --cs-deep: #8fd19e;
  --cs-sheet: #0d110e;
  --cs-media: #131814;
  --cs-glow-a: rgba(42, 146, 84, 0.26);
  --cs-glow-b: rgba(196, 160, 96, 0.09);
}

/* Grayscale: the brand's deep purple, with the peach of its wordmark and a lavender light */
.cs--grayscale {
  --cs-accent: #feb197;
  --cs-deep: #c5bfe5;
  --cs-sheet: #120e1f;
  --cs-media: #1d1731;
  --cs-glow-a: rgba(122, 102, 196, 0.34);
  --cs-glow-b: rgba(254, 177, 151, 0.08);
}

/* Marqeta: the brand's deep indigo and violet cards, with its green */
.cs--marqeta {
  --cs-accent: #1cc284;
  --cs-deep: #42d59e;
  --cs-sheet: #0e0c22;
  --cs-media: #1a1640;
  --cs-glow-a: rgba(77, 68, 175, 0.4);
  --cs-glow-b: rgba(28, 194, 132, 0.08);
}

/* the band's light takes the client's colour */
.cs .work__band::before {
  background:
    radial-gradient(80% 60% at 100% 0%, var(--cs-glow-a), transparent 60%),
    radial-gradient(60% 40% at 0% 100%, var(--cs-glow-b), transparent 60%);
}
.cs .logo__cursor { background: var(--cs-accent); }

.cs__hero { position: relative; }
.cs__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 2.4vw, 40px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
  transition: color 0.3s;
}
.cs__back:hover { color: #fff; }
.cs__back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.6s var(--expo-out); }
.cs__back:hover svg { transform: translateX(-3px); }
[dir="rtl"] .cs__back svg { scale: -1 1; }

.cs .work__title { direction: ltr; text-align: start; }
.cs__intro { display: flex; justify-content: space-between; align-items: flex-end; gap: clamp(20px, 4vw, 80px); margin-top: clamp(18px, 2vw, 32px); }
.cs__intro .work__lede { margin: 0; color: #c9cdd0; }
.cs__tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 34em; }
.cs__tags li { padding: 7px 12px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; font-size: 13px; color: #d6d8dc; }

.cs-media { margin: 0; overflow: hidden; border-radius: clamp(10px, 1.2vw, 20px); background: var(--cs-media); }
.cs-media video, .cs-media img { display: block; width: 100%; height: auto; }
.cs-media--hero { position: relative; margin-top: clamp(32px, 4vw, 72px); background: #111; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }

.cs__sheet {
  --tuck: clamp(28px, 3vw, 56px);
  position: relative;
  z-index: 1;
  margin: calc(var(--tuck) * -1) clamp(10px, 1.6vw, 28px) 0;
  padding: calc(var(--tuck) + clamp(8px, 1vw, 20px)) clamp(18px, 3.6vw, 72px) clamp(40px, 5vw, 96px);
  background: var(--cs-sheet);
  border-radius: 0 0 clamp(20px, 2.2vw, 40px) clamp(20px, 2.2vw, 40px);
  color: var(--cs-ink);
}

.cs-sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
  gap: clamp(20px, 5vw, 100px);
  padding-block: clamp(48px, 6vw, 120px);
}
.cs-sec + .cs-sec, .cs-gallery + .cs-sec { border-top: 1px solid var(--cs-rule); }
.cs-sec__h {
  align-self: start;
  position: sticky;
  top: clamp(24px, 3vw, 48px);
  font-size: clamp(34px, 3.6vw, 68px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}
.cs-sec__h small { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--cs-deep); }
.cs-sec__body { max-width: 46em; }
.cs-sec__body p, .cs-list li { font-size: clamp(16px, 1.22vw, 21px); line-height: 1.62; color: var(--cs-soft); }
.cs-sec__body p + p, .cs-sec__body p + .cs-list, .cs-list + p { margin-top: 1.2em; }
.cs-sec__body h3 { margin-top: clamp(32px, 3vw, 52px); margin-bottom: 0.6em; font-size: clamp(20px, 1.6vw, 28px); font-weight: 400; letter-spacing: -0.015em; color: var(--cs-ink); }
.cs-sec__body h3 + p { margin-top: 0; }
.cs-list li { position: relative; padding-inline-start: 1.6em; }
.cs-list li + li { margin-top: 0.8em; }
.cs-list li::before { content: ""; position: absolute; inset-inline-start: 0.2em; top: 0.68em; width: 7px; height: 7px; border-radius: 50%; background: var(--cs-accent); }

/* the facts under the story: the headline figures get a full row of their own,
   then services, stack and site share the row below. Stacked, never side by side,
   so a big figure can't spill into the details. */
.cs-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 3.4vw, 56px); margin-top: clamp(36px, 4vw, 64px); padding-top: clamp(24px, 2.4vw, 40px); border-top: 1px solid var(--cs-rule); }
.cs-outcome { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 28px clamp(20px, 2.4vw, 40px); align-content: start; }
.cs-outcome > div, .cs-info > div { min-width: 0; }
.cs-facts h4 { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cs-muted); }
.cs-outcome p { margin-top: 8px; font-size: 14px; color: var(--cs-muted); }
.cs-outcome strong { display: block; margin-top: 10px; font-size: clamp(40px, 4.2vw, 80px); font-weight: 300; line-height: 1; letter-spacing: -0.04em; color: var(--cs-ink); overflow-wrap: break-word; }
.cs-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 22px clamp(20px, 2.4vw, 40px); }
.cs-info p, .cs-info li { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--cs-ink); }
.cs-info ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.cs-info a { color: var(--cs-deep); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; }

.cs-statement {
  max-width: 30em;
  padding-block: clamp(40px, 5vw, 96px) clamp(40px, 5vw, 88px);
  margin-inline-start: auto;
  font-size: clamp(22px, 2.3vw, 42px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--cs-ink);
}

/* a longer opening: two paragraphs, a size down */
.cs-statement--long { max-width: 38em; font-size: clamp(19px, 1.65vw, 30px); line-height: 1.45; }
.cs-statement p + p { margin-top: 0.9em; }
.cs-statement a, .cs-sec__body > p a { background: linear-gradient(var(--cs-accent), var(--cs-accent)) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; }

.cs-gallery { display: grid; gap: clamp(8px, 1vw, 16px); }

.cs-quote { margin: 0; }
.cs-quote p { font-size: clamp(22px, 2.2vw, 40px); font-weight: 300; line-height: 1.35; letter-spacing: -0.02em; color: var(--cs-ink); text-indent: -0.42em; }
.cs-quote footer { display: flex; align-items: center; gap: 16px; margin-top: clamp(28px, 3vw, 48px); }
.cs-quote img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.cs-quote cite { font-style: normal; font-size: 16px; color: var(--cs-ink); }
.cs-quote cite span { display: block; margin-top: 4px; font-size: 14px; color: var(--cs-muted); }

/* the way on: the next project, and the way back to the wheel */
.cs-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-top: clamp(24px, 3vw, 48px);
  padding-top: clamp(32px, 4vw, 64px);
  border-top: 1px solid var(--cs-rule);
}
.cs-next__k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cs-muted); }
.cs-next__name { display: inline-flex; align-items: baseline; gap: 0.3em; margin-top: 10px; font-size: clamp(56px, 8vw, 168px); font-weight: 300; line-height: 0.92; letter-spacing: -0.045em; color: var(--cs-ink); direction: ltr; transition: color 0.4s; }
.cs-next__name small { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cs-muted); }
.cs-next__name:hover { color: var(--cs-deep); }
.cs-next__all { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px 12px 18px; border-radius: 8px; background: var(--cs-ink); color: var(--cs-on-ink); font-size: 14px; transition: background-color 0.4s; }
.cs-next__all:hover { background: var(--cs-deep); }
.cs-next__all svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .cs-next__all svg { scale: -1 1; }

/* a gallery with no story between its films gets a quiet label under each one */
.cs-media figcaption {
  padding: 12px 2px 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cs-muted);
  background: var(--cs-sheet);
}
.cs-media figcaption b { margin-inline-end: 0.8em; font-weight: 400; color: var(--cs-deep); }
.cs-media:has(figcaption) { border-radius: 0; background: none; }
.cs-media:has(figcaption) > :is(video, img) { border-radius: clamp(10px, 1.2vw, 20px); background: var(--cs-media); }

/* ---- chapters: a product told feature by feature, the words held beside their screens ---- */
.cs-chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  align-items: start;
  gap: clamp(24px, 4.4vw, 88px);
  padding-block: clamp(40px, 5vw, 96px);
  border-top: 1px solid var(--cs-rule);
}
.cs-chapter--flip .cs-chapter__text { order: 2; }
/* the text stays in view while its screens scroll past */
.cs-chapter__text { position: sticky; top: clamp(24px, 3vw, 48px); }
.cs-chapter h2 { font-size: clamp(24px, 2.2vw, 42px); font-weight: 300; line-height: 1.12; letter-spacing: -0.025em; color: var(--cs-ink); }
.cs-chapter h2 small { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--cs-deep); }
.cs-chapter p, .cs-chapter li { font-size: clamp(15px, 1.12vw, 19px); line-height: 1.62; color: var(--cs-soft); }
.cs-chapter__text > * + *, .cs-chapter__body > * + * { margin-top: 1em; }
.cs-chapter__text > h2 + * { margin-top: 1.2em; }
.cs-chapter strong, .cs-statement strong { font-weight: 400; color: var(--cs-ink); }
.cs-chapter__media { display: grid; gap: clamp(10px, 1.2vw, 20px); }
/* a sentence that introduces a screen sits above it */
.cs-chapter__media .cs-media figcaption { order: -1; padding: 0 2px 12px; font-family: inherit; font-size: clamp(14px, 1vw, 17px); letter-spacing: 0; text-transform: none; line-height: 1.55; color: var(--cs-soft); }
.cs-chapter__media .cs-media:has(figcaption) { display: flex; flex-direction: column; }
/* a chapter that is all words: its title on the left, its text on the right */
.cs-chapter--plain .cs-chapter__body { max-width: 40em; }

/* screens of different shapes on one row: each column is as wide as its aspect ratio
   (set in --cols), so the row lines up at a single height */
.cs-row { display: grid; grid-template-columns: var(--cols, repeat(2, minmax(0, 1fr))); align-items: start; gap: clamp(8px, 1vw, 16px); }
/* a row straight after About, before the first chapter */
.cs-row--lead { padding-bottom: clamp(32px, 4vw, 72px); }
/* a phone screen, shown at phone width */
.cs-media--phone { justify-self: center; width: min(100%, 380px); }

/* two tiles of the same height: the brand on its own plate, and the film */
.cs-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); padding-bottom: clamp(32px, 4vw, 72px); }
.cs-duo .cs-media { position: relative; aspect-ratio: 16 / 9; }
.cs-duo .cs-media > :is(img, video) { width: 100%; height: 100%; object-fit: cover; }
.cs-duo .cs-media--plate { background: #fff; }
.cs-duo .cs-media--plate img { object-fit: contain; padding: 8%; }
.cs-watch {
  position: absolute;
  inset-inline-start: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: rgba(8, 10, 9, 0.62);
  color: #fff;
  font-size: 13px;
  backdrop-filter: blur(10px);
  transition: background-color 0.3s;
}
.cs-watch:hover { background: var(--cs-accent); }
.cs-watch svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .cs-chapter { grid-template-columns: 1fr; }
  .cs-chapter--flip .cs-chapter__text { order: 0; }
  .cs-chapter__text { position: static; }
  .cs-duo { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cs-row { grid-template-columns: 1fr; }
}

:root[lang="ar"] .cs__back, :root[lang="ar"] .cs-next__k, :root[lang="ar"] .cs-facts h4 { font-family: inherit; letter-spacing: 0; }

/* ---------- an all-dark page: the frame around the band, the footer and the back-to-top button ---------- */

body.page--dark { background: #060707; }
.page--dark .contact {
  --navy: #eef1f0;
  --body: #8f9996;
  --muted: #6c7673;
  --line: rgba(255, 255, 255, 0.12);
}
.page--dark .cta { color: #060707; }
.page--dark .channel:hover { background: rgba(255, 255, 255, 0.04); }
.page--dark .contact__mark { -webkit-text-stroke-color: rgba(255, 255, 255, 0.16); }
.page--dark #to-top { background: #eef1f0; color: #060707; }
.page--dark #to-top:hover { background: #fff; }

@media (max-width: 900px) {
  .cs__intro { flex-direction: column; align-items: flex-start; }
  .cs__tags { justify-content: flex-start; }
  .cs-sec { grid-template-columns: 1fr; }
  .cs-sec__h { position: static; }
  .cs-next { grid-template-columns: 1fr; align-items: start; }
}
