:root {
  --bg: #0b0f19;
  --bg2: #111827;
  --card: #151c2c;
  --border: #1f2a3f;
  --text: #e5e7eb;
  --muted: #a7afbd;
  --accent: #22d3ee;
  --accent2: #06b6d4;
  --ground: #0b0f19;
  --out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-color: var(--border) var(--bg); }
html.lenis { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--ground); color: var(--text); line-height: 1.6;
  transition: background-color .9s ease;
  overflow-x: clip;
}
::selection { background: var(--accent); color: #0b0f19; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- header, shared with the landing page ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 25, .6); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .4s ease, border-color .4s ease;
}
header.scrolled { background: rgba(11, 15, 25, .92); border-bottom-color: var(--border); }
nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; }
.nav-links li:not(.lang-switch) a {
  position: relative; color: var(--muted); font-weight: 500; font-size: .95rem;
  transition: color .25s ease;
}
.nav-links li:not(.lang-switch) a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--out);
}
.nav-links li:not(.lang-switch) a:hover,
.nav-links li:not(.lang-switch) a[aria-current] { color: var(--text); }
.nav-links li:not(.lang-switch) a:hover::after,
.nav-links li:not(.lang-switch) a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.lang-switch { position: relative; }
.lang-switch summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-size: .8rem; font-weight: 600; transition: all .2s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after {
  content: ''; width: 0; height: 0; margin-top: 2px;
  border: 4px solid transparent; border-top-color: currentColor;
}
.lang-switch summary:hover { color: var(--text); border-color: var(--accent); }
.lang-switch ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 190px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; list-style: none; z-index: 60;
}
.lang-switch ul button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  background: none; border: 0; border-radius: 7px; padding: 9px 10px;
  color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; transition: background .2s;
}
.lang-switch ul button:hover { background: var(--bg2); }
.lang-switch ul button[aria-current="true"] { color: var(--accent); font-weight: 600; }
.lang-switch img { width: 21px; height: 15px; flex-shrink: 0; border-radius: 2px; object-fit: cover; background: var(--border); }
.burger { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }
.burger svg { display: block; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
html.motion [data-i18n] { transition: opacity .16s ease, filter .16s ease; }
html.motion body.swapping [data-i18n] { opacity: .35; filter: blur(1.5px); }

/* ---------- first viewport ---------- */
.intro {
  position: relative; min-height: calc(100svh - 68px);
  display: flex; flex-direction: column; overflow: hidden;
  padding-top: clamp(32px, 7vh, 72px);
}
.intro-copy { width: 100%; }
.intro h1 {
  font-size: clamp(2.5rem, 5.6vw, 5rem); font-weight: 800; line-height: 1.04;
  letter-spacing: -0.04em; max-width: 15ch; text-wrap: balance;
}
.intro-copy p { color: var(--muted); font-size: 1.15rem; max-width: 52ch; margin-top: 20px; }
.intro-plates { position: relative; flex: 1; min-height: 340px; margin-top: 74px; }
.intro-plate { position: absolute; width: clamp(340px, 44vw, 700px); display: block; }
.intro-plate img {
  width: 100%; border-radius: 12px 12px 0 0; border: 1px solid var(--border); border-bottom: 0;
  box-shadow: 0 -24px 60px -28px rgba(0, 0, 0, .9);
  transition: filter .4s ease, transform .5s var(--out);
}
/* each plate hangs off a labelled dot: the page's drawing starts here */
.tab {
  position: absolute; bottom: 100%; left: 18px; margin-bottom: 15px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 12px; border-radius: 7px;
  background: #0b0f19; border: 1px solid var(--accent);
  font-size: .8rem; font-weight: 600; color: var(--text);
  transition: background .25s ease, color .25s ease;
}
.tab::before { content: ''; position: absolute; left: 14px; top: 100%; width: 1px; height: 15px; background: var(--accent); }
.tab::after {
  content: ''; position: absolute; left: 11px; top: calc(100% + 12px); width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
}
.tab svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tab .adult { vertical-align: 0; padding: 1px 6px; font-size: .72rem; border-radius: 5px; }
.intro-plate:hover .tab, .intro-plate:focus-visible .tab { background: var(--accent); color: #0b0f19; }
.intro-plate:hover img { transform: translateY(-8px); }
.p1 { left: 4vw; top: 0; z-index: 1; }
.p2 { left: 29vw; top: 76px; z-index: 2; }
.p3 { right: 4vw; top: 150px; z-index: 3; }
.intro-plates:hover .intro-plate:not(:hover) img { filter: brightness(.55); }

/* ---------- a product's face ---------- */
.face { position: relative; min-height: calc(100svh - 68px); display: flex; align-items: flex-end; overflow: clip; }
.face-bg { position: absolute; inset: 0; overflow: hidden; }
.face-bg picture { position: absolute; inset: -4% 0 auto; height: 108%; display: block; }
.face-bg img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.face-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--ground) 36%, transparent 60%);
  transition: background .9s ease;
}
.face-copy { position: relative; width: 100%; padding-bottom: clamp(40px, 9vh, 90px); }
.face h2 {
  font-size: clamp(2.75rem, 7.4vw, 6rem); font-weight: 800; line-height: 1;
  letter-spacing: -0.04em; text-wrap: balance; color: #fff;
}
.face-copy p { font-size: 1.15rem; max-width: 46ch; margin-top: 16px; color: #e8ebf0; }
.adult {
  display: inline-block; vertical-align: .5em; padding: 4px 10px; border-radius: 7px;
  font-size: .95rem; font-weight: 700; letter-spacing: 0; line-height: 1.2;
  background: #ff5a9e; color: #210b20;
}
.face-phone {
  position: absolute; z-index: 2; inset-inline-end: max(5vw, calc(50vw - 600px)); bottom: -5vh;
  width: clamp(150px, 15vw, 224px); border-radius: 22px;
  border: 5px solid #0b0f19; outline: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 34px 60px -18px rgba(0, 0, 0, .85);
}

/* ---------- the blueprint ---------- */
.bp { position: relative; padding: clamp(72px, 12vh, 130px) 0 clamp(64px, 11vh, 110px); }
.bp-stage {
  position: relative; max-width: none; padding: 0 32px;
  display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 58vw) minmax(190px, 1fr);
  gap: clamp(28px, 3.4vw, 56px); align-items: stretch;
}
/* the screenshots do not mirror in Arabic, so the drawing keeps its sides and only the text flips */
[dir="rtl"] .bp-stage { direction: ltr; }
[dir="rtl"] .note { direction: rtl; }
.plate { position: relative; align-self: center; border-radius: 10px; }
.plate picture, .plate img { border-radius: 10px; }
.plate img { width: 100%; outline: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); }
.plate figcaption { position: absolute; top: 100%; left: 0; right: 0; font-size: .78rem; color: var(--muted); margin-top: 10px; text-align: center; }
.spot {
  position: absolute; inset: 0; border-radius: 10px; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), transparent 0 58px, rgba(6, 9, 15, .74) 118px);
  transition: opacity .3s ease;
}
.bp-stage.focus .spot { opacity: 1; }
.dot {
  --at-x: calc(var(--x) * 1%); --at-y: calc(var(--y) * 1%);
  position: absolute; left: var(--at-x); top: var(--at-y); z-index: 3;
  width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: var(--accent); border: 2px solid #06222a;
  font-size: 0; font-style: normal;
  transition: transform .4s var(--out);
}
.dot.on { transform: scale(1.5); }
.notes { list-style: none; display: flex; flex-direction: column; justify-content: space-around; gap: 28px; }
.note { position: relative; z-index: 3; cursor: default; transition: opacity .3s ease; border-radius: 6px; }
.note .n { display: none; }
.note h3 {
  font-size: 1.04rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3;
  color: #fff; transition: color .25s ease; text-wrap: balance;
}
.note p { font-size: .9rem; line-height: 1.55; color: var(--muted); margin-top: 7px; }
.note.on h3 { color: var(--accent); }
.bp-stage.focus .note:not(.on) { opacity: .42; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.wires path { fill: none; stroke-linejoin: round; }
.wires .case { stroke: #06222a; stroke-width: 3.5; opacity: .75; }
.wires .line { stroke: var(--accent); stroke-width: 1.25; }
html.motion .wires path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--out); transition-delay: var(--d, 0ms); }
html.motion .bp.in .wires path { stroke-dashoffset: 0; }
html.motion .dot { transform: scale(0); }
html.motion .bp.in .dot { transform: scale(1); transition-delay: var(--d, 0ms); }
html.motion .bp.in .dot.on { transform: scale(1.5); transition-delay: 0ms; }
html.motion .note { opacity: 0; }
html.motion .bp.in .note { opacity: 1; transition: opacity .7s ease var(--d, 0ms); }
html.motion .bp.in.settled .note { transition: opacity .3s ease; }
html.motion .bp.in.settled .bp-stage.focus .note:not(.on) { opacity: .42; }

