/* ==========================================================================
   Kavoro, company site
   Direction: editorial two-tone (Trevor Noah / OFF+BRAND) x collectible-card dex
   Two-tone system: Tottenham navy on cool off-white, one pink accent.
   Cards are objects on a table; dark blocks break the scroll into chapters.
   ========================================================================== */

/* --- Tokens -------------------------------------------------------------- */
:root {
  /* Ink & paper, Tottenham navy on a cool off-white.
     Pure #fff is reserved for cards so they lift off the ground. */
  --ink:        #0D1B2A;
  --ink-soft:   #33475E;
  --ink-mute:   #5F7088;
  --paper:      #f7f8fc;
  --paper-2:    #e9ecf5;
  --paper-edge: #d5dae9;
  --card:       #ffffff;

  /* Accent, one hue, three stops, because a single pink cannot clear
     contrast on white AND stay soft on navy.
       --accent-ink  small text on light   (5.9:1 on --paper)
       --accent      display type, bars, decoration
       --accent-soft on navy blocks only   (too light for text on white) */
  --accent-ink:  #1F5FBF;
  --accent:      #4C8DFF;
  --accent-soft: #9CC3FF;

  /* Card type colours, per-project identity, deliberately outside the
     brand palette so the dex reads as its own world. */
  --electric:   #4d5bff;
  --lime:       #c7f45d;
  --cyan:       #59e1ff;
  --violet:     #a06bff;
  --amber:      #ffb23f;

  /* The mascots are baked on this navy; matching it kills the load flash. */
  --art-bg:     #14162b;

  /* Type */
  --font-display: 'Unbounded', 'Arial Black', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

  --text-micro: 0.6875rem;
  --text-sm:    0.875rem;
  --text-base:  clamp(1rem, 0.94rem + 0.28vw, 1.125rem);
  --text-lead:  clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --text-h3:    clamp(1.35rem, 1.1rem + 1.1vw, 2rem);
  --text-h2:    clamp(2.25rem, 1.4rem + 3.6vw, 5rem);
  --text-hero:  clamp(2.25rem, 0.5rem + 7.2vw, 8rem);

  /* Rhythm, deliberately uneven, not uniform padding everywhere */
  --gutter:      clamp(1.25rem, 0.6rem + 2.6vw, 4rem);
  --space-band:  clamp(3.25rem, 2rem + 4.2vw, 7rem);
  --space-tight: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
  --measure:     62ch;

  /* Motion */
  --dur-fast:   150ms;
  --dur-base:   320ms;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);

  --edge: 1px solid var(--paper-edge);
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper grain, atmosphere without an image request */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(19, 34, 87, 0.10) 1px, transparent 0);
  background-size: 4px 4px;
}
body > * { position: relative; z-index: 1; }

:focus-visible {
  outline: 3px solid var(--electric);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 0; }

.shell { width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }
.u-mono { font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: 0.14em; text-transform: uppercase; }
.u-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Nav ----------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem var(--gutter);
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: var(--edge);
}
.nav__mark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  white-space: nowrap;
}
.nav__mark span { color: var(--accent); }
/* Below the breakpoint the links become a panel under the bar. Without JS
   they simply stay visible and wrap, so navigation never disappears; the
   toggle is only injected once JS confirms it can drive it. */
.nav__links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }

@media (max-width: 859px) {
  .nav { flex-wrap: wrap; row-gap: 0.75rem; }
  .nav__links {
    order: 3;
    width: 100%;
    padding-top: 0.75rem;
    border-top: var(--edge);
  }
  /* JS present: collapse it behind the toggle. */
  .js .nav__links[hidden] { display: none; }
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 859px) { .js .nav__toggle { display: inline-flex; } }
.nav__toggle::after {
  content: "";
  width: 0.5rem; height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.nav__links a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding-block: 0.25rem;
  transition: color var(--dur-fast) var(--ease-out);
}
/* Underline grows from the left, designed, not a default underline */
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.3rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 -2px var(--accent); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 0 -1px var(--accent); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #fff; border-color: var(--accent); }
.btn--accent:hover { box-shadow: 0 8px 0 -2px var(--ink); }
.btn--quiet { --btn-bg: transparent; --btn-fg: var(--ink-soft); border-color: var(--paper-edge); }
.btn--quiet:hover { --btn-fg: var(--ink); border-color: var(--ink); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 1rem + 8vw, 8rem) clamp(2rem, 1rem + 4vw, 4rem);
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-mute);
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
}
.hero__eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--paper-edge);
}
.hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 0.86;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
/* Each line is its own overflow-clipped stage so the reveal wipes cleanly */
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: block; }
.hero__line--indent { padding-left: clamp(0px, 8vw, 10rem); }
.hero__line em {
  font-style: normal;
  color: var(--accent);
  -webkit-text-stroke: 0;
}
/* Outlined word, the one loud typographic move, borrowed from card-game logos */
.hero__outline {
  color: transparent;
  -webkit-text-stroke: clamp(1.5px, 0.22vw, 3px) var(--ink);
  paint-order: stroke fill;
}

