/* =====================================================================
   FONTS (self-hosted, SIL Open Font License — see assets/fonts/OFL-*.txt)
   Two families: Tajawal (Arabic + Latin text) and Cormorant Garamond (Latin display).
   ===================================================================== */
@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/tajawal-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F,
    U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/tajawal-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/tajawal-500-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F,
    U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/tajawal-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-500-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Design tokens (every colour, both themes; type, layout, motion): css/tokens.css, loaded before this file. */

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  font-synthesis: none;
} /* no CSS smooth scrolling: it breaks ScrollTrigger measurements; in-page links scroll smoothly in JS */
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0) / 1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}

html[lang="ar"] body {
  line-height: 1.85;
}

html.js:not(.gate-done) body,
html.modal-open body {
  overflow: hidden;
}

#site {
  overflow-x: clip;
}

img,
svg,
picture,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  color: var(--heading);
}

/* every sprite icon draws with one line width (thicker in the light theme), inherited through <use> */
use {
  stroke-width: var(--icon-stroke);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 18%, transparent);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.noscript {
  position: fixed;
  inset: auto 0 0;
  z-index: 400;
  padding: 1rem;
  text-align: center;
  background: var(--notice-bg);
  color: var(--notice-ink);
}

.logo {
  display: block;
  height: auto;
  aspect-ratio: 491 / 246;
  fill: currentcolor;
  overflow: visible;
}

.flip-rtl {
  transition: transform 0.4s var(--ease);
}

[dir="rtl"] .flip-rtl {
  transform: scaleX(-1);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.skip {
  position: fixed;
  z-index: 300;
  inset-inline-start: 1rem;
  top: -120px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

/* film grain + the page background: ONE fixed layer behind every section (soft glows, aurora pools, fireflies).
   Sections have no background of their own, so there is no seam between them. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background-image: var(--noise);
  background-size: 160px;
  opacity: var(--grain);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(60vmax 40vmax at 85% -10%, var(--ambient-1), transparent 60%),
    radial-gradient(50vmax 40vmax at 0% 110%, var(--ambient-2), transparent 60%);
}

.theme-veil {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
}

/* 1px gradient border for glass surfaces */
.gborder {
  position: relative;
}

.gborder::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(140deg, var(--gb-1), var(--gb-2) 38%, var(--gb-3) 78%, var(--gb-4));
  -webkit-mask:
    linear-gradient(var(--mask) 0 0) content-box,
    linear-gradient(var(--mask) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* type helpers */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentcolor;
  opacity: 0.7;
}

.eyebrow:lang(en) {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-4);
  line-height: 1.06;
  margin-top: 0.9rem;
  text-wrap: balance;
}

.h2:lang(en) {
  letter-spacing: -0.01em;
}

html[lang="ar"] .h2 {
  line-height: 1.3;
}

.h2 em {
  font-style: italic;
  color: var(--gold-ink);
}

html[lang="ar"] .h2 em {
  font-style: normal;
}

.lead {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 60ch;
  margin-top: 1.2rem;
}

.sec {
  position: relative;
  padding-block: var(--section);
}

.sec-head {
  max-width: 860px;
}

.sec-head--center {
  margin-inline: auto;
  text-align: center;
}

.sec-head--center .lead {
  margin-inline: auto;
}

/* buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition:
    scale 0.2s var(--ease-reveal),
    background-color 0.3s,
    color 0.3s,
    border-color 0.3s;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  box-shadow:
    0 14px 40px -14px var(--btn-shadow),
    inset 0 1px 0 var(--btn-highlight);
}

.btn::before {
  /* soft inner glow on hover (opacity only) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(120% 140% at 50% 120%, var(--btn-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-reveal);
}

.btn--ghost::before {
  background: radial-gradient(
    120% 140% at 50% 120%,
    color-mix(in srgb, var(--accent) 22%, transparent),
    transparent 60%
  );
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  scale: 0.97;
}

.btn--ghost {
  color: var(--btn-ghost-ink);
  border: 1px solid var(--btn-ghost-border);
  background: var(--btn-ghost-bg);
  box-shadow: var(--btn-ghost-shadow);
}

.btn--ghost:hover {
  border-color: var(--accent);
}

.btn--block {
  width: 100%;
}

.btn::after {
  /* shine sweep */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, var(--btn-shine) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.9s var(--ease);
}

.btn:hover::after {
  transform: translateX(130%);
}

.btn--ghost::after {
  background: linear-gradient(110deg, transparent 30%, var(--btn-ghost-shine) 50%, transparent 70%);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line-strong);
  background: var(--glass-solid);
  color: var(--text);
  transition:
    border-color 0.3s,
    transform 0.4s var(--ease);
}

.icon-btn:hover {
  border-color: var(--accent);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.lang-btn {
  height: 44px;
  min-width: 44px;
  padding-inline: 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--line-strong);
  background: var(--glass-solid);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: border-color 0.3s;
}

.lang-btn:hover {
  border-color: var(--accent);
}

.lang-btn svg {
  width: 16px;
  height: 16px;
  color: var(--accent-ink);
}

/* theme toggle: sun <-> moon morph */
.tt {
  overflow: visible;
}

.tt__core,
.tt__cut,
.tt__rays {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 0.6s var(--ease),
    opacity 0.4s ease;
}

.tt__rays {
  transform-box: view-box;
}

:root[data-theme="dark"] .tt__core {
  transform: scale(1.7);
}

:root[data-theme="dark"] .tt__cut {
  transform: translate(-8px, 5px);
}

:root[data-theme="dark"] .tt__rays {
  transform: scale(0.4) rotate(-60deg);
  opacity: 0;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.hdr {
  position: fixed;
  z-index: 50;
  inset-inline: 0;
  top: 0;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition:
    transform 0.55s var(--ease),
    background-color 0.4s,
    border-color 0.4s;
}

.hdr::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(var(--bg) 45%, transparent);
  transition: opacity 0.4s;
}

.hdr.is-scrolled::before {
  opacity: 0;
}

.hdr.is-scrolled {
  background: var(--glass);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

html.hdr-hidden .hdr {
  transform: translateY(-100%);
}

.hdr__in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand__mark {
  width: 74px;
  color: var(--text);
}

.brand__tag {
  font-size: 0.78rem;
  color: var(--muted);
  border-inline-start: 1px solid var(--line-2);
  padding-inline-start: 0.65rem;
  line-height: 1.2;
}

.nav {
  display: none;
  gap: 2.2rem;
}

.nav a {
  position: relative;
  font-size: 0.92rem;
  color: var(--muted);
  padding-block: 0.5rem;
  transition: color 0.3s;
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease);
}

.nav a:hover,
.nav a[aria-current="true"] {
  color: var(--text);
}

.nav a:hover::after,
.nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.hdr__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mnav {
  position: absolute;
  top: calc(var(--header-h) - 1px);
  inset-inline: 0;
  padding: 1rem var(--gutter) 1.5rem;
  background: var(--glass-2);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  gap: 0.25rem;
}

.mnav a {
  padding: 0.9rem 0.25rem;
  font-family: var(--f-display);
  font-size: var(--step-2);
  border-bottom: 1px solid var(--line);
}

@media (width >= 960px) {
  .nav {
    display: flex;
  }

  .menu-btn,
  .mnav {
    display: none !important;
  }
}

@media (width <= 420px) {
  .brand__tag {
    display: none;
  }
}

/* =====================================================================
   GATE (entry modal)
   ===================================================================== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--gate-backdrop); /* a flat tint is far cheaper to composite than a full-screen gradient */
}

