/* Vanilla Digital — shared stylesheet. Brand Book v5. */

:root {
  --vanilla: #F3EAD3;
  --vanilla-light: #FAF6EC;
  --ink: #15120F;
  --cobalt: #2B3FD6;
  --cobalt-light: #8EA2FF;
  --stone: #6B6358;
  --rule: rgba(21, 18, 15, 0.18);
  --rule-on-ink: rgba(250, 246, 236, 0.22);

  --font-head: "Plus Jakarta Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --font-ar: "IBM Plex Sans Arabic", system-ui, sans-serif;

  --radius: 24px;
  --gap: 12px;
  --pad-x: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--vanilla-light);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 800; text-wrap: balance; }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
.panel--ink :focus-visible, .panel--cobalt :focus-visible { outline-color: var(--vanilla-light); }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px;
  background: var(--ink); color: var(--vanilla-light);
  padding: 8px 16px; border-radius: 999px; z-index: 100; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1360px; margin-inline: auto; padding-inline: var(--pad-x); }

/* ---------- Type ---------- */

.hero-title {
  font-size: clamp(48px, 10.5vw, 168px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.h1 { font-size: clamp(40px, 6.4vw, 96px); line-height: 1; letter-spacing: -0.04em; }
.h2 { font-size: clamp(28px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }
.h3 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }
.lede { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.5; max-width: 34em; }
.stone { color: var(--stone); }

.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px; line-height: 16px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--stone);
}
.dot { color: var(--cobalt); }
.panel--ink .dot { color: var(--cobalt-light); }
.panel--cobalt .dot { color: var(--ink); }

.num {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(40px, 6vw, 96px); line-height: 1; letter-spacing: -0.03em;
}

/* ---------- Top strip + header ---------- */

.strip { background: var(--ink); color: var(--vanilla-light); }
.strip .wrap {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 8px;
  font-family: var(--font-mono); font-size: 11px; line-height: 16px;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.strip [lang="ar"], .strip .ar { font-family: var(--font-ar); letter-spacing: 0; font-size: 13px; }
.strip span:nth-child(3) { display: none; }
@media (min-width: 720px) { .strip span:nth-child(3) { display: inline; } }

.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--vanilla-light);
  border-bottom: 1px solid var(--rule);
}
.header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }

.logo {
  font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800;
  font-size: 28px; line-height: 1; letter-spacing: -0.05em;
  text-decoration: none; display: inline-flex; align-items: baseline; gap: 10px;
}
.logo small {
  font-family: var(--font-mono); font-weight: 400; font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--stone);
}
.logo--ar { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; }

