/* ==========================================================================
   Octopus — software + social studio
   Brand: Octopus Visual Identity, Edition 02
   Palette: deep teal #003D46 / ivory #FFF8EE / vivid coral #FF593E / butter #FFE99A
   Type: Cormorant Garamond (EN display), Manrope (EN body), Noto Sans Arabic (AR)
   Shape rule: rectangles are square-cornered; anything round is a full circle (suction rings).
   Layers: content 1 / header 50 / rail 45 / sheet 60 / fx overlays 100
   ========================================================================== */

:root {
  --teal: #003D46;
  --ivory: #FFF8EE;
  --coral: #FF593E;
  --butter: #FFE99A;

  --gut: clamp(20px, 6vw, 88px);
  --max: 1440px;
  --hdr: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --f-en-display: "Cormorant Garamond", "Times New Roman", serif;
  --f-en-body: "Manrope", system-ui, sans-serif;
  --f-ar: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  interpolate-size: allow-keywords;
}

/* ---------- skins ---------- */
:root,
:root[data-skin="deep"] {
  --bg: #003D46;
  --bg-2: #00363E;
  --chamber: #002A30;
  --raise: #0A4952;
  --fg: #FFF8EE;
  --fg-2: rgba(255, 248, 238, .76);
  --fg-3: rgba(255, 248, 238, .52);
  --line: rgba(255, 248, 238, .14);
  --line-strong: rgba(255, 248, 238, .34);
  --btn-bg: #FFE99A;
  --btn-fg: #003D46;
  --btn-hover: #FFF8EE;
  --btn-hover-fg: #003D46;
  --num: #FF593E;
  --ink: #00191D;
  --shadow: 0 30px 60px -30px rgba(0, 12, 14, .7);
  color-scheme: dark;
}

:root[data-skin="ivory"] {
  --bg: #FFF8EE;
  --bg-2: #FCF1DF;
  --chamber: #003D46;
  --raise: #FFFCF6;
  --fg: #003D46;
  --fg-2: rgba(0, 61, 70, .78);
  --fg-3: rgba(0, 61, 70, .56);
  --line: rgba(0, 61, 70, .14);
  --line-strong: rgba(0, 61, 70, .34);
  --btn-bg: #003D46;
  --btn-fg: #FFF8EE;
  --btn-hover: #00262B;
  --btn-hover-fg: #FFF8EE;
  --num: #003D46;
  --ink: #003D46;
  --shadow: 0 30px 60px -30px rgba(0, 61, 70, .35);
  color-scheme: light;
}

/* sections that stay deep in both skins */
.tone-dark,
.svc,
.foot {
  --fg: #FFF8EE;
  --fg-2: rgba(255, 248, 238, .76);
  --fg-3: rgba(255, 248, 238, .52);
  --line: rgba(255, 248, 238, .14);
  --line-strong: rgba(255, 248, 238, .34);
  --btn-bg: #FFE99A;
  --btn-fg: #003D46;
  --btn-hover: #FFF8EE;
  --btn-hover-fg: #003D46;
  --num: #FF593E;
  color: var(--fg);
}

/* ---------- language ---------- */
:root[lang="ar"] .en,
:root[lang="en"] .ar { display: none !important; }

:root[lang="en"] {
  --f-display: var(--f-en-display);
  --f-body: var(--f-en-body);
  --h1: clamp(2.9rem, 1.2rem + 4.6vw, 6.4rem);
  --h1-lh: .96;
  --h2: clamp(2.5rem, 1.5rem + 3.2vw, 4.8rem);
  --h2-lh: 1;
  --h3: clamp(1.9rem, 1.4rem + 1.3vw, 2.7rem);
  --h4: 1.75rem;
  --body: 1.0625rem;
  --body-lh: 1.65;
  --display-w: 500;
}

:root[lang="ar"] {
  --f-display: var(--f-ar);
  --f-body: var(--f-ar);
  --h1: clamp(2.3rem, 1.1rem + 3.6vw, 5rem);
  --h1-lh: 1.22;
  --h2: clamp(2rem, 1.25rem + 2.5vw, 3.75rem);
  --h2-lh: 1.3;
  --h3: clamp(1.45rem, 1.2rem + .8vw, 1.95rem);
  --h4: 1.3rem;
  --body: 1.125rem;
  --body-lh: 1.85;
  --display-w: 600;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--body);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .01s;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, h4, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
address { font-style: normal; }
::selection { background: var(--coral); color: var(--teal); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 200; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }

.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
:root[dir="rtl"] .flip { transform: scaleX(-1); }

/* ---------- type ---------- */
.h2 {
  font-family: var(--f-display);
  font-weight: var(--display-w);
  font-size: var(--h2);
  line-height: var(--h2-lh);
  letter-spacing: -.01em;
  text-wrap: balance;
}
:root[lang="ar"] .h2 { letter-spacing: 0; }
.h3 { font-family: var(--f-display); font-weight: var(--display-w); font-size: var(--h3); line-height: 1.12; }
:root[lang="ar"] .h3 { line-height: 1.4; }
.h4 { font-family: var(--f-display); font-weight: 600; font-size: var(--h4); line-height: 1.2; }
:root[lang="ar"] .h4 { line-height: 1.5; }
.lead { color: var(--fg-2); font-size: calc(var(--body) * 1.1); max-width: 46ch; text-wrap: pretty; }
.eyebrow {
  font-family: var(--f-en-body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--butter);
}
:root[lang="ar"] .eyebrow { font-family: var(--f-ar); letter-spacing: 0; font-size: .95rem; text-transform: none; }
:root[data-skin="ivory"] .eyebrow { color: var(--coral); }
:root[data-skin="ivory"] .eyebrow span { color: var(--teal); }
:root[data-skin="ivory"] .eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--coral); vertical-align: middle; margin-inline-end: 10px; }