/* The one full logo-style moment on the page. */
.hero__pop {
  color: var(--accent);
  -webkit-text-stroke: clamp(2px, 0.34vw, 5px) var(--ink);
  paint-order: stroke fill;
  text-shadow:
    clamp(3px, 0.5vw, 7px) clamp(3px, 0.5vw, 7px) 0 var(--ink),
    clamp(6px, 1vw, 14px) clamp(6px, 1vw, 14px) 0 var(--accent-soft);
}
.contact__title em {
  color: var(--accent-soft);
  -webkit-text-stroke: clamp(2px, 0.3vw, 4px) var(--paper);
  paint-order: stroke fill;
}

.hero__foot {
  display: grid;
  gap: var(--space-tight);
  margin-top: clamp(2rem, 1rem + 4vw, 4.5rem);
  padding-top: var(--space-tight);
  border-top: var(--edge);
}
@media (min-width: 900px) {
  .hero__foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: clamp(2rem, 6vw, 6rem); }
}
.hero__lede { font-size: var(--text-lead); line-height: 1.45; max-width: 42ch; text-wrap: pretty; }
.hero__lede strong { font-weight: 600; box-shadow: inset 0 -0.45em 0 color-mix(in oklab, var(--accent-soft) 55%, transparent); }
.hero__meta { display: grid; gap: 1.25rem; }
.hero__meta dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.25rem; align-items: baseline; }
.hero__meta dt { color: var(--ink-mute); }
.hero__meta dd { font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

/* --- Marquee band -------------------------------------------------------- */
.band {
  background: var(--ink);
  color: var(--paper);
  padding-block: 0.9rem;
  overflow: hidden;
  border-block: 2px solid var(--ink);
}
.band__track {
  display: flex;
  width: max-content;
  /* animation starts once JS clones the group, see app.js */
}
.band__track.is-ready { animation: marquee 42s linear infinite; }
.band:hover .band__track { animation-play-state: paused; }
.band__group { display: flex; align-items: center; flex-shrink: 0; }
.band__item {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  padding-inline: 1.5rem;
  white-space: nowrap;
}
.band__item:nth-child(even) { color: var(--accent-soft); }
.band__sep { color: var(--accent); font-size: 1.1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Section furniture --------------------------------------------------- */
.section { padding-block: var(--space-band); }
.section__head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 1rem + 4vw, 4rem);
}
@media (min-width: 900px) {
  .section__head { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; gap: clamp(2rem, 5vw, 5rem); }
}
.section__num { color: var(--accent-ink); }
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  line-height: 0.9;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  text-wrap: balance;
}
.section__note { color: var(--ink-soft); max-width: 46ch; text-wrap: pretty; }