html.gate-done .gate:not(.is-open) {
  display: none;
}

.gate.is-leaving {
  animation: gate-out 0.75s var(--ease) forwards;
  pointer-events: none;
}

.gate__panel {
  width: min(100%, 640px);
  margin: auto;
  border-radius: var(--r-l);
  padding: clamp(1.25rem, 0.9rem + 2vw, 2.5rem);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: gate-in 1s var(--ease) both 0.15s;
}

.gate__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.gate__logo {
  width: 96px;
  color: var(--text);
}

.gate__tools {
  display: flex;
  gap: 0.5rem;
}

.gate__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1.15;
}

.gate__desc {
  color: var(--muted);
  margin-top: 0.5rem;
}

.gate form {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.4rem;
}

.gate__row {
  display: grid;
  gap: 1.1rem;
}

@media (width >= 560px) {
  .gate__row {
    grid-template-columns: 1fr 1fr;
  }
}

.gate form > * {
  animation: rise 0.9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 350ms);
}

.stagger-1 {
  --i: 1;
}

.stagger-2 {
  --i: 2;
}

.stagger-3 {
  --i: 3;
}

.gate__privacy {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--muted);
}

.gate__privacy svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 0.2em;
  color: var(--accent-ink);
}

@keyframes gate-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }
}

@keyframes gate-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* fields (shared by gate + contact form) */
.field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.field > label,
.field > legend {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0;
}

.field > legend {
  margin-bottom: 0.6rem;
}

.req {
  color: var(--gold-ink);
}

.input {
  width: 100%;
  height: 52px;
  padding-inline: 1rem;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}

.input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-glow);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

textarea.input {
  height: auto;
  min-height: 140px;
  padding-block: 0.85rem;
  resize: vertical;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.6rem;
  cursor: pointer;
  background-image: url("../assets/ui/select-arrow.svg");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: right 1rem center;
}

[dir="rtl"] select.input {
  background-position: left 1rem center;
}

select.input option {
  background: var(--surface);
  color: var(--text);
}

.err {
  font-size: 0.8rem;
  color: var(--danger);
  min-height: 1.1em;
}

.err:empty {
  min-height: 0;
}

.hp {
  position: absolute !important;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* visitor type cards */
.vt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (width >= 520px) {
  .vt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.vt {
  position: relative;
  display: block;
}

.vt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.vt__card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  border-radius: 16px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.3;
  position: relative;
  transition:
    border-color 0.3s,
    background-color 0.3s,
    box-shadow 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.vt__card svg {
  width: 28px;
  height: 28px;
  color: var(--accent-ink);
  transition: transform 0.5s var(--ease);
}

.vt:hover .vt__card {
  border-color: var(--accent);
}

.vt input:checked + .vt__card {
  border-color: var(--accent);
  background: var(--vt-on-bg);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    0 14px 30px -16px var(--vt-on-shadow);
}

.vt input:checked + .vt__card svg {
  transform: scale(1.12);
}

.vt input:checked + .vt__card::after {
  content: "";
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent) url("../assets/ui/check.svg") center/10px no-repeat;
}

.vt input:focus-visible + .vt__card {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.vt-other {
  margin-top: 0.8rem;
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  --ring-size: clamp(280px, min(78vmin, 820px), 820px); /* the outer ring (see .hero-orbit) */
  --mark-w: min(78vw, 560px); /* the wordmark; its height is 0.501 of its width */

  position: relative;
  isolation: isolate; /* no overflow clipping: rings and glow fade out instead of being cut */
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;

  /* room above the wordmark for the upper half of its rings: they never run off the top of the page */
  padding: max(calc(var(--header-h) + 2rem), calc(var(--ring-size) / 2 - var(--mark-w) * 0.2505 + 12px)) var(--gutter)
    1.5rem;
}

@supports (min-height: 100svh) {
  .hero {
    min-height: 100svh;
  }
}

.particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- hero orbit: the rings, the orbiting sphere and the glow, one component centred on the wordmark.
   Every part is sized from --ring-size and shares one centre; only transform and opacity animate. */
.hero__mark {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-orbit {
  position: absolute;
  inset: 0;
  z-index: -1; /* behind every line of the hero text, in front of the page background */
  display: grid;
  place-content: center; /* the rings are larger than the wordmark: overflow evenly on every side */
  place-items: center;
  pointer-events: none;
  perspective: 1100px;
  animation: orbit-in 1.4s var(--ease-reveal) both;
}

.hero-orbit > * {
  grid-area: 1 / 1;
}

.hero-orbit__glow {
  width: var(--ring-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--hero-glow-1), var(--hero-glow-2) 55%, transparent);
  mask-image: radial-gradient(closest-side, var(--mask) 55%, transparent); /* soft all the way out: no edge */
  opacity: var(--glow-strength);
  animation: breathe 8s ease-in-out infinite;
}

.hero-orbit__rings {
  position: relative;
  width: var(--ring-size);
  aspect-ratio: 1;
}

.ring,
.orbit {
  position: absolute;
  inset: 0;
  width: var(--size);
  max-width: none; /* the global svg rule would cap the width and squash the circle */
  height: var(--size);
  margin: auto;
  transform-origin: 50% 50%;
}

.ring {
  overflow: visible;
}

.ring--outer {
  --size: 100%;

  animation: spin 70s linear infinite;
}

.ring--dots {
  --size: 88%;

  animation: spin 160s linear infinite;
}

.ring--inner {
  --size: 72%;

  animation: spin 52s linear infinite reverse;
}

.s-a {
  stop-color: var(--ring-a);
}

.s-b {
  stop-color: var(--ring-b);
}

.s-t {
  stop-color: var(--ring-faint);
}

.s-shine {
  stop-color: var(--wordmark-shine);
}

.ring circle {
  vector-effect: var(--ring-vector);
}

.ring--outer circle {
  stroke-width: var(--ring-w-outer);
}

.ring--dots circle {
  stroke-width: var(--ring-w-dots);
}

.ring--inner circle {
  stroke-width: var(--ring-w-inner);
}

.orbit {
  --size: 100%; /* the sphere rides the outer ring: one turn every 16 s */

  animation: spin 16s linear infinite;
}

.orbit__trail {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 235deg, var(--trail-mid) 305deg, var(--trail-end) 360deg);
  -webkit-mask: radial-gradient(
    closest-side,
    transparent calc(98% - 2.5px),
    var(--mask) calc(98% - 1.2px),
    var(--mask) calc(98% + 1.2px),
    transparent calc(98% + 2.5px)
  );
  mask: radial-gradient(
    closest-side,
    transparent calc(98% - 2.5px),
    var(--mask) calc(98% - 1.2px),
    var(--mask) calc(98% + 1.2px),
    transparent calc(98% + 2.5px)
  );
}

.orbit__sphere {
  /* centred on the outer ring's line (r = 196 of 200, so 1% from the top) */
  position: absolute;
  left: 50%;
  top: 1%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--sphere-core), var(--sphere-mid) 30%, var(--sphere-edge) 72%);
  box-shadow:
    0 0 12px 3px var(--sphere-glow-1),
    0 0 34px 10px var(--sphere-glow-2),
    0 0 70px 22px var(--sphere-glow-3);
}

@keyframes orbit-in {
  from {
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.92);
    opacity: calc(0.62 * var(--glow-strength));
  }

  50% {
    transform: scale(1.06);
    opacity: var(--glow-strength);
  }
}

/* paused off-screen, and while the entry form or the intro covers the hero */
.hero.is-paused *,
.hero.is-paused,
html.js:not(.gate-done) .hero *,
html.has-intro .hero *,
html.js:not(.gate-done) .aurora__blob,
html.has-intro .aurora__blob {
  animation-play-state: paused !important;
}