.nav { margin-inline-start: auto; display: none; gap: 6px; align-items: center; }
.nav a, .lang {
  font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none;
  padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px;
  transition: background-color .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.nav a:hover, .lang:hover, .nav a[aria-current="page"] { background: var(--ink); color: var(--vanilla-light); border-color: var(--ink); }
.header-actions { display: flex; gap: 6px; align-items: center; margin-inline-start: auto; }
.lang { font-family: var(--font-ar); }
html[dir="rtl"] .lang { font-family: "Inter", sans-serif; }

.menu-btn {
  font: 600 14px/20px var(--font-body); color: inherit;
  padding: 7px 14px; border: 1px solid var(--ink); border-radius: 999px;
  background: none; cursor: pointer;
}
.header .btn { display: none; }

@media (min-width: 1080px) {
  .nav { display: flex; }
  .header-actions { margin-inline-start: 6px; }
  .menu-btn { display: none; }
  .header .btn { display: inline-flex; }
}
@media (max-width: 1079px) {
  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; inset-inline: 0;
    background: var(--vanilla-light); border-bottom: 1px solid var(--rule);
    padding: 16px var(--pad-x) 24px; gap: 8px;
  }
  .nav.is-open a { font-size: 18px; padding: 12px 18px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 16px/24px var(--font-body); text-decoration: none;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .2s, background-color .2s, color .2s;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--cobalt); color: #fff; }
.btn--ink { background: var(--ink); color: var(--vanilla-light); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--vanilla-light); }
.btn--light { background: var(--vanilla-light); color: var(--ink); }
.btn--outline-light { border-color: var(--vanilla-light); color: var(--vanilla-light); }
.btn--sm { padding: 8px 16px; font-size: 14px; line-height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link {
  font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.link:hover { color: var(--cobalt); }
.panel--ink .link:hover { color: var(--cobalt-light); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(40px, 7vw, 104px) var(--gap); }
.hero-meta {
  display: grid; gap: 28px; margin-top: clamp(28px, 4vw, 56px);
  align-items: end;
}
@media (min-width: 900px) { .hero-meta { grid-template-columns: 1.2fr 1fr; } .hero-meta .btn-row { justify-content: flex-end; } }

.media {
  background: var(--vanilla); border-radius: var(--radius);
  aspect-ratio: 16 / 7; min-height: 240px; width: 100%;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 20px 24px; margin-top: clamp(32px, 5vw, 64px);
  overflow: hidden; position: relative;
}
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media--43 { aspect-ratio: 4 / 3; margin-top: 0; min-height: 0; }
.media--169 { aspect-ratio: 16 / 9; margin-top: 0; min-height: 0; }
.media--ink { background: var(--ink); }
.media--ink .label { color: var(--vanilla); }

.page-hero { padding-block: clamp(48px, 7vw, 112px) clamp(40px, 5vw, 72px); }
.page-hero .lede { margin-top: 28px; }
.page-hero .label { margin-bottom: 20px; }

/* ---------- Talk bar ---------- */

.talkbar { display: flex; flex-wrap: wrap; gap: var(--gap); margin-top: var(--gap); }
.talkbar p {
  flex: 1 1 320px; max-width: none; margin: 0;
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 13px 24px; font-family: var(--font-mono); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.1em; line-height: 24px;
}

/* ---------- Sections & panels ---------- */

.section { padding-block: var(--section-y); }
.section--rule { border-top: 1px solid var(--rule); }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }

.sec-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 64px); }
@media (min-width: 900px) {
  .sec-head { grid-template-columns: 1fr 3fr; gap: 24px; align-items: start; }
  .sec-head .label { padding-top: 14px; }
}
.sec-head .lede { margin-top: 20px; }

.panels { display: grid; gap: var(--gap); padding-block: var(--gap); }
.panels > *, .grid > *, .split > *, .sec-head > * { min-width: 0; }
.panel { border-radius: var(--radius); padding: clamp(28px, 5.5vw, 80px); }
.panel--vanilla { background: var(--vanilla); }
.panel--ink { background: var(--ink); color: var(--vanilla-light); }
.panel--ink .label { color: var(--cobalt-light); }
.panel--ink .stone { color: var(--vanilla); opacity: .8; }
.panel--cobalt { background: var(--cobalt); color: #fff; }
.panel--cobalt .label { color: #fff; }
.panel--outline { border: 1px solid var(--ink); }

/* ---------- Logos ---------- */

.logos { overflow: hidden; padding-block: clamp(28px, 4vw, 48px); direction: ltr; }
.logos .label { text-align: center; margin-bottom: 20px; }
.logos-track { display: flex; gap: var(--gap); width: max-content; animation: marquee 48s linear infinite; }
.logos:hover .logos-track { animation-play-state: paused; }
.logo-tile {
  width: 200px; height: 96px; flex: none;
  background: var(--vanilla); border-radius: 16px;
  display: grid; place-items: center;
}
.logo-tile img { max-width: 60%; max-height: 50%; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }

/* ---------- Numbered list (services) ---------- */

.rows { border-top: 1px solid var(--ink); }
.row {
  display: grid; gap: 12px 24px; padding-block: clamp(24px, 3.4vw, 44px);
  border-bottom: 1px solid var(--rule); text-decoration: none;
  align-items: baseline; transition: padding .25s;
}
.row .idx { font-family: var(--font-mono); font-size: 13px; color: var(--stone); }
.row .row-title { font-size: clamp(28px, 4.4vw, 64px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; font-family: var(--font-head); }
.row .arrow { font-size: 28px; line-height: 1; transition: transform .25s; display: none; }
@media (min-width: 900px) {
  .row { grid-template-columns: 80px 1.4fr 1.2fr 40px; }
  .row .arrow { display: block; justify-self: end; }
  a.row:hover { padding-inline: 16px; }
  a.row:hover .arrow { transform: translateX(6px); }
  html[dir="rtl"] a.row:hover .arrow { transform: translateX(-6px); }
}
a.row:hover .row-title { color: var(--cobalt); }

/* ---------- Table ---------- */

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); min-width: 560px; }
.table th, .table td { text-align: start; vertical-align: top; padding: 20px 16px 20px 0; border-bottom: 1px solid var(--rule); }
html[dir="rtl"] .table th, html[dir="rtl"] .table td { padding: 20px 0 20px 16px; }
.table thead th {
  font-family: var(--font-mono); font-weight: 400; font-size: 12px; line-height: 16px;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--stone); padding-block: 14px;
}
.table tbody th { font-family: var(--font-head); font-weight: 700; font-size: 20px; width: 26%; }
.table .never { color: var(--stone); text-decoration: line-through; text-decoration-thickness: 1px; }
.table .mono { font-family: var(--font-mono); font-size: 15px; }
.panel--ink .table { border-top-color: var(--vanilla-light); }
.panel--ink .table th, .panel--ink .table td { border-bottom-color: var(--rule-on-ink); }