/* --- About --------------------------------------------------------------- */
.about { display: grid; gap: var(--space-tight); }
@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
  /* The pull quote runs the full width beneath both columns. */
  .about .quote { grid-column: 1 / -1; margin-top: var(--space-tight); }
}
.about__body p + p { margin-top: 1.1rem; }
.about__body { max-width: var(--measure); text-wrap: pretty; }
.quote {
  align-self: start;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--ink);
  color: var(--paper);
  border-radius: 16px;
}
.quote__mark {
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 0.6;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}
.quote__text {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.quote__by { margin-top: 1.25rem; color: color-mix(in oklab, var(--paper) 62%, transparent); }

/* --- Principles ---------------------------------------------------------- */
.principles { border-top: var(--edge); }
.principle {
  display: grid;
  gap: 0.5rem 2rem;
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-bottom: var(--edge);
}
@media (min-width: 780px) {
  .principle { grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
}
.principle__n { color: var(--accent-ink); padding-top: 0.35rem; }
.principle__t {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.principle__d { color: var(--ink-soft); max-width: var(--measure); text-wrap: pretty; }
/* Hover shifts the whole row, a designed state on a non-interactive block */
@media (hover: hover) and (min-width: 780px) {
  .principle { transition: background var(--dur-base) var(--ease-out); }
  .principle:hover { background: color-mix(in oklab, var(--paper-2) 60%, transparent); }
  .principle__t { transition: transform var(--dur-base) var(--ease-out); }
  .principle:hover .principle__t { transform: translateX(8px); }
}

/* --- Contact ------------------------------------------------------------- */
.contact { background: var(--ink); color: var(--paper); border-radius: 24px 24px 0 0; padding-block: var(--space-band); }
.contact .section__note { color: color-mix(in oklab, var(--paper) 65%, transparent); }
.contact__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 0.85;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-bottom: clamp(1.5rem, 1rem + 3vw, 3rem);
}
.contact__title em { font-style: normal; color: var(--accent); }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.contact .btn { --btn-bg: var(--paper); --btn-fg: var(--ink); border-color: var(--paper); }
.contact .btn:hover { box-shadow: 0 8px 0 -2px var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.contact__links a {
  color: color-mix(in oklab, var(--paper) 78%, transparent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--paper) 28%, transparent);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.contact__links a:hover { color: var(--accent-soft); border-color: var(--accent-soft); }
.contact__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: var(--space-tight);
  padding-top: var(--space-tight);
  border-top: 1px solid color-mix(in oklab, var(--paper) 18%, transparent);
  color: color-mix(in oklab, var(--paper) 55%, transparent);
}


/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .band__track { animation: none; }
  .card__foil, .card__art::before { display: none; }
}

/* ==========================================================================
   Dark blocks, the reference breaks its scroll into light and dark chapters
   rather than running one continuous ground. Inverting the tokens rather than
   restyling components means buttons, chips, borders and bars all follow
   without a single override.
   ========================================================================== */
.block--dark {
  --paper:       #0D1B2A;
  --paper-2:     #1e3070;
  --paper-edge:  #33468c;
  --card:        #1b2c66;
  --ink:         #f7f8fc;
  --ink-soft:    #c0c8e0;
  --ink-mute:    #8b97c2;
  --accent-ink:  var(--accent-soft);

  background: #0D1B2A;
  color: var(--ink);
}
/* Full-bleed: the block spans the viewport while its contents stay in the shell. */
.block--dark > .shell { position: relative; }

/* --- Pinned two-column section ------------------------------------------- */
.pinned { display: grid; gap: var(--space-tight); }
@media (min-width: 900px) {
  .pinned {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
  }
  /* The heading holds while its entries scroll past it. */
  .pinned__head {
    position: sticky;
    top: 5.5rem;
  }
}
.pinned__title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  line-height: 0.9;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  text-wrap: balance;
}
.pinned__note { color: var(--ink-soft); margin-top: 1.25rem; max-width: 34ch; text-wrap: pretty; }

/* --- Experience timeline -------------------------------------------------- */
.roles { border-top: 1px solid var(--paper-edge); }
.role {
  display: grid;
  gap: 0.4rem;
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  border-bottom: 1px solid var(--paper-edge);
  position: relative;
}
.role__when { color: var(--accent-soft); }
.role__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  transition: transform var(--dur-base) var(--ease-out);
}
.role__org { color: var(--ink-mute); font-weight: 500; }
.role__desc { color: var(--ink-soft); max-width: var(--measure); margin-top: 0.4rem; text-wrap: pretty; }
.role__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
@media (hover: hover) and (min-width: 780px) {
  .role::before {
    content: "";
    position: absolute;
    left: calc(-1 * clamp(0.75rem, 2vw, 1.5rem));
    top: clamp(1.5rem, 1rem + 2vw, 2.25rem);
    width: 3px; height: 0;
    background: var(--accent);
    transition: height var(--dur-base) var(--ease-out);
  }
  .role:hover::before { height: 2.5rem; }
  .role:hover .role__title { transform: translateX(6px); }
}