.hero__content {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  text-align: center;
  max-width: 780px;
  will-change: transform, opacity;
}

.hero__title {
  margin: 0;
  line-height: 0;
}

.wordmark {
  width: var(--mark-w);
  height: auto;
  overflow: visible;
}

.wordmark__path {
  fill: url("#wm-fill");
  fill-opacity: 0;
  stroke: url("#wm-stroke");
  stroke-width: 1.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-opacity: 1;
}

.hero.is-revealed .wordmark__path {
  animation:
    draw 2.8s var(--ease-2) forwards,
    fill-in 1.4s ease 1.7s forwards;
}

html:not(.js) .wordmark__path,
html.reduce-motion .wordmark__path {
  fill-opacity: 1;
  stroke-dashoffset: 0;
  stroke-opacity: 0.18;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-in {
  to {
    fill-opacity: 1;
    stroke-opacity: 0.18;
  }
}

.hero__script {
  width: clamp(150px, 28vw, 250px);
  height: auto;
  color: var(--gold-ink);
  fill: currentcolor;
  margin-top: -0.4rem;
}

.hero__tag {
  font-family: var(--f-display);
  font-size: var(--step-2);
  font-weight: 500;
}

.hero__lead {
  color: var(--muted);
  max-width: 52ch;
  font-size: var(--step-0);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 0.6rem;
}

html.js .hero [data-hero] {
  opacity: 0;
  transform: translate3d(0, var(--rise), 0);
  transition:
    opacity 800ms var(--ease-reveal),
    transform 800ms var(--ease-reveal);
  transition-delay: calc(var(--d, 0) * 1ms + 1500ms);
}

html.js .hero.is-revealed [data-hero] {
  opacity: 1;
  transform: none;
}

.hero .d-1 {
  --d: 120;
}

.hero .d-2 {
  --d: 240;
}

.hero .d-3 {
  --d: 360;
}

.hero .d-4 {
  --d: 480;
}

/* in its own row, at least 48px below the buttons; fades out once the page scrolls (js/app.js) */
.cue {
  margin-top: 48px;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
  transition:
    opacity 0.5s var(--ease),
    visibility 0.5s;
}

.cue:lang(en) {
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.cue.is-gone {
  opacity: 0;
  visibility: hidden;
}

.cue__line {
  position: relative;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: linear-gradient(var(--line-2), transparent);
}

.cue__line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 40%;
  background: var(--accent);
  transform: translateY(-100%);
  animation: cue 2.4s var(--ease-2) infinite;
}

@keyframes cue {
  to {
    transform: translateY(260%);
  }
}

/* =====================================================================
   ABOUT
   ===================================================================== */
.about__grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
}

@media (width >= 960px) {
  .about__grid {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }
}

.about__text {
  display: grid;
  gap: 1.4rem;
}

.about__text > p {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.75;
}

.about__visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 0.74;
}

.about__plate {
  position: absolute;
  width: 46%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    var(--plate-shadow),
    0 0 0 1px var(--line-2);
  background: var(--surface-2);
}

.about__plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__plate:nth-child(1) {
  inset-inline-start: 0;
  top: 12%;
  rotate: -5deg;
}

.about__plate:nth-child(2) {
  inset-inline-start: 27%;
  top: 0;
  z-index: 2;
}

.about__plate:nth-child(3) {
  inset-inline-start: 54%;
  top: 16%;
  rotate: 5deg;
}

.about__halo {
  position: absolute;
  inset: 10% 0 -5%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--about-halo), transparent);
  opacity: var(--glow-strength);
}

.quote {
  box-shadow: var(--card-shadow);
  padding: 1.6rem 1.8rem;
  border-radius: var(--r-m);
  background: var(--glass);
}

.quote figcaption {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-ink);
  margin-bottom: 0.6rem;
}

.quote figcaption:lang(en) {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.quote p {
  font-family: var(--f-display);
  font-size: var(--step-2);
  line-height: 1.45;
}

.about__aud {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: var(--step-0) !important;
}

.about__aud svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.25em;
  color: var(--accent-ink);
}

/* marquee strip */
.marquee {
  margin-top: var(--section);
  overflow: hidden;
  direction: ltr; /* the strip is decorative and moves in physical pixels in both languages */
  border-block: 1px solid var(--line);
  padding-block: 1.5rem;
  background: linear-gradient(90deg, transparent, var(--marquee-tint), transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  direction: ltr;
  will-change: transform;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding-inline-end: 2.4rem;
  flex: none;
}

.marquee__item {
  font-family: var(--f-display);
  font-size: var(--step-2);
  white-space: nowrap;
}

.marquee__item--out {
  color: transparent;
  -webkit-text-stroke: 1px var(--muted);
}

.marquee__group svg {
  width: 18px;
  height: 18px;
  color: var(--gold-ink);
  flex: none;
}

/* pillars + counters */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
}

@media (width >= 960px) {
  .pillars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pillar {
  box-shadow: var(--card-shadow);
  background: var(--bg);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.4rem);
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.pillar__num {
  font-family: var(--f-display);
  font-size: var(--step-5);
  line-height: 0.95;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
}

.pillar__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  color: var(--accent-ink);
  background: var(--pillar-icon-bg);
}

.pillar__icon svg {
  width: 26px;
  height: 26px;
}

.pillar__title {
  font-family: var(--f-display);
  font-size: var(--step-1);
  font-weight: 600;
}

.pillar__label {
  color: var(--muted);
  font-size: 0.92rem;
}

/* =====================================================================
   PRODUCTS
   ===================================================================== */
.cat-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  margin-top: 2.5rem;
  padding-block: 0.8rem;
  background: linear-gradient(color-mix(in srgb, var(--bg) 78%, transparent) 55%, transparent);
  transition: transform 0.55s var(--ease);
}

html.hdr-hidden .cat-nav {
  transform: translateY(calc(-1 * var(--header-h)));
}

.cat-nav__list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.2rem var(--gutter);
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
}

.cat-nav__list::-webkit-scrollbar {
  display: none;
}