/* ---------- Grids & cards ---------- */

.grid { display: grid; gap: clamp(20px, 2.4vw, 32px); }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.col { border-top: 1px solid var(--ink); padding-top: 20px; }
.col .label { margin-bottom: 14px; }
.col .h3 { margin-bottom: 10px; }
.panel--ink .col { border-top-color: var(--rule-on-ink); }

.card { border: 1px solid var(--ink); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 36px); display: flex; flex-direction: column; gap: 14px; }
.card .label { margin-bottom: 4px; }
.card ul { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); font-family: var(--font-mono); font-size: 14px; line-height: 26px; }
.card--quote blockquote { margin: 0; font-size: 19px; line-height: 30px; }
.card--quote footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 22px; color: var(--stone); }

.work-card { text-decoration: none; display: block; }
.work-card .media { transition: transform .35s; }
a.work-card:hover .media { transform: scale(0.985); }
.work-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-top: 14px; align-items: baseline; }
.work-meta strong { font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.work-meta span { font-family: var(--font-mono); font-size: 13px; color: var(--stone); text-align: end; }

.checks li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 14px; }
.checks li:first-child { border-top: 1px solid var(--ink); }
.checks li::before { content: "—"; color: var(--stone); flex: none; }

.split { display: grid; gap: clamp(28px, 5vw, 72px); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.flow span { border: 1px solid var(--ink); border-radius: 999px; padding: 8px 16px; }
.flow i { font-style: normal; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; justify-content: space-between; gap: 24px;
  font-family: var(--font-head); font-weight: 700; font-size: clamp(18px, 1.8vw, 24px); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-weight: 400; flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; }

/* ---------- CTA ---------- */

.cta .h1 { max-width: 14em; }
.cta .btn-row { margin-top: clamp(28px, 4vw, 48px); }
.cta p { margin-top: 24px; }

/* ---------- Contact ---------- */

.contact-list a {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: center;
  padding: clamp(22px, 3vw, 36px) 0; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.contact-list li:first-child a { border-top: 1px solid var(--ink); }
.contact-list strong { font-family: var(--font-head); font-weight: 800; font-size: clamp(24px, 3.4vw, 44px); letter-spacing: -0.02em; line-height: 1.1; }
.contact-list .label { grid-column: 1; }
.contact-list .arrow { grid-row: 1 / span 2; grid-column: 2; font-size: 28px; }
.contact-list a:hover strong { color: var(--cobalt); }

/* ---------- Article ---------- */

.prose { max-width: 720px; }
.prose h2 { font-size: 28px; line-height: 32px; letter-spacing: -0.02em; margin: 48px 0 16px; }
.prose p { margin-bottom: 1.2em; }
.note {
  border: 1px dashed var(--stone); border-radius: 16px; padding: 16px 20px;
  font-family: var(--font-mono); font-size: 13px; line-height: 22px; color: var(--stone);
}

/* ---------- Footer ---------- */

.footer { padding-block: var(--gap) 32px; }
.footer .panel { padding-bottom: clamp(24px, 3vw, 40px); }
.footer-top { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-nav li { padding: 4px 0; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer .label { margin-bottom: 14px; }
.footer-logo { font-size: clamp(72px, 19vw, 300px); line-height: .85; letter-spacing: -0.06em; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; margin-top: clamp(48px, 8vw, 112px); }
html[dir="rtl"] .footer-logo { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; line-height: 1.1; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule-on-ink); }
.footer-bottom .label { margin: 0; color: var(--vanilla); }

/* ---------- Motion (calm) ---------- */

.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .logos-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .logos-track > [aria-hidden="true"] { display: none; }
  .btn:hover { transform: none; }
}

/* ---------- Arabic / right-to-left ---------- */

html[dir="rtl"] body,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .btn, html[dir="rtl"] .menu-btn,
html[dir="rtl"] .row .row-title, html[dir="rtl"] .faq summary,
html[dir="rtl"] .work-meta strong, html[dir="rtl"] .contact-list strong,
html[dir="rtl"] .table tbody th { font-family: var(--font-ar); letter-spacing: 0; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] .row .row-title, html[dir="rtl"] .contact-list strong { font-weight: 700; }
html[dir="rtl"] .hero-title { line-height: 1.2; font-size: clamp(44px, 9vw, 144px); }
html[dir="rtl"] .h1 { line-height: 1.25; }
html[dir="rtl"] .h2 { line-height: 1.35; }
html[dir="rtl"] .row .row-title { line-height: 1.3; }
html[dir="rtl"] body { line-height: 30px; }
html[dir="rtl"] .label, html[dir="rtl"] .talkbar p, html[dir="rtl"] .flow,
html[dir="rtl"] .table thead th, html[dir="rtl"] .work-meta span,
html[dir="rtl"] .card ul, html[dir="rtl"] .note, html[dir="rtl"] .strip .wrap {
  font-family: var(--font-ar); letter-spacing: 0; font-size: 14px; line-height: 22px;
}
html[dir="rtl"] .strip [lang="en"] { font-family: var(--font-mono); letter-spacing: 0.14em; font-size: 11px; }

/* ---------- Dark option (Ink-led). Applied when <html data-theme="dark"> ---------- */

html[data-theme="dark"] {
  --vanilla-light: #15120F;                 /* page */
  --ink: #FAF6EC;                           /* type */
  --vanilla: #221E19;                       /* raised panels and tiles */
  --stone: rgba(243, 234, 211, 0.68);       /* captions */
  --cobalt-accent: #8EA2FF;
  --rule: rgba(250, 246, 236, 0.2);
  --rule-on-ink: rgba(21, 18, 15, 0.18);
  color-scheme: dark;
}
html[data-theme="dark"] .dot,
html[data-theme="dark"] .link:hover,
html[data-theme="dark"] a.row:hover .row-title,
html[data-theme="dark"] .contact-list a:hover strong { color: #8EA2FF; }
html[data-theme="dark"] :focus-visible { outline-color: #8EA2FF; }
html[data-theme="dark"] .btn--primary { background: #8EA2FF; color: #15120F; }

/* The "ink" panels flip to Vanilla so they still stand apart from the page */
html[data-theme="dark"] .panel--ink { background: #F3EAD3; color: #15120F; }
html[data-theme="dark"] .panel--ink .label,
html[data-theme="dark"] .panel--ink .dot,
html[data-theme="dark"] .panel--ink .link:hover { color: #2B3FD6; }
html[data-theme="dark"] .panel--ink .stone,
html[data-theme="dark"] .panel--ink .footer-bottom .label { color: #6B6358; opacity: 1; }
html[data-theme="dark"] .panel--ink :focus-visible { outline-color: #2B3FD6; }
html[data-theme="dark"] .panel--ink .table { border-top-color: #15120F; }

/* The one Cobalt panel keeps its own colours */
html[data-theme="dark"] .panel--cobalt .dot { color: #15120F; }
html[data-theme="dark"] .panel--cobalt .btn--light { background: #FAF6EC; color: #15120F; }
html[data-theme="dark"] .panel--cobalt .btn--outline-light { border-color: #fff; color: #fff; }
html[data-theme="dark"] .panel--cobalt :focus-visible { outline-color: #fff; }

html[data-theme="dark"] .strip { background: #221E19; color: #FAF6EC; }

/* ---------- Article cards and article text ---------- */

a.card { text-decoration: none; transition: background-color .2s; }
a.card:hover { background: var(--vanilla); }
a.card .link { margin-top: auto; padding-top: 12px; }
.prose ul { list-style: disc; padding-inline-start: 1.2em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose .note { margin: 0 0 1.2em; max-width: none; }
.prose .table-scroll { margin-bottom: 1.6em; }
.prose .table { min-width: 0; }
.prose .table tbody th { font-size: 17px; width: 34%; }