.bp-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
  margin-top: clamp(44px, 7vh, 72px);
}
.bp-foot p { color: var(--muted); max-width: 62ch; }
.visit {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; white-space: nowrap;
  padding: 13px 22px; border-radius: 10px; font-weight: 600;
  background: var(--accent); color: #0b0f19; transition: background .25s ease;
}
.visit:hover { background: #67e8f9; }
.visit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--out); }
.visit:hover svg { transform: translate(2px, -2px); }
[dir="rtl"] .visit svg { transform: scaleX(-1); }
[dir="rtl"] .visit:hover svg { transform: scaleX(-1) translate(2px, -2px); }

/* ---------- close ---------- */
.close { padding: clamp(96px, 18vh, 180px) 0; }
.close h2 {
  font-size: clamp(2.25rem, 5vw, 4.25rem); font-weight: 800; line-height: 1.05;
  letter-spacing: -0.04em; max-width: 17ch; text-wrap: balance;
}
.close p { color: var(--muted); font-size: 1.15rem; margin-top: 20px; }
.mail {
  position: relative; display: inline-block; margin-top: 30px; padding-inline-start: clamp(44px, 7vw, 92px);
  color: var(--accent); overflow-wrap: anywhere;
  font-size: clamp(1.3rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
  transition: color .25s ease;
}
.mail:hover { color: #67e8f9; }
/* the drawing's last line lands on the address */
.mail::before { content: ''; position: absolute; inset-inline-start: 0; top: .78em; width: clamp(30px, 6vw, 78px); height: 1px; background: var(--accent); }
.mail::after { content: ''; position: absolute; inset-inline-start: clamp(30px, 6vw, 78px); top: calc(.78em - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

footer {
  border-top: 1px solid var(--border); padding: 32px 0; text-align: center;
  color: var(--muted); font-size: .9rem; background: var(--bg);
}

@media (max-width: 1023px) {
  /* no room for margins: numbered dots on the plate, the list under it */
  .bp-stage { display: flex; flex-direction: column; gap: 0; padding: 0 24px; }
  .plate { order: 0; width: min(80%, 400px); margin: 0 auto 38px; }
  .notes { order: 1; display: contents; }
  .note { order: var(--n, 9); padding: 18px 0 18px 42px; border-top: 1px solid rgba(255, 255, 255, .12); width: min(100%, 640px); margin-inline: auto; }
  [dir="rtl"] .note { padding: 18px 42px 18px 0; }
  .note .n {
    display: flex; position: absolute; top: 18px; inset-inline-start: 0;
    width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center;
    background: var(--accent); color: #06222a; font-size: .78rem; font-weight: 800;
  }
  /* this one has no pixel on the phone crop, so it reads as a closing fact */
  .note.no-m, [dir="rtl"] .note.no-m { padding-inline: 0; }
  .note p { font-size: .95rem; }
  .wires { display: none; }
  .dot {
    --at-x: calc(var(--mx) * 1%); --at-y: calc(var(--my) * 1%);
    width: 24px; height: 24px; margin: -12px 0 0 -12px;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 800; color: #06222a; border-color: #fff;
  }
  .dot.no-m { display: none; }
  .bp-foot { flex-direction: column; align-items: flex-start; gap: 22px; width: min(100%, 688px); }
}

@media (max-width: 860px) {
  .nav-links { gap: 18px; }
  .nav-links li:not(.lang-switch) a { font-size: .88rem; }
}

@media (max-width: 760px) {
  .burger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; background: var(--bg2); padding: 20px 24px;
    border-bottom: 1px solid var(--border); gap: 18px;
  }
  .nav-links.open { display: flex; }
  .lang-switch ul { inset-inline-end: auto; inset-inline-start: 0; }
  .intro-plates { min-height: 300px; margin-top: 62px; }
  .intro-plate { width: 82vw; }
  .tab { left: 10px; }
  .p3 .tab { left: 48px; }
  .p1 { left: 5vw; top: 0; }
  .p2 { left: 13vw; top: 70px; }
  .p3 { left: auto; right: -5vw; top: 140px; }
  .face-phone { display: none; }
  .face-copy p { font-size: 1.05rem; }
  .face-bg img { object-position: top left; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