@media (width >= 1240px) {
  .cat-nav__list {
    justify-content: center;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 44px;
  padding-inline: 1.1rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  background: var(--glass-solid);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition:
    color 0.3s,
    background-color 0.3s,
    border-color 0.3s;
}

.pill:hover {
  color: var(--text);
  border-color: var(--accent);
}

.pill[aria-current="true"] {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.pill__count {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.cat {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding-top: clamp(3rem, 2rem + 4vw, 6rem);
  scroll-margin-top: calc(var(--header-h) + 64px);
}

.cat__head {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}

.cat__title {
  font-family: var(--f-display);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

html[lang="ar"] .cat__title {
  line-height: 1.35;
  letter-spacing: 0;
}

.cat__line {
  color: var(--muted);
  max-width: 60ch;
}

.grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(80vw, 340px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin-inline: calc(-1 * var(--gutter));
  padding: 0.5rem var(--gutter) 1.5rem;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.grid > * {
  scroll-snap-align: start;
}

@media (width >= 768px) {
  .grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    margin-inline: 0;
    padding: 0;
    gap: 1.25rem;
  }
}

@media (width >= 1100px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width >= 1600px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.swipe-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: -0.6rem;
}

.swipe-hint svg {
  width: 16px;
  height: 16px;
}

@media (width >= 768px) {
  .swipe-hint {
    display: none;
  }
}

.products__note {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* =====================================================================
   CARD (product "hero shot")
   ===================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-l);
  background: var(--surface);
  isolation: isolate;
  transition:
    transform 0.7s var(--ease),
    box-shadow 0.7s var(--ease);
  content-visibility: auto; /* skipped until near the viewport */
  contain-intrinsic-size: auto 680px;

  --gb-3: color-mix(in srgb, var(--glow) 55%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: var(--shadow-lg);
  }
}

.card__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--r-l) var(--r-l) 0 0;
  display: grid;
  place-items: center;
  perspective: 900px;
  background: radial-gradient(120% 90% at 50% 0%, var(--stage-a), var(--stage-b));
}

.card__glow {
  position: absolute;
  inset: -12% -12% 4%;
  pointer-events: none;
  background: radial-gradient(closest-side at 50% 50%, var(--glow), transparent 72%);
  opacity: calc(0.72 * var(--glow-strength));
  transform: scale(0.92);
  transition:
    opacity 0.7s var(--ease),
    transform 0.9s var(--ease);
}

.card:hover .card__glow,
.card:focus-within .card__glow {
  opacity: var(--glow-strength);
  transform: scale(1.06);
}

.card__bloom {
  position: absolute;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0.3;
  animation: bloom 5.5s ease-in-out infinite;
  animation-play-state: paused;
}

.card__floor {
  position: absolute;
  left: 50%;
  bottom: 6%;
  translate: -50% 0;
  width: 62%;
  height: 10%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, var(--floor), transparent);
}

.card__floor::after {
  content: "";
  position: absolute;
  inset: -40% 10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0.35;
}

.card__float {
  position: relative;
  width: 60%;
  margin-top: -4%;
  animation: float 7.5s ease-in-out infinite;
  animation-play-state: paused;
  animation-delay: calc(var(--i, 0) * -0.9s);
}

/* gentle float: every visible card at "high"; only the lit (hovered or focused) card at "medium" */
html[data-quality="high"] .card.is-visible .card__float,
.card.is-lit .card__float,
.card.is-lit .card__bloom {
  animation-play-state: running;
}

.card__plate {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  backface-visibility: hidden; /* no shimmering edges while tilted */
  box-shadow:
    var(--plate-shadow),
    0 0 0 1px var(--plate-ring);
}

.card__plate img,
.card__plate .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateX(-130%);
  transition: none; /* snaps back unseen, so the sweep plays once per hover */
  background: linear-gradient(115deg, transparent 30%, var(--card-shine) 48%, transparent 64%);
}

.card:hover .card__shine {
  transform: translateX(130%);
  transition: transform 1.2s var(--ease-reveal);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes bloom {
  0%,
  100% {
    opacity: 0.18;
    transform: scale(0.9);
  }

  50% {
    opacity: 0.42;
    transform: scale(1.1);
  }
}

.badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--badge-ink);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
}

.badge svg {
  width: 13px;
  height: 13px;
  color: var(--badge-icon);
}

.badge--new {
  inset-inline: auto 14px;
  color: var(--badge-new-ink);
  background: var(--badge-new-bg);
  border-color: transparent;
}

.card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  padding: 1.2rem 1.25rem 1.35rem;
}

.card__title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
}

html[lang="ar"] .card__title {
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.5;
}

.card__open {
  text-align: start;
}

.card__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: var(--r-l);
}

.card__open:focus-visible {
  outline: none;
}

.card__open:focus-visible::after {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
}

.card__sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: -0.35rem;
}

.card__sub:lang(en) {
  letter-spacing: 0.02em;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card__meta svg {
  width: 14px;
  height: 14px;
  color: var(--accent-ink);
}

.benefits {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.benefits li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.benefits li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glow, var(--accent));
  box-shadow: 0 0 10px var(--glow, var(--accent));
  translate: 0 -0.12em;
}

.card__ings {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.card__ings-label {
  width: 100%;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1.35;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--text);
  transition:
    transform 0.35s var(--ease),
    border-color 0.3s;
}

.chip::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--glow, var(--accent));
}

.chip--more {
  position: relative;
  z-index: 4; /* above the card's full-size open button */
  color: var(--muted);
  cursor: pointer;
}

.chip--more::before {
  display: none;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.card__cta svg {
  width: 16px;
  height: 16px;
  transition: translate 0.5s var(--ease);
}

.card:hover .card__cta svg {
  translate: 4px 0;
}

[dir="rtl"] .card:hover .card__cta svg {
  translate: -4px 0;
}

.ph {
  display: grid;
  place-items: center;
  background: radial-gradient(
    circle at 50% 40%,
    color-mix(in srgb, var(--glow) 30%, var(--surface-2)),
    var(--surface-2)
  );
}

.ph svg {
  width: 46%;
  height: auto;
  color: var(--glow);
}

/* off-screen blocks skip layout + paint until needed (big win on mobile CPUs); see also .card */
.branch,
.ftr__top {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

#about {
  content-visibility: auto;
  contain-intrinsic-size: auto 2200px;
}

#journey {
  content-visibility: auto;
  contain-intrinsic-size: auto 2100px;
}

/* during in-page navigation everything is laid out once, so the scroll target is exact (sizes are then remembered) */
html.cv-off .card,
html.cv-off #explorer,
html.cv-off .branch,
html.cv-off .ftr__top,
html.cv-off #about,
html.cv-off #journey {
  content-visibility: visible;
}

/* reveal for dynamically rendered cards (IntersectionObserver driven) */
html.js .card.pre {
  opacity: 0;
  transform: translate3d(0, var(--rise), 0);
}

html.js .card.pre.in {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-reveal) var(--ease-reveal),
    transform var(--dur-reveal) var(--ease-reveal);
  transition-delay: var(--d, 0ms);
}

/* =====================================================================
   DETAIL PANEL (dialog)
   ===================================================================== */
.pd {
  width: min(1140px, calc(100% - 20px));
  max-width: none;
  max-height: calc(100dvh - 20px);
  padding: 0;
  border: 0;
  border-radius: var(--r-l);
  background: var(--surface);
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 60px 140px -40px var(--dialog-shadow);
}

.pd::backdrop {
  background: var(--dialog-backdrop);
}

.pd[open] {
  animation: pd-in 0.7s var(--ease);
}

.pd[open]::backdrop {
  animation: fade 0.5s ease;
}

.pd.is-closing {
  animation: pd-out 0.32s ease forwards;
}

.pd.is-closing::backdrop {
  animation: fade 0.32s ease reverse forwards;
}

@keyframes pd-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
}