/* --- Certification badges ------------------------------------------------- */
.certs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 212px), 1fr));
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}
.cert {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 0.9rem 0.85rem;
  background: var(--card);
  border: 2px solid var(--paper-edge);
  border-radius: 14px;
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.cert:hover { border-color: var(--badge, var(--accent)); transform: translateY(-3px); }
.cert__badge {
  display: grid;
  place-items: center;
  width: 44px; height: 49px;
  /* A shield, so credentials read as earned rather than as list items. */
  clip-path: polygon(50% 0, 100% 16%, 100% 68%, 50% 100%, 0 68%, 0 16%);
  background: var(--badge, var(--accent));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0;
  padding-inline: 2px;
}
.cert__name { font-weight: 600; font-size: 0.92rem; line-height: 1.2; text-wrap: balance; }
.cert__meta { color: var(--ink-mute); font-size: var(--text-sm); }

/* --- Line-by-line heading reveal ----------------------------------------- */
/* Each line is its own clipped stage so the wipe has a hard edge. */
.lines .line {
  display: block;
  overflow: hidden;
  /* Titan One overshoots its line box; without this the wipe's clip edge
     shears the tops of caps and the tails of descenders. */
  padding-block: 0.14em;
  margin-block: -0.14em;
}
.lines .line > span { display: block; }
.js .lines:not(.is-shown) .line > span { transform: translateY(105%); }
/* Only the hero carries .lines; nothing else animates on scroll. */
.no-js .lines .line > span { transform: none; }
.certs-wrap { margin-top: var(--space-band); padding-top: var(--space-tight); border-top: 1px solid var(--paper-edge); }

/* --- Language switcher ---------------------------------------------------- */
.langs { display: flex; gap: 0.25rem; align-items: center; }
.langs__btn {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-mute);
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  border-radius: 2px;
  font-size: var(--text-sm);
  line-height: 1;
}
.langs__btn:hover { color: var(--ink); border-color: var(--paper-edge); }
.langs__btn[aria-current="true"] { color: var(--ink); border-color: var(--ink); }
.langs__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Right to left -------------------------------------------------------- */
/* Arabic mirrors the page. Only the rules that name a physical side need an
   override; everything else is already logical or symmetrical. */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .hero__line--indent { padding-right: clamp(1rem, 6vw, 6rem); padding-left: 0; }
[dir="rtl"] .proof__item:first-child { padding-right: 0; padding-left: clamp(1rem, 2vw, 2rem); }
[dir="rtl"] .week__list li { border-left: 0; border-right: 2px solid var(--paper-edge); padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .offer { border-left: var(--edge); border-right: 4px solid var(--accent); }
/* The marquees travel the other way so text still enters from the leading edge. */
[dir="rtl"] .band__track.is-ready,
[dir="rtl"] .logos__track.is-ready { animation-direction: reverse; }

/* Arabic needs a face that actually has Arabic glyphs: Titan One has none, so
   the display face falls back for Arabic headings rather than rendering boxes. */
[lang="ar"] {
  --font-display: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
}
[lang="ar"] .hero__title,
[lang="ar"] .section__title { letter-spacing: 0; }
/* Two-line Arabic headings collided at the Latin setting: the second
   line's ascenders landed on the first line's descenders. */
[lang="ar"] .section__title { line-height: 1.35; }

/* Noto Kufi's glyph box is much taller than Titan One's, and every hero line
   is an overflow-clipped stage for the reveal, so a leading set for Latin caps
   cut up to 43px off each Arabic line, diacritics first. Arabic is set a
   little smaller with its own leading, which clears the ink and keeps the
   three lines close to the height the Latin hero occupies. The clamped card
   teasers lose their descenders the same way. Latin keeps the tight setting. */
[lang="ar"] .hero__title { font-size: calc(var(--text-hero) * 0.8); line-height: 1.45; }
[lang="ar"] .card__blurb { line-height: 1.6; }

/* Held back until the text swap has happened, so the page paints once in the
   language being read. Set and cleared by hand in the head of index.html and
   in i18n.js: see the note there. */
html[data-i18n-pending] body { visibility: hidden; }

/* --- Nav panel, painted collapsed ---------------------------------------- */
/* The links carry hidden in the markup, so a phone never paints the full nav
   and then collapses it: that single reflow was 0.097 of layout shift, most of
   the mobile total. Above the breakpoint, and whenever JS is blocked, CSS
   overrides the attribute so the links are simply present.
   The inline script in the head swaps no-js for js before first paint, so this
   never flashes. */
@media (min-width: 860px) { .nav__links[hidden] { display: flex; } }
.no-js .nav__links[hidden] { display: flex; }