/* ---------- buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding-inline: 28px;
  border: 1.5px solid transparent;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  translate: var(--mx) var(--my);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), translate .5s var(--ease), scale .15s;
}
.btn:active { scale: .97; }
.btn--sm { height: 44px; padding-inline: 18px; font-size: .9375rem; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary { --from: left; }
:root[dir="rtl"] .btn--primary { --from: right; }
.btn--primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--btn-hover); transform: scaleX(0); transform-origin: var(--from) center; transition: transform .45s var(--ease); }
.btn--primary:hover::after { transform: scaleX(1); }
.btn--primary:hover { color: var(--btn-hover-fg); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--dark { background: var(--teal); color: var(--ivory); }
.btn--dark:hover { background: #002A30; }
.btn .ic { width: 1.15em; height: 1.15em; transition: transform .35s var(--ease); }
.btn:hover .ic.flip { transform: translateX(4px); }
:root[dir="rtl"] .btn:hover .ic.flip { transform: scaleX(-1) translateX(4px); }

.ripple { position: absolute; z-index: 2; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 2px solid var(--coral); pointer-events: none; animation: ripple .7s var(--ease) forwards; }
@keyframes ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(7); opacity: 0; } }

.round {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--fg);
  font-family: var(--f-en-body);
  font-weight: 700;
  font-size: .875rem;
  transition: border-color .25s, background-color .25s, color .25s;
}
.round:hover { border-color: var(--fg); }
.round .ic { width: 20px; height: 20px; }
.lang-btn [lang="ar"] { font-family: var(--f-ar); font-size: 1.05rem; font-weight: 600; }

.tip {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-end: -8px;
  width: max-content;
  max-width: 260px;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--f-body);
  font-weight: 500;
  font-size: .8125rem;
  line-height: 1.5;
  text-align: start;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.skin-btn:hover .tip, .skin-btn:focus-visible .tip { opacity: 1; transform: none; }

.link { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; background: linear-gradient(var(--coral), var(--coral)) no-repeat 0 100% / 0 2px; padding-bottom: 4px; transition: background-size .35s var(--ease); }
:root[dir="rtl"] .link { background-position: 100% 100%; }
.link:hover { background-size: 100% 2px; }

/* ---------- header ---------- */
.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--hdr);
  transition: transform .45s var(--ease), background-color .3s, box-shadow .3s;
}
.hdr.is-solid { background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 28px; }
.hdr__logo { display: block; width: 128px; flex: none; color: var(--fg); }
.hdr__logo svg { width: 100%; height: auto; }
.hdr__nav { display: flex; gap: 28px; margin-inline-start: auto; }
.hdr__nav a { position: relative; font-weight: 500; font-size: .9375rem; padding-block: 6px; }
.hdr__nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--coral); transform: scaleX(0); transition: transform .3s var(--ease); }
.hdr__nav a:hover::after, .hdr__nav a.is-current::after { transform: scaleX(1); }
.hdr__tools { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }

.sheet {
  position: fixed;
  inset: var(--hdr) 0 0;
  z-index: 60;
  background: var(--bg);
  padding: 28px var(--gut) calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.sheet[hidden] { display: none; }
.sheet__nav { display: grid; }
.sheet__nav a { font-family: var(--f-display); font-weight: var(--display-w); font-size: 2.25rem; line-height: 1.2; padding-block: 12px; border-bottom: 1px solid var(--line); }
.sheet__foot { display: grid; gap: 12px; margin-top: 32px; }
body.sheet-open { overflow: hidden; }

/* ---------- section rail ---------- */
.rail {
  position: fixed;
  inset-inline-end: 22px;
  top: 50%;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(-50%);
  transition: opacity .4s;
  --rc: var(--fg);
}
.rail.on-dark { --rc: #FFF8EE; }
body.in-hero .rail { opacity: 0; pointer-events: none; }
.rail a { position: relative; display: block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--rc); opacity: .55; transition: transform .35s var(--ease), background-color .3s, opacity .3s, border-color .3s; }
.rail a.is-past { background: var(--rc); opacity: .4; }
.rail a.is-active { background: var(--coral); border-color: var(--coral); opacity: 1; transform: scale(1.45); }
.rail a span { position: absolute; top: 50%; inset-inline-end: calc(100% + 14px); transform: translateY(-50%) translateX(6px); white-space: nowrap; font-size: .75rem; font-weight: 600; background: var(--fg); color: var(--bg); padding: 4px 9px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.rail.on-dark a span { background: #FFF8EE; color: #003D46; }
:root[dir="rtl"] .rail a span { transform: translateY(-50%) translateX(-6px); }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: translateY(-50%); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--hdr) + clamp(28px, 7vh, 88px));
  overflow: clip;
}
.hero__grid { position: relative; z-index: 2; flex: 1 0 auto; display: flex; align-items: center; }
.hero__copy { max-width: 1000px; }
.hero__eyebrow { margin-bottom: 28px; }
.hero__title {
  font-family: var(--f-display);
  font-weight: var(--display-w);
  font-size: var(--h1);
  line-height: var(--h1-lh);
  letter-spacing: -.015em;
}
:root[lang="ar"] .hero__title { letter-spacing: 0; font-weight: 700; }
.hero__title .line { display: block; }
.hero__title em {
  position: relative;
  font-style: italic;
  color: var(--teal);
  padding-inline: .08em;
  white-space: nowrap;
  isolation: isolate;
}
:root[lang="ar"] .hero__title em { font-style: normal; padding-inline: .14em; display: inline-block; line-height: 1.32; vertical-align: top; }
.hero__title em::before {
  content: "";
  position: absolute;
  inset: .16em -.02em .02em;
  z-index: -1;
  background: var(--coral);
  transform-origin: left center;
  transform: scaleX(var(--mark, 1));
}
:root[lang="ar"] .hero__title em::before { inset: 0; }
:root[dir="rtl"] .hero__title em::before { transform-origin: right center; }
.hero__sub { margin-top: 30px; max-width: 31em; color: var(--fg-2); font-size: clamp(1.0625rem, .95rem + .35vw, 1.25rem); text-wrap: pretty; }
:root[lang="en"] .hero__sub { max-width: 31em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* the hero curve runs edge to edge: its two flat cuts sit exactly on the screen edges.
   --cw widens it past the screen on small viewports, --ck chooses how much of the overflow
   is cropped from the inline-start side (0 = none, 1 = all). */
.hero__curve {
  --cw: 100%;
  --ck: .5;
  position: relative;
  z-index: 1;
  flex: none;
  width: var(--cw);
  margin-top: clamp(32px, 6vh, 64px);
  margin-inline-start: calc((100% - var(--cw)) * var(--ck));
  color: var(--coral);
  pointer-events: none;
}
.hero__curve-in { animation: drift 9s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-1.1%); } }
.curve-art { width: 100%; height: auto; overflow: visible; }
/* the flat cut of the curve is its base: put it against the page edge (mirror in LTR) */
:root[dir="ltr"] .curve-art { transform: scaleX(-1); }
.curve-art__suckers .sucker { fill: var(--butter); scale: 0; transform-box: fill-box; transform-origin: center; transition: scale .4s var(--ease); }