@keyframes pd-out {
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.pd__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (width >= 900px) {
  .pd__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.pd__stage {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 3.5rem 2rem 3rem;
  background: radial-gradient(120% 90% at 50% 0%, var(--stage-a), var(--stage-b));
}

@media (width >= 900px) {
  .pd__stage {
    position: sticky;
    top: 0;
    height: min(calc(100dvh - 20px), 780px);
  }
}

.pd__stage .card__glow {
  opacity: calc(0.75 * var(--glow-strength));
  transform: scale(1);
}

.pd__stage .card__float {
  width: min(70%, 380px);
  animation-play-state: running;
}

.pd__stage .card__bloom {
  animation-play-state: running;
  width: 60%;
}

.pd__body > * {
  min-width: 0;
}

.pd__body {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-content: start;
  padding: clamp(1.4rem, 1rem + 2vw, 3rem);
}

.pd__top {
  position: absolute;
  top: 14px;
  inset-inline: 14px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.pd__top > * {
  pointer-events: auto;
}

.pd__steps {
  display: flex;
  gap: 0.5rem;
}

.pd__cat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.pd__cat:lang(en) {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.pd__title {
  font-family: var(--f-display);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.15;
  margin-top: 0.4rem;
}

html[lang="ar"] .pd__title {
  line-height: 1.4;
}

.pd__alt {
  color: var(--muted);
  margin-top: 0.3rem;
}

.pd__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pd__badges .badge {
  position: static;
}

.pd__h {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-ink);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pd__h:lang(en) {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.pd__h svg {
  width: 16px;
  height: 16px;
}

.pd .benefits {
  font-size: 0.98rem;
  gap: 0.6rem;
}

.pd__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pd__chips .chip {
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  animation: chip-in 0.7s var(--ease) both;
  animation-delay: calc(var(--ci, 0) * 55ms + 250ms);
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
}

.pd__usage {
  color: var(--muted);
  line-height: 1.8;
}

.pd__note {
  font-size: 0.78rem;
  color: var(--muted);
}

.pd__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding-top: 0.5rem;
}

.scents {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.6rem;
  scrollbar-width: thin;
}

.scent {
  flex: none;
  min-width: 148px;
  scroll-snap-align: start;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--chip-bg);
}

.scent__for {
  font-size: 0.72rem;
  color: var(--gold-ink);
  font-weight: 600;
}

.scent__name {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

.scent__desc {
  font-size: 0.78rem;
  color: var(--muted);
}

/* =====================================================================
   JOURNEY (timeline + branch map)
   ===================================================================== */
.tl-wrap {
  position: relative;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
}

.tl {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(1.8rem, 1.4rem + 2vw, 3.2rem);
}

.tl__item {
  position: relative;
  padding-inline-start: 54px;
}

.tl__node {
  position: absolute;
  top: 1.5rem;
  inset-inline-start: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 2px solid var(--line-2);
  transition:
    border-color 0.6s,
    box-shadow 0.6s var(--ease);
}

.tl__node::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    background-color 0.6s,
    transform 0.6s var(--ease);
}

.tl__item.is-active .tl__node {
  border-color: var(--accent);
  box-shadow:
    0 0 0 6px var(--tl-node-ring),
    0 0 26px var(--tl-node-glow);
}

.tl__item.is-active .tl__node::after {
  background: var(--accent);
  transform: scale(1.2);
}

.tl__card {
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.6rem;
  border-radius: var(--r-m);
  background: var(--glass);
  border: 1px solid var(--line);
  transition: border-color 0.6s;
}

.tl__item.is-active .tl__card {
  border-color: var(--line-2);
}

.tl__chapter {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-ink);
}

.tl__chapter:lang(en) {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.tl__title {
  font-family: var(--f-display);
  font-size: var(--step-2);
  font-weight: 500;
  margin: 0.35rem 0 0.45rem;
  line-height: 1.25;
}

.tl__text {
  color: var(--muted);
}

@media (width >= 960px) {
  .tl__item {
    width: 50%;
    padding-inline: 0 60px;
  }

  .tl__item:nth-child(even) {
    margin-inline-start: 50%;
    padding-inline: 60px 0;
  }

  .tl__node {
    inset-inline: auto -11px;
  }

  .tl__item:nth-child(even) .tl__node {
    inset-inline: -11px auto;
  }
}

.branch {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(3.5rem, 2rem + 4vw, 6rem);
}

@media (width >= 960px) {
  .branch {
    grid-template-columns: 1fr 1.25fr;
  }
}

.branch__info {
  box-shadow: var(--card-shadow);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--r-l);
  background: var(--surface);
  display: grid;
  gap: 1rem;
  align-content: center;
}

.branch__info h3 {
  font-family: var(--f-display);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.2;
}

.branch__addr {
  display: flex;
  gap: 0.7rem;
  color: var(--muted);
}

.branch__addr svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.3em;
  color: var(--accent-ink);
}

.map {
  position: relative;
  min-height: 340px;
  border-radius: var(--r-l);
  overflow: hidden;
  background: radial-gradient(80% 70% at 58% 52%, var(--map-tint), transparent 70%), var(--surface);
  box-shadow: var(--card-shadow);
}

.map__topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map__topo path {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1;
}

.map__topo .grid-l {
  stroke: var(--line);
  stroke-dasharray: 2 6;
}

.map__topo .faint {
  opacity: 0.6;
}

.map__pin {
  position: absolute;
  left: 58%;
  top: 50%;
  width: 0;
  height: 0;
}

.map__dot {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 4px var(--map-dot-ring),
    0 0 30px var(--map-dot-glow);
}

.map__pulse {
  position: absolute;
  left: -40px;
  top: -40px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 2.6s var(--ease) infinite;
}

.map__pulse:nth-child(2) {
  animation-delay: 1.3s;
}

@keyframes ping {
  from {
    transform: scale(0.2);
    opacity: 0.9;
  }

  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

.map__label {
  position: absolute;
  left: 58%;
  top: 50%;
  translate: 18px -120%;
  padding: 0.55rem 0.9rem;
  border-radius: 14px;
  white-space: nowrap;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  font-size: 0.85rem;
}

.map__label b {
  display: block;
  font-family: var(--f-display);
  font-size: 1.15rem;
}

.map__coords {
  position: absolute;
  inset-inline-start: 1.2rem;
  bottom: 1rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.map__open {
  position: absolute;
  inset-inline-end: 1rem;
  bottom: 1rem;
}

/* =====================================================================
   INGREDIENT EXPLORER
   ===================================================================== */
#explorer {
  content-visibility: auto;
  contain-intrinsic-size: auto 1500px;
}

.explorer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(1.8rem, 1.4rem + 1.5vw, 2.6rem);
}

.xchip {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding-inline: 1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--text);
  font-size: 0.9rem;
  transition:
    color 0.3s,
    background-color 0.3s,
    border-color 0.3s,
    transform 0.45s var(--ease);
}

.xchip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.xchip[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.xchip__n {
  display: grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding-inline: 0.4rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  background: var(--count-bg);
}

.xchip[aria-pressed="true"] .xchip__n {
  background: var(--count-on-bg);
}

.explorer__result {
  margin-top: 1.6rem;
  min-height: 1.6em;
  color: var(--muted);
  font-size: 0.92rem;
}

.explorer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

@media (width >= 768px) {
  .explorer__grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.25rem;
  }
}

.mini__btn {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.8rem;
  width: 100%;
  height: 100%;
  padding: 0.65rem 0.65rem 1rem;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: start;
  transition:
    transform 0.6s var(--ease),
    border-color 0.4s,
    box-shadow 0.6s var(--ease);
}

.mini__btn:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--glow) 60%, transparent);
  box-shadow: 0 26px 50px -32px var(--glow);
}

.mini__img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 30%,
    color-mix(in srgb, var(--glow) 28%, var(--surface-2)),
    var(--surface-2)
  );
}

.mini__img img,
.mini__img .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini__text {
  display: grid;
  gap: 0.2rem;
  padding-inline: 0.2rem;
}

.mini__name {
  font-family: var(--f-display);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
}

.mini__cat {
  font-size: 0.76rem;
  color: var(--muted);
}

/* =====================================================================
   PARTNERS BAND (pharmacists & distributors)
   ===================================================================== */
.band {
  position: relative;
  padding-block: clamp(1rem, 0.5rem + 2vw, 3rem);
}

.band__frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.5px;
  border-radius: var(--r-l);
}

/* animated gradient border: a rotating conic layer behind the inner panel (transform only) */
.band__frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: max(115%, 640px);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: conic-gradient(
    from 0deg,
    var(--accent),
    var(--gold) 18%,
    transparent 34%,
    transparent 50%,
    var(--accent) 68%,
    var(--gold) 84%,
    var(--accent)
  );
  animation: spin 10s linear infinite;
  animation-play-state: paused;
}

.band.is-visible .band__frame::before {
  animation-play-state: running;
}

.band__inner {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
  padding: clamp(1.6rem, 1rem + 3vw, 3.4rem);
  border-radius: calc(var(--r-l) - 1.5px);
  background: var(--surface);
}

.band__welcome {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-ink);
}

.band__title {
  font-family: var(--f-display);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.2;
  max-width: 26ch;
}

.band__text {
  color: var(--muted);
  max-width: 62ch;
}

.band__inner .btn {
  margin-top: 0.4rem;
}

@media (width >= 960px) {
  .band__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 3rem;
  }

  .band__inner > * {
    grid-column: 1;
  }

  .band__inner .btn {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0;
  }
}

/* =====================================================================
   MOTION LAYER (intro, cursor, progress, aurora, colour wash, spotlight…)
   Only transform, opacity and clip-path are animated; every loop pauses off-screen.
   ===================================================================== */

/* ---------- top scroll-progress line */
.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: 2px;
  pointer-events: none;
}

.progress__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

[dir="rtl"] .progress__bar {
  transform-origin: 100% 50%;
}

/* ---------- intro (logo preloader, once per session) */
.intro {
  display: none;
}

html.has-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  clip-path: circle(75% at 50% 50%);
}

/* exit: the ring expands while the curtain closes into a circle and reveals the page (clip-path, cheap to animate) */
html.has-intro .intro.is-leaving {
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
  transition: clip-path 0.9s var(--ease-2);
}

.intro__art {
  position: relative;
  display: grid;
  place-items: center;
  width: min(66vw, 300px);
  aspect-ratio: 1;
}

.intro__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  rotate: -90deg;
  transition:
    scale 0.9s var(--ease-2),
    opacity 0.9s ease;
}

.intro__circle {
  fill: none;
  stroke: url("#intro-grad");
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.4s var(--ease-2) 0.1s forwards;
}

.intro__orbit {
  position: absolute;
  inset: 4%;
  animation: spin 2.6s linear infinite;
}

.intro__sphere {
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--sphere-core), var(--sphere-mid) 30%, var(--sphere-edge) 72%);
  box-shadow:
    0 0 12px 3px var(--sphere-glow-1),
    0 0 34px 10px var(--sphere-glow-2);
}

.intro__word {
  width: 60%;
  height: auto;
  overflow: visible;
}

.intro__path {
  fill: url("#intro-grad");
  fill-opacity: 0;
  stroke: url("#intro-grad");
  stroke-width: 1.6;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    draw 1.3s var(--ease-2) 0.2s forwards,
    fill-in 0.6s ease 1.1s forwards;
}

.intro__progress {
  position: absolute;
  inset-inline: 18%;
  bottom: -2.4rem;
  height: 1px;
  overflow: hidden;
  background: var(--line-2);
}

.intro__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease);
}

[dir="rtl"] .intro__bar {
  transform-origin: 100% 50%;
}

.intro__skip {
  position: absolute;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  inset-inline-end: 1.5rem;
  min-height: 44px;
  padding-inline: 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 0.85rem;
  transition:
    color 0.3s,
    border-color 0.3s;
}

.intro__skip:hover {
  color: var(--text);
  border-color: var(--accent);
}

.intro.is-leaving .intro__ring {
  scale: 7;
  opacity: 0;
}

.intro.is-leaving .intro__word,
.intro.is-leaving .intro__orbit,
.intro.is-leaving .intro__progress,
.intro.is-leaving .intro__skip {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* ---------- custom cursor (mouse only; js/fx.js adds .has-cursor) */
.cursor {
  display: none;
}

html.has-cursor .cursor {
  display: block;
}

html.modal-open .cursor {
  display: none;
}

.cursor__dot,
.cursor__halo {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.cursor.is-on .cursor__dot,
.cursor.is-on .cursor__halo {
  opacity: 1;
}

.cursor__dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--gold);
}

.cursor__halo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
}

.cursor__halo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  transition:
    transform 0.5s var(--ease),
    background-color 0.4s,
    border-color 0.4s;
}

.cursor.is-link .cursor__halo::before {
  transform: scale(1.45);
  border-color: var(--accent);
}

.cursor.is-view .cursor__halo::before {
  transform: scale(2.5);
  background: var(--accent);
  border-color: transparent;
}

.cursor.is-down .cursor__halo::before {
  transform: scale(0.8);
}

.cursor.is-view.is-down .cursor__halo::before {
  transform: scale(2.2);
}

.cursor__label {
  position: relative;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--on-accent);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.3s,
    transform 0.5s var(--ease);
}

.cursor.is-view .cursor__label {
  opacity: 1;
  transform: none;
}

.cursor.is-view .cursor__dot {
  opacity: 0;
}

html.has-cursor [data-cursor="view"],
html.has-cursor [data-cursor="view"] * {
  cursor: none;
}

html.has-cursor [data-cursor="view"] .chip--more {
  cursor: pointer;
}

/* ---------- animated underlines (footer links; the header nav has its own) */
.ftr__links a {
  position: relative;
}

.ftr__links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: var(--ul-from, right);
  transition: transform 0.5s var(--ease);
}

[dir="rtl"] .ftr__links a::after {
  --ul-from: left;
}

.ftr__links a:hover::after {
  --ul-from: left;

  transform: scaleX(1);
}

[dir="rtl"] .ftr__links a:hover::after {
  --ul-from: right;
}

/* ---------- theme switch: the new theme opens as a circle (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ---------- theme switch press: the leaf lands on it (or a direct press without the flight) */
[data-theme-toggle] {
  position: relative;
}

[data-theme-toggle].is-pressed {
  animation: toggle-press 240ms var(--ease-reveal);
}

[data-theme-toggle].is-pressed::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 18px var(--focus-glow);
  animation: toggle-glow 240ms ease-out forwards;
}

@keyframes toggle-press {
  40% {
    transform: scale(0.92);
  }
}

@keyframes toggle-glow {
  from {
    opacity: 0.9;
  }

  to {
    opacity: 0;
  }
}

/* ---------- theme switch leaf (js/leaf-fx.js): a click-through layer made for one flight and removed after it;
   above the page and the theme fade, below the intro and the product dialog */
.leaf-fx {
  position: fixed;
  inset: 0;
  z-index: 160;
  overflow: hidden;
  pointer-events: none;
  view-transition-name: leaf-fx; /* its own live layer during the circular reveal, so it is never frozen or cut */
}

.leaf-fx__leaf {
  position: absolute;
  inset: 0 auto auto 0;
  width: var(--leaf-size);
  height: var(--leaf-size);
  overflow: visible;
  opacity: 0;
}

::view-transition-group(leaf-fx),
::view-transition-new(leaf-fx) {
  animation: none;
}

::view-transition-old(leaf-fx) {
  display: none;
}

.leaf-s-tip {
  stop-color: var(--leaf-c);
}

.leaf-s-mid {
  stop-color: var(--leaf-a);
}

.leaf-s-base {
  stop-color: var(--leaf-b);
}

/* ---------- smooth scrolling (Lenis, desktop only) */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* ---------- page aurora (in the fixed background layer), 3D hero rings, gold shine across the wordmark */
.aurora {
  position: absolute;
  inset: -18vh 0; /* taller than the screen, so the scroll drift never shows an edge */
  pointer-events: none;
  transform: translate3d(0, calc(var(--sp, 0) * -16vh), 0);
}