/* hero intro choreography (runs once fonts are ready) */
.js .hero__eyebrow, .js .hero__title .line, .js .hero__sub, .js .hero__ctas { opacity: 0; transform: translateY(26px); }
.js .hero__title em { --mark: 0; }
.js .hero__curve { clip-path: inset(0 0 0 100%); }
:root.js[dir="rtl"] .hero__curve { clip-path: inset(0 100% 0 0); }
.is-ready .hero__eyebrow, .is-ready .hero__title .line, .is-ready .hero__sub, .is-ready .hero__ctas {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
}
.is-ready .hero__eyebrow { transition-delay: .05s; }
.is-ready .hero__title .line:nth-child(1) { transition-delay: .15s; }
.is-ready .hero__title .line:nth-child(2) { transition-delay: .28s; }
.is-ready .hero__sub { transition-delay: .45s; }
.is-ready .hero__ctas { transition-delay: .58s; }
.is-ready .hero__title em::before { transition: transform .9s var(--ease-io) .85s; }
.is-ready .hero__title em { --mark: 1; }
.is-ready .hero__curve { clip-path: inset(0 0 0 0) !important; transition: clip-path 1.6s var(--ease-io) .25s; }

/* ---------- anatomy ---------- */
.anat { padding-block: clamp(96px, 12vw, 180px); }
.anat__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.anat__head { position: sticky; top: calc(var(--hdr) + 48px); display: grid; gap: 24px; }
.anat__facts { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 72px) clamp(28px, 4vw, 56px); }
.fact { border-top: 1px solid var(--line-strong); padding-top: 22px; }
.fact dt { display: flex; align-items: baseline; gap: 14px; }
.fact__n {
  font-family: var(--f-en-display);
  font-weight: 600;
  font-size: clamp(5rem, 2.6rem + 6.2vw, 10.5rem);
  line-height: .8;
  color: var(--num);
  font-variant-numeric: lining-nums tabular-nums;
  min-width: 1.05ch;
}
.fact__k { font-family: var(--f-en-display); font-style: italic; font-weight: 500; font-size: clamp(1.6rem, 1.2rem + 1vw, 2.3rem); color: var(--fg); }
:root[lang="ar"] .fact__k { font-family: var(--f-ar); font-style: normal; font-weight: 600; font-size: clamp(1.3rem, 1.1rem + .6vw, 1.75rem); }
.fact dd { margin-top: 18px; color: var(--fg-2); max-width: 32ch; }

/* ---------- services (eight arms) ---------- */
.svc { background: var(--chamber); padding-block: clamp(96px, 11vw, 168px) clamp(64px, 8vw, 120px); position: relative; }
.svc__head { display: grid; gap: 22px; max-width: 900px; }
.svc__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 96px); margin-top: clamp(40px, 6vw, 80px); }
.svc__stage { position: relative; }
.svc__sticky { position: sticky; top: calc(var(--hdr) + 3vh); height: calc(100dvh - var(--hdr) - 6vh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.octo { direction: ltr; width: 100%; max-width: 680px; max-height: calc(100dvh - var(--hdr) - 14vh); overflow: visible; }
.svc__legend { font-size: .875rem; font-weight: 600; color: var(--fg-3); letter-spacing: .02em; }
.svc__list { counter-reset: svc; }
.svc__item {
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding-block: 9vh;
  border-top: 1px solid var(--line);
  transition: opacity .5s var(--ease);
}
.svc__item:first-child { border-top: 0; }
.js .svc__item:not(.is-active) { opacity: .34; }
.svc__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: var(--butter); }
.svc__icon .ic { width: 26px; height: 26px; }
.svc__item--social .svc__icon { color: var(--coral); }
.svc__item p { color: var(--fg-2); max-width: 40ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips li { border: 1px solid var(--line-strong); padding: 7px 13px; font-size: .875rem; font-weight: 500; line-height: 1.4; }

/* the octopus diagram (built by js/arms.js) */
.octo .arm { cursor: pointer; transform-box: view-box; transform-origin: 550px 550px; --r: 0deg; --s: 1; transform: rotate(var(--r)) scale(var(--s)); transition: transform .8s var(--ease); }
.octo .arm__body { fill: var(--fg); transition: fill .45s var(--ease); }
.octo .arm__sucker { fill: var(--chamber); }
.octo .arm.is-social .arm__body { fill: #FFE99A; }
.octo .arm.is-on .arm__body { fill: var(--coral); }
.octo .arm.is-on { --s: 1.045; }
.octo .arm__label { font-family: var(--f-en-body); font-weight: 600; font-size: 31px; fill: var(--fg-2); transition: fill .3s; }
:root[lang="ar"] .octo .arm__label { font-family: var(--f-ar); font-size: 32px; }
.octo .arm.is-on .arm__label { fill: var(--coral); font-weight: 700; }
.octo .hub__disc { fill: var(--fg); }
.octo .hub__ring { fill: none; stroke: var(--coral); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; transform-box: view-box; transform-origin: 550px 550px; animation: spin 40s linear infinite; }
.octo .hub__text { font-family: var(--f-en-body); font-weight: 700; font-size: 30px; fill: var(--teal); text-anchor: middle; }
:root[lang="ar"] .octo .hub__text { font-family: var(--f-ar); font-size: 29px; }
@keyframes spin { to { transform: rotate(360deg); } }
.js .octo .arm { --s: .12; opacity: 0; }
.js .octo.is-in .arm { --s: 1; opacity: 1; transition: transform 1.1s var(--ease), opacity .6s; transition-delay: calc(var(--i) * 80ms); }
.js .octo.is-in .arm.is-on { --s: 1.045; }
.js .octo.intro-done .arm { transition: transform .8s var(--ease), opacity .6s; transition-delay: 0s; }

/* ---------- code -> feed ---------- */
.build { position: relative; background: var(--bg-2); }
.build__track { height: 330vh; }
.build__stage { position: sticky; top: 0; height: 100dvh; display: grid; align-items: center; overflow: hidden; padding-top: var(--hdr); }
.build__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(24px, 3vw, 56px); align-items: center; }
.build__head { display: grid; gap: 20px; align-content: center; }
.build__head .h2 { font-size: clamp(2.2rem, 1.4rem + 2.2vw, 3.8rem); }
:root[lang="ar"] .build__head .h2 { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.9rem); }
.build__steps { display: grid; gap: 4px; margin-top: 16px; }
.build__steps li { position: relative; display: flex; align-items: center; gap: 14px; padding-block: 10px; font-weight: 600; color: var(--fg-3); transition: color .3s; }
.build__steps li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color .3s, border-color .3s, transform .3s var(--ease); }
.build__steps li.is-done { color: var(--fg-2); }
.build__steps li.is-done::before { background: currentColor; }
.build__steps li.is-now { color: var(--fg); }
.build__steps li.is-now::before { background: var(--coral); border-color: var(--coral); transform: scale(1.25); }

.editor { background: #00252A; color: #FFF8EE; border: 1px solid rgba(255, 248, 238, .12); box-shadow: var(--shadow); min-width: 0; }
.editor__bar { display: flex; align-items: center; gap: 8px; height: 40px; padding-inline: 16px; border-bottom: 1px solid rgba(255, 248, 238, .1); }
.ring-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(255, 248, 238, .4); }
.editor__file { margin-inline-start: auto; font-family: var(--f-mono); font-size: .75rem; color: rgba(255, 248, 238, .5); }
.editor__code {
  margin: 0;
  padding: 20px 20px 24px;
  font-family: var(--f-mono);
  font-size: clamp(.72rem, .6rem + .3vw, .86rem);
  line-height: 1.75;
  min-height: 34em;
  white-space: pre;
  overflow: hidden;
  text-align: left;
  counter-reset: ln;
  unicode-bidi: plaintext;
}
.editor__code .ln { display: block; min-height: 1.75em; }
.editor__code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 2.2em; color: rgba(255, 248, 238, .22); }
.editor__code .t-tag { color: #FFE99A; }
.editor__code .t-attr { color: #FF8A73; }
.editor__code .t-str { color: #9ED3CB; }
.editor__code .t-txt { color: #FFF8EE; }
.editor__code .t-punc { color: rgba(255, 248, 238, .5); }
.editor__code .t-sel { color: #FFE99A; }
.editor__code .t-prop { color: #9ED3CB; }
.editor__code .t-val { color: #FF8A73; }
.editor__code .t-fn { color: #FFE99A; }
.editor__code .t-ar { font-family: var(--f-ar); font-size: 1.04em; }
.editor__code .caret { display: inline-block; width: .6em; height: 1.2em; vertical-align: -.2em; background: var(--coral); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.phone {
  justify-self: center;
  width: clamp(240px, 21vw, 320px);
  aspect-ratio: 9 / 18.5;
  border-radius: 42px;
  padding: 10px;
  background: #00191D;
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 248, 238, .12);
}
/* the post scales with the screen: sizes are given in px (desktop phone, post 280 wide) and again in cqi, the same proportion of the screen width */
.phone__screen { width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #FFF8EE; color: #003D46; container-type: inline-size; }
.ig { height: 100%; display: flex; flex-direction: column; font-family: var(--f-en-body); font-size: 12px; line-height: 1.4; }
:root[lang="ar"] .ig { font-family: var(--f-ar); font-size: 12.5px; }
.ig__top { display: flex; align-items: center; gap: 9px; padding: 34px 12px 10px; }
.ig__avatar { width: 30px; height: 30px; border-radius: 50%; background: #003D46; color: #FFF8EE; display: grid; place-items: center; padding: 5px; }
.ig__avatar svg { width: 100%; height: auto; }
.ig__who { display: grid; line-height: 1.2; }
.ig__who b { font-family: var(--f-en-body); font-size: 12.5px; }
.ig__who small { font-size: 10.5px; color: rgba(0, 61, 70, .6); }
.ig__more { margin-inline-start: auto; width: 18px; height: 18px; }

.post {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ECE7DE;
  color: #222;
  padding: 18px 16px;
  padding: 6.4cqi 5.7cqi;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  gap: 2.9cqi;
  transition: background-color .6s var(--ease), color .6s;
}
.post > * { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .55s var(--ease), color .5s, background-color .5s, font-size .5s var(--ease); }
.post__h { font-family: "Times New Roman", serif; font-size: 22px; font-size: 7.9cqi; line-height: 1.05; font-weight: 700; }
.post__p { font-family: "Times New Roman", serif; font-size: 12px; font-size: max(9.5px, 4.3cqi); line-height: 1.4; max-width: 18em; }
.post__curve { position: absolute; inset-inline-end: -30%; bottom: 13%; width: 105%; color: #B9B3A8; transform-origin: center; }
:root[dir="ltr"] .post__curve { scale: -1 1; }
.post__btn { position: absolute; inset-inline-start: 16px; inset-inline-start: 5.7cqi; bottom: 16px; bottom: 5.7cqi; padding: 8px 12px; padding: 2.9cqi 4.3cqi; border: 1px solid #222; font-family: "Times New Roman", serif; font-size: 11px; font-size: max(9.5px, 3.9cqi); }
.post__heart { position: absolute; inset: 0; display: grid; place-items: center; color: #FFF8EE; opacity: 0; transform: scale(.3); pointer-events: none; }
.post__heart .ic { width: 72px; height: 72px; width: 26cqi; height: 26cqi; filter: drop-shadow(0 6px 18px rgba(0, 25, 29, .35)); }

.post.has-h .post__h, .post.has-p .post__p, .post.has-img .post__curve, .post.has-btn .post__btn { opacity: 1; transform: none; }
.post.s-bg { background: #003D46; color: #FFF8EE; }
.post.s-bg .post__btn { border-color: #FFF8EE; }
.post.s-h .post__h { font-family: var(--f-en-display); font-weight: 500; font-size: 36px; font-size: 12.9cqi; line-height: .95; color: #FFF8EE; }
:root[lang="ar"] .post.s-h .post__h { font-family: var(--f-ar); font-weight: 700; font-size: 27px; font-size: 9.6cqi; line-height: 1.25; }
.post.s-h .post__p { font-family: var(--f-body); font-size: 11.5px; font-size: max(9.5px, 4.1cqi); color: rgba(255, 248, 238, .8); }
.post.s-img .post__curve { color: #FF593E; }
.post.s-btn .post__btn { background: #FFE99A; color: #003D46; border-color: #FFE99A; font-family: var(--f-body); font-weight: 700; }
.post.live .post__heart { animation: heart 1.1s var(--ease) .1s both; }
@keyframes heart { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.15); } 45% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.05); } }

.ig__actions { display: flex; gap: 14px; padding: 10px 12px 4px; }
.ig__actions .ic { width: 21px; height: 21px; }
.ig__save { margin-inline-start: auto; }
.ig__like { transition: color .3s, transform .3s var(--ease); }
.build.is-live .ig__like { color: #FF593E; transform: scale(1.12); }
.ig__likes { padding: 2px 12px; font-weight: 700; opacity: 0; transition: opacity .4s; }
.ig__comments { padding: 4px 12px; display: grid; gap: 4px; }
.ig__comments li, .ig__channels { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.ig__comments b { font-family: var(--f-en-body); margin-inline-end: 4px; }
.ig__channels { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 12px 14px; margin-top: auto; }
.ig__channels li { border: 1px solid rgba(0, 61, 70, .3); padding: 3px 7px; font-family: var(--f-en-body); font-size: 10px; font-weight: 600; }
.build.is-live .ig__likes { opacity: 1; }
.build.is-live .ig__comments li { opacity: 1; transform: none; }
.build.is-live .ig__comments li:nth-child(2) { transition-delay: .25s; }
.build.is-live .ig__channels { opacity: 1; transform: none; transition-delay: .45s; }

/* ---------- process ---------- */
.proc { padding-block: clamp(96px, 12vw, 180px) clamp(48px, 6vw, 96px); }
.proc__track { position: relative; margin-top: clamp(48px, 6vw, 88px); }
.proc__line { position: absolute; inset-inline: 0; top: 0; width: 100%; height: 120px; overflow: visible; }
:root[dir="rtl"] .proc__line { transform: scaleX(-1); }
.proc__line path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.proc__base { stroke: var(--line-strong); stroke-dasharray: 2 7; }
.proc__draw { stroke: var(--coral); stroke-width: 3; stroke-dasharray: 1 1; stroke-dashoffset: var(--draw-off, 1); }
.proc__steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); }
.step { position: relative; padding: 132px 14px 0; text-align: center; }
.step__ring { position: absolute; top: 60px; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg); transition: border-color .4s, transform .5s var(--ease), background-color .4s; }
.step__ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--coral); transform: scale(0); transition: transform .5s var(--ease); }
.step.is-lit .step__ring { border-color: var(--coral); transform: scale(1.15); }
.step.is-lit .step__ring::after { transform: scale(1); }
.step h3 { margin-bottom: 12px; }
.step p { color: var(--fg-2); font-size: .975rem; max-width: 24ch; margin-inline: auto; }
:root[lang="ar"] .step p { font-size: 1.02rem; }
.js .step h3, .js .step p { opacity: .3; transition: opacity .5s; }
.js .step.is-lit h3, .js .step.is-lit p { opacity: 1; }

/* ---------- ribbon ---------- */
.ribbon { position: relative; height: clamp(150px, 16vw, 240px); overflow: hidden; pointer-events: none; }
.ribbon svg { width: 100%; height: 100%; overflow: visible; direction: ltr; }
.ribbon__text { font-family: var(--f-en-display); font-style: italic; font-weight: 500; font-size: 84px; fill: var(--fg); }
:root[lang="ar"] .ribbon__text { font-family: var(--f-ar); font-style: normal; font-weight: 600; font-size: 76px; }
.ribbon__text .sep { fill: var(--coral); font-style: normal; }

/* ---------- work ---------- */
.work { padding-block: clamp(48px, 6vw, 96px) clamp(96px, 12vw, 180px); }
.work .eyebrow { margin-bottom: 18px; }
.work__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); margin-top: clamp(40px, 5vw, 72px); }
.case { position: relative; display: flex; flex-direction: column; gap: 24px; }
/* the first project is featured across the grid; the next two share a row; the call to action closes it */
.case--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.case--half { grid-column: span 6; }
.case--next { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 32px; padding: clamp(28px, 3vw, 44px); background: var(--butter); color: var(--teal); }
.case--next p { color: rgba(0, 61, 70, .8); margin-top: 6px; }
.case--next .btn { margin-inline-start: auto; }
.case__emblem { width: 92px; flex: none; color: var(--teal); }
.case__media { position: relative; background: var(--chamber); padding: clamp(18px, 3vw, 44px); overflow: hidden; }
.case__media { display: block; }
/* desktop and phone together: the phone overlaps the browser's inline-end corner */
.duo { position: relative; padding-inline-end: 11%; padding-bottom: 7%; }
.duo .device { position: absolute; inset-inline-end: 0; bottom: 0; width: 23%; border-radius: clamp(14px, 2vw, 26px); padding: clamp(4px, .5vw, 7px); }
.duo .device img { border-radius: clamp(10px, 1.5vw, 20px); }
.browser__url { margin-inline-start: auto; font-family: var(--f-mono); font-size: .6875rem; color: rgba(255, 248, 238, .5); }
.case__link { justify-self: start; margin-top: 4px; }
.case__body { display: grid; gap: 12px; }
.case__body p { color: var(--fg-2); max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .8125rem; font-weight: 600; padding: 5px 11px; border: 1px solid var(--line-strong); }
.browser { width: 100%; background: #FFF8EE; box-shadow: 0 40px 80px -40px rgba(0, 10, 12, .8); transition: transform .8s var(--ease); }
.browser__bar { display: flex; gap: 7px; align-items: center; height: 28px; padding-inline: 12px; background: #00191D; }
.browser img, .device img { width: 100%; }
.device { width: min(78%, 300px); border-radius: 36px; padding: 9px; background: #00191D; box-shadow: 0 40px 80px -40px rgba(0, 10, 12, .8), inset 0 0 0 1.5px rgba(255, 248, 238, .14); transition: transform .8s var(--ease); }
.device img { border-radius: 28px; }
.case:hover .browser, .case:hover .device { transform: translateY(-8px); }

/* ink-blot reveal (mask grows from the centre) */
.js .ink { -webkit-mask: url("../assets/ink.svg") center / 0% no-repeat; mask: url("../assets/ink.svg") center / 0% no-repeat; }
.js .ink.is-in { -webkit-mask-size: 320%; mask-size: 320%; transition: -webkit-mask-size 1.4s var(--ease-io), mask-size 1.4s var(--ease-io); }
.js .ink.ink-done { -webkit-mask: none; mask: none; }

/* ---------- brief builder ---------- */
.brief { padding-block: clamp(96px, 11vw, 168px); background: var(--bg-2); }
.brief__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.brief__form { display: grid; gap: 0; }
.brief__form > .lead { margin-top: 20px; }
.q { border: 0; padding: 0; margin: 48px 0 0; min-width: 0; }
.q__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 0; margin-bottom: 16px; font-weight: 700; font-size: 1.125rem; }
.q__title small { font-weight: 500; font-size: .875rem; color: var(--fg-3); }
.pick { display: grid; gap: 10px; }
.pick--arms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: .975rem;
  line-height: 1.35;
  user-select: none;
  transition: border-color .25s, background-color .25s, color .25s;
}
.opt:hover { border-color: var(--fg); }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt .ic { width: 22px; height: 22px; color: var(--fg-2); transition: color .25s; }
.opt__ring { order: 3; margin-inline-start: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; position: relative; transition: border-color .25s; }
.opt__ring::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--coral); transform: scale(0); transition: transform .35s var(--ease); }
.opt:has(input:checked) { border-color: var(--coral); background: rgba(255, 89, 62, .1); }
.opt:has(input:checked) .ic { color: var(--coral); }
.opt:has(input:checked) .opt__ring { border-color: var(--coral); }
.opt:has(input:checked) .opt__ring::after { transform: scale(1); }
.opt:has(input:focus-visible) { outline: 2px solid var(--coral); outline-offset: 3px; }
.opt--card { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; min-height: 104px; padding: 16px; }
.q--fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.q--fields .q__title { grid-column: 1 / -1; margin-bottom: 0; }
.field { display: grid; gap: 8px; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9375rem; }
.field label small { font-weight: 500; color: var(--fg-3); margin-inline-start: 6px; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: 0;
  padding: 14px 16px;
  transition: border-color .25s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field textarea:hover { border-color: var(--fg-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
:root[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
:root[dir="rtl"] .field input[dir="ltr"]:focus { text-align: left; }
.field input[aria-invalid="true"] { border-color: var(--coral); }
.q__err { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; font-weight: 600; color: var(--fg); }
.field .q__err { margin-top: 0; }
.q__err[hidden] { display: none; }
.q__err .ic { color: var(--coral); width: 18px; height: 18px; }
.brief__send { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.ticket-wrap { position: sticky; top: calc(var(--hdr) + 28px); }
.ticket {
  position: relative;
  background: var(--butter);
  color: var(--teal);
  padding: 28px 28px 44px;
  box-shadow: var(--shadow);
}
.ticket__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1.5px dashed rgba(0, 61, 70, .35); }
.ticket__title { font-family: var(--f-display); font-weight: var(--display-w); font-size: 1.9rem; line-height: 1; }
:root[lang="ar"] .ticket__title { font-size: 1.45rem; line-height: 1.4; }
.ticket__copy { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .875rem; padding: 8px 12px; border: 1.5px solid rgba(0, 61, 70, .4); transition: border-color .2s, background-color .2s; }
.ticket__copy:hover { border-color: var(--teal); }
.ticket__copy .ic { width: 17px; height: 17px; }
.ticket__copy.is-done { background: var(--teal); color: var(--butter); border-color: var(--teal); }
.ticket__arms { display: flex; gap: 8px; padding-block: 18px; }
.ticket__arms span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0, 61, 70, .35); transition: background-color .3s, border-color .3s, transform .35s var(--ease); }
.ticket__arms span.on { background: var(--coral); border-color: var(--coral); transform: scale(1.12); }
.ticket__msg { margin: 0; font-family: var(--f-body); font-size: .975rem; line-height: 1.75; white-space: pre-wrap; word-break: break-word; min-height: 9em; }
.ticket__msg .ln { display: block; }
.ticket__msg .ln.is-new { animation: lnin .5s var(--ease); }
.ticket__msg .ln b { font-weight: 700; }
@keyframes lnin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ticket__empty { font-weight: 600; color: rgba(0, 61, 70, .7); }
.ticket.has-arms .ticket__empty { display: none; }
.ticket:not(.has-arms) .ticket__msg { display: none; }
/* punched suction-ring perforation along the bottom edge */
.ticket__perf { position: absolute; inset-inline: 0; bottom: 14px; height: 12px; background: radial-gradient(circle, var(--bg-2) 5px, transparent 5.5px) 0 0 / 22px 12px repeat-x; }

/* ---------- FAQ ---------- */
.faq { padding-block: clamp(96px, 12vw, 180px); }
.faq__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.faq__head { position: sticky; top: calc(var(--hdr) + 48px); display: grid; gap: 22px; }
.qa { border-top: 1px solid var(--line-strong); }
.qa:last-child { border-bottom: 1px solid var(--line-strong); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
  cursor: pointer;
  list-style: none;
  font-family: var(--f-display);
  font-weight: var(--display-w);
  font-size: clamp(1.4rem, 1.1rem + .8vw, 1.9rem);
  line-height: 1.2;
}
:root[lang="ar"] .qa summary { font-size: clamp(1.1rem, 1rem + .4vw, 1.35rem); line-height: 1.6; }
.qa summary::-webkit-details-marker { display: none; }
.qa__sign { position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background-color .3s, border-color .3s; }
.qa__sign::before, .qa__sign::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; background: currentColor; transition: transform .4s var(--ease); }
.qa__sign::after { transform: rotate(90deg); }
.qa[open] .qa__sign { background: var(--coral); border-color: var(--coral); color: var(--teal); }
.qa[open] .qa__sign::after { transform: rotate(0deg); }
.qa summary:hover .qa__sign { border-color: var(--fg); }
.qa::details-content { block-size: 0; overflow: clip; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
.qa[open]::details-content { block-size: auto; }
.qa__a { padding-bottom: 28px; color: var(--fg-2); max-width: 58ch; }

/* the Hairline keyboard (js/keys.js): the kernel's palette, set to the brand.
   plate = the section ground, so nearer keycaps cover farther ones; hi = coral, the only highlight. */
.keys { position: relative; width: 100%; margin: 0; max-width: 540px; }
/* the drawing fills the middle of its 5:4 frame: widen the frame and pull it up so the keyboard reads larger */
.keys__stage {
  width: 116%;
  margin: -12% -8% -14%;
  --hairline-stroke: 1;
  --hairline-plate: #003D46;
  --hairline-hi: #FF593E;
  --hairline-edge: #B3C0BC;
  --hairline-mid: #739192;
  --hairline-lo: #406C70;
}
:root[data-skin="ivory"] .keys__stage {
  --hairline-plate: #FFF8EE;
  --hairline-edge: #406C70;
  --hairline-mid: #8CA4A2;
  --hairline-lo: #C7CFC9;
}
.keys__read {
  position: absolute;
  top: 10%;
  right: 4%;
  min-width: 2.4em;
  padding: 5px 10px;
  border: 1.5px solid transparent;
  font-family: var(--f-body);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--fg-3);
  pointer-events: none;
  transition: border-color .25s, color .25s;
}
.keys__read.is-key { font-family: var(--f-mono); font-size: .875rem; color: var(--fg); border-color: var(--coral); }

/* ---------- visit ---------- */
.visit { padding-block: clamp(48px, 6vw, 96px) clamp(96px, 12vw, 180px); }
.visit__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 110px); align-items: center; }
.visit__copy { display: grid; gap: 28px; }
.visit__addr { font-family: var(--f-display); font-weight: var(--display-w); font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.6rem); line-height: 1.25; color: var(--fg-2); }
.visit__addr b { color: var(--fg); font-weight: inherit; }
:root[lang="ar"] .visit__addr { font-size: clamp(1.25rem, 1rem + .9vw, 1.9rem); line-height: 1.7; }
.visit__links { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.visit__badge { aspect-ratio: 1; background: var(--chamber); color: #FFF8EE; display: grid; place-items: center; padding: 15%; }
:root[data-skin="deep"] .visit__badge { background: var(--chamber); }
.visit__badge svg { width: 100%; height: auto; }

/* ---------- footer ---------- */
.foot { position: relative; background: var(--chamber); padding-block: clamp(72px, 9vw, 140px) calc(min(50vw, 740px) / 2.92 + 8px); overflow: hidden; }
.foot__hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: center; }
.foot__tag { font-family: var(--f-en-display); font-style: italic; font-weight: 500; font-size: clamp(2.8rem, 1.4rem + 4vw, 5.8rem); line-height: 1; letter-spacing: -.01em; color: var(--butter); padding-bottom: .1em; }
:root[lang="ar"] .foot__tag { font-family: var(--f-ar); font-style: normal; font-weight: 700; font-size: clamp(2.2rem, 1.2rem + 3vw, 4.4rem); line-height: 1.35; letter-spacing: 0; }
/* the Hairline terrain (js/terrain.js) on the footer's ground: plate = the footer colour, hi = coral */
.field { position: relative; width: 100%; max-width: 680px; justify-self: end; }
.field__stage {
  width: 112%;
  margin: -9% -6% -11%;
  --hairline-stroke: 1;
  --hairline-plate: #002A30;
  --hairline-hi: #FF593E;
  --hairline-edge: #B3BAB5;
  --hairline-mid: #738786;
  --hairline-lo: #405E60;
}
:root[data-skin="ivory"] .field__stage { --hairline-plate: #003D46; --hairline-edge: #B3C0BC; --hairline-mid: #739192; --hairline-lo: #406C70; }
.field__read { position: absolute; top: 6%; right: 3%; font-family: var(--f-mono); font-size: .8125rem; color: var(--fg-3); pointer-events: none; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; margin-top: clamp(48px, 6vw, 88px); padding-top: 28px; border-top: 1px solid var(--line); }
.foot__nav { display: flex; flex-wrap: wrap; gap: 10px 26px; font-weight: 600; font-size: .9375rem; }
.foot__nav a:hover { color: var(--butter); }
.foot__copy { color: var(--fg-3); font-size: .875rem; }
.foot__top { margin-inline-start: auto; }
.foot__curve { position: absolute; bottom: calc(min(50vw, 740px) / -8); inset-inline-end: -5vw; width: min(50vw, 740px); color: var(--coral); }
:root[dir="ltr"] .foot__curve { transform: scaleX(-1); }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.js .h2[data-split] { opacity: 1; transform: none; }
.w { display: inline-block; overflow: clip; overflow-clip-margin: .14em; vertical-align: top; padding-block: .06em; margin-block: -.06em; }
.w__i { display: inline-block; transform: translateY(110%); }
.h2.is-in .w__i { transform: none; transition: transform 1s var(--ease); transition-delay: calc(var(--wi) * 45ms); }

/* ---------- fx overlays ---------- */
.inkfx { position: fixed; inset: 0; z-index: 100; pointer-events: none; visibility: hidden; overflow: hidden; }
.inkfx.is-on { visibility: visible; }
.inkfx svg { position: absolute; left: 0; top: 0; fill: var(--ink); transform: translate(-50%, -50%) scale(0); }
.inkfx__word { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-en-display); font-size: clamp(3rem, 8vw, 7rem); color: #FFF8EE; opacity: 0; }
.inkfx__word[lang="ar"] { font-family: var(--f-ar); font-weight: 600; font-size: clamp(2.6rem, 6vw, 5.4rem); }
.chroma { position: fixed; inset: 0; z-index: 100; width: 100%; height: 100%; pointer-events: none; display: none; }

/* ---------- responsive ---------- */
@media (min-width: 981px) and (max-height: 820px) {
  .hero { padding-top: calc(var(--hdr) + 3vh); }
  .hero__eyebrow { margin-bottom: 18px; }
  .hero__sub { margin-top: 22px; }
  .hero__ctas { margin-top: 30px; }
  .hero__curve { margin-top: 28px; }
}

@media (max-width: 1180px) {
  .hdr__nav { gap: 20px; }
  .build__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); grid-template-rows: auto 1fr; row-gap: 28px; }
  .build__head { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: end; column-gap: 40px; }
  .build__head .lead { grid-column: 1; }
  .build__steps { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .editor__code { min-height: 32em; }
}

@media (max-width: 1100px) {
  .rail { display: none; }
}

@media (max-width: 980px) {
  :root { --hdr: 64px; }
  .hdr__nav, .hdr__cta, .skin-btn { display: none; }
  .menu-btn { display: inline-grid; }
  .hdr__tools { margin-inline-start: auto; }
  .hdr__logo { width: 124px; }
  /* phones + tablets: the curve sits on the bottom of the first screen, copy centred above it */
  .hero__curve { margin-top: 0; padding-top: 30px; }
  .anat__grid, .faq__grid, .visit__grid, .brief__grid { grid-template-columns: 1fr; }
  .anat__head, .faq__head { position: static; }
  .keys { max-width: 460px; margin-inline: auto; }
  .keys__stage { width: 106%; margin-inline: -3%; }
  .svc__grid { grid-template-columns: 1fr; }
  .svc__stage { order: -1; }
  .svc__sticky { position: relative; top: auto; height: auto; padding-block: 8px 24px; }
  .octo { max-width: 520px; max-height: none; margin-inline: auto; }
  .svc__item { min-height: 0; padding-block: 44px; }
  .js .svc__item:not(.is-active) { opacity: 1; }
  .ticket-wrap { position: relative; top: auto; }
  .visit__badge { max-width: 380px; }
  .work__grid { grid-template-columns: 1fr; }
  .case--feature, .case--half, .case--next { grid-column: auto; grid-row: auto; }
  .case--feature { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero { padding-top: calc(var(--hdr) + 28px); min-height: 100svh; }
  /* phones: enlarge the curve, keeping its wave, the crest with the big suckers and the base cut */
  .hero__curve { --cw: 140%; --ck: 1; }
  .hero__ctas .btn { flex: 1 1 auto; }
  .anat__facts { grid-template-columns: 1fr; gap: 36px; }
  .build__track { height: 300vh; }
  /* phones: heading, then the code being typed, then the phone it builds. The stage uses the small
     viewport height (stable while the browser bars move) and the phone is sized from it, so the code and
     the post (with its likes) are both on screen; on short screens the phone's foot runs off the bottom. */
  .build__stage { height: 100svh; display: block; padding-top: calc(var(--hdr) + 10px); }
  .build__grid { display: flex; flex-direction: column; gap: 12px; }
  .build__head { grid-template-columns: 1fr; gap: 10px; }
  .build__head .lead, .build__steps { display: none; }
  .build__head .h2 { font-size: 1.9rem; }
  :root[lang="ar"] .build__head .h2 { font-size: 1.55rem; }
  .editor { order: 2; flex: none; }
  .editor__bar { height: 30px; }
  .editor__code { height: 9.1em; min-height: 0; padding: 7px 12px; font-size: .74rem; line-height: 1.7; overflow: hidden; }
  .phone { order: 3; flex: none; align-self: center; width: clamp(176px, min(64vw, calc((100svh - 326px) * .64)), 250px); min-height: 0; border-radius: 36px; padding: 8px; }
  .phone__screen { border-radius: 29px; }
  .ig__top { padding: 14px 12px 8px; }
  .ig__actions { padding-top: 8px; }
  .proc__line { display: none; }
  .proc__steps { grid-template-columns: 1fr; gap: 0; }
  .proc__steps::before { content: ""; position: absolute; inset-inline-start: 14px; top: 16px; bottom: 16px; width: 2px; background: var(--line-strong); }
  .proc__steps::after { content: ""; position: absolute; inset-inline-start: 14px; top: 16px; bottom: 16px; width: 3px; margin-inline-start: -.5px; background: var(--coral); transform-origin: top; transform: scaleY(var(--p, 0)); }
  .step { padding: 4px 0 40px; padding-inline-start: 56px; text-align: start; }
  .step__ring { top: 16px; left: auto; inset-inline-start: 0; margin: -15px 0 0; z-index: 1; }
  .step p { margin-inline: 0; }
  .case--next { flex-direction: column; align-items: flex-start; }
  .case--next .btn { margin-inline-start: 0; }
  .pick--arms { grid-template-columns: 1fr; }
  .pick--row { grid-template-columns: 1fr; }
  .opt--card { flex-direction: row; align-items: center; min-height: 58px; }
  .q--fields { grid-template-columns: 1fr; }
  .brief__send .btn { flex: 1 1 100%; }
  .foot__top { margin-inline-start: 0; }
  .foot { padding-bottom: 42vw; }
  .foot__curve { width: 110vw; inset-inline-end: -30vw; }
  .foot__hero { grid-template-columns: 1fr; }
  .field { justify-self: center; }
  .field__stage { width: 106%; margin-inline: -3%; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .hero__eyebrow, .js .hero__title .line, .js .hero__sub, .js .hero__ctas { opacity: 1 !important; transform: none !important; }
  .js .hero__curve { clip-path: none !important; transform: none; }
  .js .hero__title em { --mark: 1; }
  .w__i { transform: none !important; }
  .js .ink { -webkit-mask: none !important; mask: none !important; }
  .js .octo .arm { opacity: 1; --s: 1; }
  .hub__ring { animation: none !important; }
}