.aurora__blob {
  position: absolute;
  width: 62vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: var(--glow-strength);
  background: radial-gradient(closest-side, var(--aurora-1), transparent 72%);
  animation: drift-a 24s ease-in-out infinite alternate;
  will-change: transform;
}

/* three pools at most (2 and 4 are spare variants); "medium" keeps one, "low" none */
.aurora__blob--2,
.aurora__blob--4 {
  display: none;
}

/* emerald pools lead at the top of the page … */
.aurora__blob--1 {
  left: -22vmax;
  top: -8vmax;
  opacity: calc(var(--glow-strength) * (1 - var(--sp, 0) * 0.5));
}

.aurora__blob--2 {
  right: -24vmax;
  top: 30%;
  background: radial-gradient(closest-side, var(--aurora-2), transparent 72%);
  animation-name: drift-b;
  animation-duration: 28s;
}

/* … olive and gold pools take over further down */
.aurora__blob--3 {
  left: 16%;
  bottom: -14vmax;
  background: radial-gradient(closest-side, var(--aurora-3), transparent 72%);
  opacity: calc(var(--glow-strength) * (0.55 + var(--sp, 0) * 0.6));
  animation-duration: 32s;
  animation-direction: alternate-reverse;
}

.aurora__blob--4 {
  right: 8%;
  top: -18vmax;
  width: 46vmax;
  background: radial-gradient(closest-side, var(--aurora-4), transparent 72%);
  opacity: calc(var(--glow-strength) * (1 - var(--sp, 0) * 0.6));
  animation-name: drift-b;
  animation-duration: 36s;
  animation-direction: alternate-reverse;
}

.aurora__blob--5 {
  right: -12vmax;
  bottom: -10vmax;
  width: 54vmax;
  background: radial-gradient(closest-side, var(--aurora-5), transparent 72%);
  opacity: calc(var(--glow-strength) * (0.35 + var(--sp, 0) * 0.75));
  animation-duration: 30s;
  animation-direction: alternate-reverse;
}

/* light theme: white / olive */

/* phones: three pools are enough */
@media (width < 700px) {
  .aurora__blob--3,
  .aurora__blob--4 {
    display: none;
  }
}

@keyframes drift-a {
  to {
    transform: translate3d(14vmax, 9vmax, 0) scale(1.14);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-12vmax, 8vmax, 0) scale(0.9);
  }
}

.wordmark__shine {
  transform: translateX(0);
}

.hero.is-revealed .wordmark__shine {
  animation: shine 2.4s var(--ease-2) 3.4s 1 both; /* once, after the name has drawn itself */
}

@keyframes shine {
  to {
    transform: translateX(660px);
  }
}

/* ---------- headings: word-by-word mask reveal (js/fx.js wraps each word) */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.14em 0.06em;
  margin: -0.14em -0.06em;
}

.w__i {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--dur-reveal) var(--ease-reveal);
  transition-delay: calc(var(--wi, 0) * 60ms);
}

.is-in .w__i,
.hero.is-revealed .w__i {
  transform: none;
}

.hero .w__i {
  transition-delay: calc(1700ms + var(--wi, 0) * 110ms);
}

/* ---------- About: the paragraph whose words light up while it scrolls past */
.story {
  padding-block: clamp(2.5rem, 1rem + 5vw, 6rem);
}

.story__text {
  max-width: 24ch;
  margin-inline: auto;
  text-align: center;
  font-family: var(--f-display);
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

html[lang="ar"] .story__text {
  max-width: 28ch;
  font-size: var(--step-3);
  line-height: 1.65;
}

@media (width >= 960px) {
  #about {
    content-visibility: visible; /* the story measures its scroll positions here: keep the section laid out */
  }
}

/* pillar icons draw their outlines once visible */
html.has-motion .pillar__icon svg {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.8s var(--ease-2) 0.2s;
}

html.has-motion .pillar.is-drawn .pillar__icon svg {
  stroke-dashoffset: 0;
}

/* ---------- products: colour wash, catalogue width, spotlight */
.products {
  isolation: isolate;
}

.wash {
  position: sticky;
  top: 0;
  z-index: -1;
  height: 100vh;
  margin-bottom: -100vh;
  pointer-events: none;
}

.wash__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(75% 60% at 50% 45%, color-mix(in srgb, var(--wash) 17%, transparent), transparent 76%);
  transition: opacity 0.6s var(--ease);
}

.wash__layer.is-on {
  opacity: var(--glow-strength);
}

.gallery {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

#catalog .card {
  transition:
    transform 0.7s var(--ease),
    box-shadow 0.7s var(--ease),
    opacity 0.6s var(--ease);
}

#catalog.is-spot .card:not(.is-lit, .pre) {
  opacity: 0.62;
}

#catalog.is-spot .card.is-lit {
  transform: translate3d(0, -4px, 0);
  box-shadow: var(--shadow-lg);
}

/* layered halo, glare and ambient ingredient shapes */
.card__glow::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--glow) 40%, transparent);
  transform: scale(0.9);
  opacity: 0.6;
  transition: transform 0.9s var(--ease);
}

.card:hover .card__glow::after {
  transform: scale(1.08);
}

.card__glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, var(--card-glare), transparent 45%);
  transition: opacity 0.4s;
}

.card:hover .card__glare {
  opacity: 1;
}

.decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--glow);
  opacity: 0.55;
}

.decor__i {
  position: absolute;
  height: auto;
  aspect-ratio: 1;
  animation: drift-decor 9s ease-in-out infinite alternate;
  animation-play-state: paused;
}

.card:not(.is-lit) .decor {
  display: none;
}

.card.is-lit .decor__i,
.pd .decor__i {
  animation-play-state: running;
}

.decor__i--1 {
  left: 9%;
  top: 14%;
  width: 11%;
}

.decor__i--2 {
  right: 9%;
  top: 28%;
  width: 8%;
  opacity: 0.75;
  animation-delay: -3s;
}

.decor__i--3 {
  left: 20%;
  bottom: 18%;
  width: 6%;
  opacity: 0.55;
  animation-delay: -6s;
}

@keyframes drift-decor {
  to {
    transform: translate3d(0, -12px, 0) rotate(14deg);
  }
}

/* ingredient chips: bloom in, lift on hover; "+N" expands inline */
.chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--glow, var(--accent)) 60%, transparent);
}

.card__ings .chip {
  animation: chip-bloom 600ms var(--ease-reveal) both;
  animation-delay: calc(var(--ci, 0) * 60ms);
  animation-play-state: paused;
}

.card.is-visible .card__ings .chip {
  animation-play-state: running;
}

.card__more {
  display: contents;
}

.card__more[hidden] {
  display: none;
}

.card__more .chip {
  animation-delay: calc((var(--ci, 4) - 4) * 50ms);
}

.chip--more:hover {
  color: var(--text);
}

@keyframes chip-bloom {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* detail panel: while the photo flies in, the panel only fades (a transform would move the flying copy) */
.pd.pd--flip[open] {
  animation: fade 0.45s ease;
}

.flip-ghost {
  z-index: 95;
  pointer-events: none;
  will-change: transform;
}

/* ---------- journey: drawn path + travelling orb */
.tl__path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.tl__path-base,
.tl__path-draw {
  fill: none;
  stroke-linecap: round;
}

.tl__path-base {
  stroke: var(--line-2);
  stroke-width: 1.5;
}

.tl__path-draw {
  stroke: var(--accent);
  stroke-width: 2;
}

.tl__orb {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 35% 35%, var(--sphere-core), var(--sphere-mid) 30%, var(--sphere-edge) 72%);
  box-shadow:
    0 0 14px 4px var(--sphere-glow-1),
    0 0 40px 12px var(--sphere-glow-3);
  transition: opacity 0.4s;
}

.tl__orb.is-on {
  opacity: 1;
}

/* =====================================================================
   FLOATING CONTACT BUTTON
   ===================================================================== */
.fab {
  position: fixed;
  z-index: 60;
  bottom: max(18px, env(safe-area-inset-bottom));
  inset-inline-end: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

html.js:not(.gate-done) .fab {
  display: none;
}

.fab__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 58px;
  min-width: 58px;
  justify-content: center;
  padding-inline: 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--fab-ink);
  background: linear-gradient(135deg, var(--fab-a), var(--fab-b));
  box-shadow: 0 18px 40px -14px var(--fab-shadow);
}

.fab__btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.5s var(--ease);
}

.fab__btn::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 1.5px solid var(--fab-ring);
  opacity: 0;
  animation: fab-pulse 2.8s ease-out infinite;
  pointer-events: none;
}

.fab.is-open .fab__btn::before {
  animation: none;
}

.fab.is-open .fab__btn .i-chat {
  transform: rotate(-90deg) scale(0.9);
}

.fab__label {
  display: none;
}

@media (width >= 640px) {
  .fab__label {
    display: inline;
  }

  .fab__btn {
    padding-inline: 1.1rem 1.35rem;
  }
}

@keyframes fab-pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.94);
  }

  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

.fab__menu {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
  visibility: hidden;
  transition: visibility 0s 0.4s;
}

.fab.is-open .fab__menu {
  visibility: visible;
  transition-delay: 0s;
}

.fab__item {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition:
    opacity 0.35s ease,
    transform 0.5s var(--ease);
  transition-delay: calc((3 - var(--i)) * 35ms);
}

.fab.is-open .fab__item {
  opacity: 1;
  transform: none;
  transition-delay: calc((3 - var(--i)) * 45ms);
}

.fab__link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  height: 48px;
  padding-inline: 1rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 30px -18px var(--fab-link-shadow);
  transition: border-color 0.3s;
}

.fab__link:hover {
  border-color: var(--accent);
}

.fab__link svg {
  width: 20px;
  height: 20px;
  color: var(--accent-ink);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.ftr {
  position: relative;
  padding-block: clamp(3rem, 2rem + 3vw, 5rem) 6.5rem;
}

.ftr::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  height: 1px;
  translate: -50% 0;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

.ftr__top {
  display: grid;
  gap: 2.2rem;
}

@media (width >= 900px) {
  .ftr__top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.ftr__logo {
  width: 120px;
  color: var(--text);
}

.ftr__links--spaced {
  margin-top: 1rem;
}

.ftr__tag {
  color: var(--muted);
  margin-top: 0.6rem;
  max-width: 42ch;
}

.ftr__h {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-ink);
  margin-bottom: 0.8rem;
}

.ftr__h:lang(en) {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.ftr__links {
  display: grid;
  gap: 0.5rem;
}

.ftr__links a,
.ftr__links button {
  color: var(--muted);
  transition: color 0.3s;
  text-align: start;
}

.ftr__links a:hover,
.ftr__links button:hover {
  color: var(--text);
}

.ftr__tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fx-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.8rem;
}

.fx-switch__label {
  padding-inline: 0.6rem 0.3rem;
  color: var(--muted);
}

.fx-switch__btn {
  min-height: 36px;
  padding-inline: 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  transition:
    color 0.3s,
    background-color 0.3s;
}

.fx-switch__btn[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--accent);
}

.ftr__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.disclaimer {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.disclaimer svg {
  width: 16px;
  height: 16px;
  color: var(--gold-ink);
}

.linkish {
  position: relative;
  display: inline-block;
  color: var(--text);
  background: linear-gradient(var(--line-2), var(--line-2)) left bottom / 100% 1px no-repeat;
}

.linkish::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: var(--ul-from, right);
  transition: transform 0.5s var(--ease-reveal);
}

[dir="rtl"] .linkish::after {
  --ul-from: left;
}

.linkish:hover::after {
  --ul-from: left;

  transform: scaleX(1);
}

[dir="rtl"] .linkish:hover::after {
  --ul-from: right;
}

/* reveal: hidden until the section scrolls into view (js/app.js animates it in) */
.pre-reveal {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, var(--rise), 0);
}

.pre-reveal--side {
  transform: translate3d(var(--tl-x, 0), var(--tl-y, var(--rise)), 0);
}

.pre-reveal.is-revealed {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity var(--dur-reveal) var(--ease-reveal),
    transform var(--dur-reveal) var(--ease-reveal);
  transition-delay: calc(var(--rd, 0) * 75ms);
}

html[data-quality="low"] .pre-reveal {
  transform: none;
}

/* =====================================================================
   EFFECTS LEVELS (data-quality on <html>, set by js/quality.js)
   high: everything (capped). medium: lighter. low: still and cheap, same look.
   ===================================================================== */
html[data-quality="medium"] .aurora__blob:not(.aurora__blob--1),
html[data-quality="medium"] .card__glare,
html[data-quality="medium"] .decor,
html[data-quality="medium"] .card__bloom,
html[data-quality="medium"] .card__glow::after,
html[data-quality="low"] .aurora,
html[data-quality="low"] .particles,
html[data-quality="low"] .card__glare,
html[data-quality="low"] .card__shine,
html[data-quality="low"] .decor,
html[data-quality="low"] .card__bloom,
html[data-quality="low"] .card__glow::after,
html[data-quality="low"] .wordmark__shine,
html[data-quality="low"] body::after {
  display: none;
}

/* no backdrop blur below "high" */
html:not([data-quality="high"]) .hdr.is-scrolled,
html:not([data-quality="high"]) .mnav {
  background: var(--glass-2);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* "low": nothing loops */
html[data-quality="low"] .hero-orbit__glow,
html[data-quality="low"] .card__float,
html[data-quality="low"] .band__frame::before,
html[data-quality="low"] .map__pulse,
html[data-quality="low"] .cue__line::after,
html[data-quality="low"] .fab__btn::before {
  animation: none;
}

/* "low" still turns the hero rings (never a frozen hero), just much more slowly */
html[data-quality="low"] .ring--outer {
  animation-duration: 160s;
}

html[data-quality="low"] .ring--dots {
  animation-duration: 320s;
}

html[data-quality="low"] .ring--inner {
  animation-duration: 120s;
}

html[data-quality="low"] .orbit {
  animation-duration: 40s;
}

html[data-quality="low"] .card:hover {
  transform: none;
}

/* =====================================================================
   MOTION PREFERENCES
   ===================================================================== */
@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;
    transition-delay: 0s !important;
  }

  .particles,
  .orbit,
  .card__bloom,
  .map__pulse,
  .intro,
  .cursor,
  .decor,
  .tl__orb {
    display: none !important;
  }

  .aurora__blob,
  .band__frame::before {
    animation: none !important;
  }

  /* the rings stay still, sized and centred as usual; they only fade in */
  .hero-orbit {
    animation-duration: 1.2s !important;
  }

  /* the marquee becomes a static, wrapped line (no scrollable strip that keyboards cannot reach) */
  .marquee__track {
    width: auto;
    transform: none !important;
  }

  .marquee__group {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.8rem;
    padding-inline: var(--gutter);
  }

  .marquee__group + .marquee__group {
    display: none;
  }
}

html.reduce-motion .particles,
html.reduce-motion .orbit {
  display: none;
}
