/* Rosemarine Garden — v2
   One stylesheet, organised top-down: tokens → base → components → sections → dialogs → motion → responsive. */

@font-face { font-family: Thmanyah; src: local('thmanyah sans Regular'), local('thmanyahsans-Regular'); font-weight: 100 499; font-display: swap; }
@font-face { font-family: Thmanyah; src: local('thmanyah sans Medium'), local('thmanyahsans-Medium'); font-weight: 500 599; font-display: swap; }
@font-face { font-family: Thmanyah; src: local('thmanyah sans Bold'), local('thmanyahsans-Bold'); font-weight: 600 900; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --sand: #f3efe7;
  --sand-2: #e9e3d7;
  --sand-3: #dcd4c4;
  --ink: #121a1b;
  --ink-2: #384341;
  --muted: #5d6764;
  --marine: #0c191b;
  --marine-2: #132427;
  --marine-3: #1d3337;
  --foam: #eef0ea;
  --foam-muted: #a9b4b0;
  /* Rosemary sea-glass: the grey-green of rosemary and of the Marmara. */
  --accent: #93c2b4;      /* on marine: 9.1:1 */
  --accent-soft: #c9e2d9;
  --accent-deep: #2e6b5e; /* text on sand: 5.4:1 */
  --line-l: rgba(18, 26, 27, .14);
  --line-d: rgba(238, 240, 234, .16);

  --sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  --pad: clamp(20px, 4.2vw, 72px);
  --nav-h: 76px;
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}
html[lang=ar] { --sans: Thmanyah, 'IBM Plex Sans Arabic', 'Geist', system-ui, sans-serif; --serif: var(--sans); }
html[lang=zh] { --sans: 'Geist', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif; --serif: 'Instrument Serif', 'Songti SC', 'Noto Serif SC', serif; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 400; }
em { font-style: normal; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; border-radius: 4px; }
[data-theme=dark] :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; z-index: 400; top: -100px; inset-inline-start: 16px; padding: 12px 18px; background: var(--foam); color: var(--ink); border-radius: 999px; }
.skip:focus { top: 16px; }

.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html[dir=rtl] .i-dir { transform: scaleX(-1); }
html[dir=rtl] .hero-veil { transform: scaleX(-1); }

/* Film grain keeps large flat areas from feeling digital. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type ---------- */
.eyebrow, .kicker { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.kicker { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.kicker-num { color: var(--accent); font-variant-numeric: tabular-nums; }
[data-theme=light] .kicker-num, [data-theme=light] .step-meta span:first-child { color: var(--accent-deep); }
.kicker-num::after { content: ''; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-inline-start: 14px; opacity: .6; }
[data-theme=dark] .kicker { color: var(--foam-muted); }
h2 { font-size: clamp(40px, 5.4vw, 92px); line-height: 1; letter-spacing: -.04em; }
h2 em, h1 .accent, .manifesto-text em { font-family: var(--serif); font-style: italic; letter-spacing: -.01em; }
html[lang=ar] h1, html[lang=ar] h2, html[lang=ar] h3 { letter-spacing: 0; line-height: 1.25; }
html[lang=ar] .eyebrow, html[lang=ar] .kicker { letter-spacing: 0; }
html[lang=ar] h2 em, html[lang=ar] h1 .accent, html[lang=ar] .manifesto-text em,
html[lang=zh] h2 em, html[lang=zh] h1 .accent, html[lang=zh] .manifesto-text em { font-style: normal; opacity: .62; }
.footnote { font-size: 12px; line-height: 1.6; color: var(--muted); max-width: 820px; }
[data-theme=dark] .footnote { color: var(--foam-muted); }

/* ---------- Components ---------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .5s var(--ease), border-color .5s, transform .5s var(--ease);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: none; }
.btn .i { transition: transform .5s var(--ease); }
.btn:hover .i { transform: translate(2px, -2px); }
html[dir=rtl] .btn:hover .i-dir { transform: scaleX(-1) translate(2px, -2px); }
.btn-light { background: var(--foam); color: var(--ink); }
.btn-light::before { background: var(--accent); }
.btn-dark { background: var(--ink); color: var(--sand); }
.btn-dark::before { background: var(--marine-3); }
.btn-ghost { border: 1px solid rgba(238, 240, 234, .45); color: var(--foam); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost::before { background: var(--foam); }
.btn-ghost:hover { color: var(--ink); border-color: var(--foam); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: auto; min-height: 76px; padding: 14px 30px 14px 36px; gap: 28px; font-size: 18px; text-align: start; }
.btn-lg small { display: block; font-size: 12px; font-weight: 400; opacity: .6; margin-top: 2px; }
.btn-block { width: 100%; justify-content: space-between; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
  transition: background-size .6s var(--ease);
}
html[dir=rtl] .link-arrow { background-position: 100% 100%; }
.link-arrow:hover { background-size: 0 1px; background-position: 100% 100%; }
html[dir=rtl] .link-arrow:hover { background-position: 0 100%; }
.link-arrow .i { transition: transform .5s var(--ease); }
.link-arrow:hover .i { transform: translate(3px, -3px); }
html[dir=rtl] .link-arrow:hover .i-dir { transform: scaleX(-1) translate(3px, -3px); }
.link-sm { font-size: 13px; }

.icon-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; opacity: .85; transition: transform .5s var(--ease), opacity .3s, background .3s; }
.icon-btn:hover { transform: rotate(90deg); opacity: 1; }

.pulse { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
[data-theme=light] .pulse { background: var(--accent-deep); }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 2.2s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }

/* Segmented control with sliding indicator */
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--sand-2); }
.seg button { position: relative; z-index: 1; padding: 10px 20px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--muted); transition: color .45s var(--ease); }
.seg button[aria-pressed=true] { color: var(--sand); }
.seg-ind { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--ink); transform: translateX(var(--x, 4px)); width: var(--w, 0); transition: transform .6s var(--ease), width .6s var(--ease); }
.seg-dark { background: rgba(238, 240, 234, .1); }
.seg-dark button { color: var(--foam-muted); }
.seg-dark button[aria-pressed=true] { color: var(--ink); }
.seg-dark .seg-ind { background: var(--foam); }
.seg-sm button { padding: 7px 13px; font-size: 13px; }

/* ---------- Loader ---------- */
.loader { display: none; }
html.intro .loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--marine);
  color: var(--foam);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-io);
}
html.intro.intro-out .loader { clip-path: inset(0 0 100% 0); }
.loader-inner { display: grid; justify-items: center; gap: 26px; }
.loader-mark { width: 54px; height: 60px; fill: none; stroke: var(--foam); stroke-width: 1.2; }
.loader-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s .1s var(--ease-io) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.loader-word { display: flex; overflow: hidden; font-size: clamp(28px, 4vw, 48px); font-weight: 500; letter-spacing: .02em; }
.loader-word span { display: block; transform: translateY(110%); animation: rise .9s var(--ease) forwards; }
.loader-word span:nth-child(1) { animation-delay: .35s; } .loader-word span:nth-child(2) { animation-delay: .39s; }
.loader-word span:nth-child(3) { animation-delay: .43s; } .loader-word span:nth-child(4) { animation-delay: .47s; }
.loader-word span:nth-child(5) { animation-delay: .51s; } .loader-word span:nth-child(6) { animation-delay: .55s; }
.loader-word span:nth-child(7) { animation-delay: .59s; } .loader-word span:nth-child(8) { animation-delay: .63s; }
.loader-word span:nth-child(9) { animation-delay: .67s; } .loader-word span:nth-child(10) { animation-delay: .71s; }
@keyframes rise { to { transform: none; } }
.loader-foot { position: absolute; bottom: 28px; inset-inline: var(--pad); display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .14em; color: var(--foam-muted); }
.loader-count { font-variant-numeric: tabular-nums; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  z-index: 100;
  top: 0;
  inset-inline: 0;
  height: var(--nav-h);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  color: var(--foam);
  transition: transform .7s var(--ease), color .5s;
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(12, 25, 27, .62);
  border-bottom: 1px solid var(--line-d);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  opacity: 0;
  transition: opacity .6s var(--ease), background-color .5s, border-color .5s;
}
.nav.is-scrolled::before { opacity: 1; }
.nav[data-theme=light]::before { background: rgba(243, 239, 231, .74); border-color: var(--line-l); }
.nav .brand { grid-column: 1; justify-self: start; }
.nav-links { grid-column: 2; }
.nav-end { grid-column: 3; justify-self: end; }
.nav.is-hidden { transform: translateY(-100%); }
.nav[data-theme=light] { color: var(--ink); }
.nav[data-theme=light] .btn-light { background: var(--ink); color: var(--sand); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 24px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .8s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) translateY(-2px); }
.brand-word { font-size: 15px; font-weight: 500; letter-spacing: .06em; line-height: 1.15; direction: ltr; }
.brand-word small { display: block; font-size: 9px; letter-spacing: .5em; opacity: .75; }
.nav-links { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(238, 240, 234, .08); border: 1px solid var(--line-d); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav[data-theme=light] .nav-links { background: rgba(18, 26, 27, .04); border-color: var(--line-l); }
.nav-links a { position: relative; padding: 8px 16px; border-radius: 999px; font-size: 14px; transition: background .4s, color .4s; }
.nav-links a:hover, .nav-links a[aria-current=true] { background: var(--foam); color: var(--ink); }
.nav[data-theme=light] .nav-links a:hover, .nav[data-theme=light] .nav-links a[aria-current=true] { background: var(--ink); color: var(--sand); }
.nav-end { display: flex; align-items: center; gap: 18px; }
.nav-lang { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; padding: 8px 0; }
.nav-menu { display: none; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.nav-menu i { position: relative; width: 22px; height: 8px; border-block: 1.5px solid currentColor; }
.progress { position: fixed; z-index: 101; top: 0; inset-inline: 0; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
html[dir=rtl] .progress i { transform-origin: right; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; color: var(--foam); background: var(--marine); }
.hero-media { position: absolute; inset: -2%; will-change: transform; transform: translate3d(0, 0, 0); }
.hero-shade { position: absolute; inset: 0; z-index: 1; background: var(--marine); opacity: 0; pointer-events: none; will-change: opacity; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; will-change: transform, opacity; transition: opacity 1.6s var(--ease); }
.hero-img.is-leaving { opacity: 0; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 14, 15, .5), rgba(6, 14, 15, 0) 55%), linear-gradient(180deg, rgba(6, 14, 15, .55) 0%, rgba(6, 14, 15, 0) 26%, rgba(6, 14, 15, 0) 44%, rgba(6, 14, 15, .55) 72%, rgba(6, 14, 15, .86) 100%); }
.hero-inner { position: absolute; z-index: 2; inset-inline-start: var(--pad); bottom: clamp(32px, 7vh, 80px); width: min(860px, calc(100% - 2 * var(--pad))); }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 12px; color: rgba(238, 240, 234, .85); }
.hero-eyebrow { gap: 10px 16px; flex-wrap: wrap; }
.hero-florya { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 11px; border-radius: 999px; background: rgba(10, 22, 24, .38); border: 1px solid rgba(238, 240, 234, .28); color: var(--foam); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero-florya .mq-star { width: 12px; height: 12px; }
.hero-title { margin-top: 22px; font-size: clamp(54px, 8.2vw, 144px); line-height: .95; letter-spacing: -.045em; font-weight: 400; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.hero-title .line > span { display: block; }
.hero-title .accent { font-size: 1.08em; letter-spacing: -.02em; }
html[lang=ar] .hero-title { line-height: 1.2; }
.hero-foot { display: flex; align-items: flex-end; justify-content: flex-start; gap: 32px 48px; margin-top: 34px; flex-wrap: wrap; }
.hero-sub { font-size: 17px; line-height: 1.55; max-width: 320px; color: rgba(238, 240, 234, .85); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.live-card {
  position: absolute;
  z-index: 2;
  inset-inline-end: var(--pad);
  bottom: clamp(32px, 7vh, 80px);
  width: 320px;
  padding: 18px 20px 16px;
  border-radius: 20px;
  background: rgba(10, 22, 24, .34);
  border: 1px solid rgba(238, 240, 234, .2);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}
.live-top { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(238, 240, 234, .85); }
html[lang=ar] .live-top { letter-spacing: 0; }
.live-time { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; }
.live-clock { font-size: 46px; font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; }
.live-clock .colon { animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.live-phase { max-width: 58%; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.05; text-align: end; color: var(--accent-soft); }
html[lang=ar] .live-phase, html[lang=zh] .live-phase { font-style: normal; font-size: 18px; }
.sky { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.sky-arc { fill: none; stroke: rgba(238, 240, 234, .28); stroke-width: 1; stroke-dasharray: 3 4; }
.sky-arc-done { fill: none; stroke: var(--accent-soft); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.sky-horizon { stroke: rgba(238, 240, 234, .35); stroke-width: 1; }
.sky-sun { fill: #f6d7a7; transition: cx 1.6s var(--ease), cy 1.6s var(--ease), fill .6s; }
.sky-glow { fill: #f6d7a7; opacity: .25; animation: glow 3s ease-in-out infinite; transition: cx 1.6s var(--ease), cy 1.6s var(--ease); }
@keyframes glow { 50% { opacity: .08; } }
.is-night .sky-sun { fill: #dfe6ee; }
.is-night .sky-glow { fill: #dfe6ee; }
.sky-moon { fill: #e3e8ee; opacity: 0; transition: opacity .4s; }
.live-ends { display: flex; justify-content: space-between; font-size: 12px; color: rgba(238, 240, 234, .7); margin-top: 4px; }
.live-ends b { font-weight: 500; color: var(--foam); font-variant-numeric: tabular-nums; }
.live-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(238, 240, 234, .14); font-size: 11.5px; line-height: 1.5; color: rgba(238, 240, 234, .62); }


/* ---------- Marquee ---------- */
.marquee { position: relative; overflow: hidden; padding: 26px 0; background: var(--sand); border-bottom: 1px solid var(--line-l); }
.marquee-track { display: flex; width: max-content; align-items: center; will-change: transform; direction: ltr; }
.marquee-item { display: inline-flex; align-items: center; gap: 44px; padding-inline-end: 44px; font-size: clamp(30px, 4.6vw, 72px); letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; }
.marquee-item:nth-child(even) .mq-text { font-family: var(--serif); font-style: italic; letter-spacing: -.01em; }
.mq-star { width: .42em; height: .42em; fill: var(--accent-deep); animation: spin 9s linear infinite; }
.hero-florya .mq-star { fill: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Manifesto ---------- */
.manifesto { position: relative; padding: clamp(110px, 17vh, 210px) var(--pad) clamp(90px, 14vh, 170px); overflow: hidden; }
.manifesto-text { position: relative; z-index: 2; margin-top: 48px; max-width: min(1080px, 66%); font-size: clamp(30px, 3.9vw, 64px); line-height: 1.13; letter-spacing: -.032em; }
html[lang=ar] .manifesto-text { line-height: 1.45; letter-spacing: 0; }
.manifesto-text .w { transition: opacity .6s var(--ease), color .6s; }
html.motion .manifesto-text .w { opacity: .14; }
html.motion .manifesto-text .w.on { opacity: 1; }
.manifesto-text .hl .w { color: var(--ink); }
.manifesto-aside { position: relative; z-index: 2; max-width: min(1080px, 66%); margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line-l); display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.manifesto-aside p { max-width: 440px; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.floats { position: absolute; inset: 0; pointer-events: none; }
.float { position: absolute; overflow: hidden; border-radius: 18px; box-shadow: 0 30px 70px rgba(18, 26, 27, .18); transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg)); will-change: transform; }
.float img { width: 100%; height: 100%; object-fit: cover; }
.f1 { width: clamp(150px, 15vw, 250px); aspect-ratio: 4 / 5; top: 13%; inset-inline-end: 5%; --rot: 3deg; }
.f2 { width: clamp(130px, 12vw, 200px); aspect-ratio: 1; top: 47%; inset-inline-end: 21%; --rot: -4deg; }
.f3 { width: clamp(120px, 11vw, 190px); aspect-ratio: 3 / 4; bottom: 9%; inset-inline-end: 7%; --rot: 2deg; }

/* ---------- Section heads ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-bottom: clamp(44px, 7vh, 80px); }
.sec-head h2 { margin-top: 26px; }
.sec-sub { max-width: 360px; font-size: 17px; line-height: 1.55; color: var(--muted); }
[data-theme=dark] .sec-sub { color: var(--foam-muted); }
.sec-side { display: grid; gap: 26px; justify-items: start; }

/* ---------- Residences ---------- */
.residences { position: relative; background: var(--marine); color: var(--foam); padding: clamp(100px, 15vh, 170px) var(--pad) clamp(70px, 10vh, 120px); }
.panels { display: flex; gap: 12px; height: min(80svh, 780px); min-height: 560px; }
.panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--marine-2);
  transition: flex-grow 1s var(--ease);
}
.panel.is-active { flex-grow: 3.1; }
.panel-media { position: absolute; inset: 0; }
.panel-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity 1.2s var(--ease), transform 7s linear; }
.panel-media img.on { opacity: 1; transform: scale(1); }
.panel::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(6, 14, 15, .4) 0%, rgba(6, 14, 15, 0) 16%, rgba(6, 14, 15, .18) 34%, rgba(6, 14, 15, .82) 68%, rgba(6, 14, 15, .9) 100%), linear-gradient(90deg, rgba(6, 14, 15, .45), rgba(6, 14, 15, 0) 62%); }
html[dir=rtl] .panel::after { background: linear-gradient(180deg, rgba(6, 14, 15, .4) 0%, rgba(6, 14, 15, 0) 16%, rgba(6, 14, 15, .18) 34%, rgba(6, 14, 15, .82) 68%, rgba(6, 14, 15, .9) 100%), linear-gradient(270deg, rgba(6, 14, 15, .45), rgba(6, 14, 15, 0) 62%); }
.panel-media::after { content: ''; position: absolute; inset: 0; background: rgba(6, 14, 15, .38); transition: opacity .9s var(--ease); }
.panel.is-active .panel-media::after { opacity: 0; }
.panel-bars { position: absolute; z-index: 3; top: 20px; inset-inline: 20px; display: flex; gap: 6px; opacity: 0; transition: opacity .6s; }
.panel.is-active .panel-bars { opacity: 1; }
.panel-bars i { flex: 1; height: 2px; border-radius: 2px; background: rgba(238, 240, 234, .25); overflow: hidden; }
.panel-bars i::after { content: ''; display: block; height: 100%; background: var(--foam); transform: scaleX(0); transform-origin: left; }
html[dir=rtl] .panel-bars i::after { transform-origin: right; }
.panel-bars i.done::after { transform: scaleX(1); }
.panel-bars i.run::after { transform: scaleX(1); transition: transform var(--dur, 3.6s) linear; }
.panel-hit { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.panel.is-active .panel-hit { pointer-events: none; }
.panel-content { position: absolute; z-index: 3; inset-inline: 0; bottom: 0; padding: clamp(20px, 2.4vw, 34px); pointer-events: none; }
.panel-content button, .panel-content a { pointer-events: auto; }
.panel-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.panel-num { font-size: clamp(56px, 6.4vw, 112px); font-weight: 300; letter-spacing: -.065em; line-height: .85; }
.panel-tag { font-size: 14px; line-height: 1.4; color: rgba(238, 240, 234, .8); max-width: 220px; }
.panel-detail { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .9s var(--ease), opacity .5s; }
.panel.is-active .panel-detail { grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .9s var(--ease), opacity .8s .25s; }
.panel-detail > div { overflow: hidden; min-height: 0; }
.panel-detail-inner { width: min(620px, 52vw); padding-top: 26px; }
.panel-detail h3 { font-size: clamp(28px, 2.7vw, 44px); line-height: 1.04; letter-spacing: -.035em; }
.panel-detail p { margin-top: 14px; max-width: 470px; font-size: 15.5px; line-height: 1.55; color: rgba(238, 240, 234, .78); }
.stats { display: flex; gap: clamp(20px, 3vw, 44px); margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(238, 240, 234, .18); }
.stats dt { font-size: 12px; color: rgba(238, 240, 234, .62); }
.stats dd { font-size: 22px; letter-spacing: -.02em; margin-top: 2px; }
.range { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 11px; color: rgba(238, 240, 234, .55); direction: ltr; }
.range-track { position: relative; flex: 1; height: 3px; border-radius: 3px; background: rgba(238, 240, 234, .15); }
.range-track i { position: absolute; top: -1px; bottom: -1px; left: var(--from); width: calc(var(--to) - var(--from)); min-width: 6px; border-radius: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1.2s .45s var(--ease); }
.panel.is-active .range-track i { transform: scaleX(1); }
.panel-actions { display: flex; align-items: center; gap: 24px; margin-top: 26px; flex-wrap: wrap; }
.residences .footnote { margin-top: 28px; }

/* ---------- Story ---------- */
.story { position: relative; padding: clamp(100px, 15vh, 170px) var(--pad) 0; }
.story-body { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: clamp(36px, 6vw, 110px); }
.story-sticky { position: sticky; top: 12svh; height: 76svh; align-self: start; }
.story-frame { position: relative; height: 100%; overflow: hidden; border-radius: var(--radius); background: var(--sand-3); cursor: pointer; }
.story-img { position: absolute; inset: 0; clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease-io); }
.story-img.on { clip-path: inset(0 0 0 0); }
.story-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform 1.8s var(--ease); }
.story-img.on img { transform: scale(1); }
.story-chip { position: absolute; z-index: 2; bottom: 18px; inset-inline-start: 18px; display: inline-flex; align-items: center; gap: 12px; padding: 9px 16px; border-radius: 999px; background: rgba(10, 22, 24, .4); color: var(--foam); font-size: 13px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); pointer-events: none; }
.story-chip span:first-child { font-variant-numeric: tabular-nums; opacity: .75; }
.story-rail { position: absolute; top: 0; bottom: 0; inset-inline-end: -22px; width: 2px; border-radius: 2px; background: var(--line-l); }
.story-rail i { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: top; transform: scaleY(var(--p, .25)); transition: transform .9s var(--ease); }
.step { min-height: 76svh; display: flex; flex-direction: column; justify-content: center; padding-block: 8svh; opacity: .22; transition: opacity .7s var(--ease); }
.step.on { opacity: 1; }
.step-img { display: none; }
.step-meta { display: flex; gap: 16px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang=ar] .step-meta { letter-spacing: 0; }
.step-meta span:first-child { color: var(--accent); font-variant-numeric: tabular-nums; }
.step h3 { margin-top: 20px; font-size: clamp(34px, 3.6vw, 60px); line-height: 1.02; letter-spacing: -.04em; }
.step p { margin-top: 18px; max-width: 420px; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.step .link-arrow { margin-top: 26px; align-self: flex-start; }

.film { margin-top: clamp(60px, 10vh, 120px); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); margin-inline: calc(-1 * var(--pad)); }
.film-track { display: flex; gap: 12px; width: max-content; direction: ltr; animation: film var(--dur, 120s) linear infinite; }
.film:hover .film-track { animation-play-state: paused; }
@keyframes film { to { transform: translateX(-50%); } }
.film-item { position: relative; height: clamp(120px, 15vw, 190px); aspect-ratio: var(--ar, 4 / 3); overflow: hidden; border-radius: 14px; background: var(--sand-3); transition: transform .6s var(--ease); }
.film-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.film-item span { position: absolute; inset-inline-start: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(10, 22, 24, .55); color: var(--foam); font-size: 12px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--ease); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.film-item:hover { transform: translateY(-6px); }
.film-item:hover img { transform: scale(1.06); }
.film-item:hover span, .film-item:focus-visible span { opacity: 1; transform: none; }

.gallery-cta { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: clamp(56px, 9vh, 100px) 0 clamp(100px, 15vh, 170px); }
.gallery-cta .eyebrow { color: var(--muted); }
.gallery-cta h3 { margin-top: 16px; font-size: clamp(34px, 3.8vw, 62px); line-height: 1.02; letter-spacing: -.04em; }
.gallery-cta p { margin-top: 14px; max-width: 470px; font-size: 17px; color: var(--ink-2); }

/* ---------- Light ---------- */
.light { position: relative; background: var(--marine); color: var(--foam); }
.light-pin { position: relative; height: 380svh; }
.light-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.light-frames { position: absolute; inset: 0; z-index: 0; }
.light-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; will-change: opacity; }
.light-veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6, 14, 15, .72) 0%, rgba(6, 14, 15, 0) 34%, rgba(6, 14, 15, 0) 52%, rgba(6, 14, 15, .7) 100%); }
.light-ghost { position: absolute; z-index: 1; inset-inline-end: calc(var(--pad) - .04em); bottom: -0.12em; font-size: clamp(110px, 19vw, 340px); font-weight: 200; letter-spacing: -.07em; line-height: 1; color: rgba(238, 240, 234, .16); font-variant-numeric: tabular-nums; direction: ltr; pointer-events: none; }
.light-head { position: absolute; z-index: 2; top: calc(var(--nav-h) + 3vh); inset-inline: var(--pad); display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.light-head h2 { margin-top: 22px; font-size: clamp(40px, 4.8vw, 80px); }
.light-copy { font-size: 16px; line-height: 1.55; color: rgba(238, 240, 234, .82); margin-top: 6px; }
.light-hud {
  position: absolute;
  z-index: 3;
  inset-inline-start: var(--pad);
  bottom: clamp(20px, 4.5vh, 48px);
  width: min(500px, calc(100% - 2 * var(--pad)));
  padding: 20px 22px 16px;
  border-radius: 22px;
  background: rgba(10, 22, 24, .42);
  border: 1px solid rgba(238, 240, 234, .2);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}
.hud-top { display: flex; align-items: center; gap: 14px; }
.hud-play { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--foam); color: var(--ink); transition: transform .5s var(--ease), background .4s; }
.hud-play:hover { transform: scale(1.08); background: var(--accent-soft); }
.hud-play .i { width: 16px; height: 16px; }
.hud-time { display: grid; line-height: 1.05; margin-inline-end: auto; }
.hud-time time { font-size: 34px; font-weight: 300; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hud-time span { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--accent-soft); }
html[lang=ar] .hud-time span, html[lang=zh] .hud-time span { font-style: normal; font-size: 14px; }
.hud-sky { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.hud-range { display: block; padding: 10px 0 4px; }
#timeSlider { --progress: 0%; direction: ltr; display: block; width: 100%; height: 3px; margin: 0; -webkit-appearance: none; appearance: none; border-radius: 3px; background: linear-gradient(90deg, var(--foam) var(--progress), rgba(238, 240, 234, .22) var(--progress)); cursor: ew-resize; touch-action: pan-y; }
#timeSlider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--foam); box-shadow: 0 0 0 6px rgba(238, 240, 234, .14), 0 3px 12px rgba(0, 0, 0, .3); }
#timeSlider::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--foam); box-shadow: 0 0 0 6px rgba(238, 240, 234, .14); }
.hud-marks { display: flex; justify-content: space-between; margin-top: 6px; }
.hud-marks button { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .55; padding: 4px 0; transition: opacity .3s; }
.hud-marks button[aria-pressed=true], .hud-marks button:hover { opacity: 1; }
.hud-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(238, 240, 234, .14); }
.hud-hint { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(238, 240, 234, .7); }
.hud-foot .link-arrow { white-space: nowrap; flex-shrink: 0; }
.hud-hint { min-width: 0; line-height: 1.35; }
.hud-hint i { position: relative; width: 14px; height: 22px; border: 1.5px solid currentColor; border-radius: 8px; flex-shrink: 0; }
.hud-hint i::after { content: ''; position: absolute; left: 50%; top: 4px; width: 2px; height: 5px; margin-left: -1px; border-radius: 2px; background: currentColor; animation: wheel 1.8s var(--ease-io) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(7px); opacity: 0; } 100% { opacity: 0; } }
.light-aside { max-width: 320px; }
.light-note { margin-top: 14px; font-size: 11.5px; line-height: 1.5; color: rgba(238, 240, 234, .6); }

/* ---------- Setting ---------- */
.setting { position: relative; padding-top: clamp(40px, 8vh, 100px); }
.setting-media {
  --k: 1;
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: var(--foam);
  clip-path: inset(calc(var(--k) * 7%) calc(var(--k) * 9%) round calc(var(--k) * 36px));
}
.setting-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1 + var(--k) * .16)); }
.setting-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 14, 15, 0) 40%, rgba(6, 14, 15, .7)); }
.setting-overlay { position: absolute; z-index: 2; inset-inline: var(--pad); bottom: clamp(36px, 8vh, 90px); }
.setting-overlay .kicker { color: rgba(238, 240, 234, .85); }
.setting-overlay .kicker-num { color: var(--accent-soft); }
.setting-overlay h2 { margin-top: 22px; font-size: clamp(48px, 7.4vw, 128px); line-height: .98; }
.setting-label { position: absolute; z-index: 2; inset-inline-end: var(--pad); bottom: 20px; font-size: 11px; color: rgba(238, 240, 234, .7); }
.setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); padding: clamp(80px, 12vh, 140px) var(--pad) clamp(100px, 15vh, 170px); }
.setting-lead { margin-bottom: 18px; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2vw, 28px); line-height: 1.3; color: var(--accent-deep); }
html[lang=ar] .setting-lead, html[lang=zh] .setting-lead { font-style: normal; font-size: 19px; }
.setting-copy { font-size: clamp(22px, 2vw, 30px); line-height: 1.35; letter-spacing: -.02em; max-width: 560px; }
.setting-links { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 36px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-content: start; }
.fact { padding: 22px 0 26px; border-top: 1px solid var(--line-l); }
.fact strong { display: flex; align-items: center; gap: 10px; font-size: clamp(44px, 4.4vw, 72px); font-weight: 300; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.fact strong small { font-size: .32em; letter-spacing: 0; align-self: flex-start; margin-top: .3em; }
.fact > span { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); }
.fact-live { grid-column: 1 / -1; }
.fact-live strong { gap: 16px; }
.fact-live strong .pulse { width: 10px; height: 10px; }
.fact-sep { font-weight: 200; opacity: .35; }
.facts .footnote { grid-column: 1 / -1; margin-top: 18px; }

/* ---------- Closing ---------- */
.closing { position: relative; height: 100svh; min-height: 620px; overflow: hidden; color: var(--foam); background: var(--marine); }
.closing-media { position: absolute; inset: -12% 0; will-change: transform; }
.closing-media img { width: 100%; height: 100%; object-fit: cover; }
.closing::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(6, 14, 15, .35), rgba(6, 14, 15, .15) 40%, rgba(6, 14, 15, .6)); }
.closing-shimmer { position: absolute; inset: 0; z-index: 1; mix-blend-mode: soft-light; background: radial-gradient(40% 30% at 30% 70%, rgba(255, 226, 190, .55), transparent 70%), radial-gradient(30% 22% at 75% 62%, rgba(255, 210, 170, .4), transparent 70%); animation: shimmer 14s ease-in-out infinite alternate; }
@keyframes shimmer { 0% { transform: translate3d(-4%, 0, 0) scale(1); opacity: .7; } 100% { transform: translate3d(5%, -2%, 0) scale(1.1); opacity: 1; } }
.closing-inner { position: absolute; z-index: 2; inset-inline: var(--pad); top: clamp(110px, 18vh, 200px); }
.closing h2 { margin-top: 26px; font-size: clamp(56px, 9vw, 164px); line-height: .96; letter-spacing: -.05em; }
.orb { position: absolute; z-index: 3; inset-inline-end: var(--pad); bottom: clamp(40px, 9vh, 100px); width: clamp(150px, 15vw, 210px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: var(--foam); transition: transform .6s var(--ease); }
.orb-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 22s linear infinite; }
.orb-ring text { font-size: 11.5px; letter-spacing: .12em; fill: currentColor; font-family: var(--sans); font-weight: 500; }
.orb-core { position: relative; width: 66%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 6px; padding: 12px; background: var(--foam); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.2; text-align: center; transition: background .5s, transform .6s var(--ease); }
.orb-core .i { width: 22px; height: 22px; transition: transform .6s var(--ease); }
.orb:hover .orb-core { background: var(--accent); transform: scale(1.06); }
.orb:hover .orb-core .i { transform: rotate(45deg); }
html[dir=rtl] .orb:hover .orb-core .i-dir { transform: scaleX(-1) rotate(45deg); }

/* ---------- Footer ---------- */
.footer { position: relative; background: var(--marine); color: var(--foam); padding: clamp(90px, 14vh, 150px) var(--pad) 28px; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; gap: 60px; align-items: flex-start; }
.footer-cta h2 { font-size: clamp(36px, 4.4vw, 72px); max-width: 12ch; }
.footer-cta .btn { margin-top: 34px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 14px 56px; font-size: 16px; }
.footer-nav a, .footer-nav button { justify-self: start; color: var(--foam-muted); transition: color .3s; text-align: start; }
.footer-nav a:hover, .footer-nav button:hover { color: var(--foam); }
.footer-word { display: flex; justify-content: space-between; margin-top: clamp(70px, 12vh, 140px); font-size: calc((100vw - 2 * var(--pad)) / 6.15); font-weight: 500; line-height: .8; letter-spacing: -.06em; overflow: hidden; padding-top: .04em; background: linear-gradient(180deg, var(--foam) 30%, rgba(238, 240, 234, .2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-word span { display: block; }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line-d); font-size: 13px; color: var(--foam-muted); }
.footer-bottom p { max-width: 640px; font-size: 12px; line-height: 1.6; }
.footer-bottom span { white-space: nowrap; }

/* ---------- Dialogs ---------- */
dialog { padding: 0; border: 0; max-width: none; max-height: none; color: var(--ink); background: transparent; }
dialog::backdrop { background: rgba(6, 14, 15, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html:has(dialog[open]) { overflow: hidden; }
dialog[open] { animation: dlg-in .55s var(--ease) both; }
dialog[open]::backdrop { animation: fade-in .5s ease both; }
dialog.is-closing { animation: dlg-out .35s var(--ease-io) both; }
dialog.is-closing::backdrop { animation: fade-out .35s ease both; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.sheet { width: min(620px, calc(100% - 32px)); padding: 32px; border-radius: 26px; background: var(--sand); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sheet-head h2 { font-size: clamp(28px, 3vw, 40px); }
.language-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
.language-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--sand-2); font-size: 17px; text-align: start; transition: background .3s, color .3s, transform .5s var(--ease); animation: rise-in .6s var(--ease) both; animation-delay: calc(var(--i) * 35ms + 120ms); }
.language-option small { font-size: 12px; letter-spacing: .1em; opacity: .6; }
.language-option:hover { transform: translateY(-2px); }
.language-option[aria-pressed=true] { background: var(--ink); color: var(--sand); }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline: auto 0;
  margin: 0;
  width: min(540px, 100%);
  height: 100dvh;
  padding: 32px clamp(24px, 3vw, 44px);
  overflow-y: auto;
  background: var(--sand);
}
.drawer[open] { animation: drawer-in .7s var(--ease) both; }
.drawer.is-closing { animation: drawer-out .4s var(--ease-io) both; }
html[dir=rtl] .drawer[open] { animation-name: drawer-in-rtl; }
html[dir=rtl] .drawer.is-closing { animation-name: drawer-out-rtl; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes drawer-in-rtl { from { transform: translateX(-100%); } }
@keyframes drawer-out-rtl { to { transform: translateX(-100%); } }
.drawer .eyebrow { color: var(--muted); }
.drawer h2 { margin-top: clamp(40px, 8vh, 90px); font-size: clamp(40px, 4.4vw, 60px); }
.demo-note { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--sand-2); font-size: 13px; line-height: 1.5; color: var(--muted); }
.form { display: grid; gap: 26px; margin-top: 36px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; font-size: 13px; color: var(--muted); }
.field legend { padding: 0; margin-bottom: 10px; }
.field input:not([type=radio]) { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--sand-3); border-radius: 0; background: transparent; font-size: 18px; color: var(--ink); background-image: linear-gradient(var(--ink), var(--ink)); background-repeat: no-repeat; background-size: 0 1px; background-position: 0 100%; transition: background-size .6s var(--ease); }
html[dir=rtl] .field input:not([type=radio]) { background-position: 100% 100%; }
.field input:not([type=radio]):focus { outline: none; background-size: 100% 1px; }
.choice { display: flex; gap: 8px; }
.choice label { flex: 1; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 14px 0; border-radius: 14px; border: 1px solid var(--sand-3); text-align: center; font-size: 18px; color: var(--ink); cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.choice input:checked + span { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.form-status { font-size: 14px; line-height: 1.5; color: var(--accent-deep); min-height: 1.5em; }
.form-status.is-error { color: #a33a2a; }
.form-privacy { font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: -8px; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form.is-sending .btn { opacity: .6; pointer-events: none; }
.form.is-sent .field, .form.is-sent .btn, .form.is-sent .form-privacy { display: none; }
.form.is-sent .form-status { font-size: 20px; line-height: 1.4; letter-spacing: -.01em; color: var(--ink); padding: 22px 0; border-top: 1px solid var(--line-l); }

.menu-dialog { width: 100%; height: 100dvh; padding: 18px 20px 28px; background: var(--marine); color: var(--foam); display: none; flex-direction: column; }
.menu-dialog[open] { display: flex; animation: menu-in .7s var(--ease-io) both; }
.menu-dialog.is-closing { animation: menu-out .45s var(--ease-io) both; }
@keyframes menu-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes menu-out { to { clip-path: inset(0 0 100% 0); } }
.menu-head { display: flex; justify-content: space-between; align-items: center; }
.menu-links { display: grid; gap: 4px; margin-block: auto; }
.menu-links a { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; font-size: clamp(38px, 11vw, 64px); line-height: 1.05; letter-spacing: -.04em; border-bottom: 1px solid var(--line-d); animation: rise-in .8s var(--ease) both; }
.menu-links a:nth-child(1) { animation-delay: .2s; } .menu-links a:nth-child(2) { animation-delay: .26s; }
.menu-links a:nth-child(3) { animation-delay: .32s; } .menu-links a:nth-child(4) { animation-delay: .38s; }
.menu-links small { font-size: 12px; letter-spacing: 0; color: var(--accent); font-variant-numeric: tabular-nums; }
.menu-foot { display: flex; gap: 10px; }
.menu-foot .btn-light { flex: 1; }

/* Gallery */
.gallery { width: 100%; height: 100dvh; background: var(--marine); color: var(--foam); display: none; flex-direction: column; }
.gallery[open] { display: flex; animation: gallery-in .6s var(--ease) both; }
.gallery.is-closing { animation: fade-out .35s ease both; }
@keyframes gallery-in { from { opacity: 0; transform: scale(1.02); } }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--pad); border-bottom: 1px solid var(--line-d); flex-shrink: 0; }
.g-title { min-width: 0; margin-inline-end: auto; }
.g-title .eyebrow { color: var(--foam-muted); font-size: 11px; }
.g-title h2 { font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.g-rooms { display: flex; flex-direction: column; gap: 2px; padding: 22px 14px 22px var(--pad); overflow-y: auto; border-inline-end: 1px solid var(--line-d); }
html[dir=rtl] .g-rooms { padding: 22px var(--pad) 22px 14px; }
.g-rooms button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 15px; text-align: start; color: var(--foam-muted); transition: background .3s, color .3s; }
.g-rooms button small { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .7; }
.g-rooms button:hover { color: var(--foam); background: rgba(238, 240, 234, .06); }
.g-rooms button[aria-current=true] { color: var(--ink); background: var(--foam); }
.g-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 18px var(--pad) 16px; }
.g-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 16px; background: #091315; }
.g-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: translateX(calc(var(--dir, 0) * 6%)) scale(1.02); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.g-img.current { opacity: 1; transform: none; }
.g-img.leaving { opacity: 0; transform: translateX(calc(var(--dir, 0) * -4%)) scale(.99); }
.g-arrow { position: absolute; z-index: 2; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 22, 24, .45); border: 1px solid rgba(238, 240, 234, .25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .3s, color .3s, transform .5s var(--ease); }
.g-arrow:hover { background: var(--foam); color: var(--ink); }
.g-prev { inset-inline-start: 16px; }
.g-next { inset-inline-end: 16px; }
.g-prev:hover { transform: translateX(-3px); }
.g-next:hover { transform: translateX(3px); }
.g-meta { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 12px 2px 10px; font-size: 13px; color: var(--foam-muted); flex-shrink: 0; }
.g-meta span { font-variant-numeric: tabular-nums; color: var(--foam); }
.g-meta p { font-size: 12px; text-align: end; max-width: 620px; }
.g-thumbs { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 4px; flex-shrink: 0; scrollbar-width: none; }
.g-thumbs::-webkit-scrollbar { display: none; }
.g-thumb { position: relative; flex: 0 0 auto; height: 64px; aspect-ratio: var(--ar, 4 / 3); border-radius: 10px; overflow: hidden; opacity: .45; transition: opacity .3s, transform .5s var(--ease); }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb:hover { opacity: .85; }
.g-thumb[aria-current=true] { opacity: 1; box-shadow: inset 0 0 0 2px var(--foam); }
.g-thumb[aria-current=true] img { transform: scale(.94); border-radius: 7px; }

/* ---------- Custom cursor ---------- */
.cursor { --c: var(--ink); --c-inv: var(--sand); position: fixed; inset: 0; z-index: 500; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; pointer-events: none; color: inherit; }
.cursor::backdrop { display: none; }
.cursor[data-theme=dark] { --c: var(--foam); --c-inv: var(--ink); }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor.is-on .cursor-dot, .cursor.is-on .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--c); transition: opacity .3s, background-color .3s; }
.cursor-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; display: grid; place-items: center; }
.cursor-ring::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--c); opacity: .7; transition: transform .45s var(--ease), background-color .3s, border-color .3s, opacity .3s; }
.cursor-ring b { position: relative; font-size: 22px; font-weight: 300; color: var(--c-inv); opacity: 0; transform: scale(.5); transition: opacity .3s, transform .45s var(--ease); }
.cursor.is-link .cursor-ring::before { transform: scale(1.5); opacity: 1; background: color-mix(in srgb, var(--c) 12%, transparent); }
.cursor.is-label .cursor-ring::before { transform: scale(2.3); opacity: 1; background: var(--c); border-color: var(--c); }
.cursor.is-label .cursor-ring b { opacity: 1; transform: none; }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor.is-text .cursor-ring { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  html.has-cursor input:not([type=range]):not([type=radio]), html.has-cursor textarea { cursor: text !important; }
}

/* ---------- Motion primitives ---------- */
[data-magnetic] { transition: translate .7s var(--ease), transform .6s var(--ease), color .5s var(--ease), border-color .5s; }
html.motion [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0ms); }
html.motion [data-reveal].in { opacity: 1; transform: none; }
/* Clip the child, not the observed element: Chrome's IntersectionObserver honours the target's own clip-path. */
html.motion [data-reveal=img] { opacity: 1; transform: none; }
html.motion [data-reveal=img] > img { clip-path: inset(100% 0 0 0); transform: scale(1.15); transition: clip-path 1.3s var(--ease-io), transform 1.8s var(--ease); }
html.motion [data-reveal=img].in > img { clip-path: inset(0 0 0 0); transform: none; }
.split .w { display: inline-block; vertical-align: top; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.split .w > span { display: inline-block; }
html.motion .split .w > span { transform: translateY(105%); transition: transform 1.15s var(--ease); transition-delay: calc(var(--i, 0) * 42ms); }
html.motion .split.in .w > span { transform: none; }

/* Hero entrance (after loader) */
html.motion .hero-img { transform: scale(1.16); }
html.motion.ready .hero-img { transform: scale(1); transition: transform 2.6s var(--ease), opacity 1.6s var(--ease); }
html.motion .hero-title .line > span { transform: translateY(108%); }
html.motion.ready .hero-title .line > span { transform: none; transition: transform 1.3s var(--ease); transition-delay: calc(.25s + var(--i) * .1s); }
html.motion .hero-eyebrow, html.motion .hero-foot, html.motion .live-card, html.motion .nav { opacity: 0; }
html.motion .hero-eyebrow, html.motion .hero-foot, html.motion .live-card { transform: translateY(24px); }
html.motion.ready .hero-eyebrow, html.motion.ready .hero-foot, html.motion.ready .live-card, html.motion.ready .nav { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
html.motion.ready .hero-eyebrow { transition-delay: .15s; }
html.motion.ready .hero-foot { transition-delay: .65s; }
html.motion.ready .live-card { transition-delay: .85s; }
html.motion.ready .nav { transition: opacity 1.2s .5s var(--ease), transform .7s var(--ease), color .5s, background-color .5s, border-color .5s; }

/* Footer wordmark letters rise */
html.motion .footer-word span { transform: translateY(100%); transition: transform 1.2s var(--ease); }
html.motion .footer-word span:nth-child(2) { transition-delay: .04s; } html.motion .footer-word span:nth-child(3) { transition-delay: .08s; }
html.motion .footer-word span:nth-child(4) { transition-delay: .12s; } html.motion .footer-word span:nth-child(5) { transition-delay: .16s; }
html.motion .footer-word span:nth-child(6) { transition-delay: .2s; } html.motion .footer-word span:nth-child(7) { transition-delay: .24s; }
html.motion .footer-word span:nth-child(8) { transition-delay: .28s; } html.motion .footer-word span:nth-child(9) { transition-delay: .32s; }
html.motion .footer-word span:nth-child(10) { transition-delay: .36s; }
html.motion .footer-word.in span { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav-links a { padding: 8px 12px; font-size: 13px; }
  .manifesto-text, .manifesto-aside { max-width: 100%; }
  .floats { position: relative; display: flex; gap: 14px; margin-top: 56px; inset: auto; }
  .float { position: relative; inset: auto; width: auto; flex: 1; aspect-ratio: 4 / 5; }
  .f2 { margin-top: 40px; }
}
@media (max-width: 980px) {
  :root { --nav-h: 64px; }
  .nav-links, .nav-cta, .nav-lang { display: none; }
  .nav-menu { display: inline-flex; }
  .hero { display: flex; flex-direction: column; justify-content: flex-end; gap: 26px; padding: calc(var(--nav-h) + 20px) var(--pad) 24px; }
  .hero-inner, .live-card { position: relative; inset: auto; bottom: auto; }
  .hero-inner { width: 100%; }
  .live-card { width: 100%; max-width: 560px; display: grid; grid-template-columns: minmax(0, 1fr) 150px; column-gap: 20px; align-items: center; padding: 14px 18px; }
  .live-top { grid-column: 1 / -1; }
  .live-time { grid-column: 1; justify-content: flex-start; gap: 14px; }
  .live-phase { max-width: none; text-align: start; }
  .sky { grid-column: 2; grid-row: 2 / span 2; margin: 0; }
  .live-ends { grid-column: 1; justify-content: flex-start; gap: 18px; }
  .live-note { grid-column: 1 / -1; }
  .sec-head { flex-direction: column; align-items: flex-start; }

  .panels { flex-direction: column; height: auto; min-height: 0; gap: 16px; }
  .panel { flex: none; height: auto; min-height: 640px; }
  .panel.is-active { flex-grow: 0; }
  .panel-bars { opacity: 1; }
  .panel-hit { display: none; }
  .panel-detail { grid-template-rows: 1fr; opacity: 1; }
  .panel-detail-inner { width: auto; }
  .range-track i { transform: scaleX(1); }

  .story-body { grid-template-columns: 1fr; }
  .story-sticky { display: none; }
  .step { min-height: 0; padding-block: 0 72px; opacity: 1; }
  .step-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; margin-bottom: 26px; }
  .step-img img { width: 100%; height: 100%; object-fit: cover; }
  .gallery-cta { flex-direction: column; align-items: flex-start; padding-top: 48px; }

  .light-pin { height: 300svh; }
  .light-sticky { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: calc(var(--nav-h) + 8px) 16px 16px; }
  .light-frames { position: relative; inset: auto; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; flex-shrink: 0; }
  .light-frame { object-position: 50% 50%; }
  .light-veil, .light-ghost, .light-copy, .hud-sky { display: none; }
  .light-head { flex-direction: column; gap: 6px; }
  .light-aside { max-width: none; }
  .light-note { margin-top: 0; font-size: 11px; }
  .light-head { position: static; order: -1; }
  .light-head .kicker { font-size: 11px; }
  .light-head h2 { margin-top: 12px; font-size: clamp(32px, 8.4vw, 48px); }
  .light-head h2 br { display: none; }
  .light-hud { position: static; width: 100%; padding: 14px 16px 12px; }
  .hud-time time { font-size: 28px; }

  .setting-media { height: 82svh; }
  .setting-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; gap: 16px; }
  .g-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .g-rooms { flex-direction: row; overflow-x: auto; padding: 12px var(--pad); border: 0; border-bottom: 1px solid var(--line-d); scrollbar-width: none; }
  html[dir=rtl] .g-rooms { padding: 12px var(--pad); }
  .g-rooms button { flex-shrink: 0; padding: 9px 14px; font-size: 14px; white-space: nowrap; }
  .g-head .seg { display: none; }
}
@media (max-width: 640px) {
  .hero { min-height: 700px; }
  .hero-title { font-size: clamp(48px, 14.5vw, 72px); }
  .hero-sub { font-size: 15px; }
  .hero-foot { margin-top: 24px; gap: 20px; }
  .hero { gap: 20px; padding-bottom: 16px; }
  .hero-actions .btn-ghost { display: none; }
  .live-card { grid-template-columns: minmax(0, 1fr) 112px; column-gap: 12px; padding: 12px 14px; border-radius: 16px; }
  .live-clock { font-size: 34px; }
  .live-phase { font-size: 18px; }
  .live-note { display: none; }
  html[lang=ru] .hero-title, html[lang=uk] .hero-title, html[lang=de] .hero-title, html[lang=tr] .hero-title { font-size: clamp(40px, 11vw, 60px); }

  .marquee { padding: 18px 0; }
  .manifesto-text { font-size: clamp(28px, 7.6vw, 40px); }
  .manifesto-aside { flex-direction: column; align-items: flex-start; margin-top: 48px; }
  .manifesto-aside p { font-size: 16px; }
  .floats { gap: 10px; margin-top: 40px; }
  .float { border-radius: 14px; }

  .panel { min-height: 0; height: auto; display: flex; flex-direction: column; justify-content: flex-end; }
  .panel-media { position: relative; height: 62svh; max-height: 520px; flex-shrink: 0; }
  .panel::after { background: linear-gradient(180deg, rgba(6, 14, 15, .4) 0%, rgba(6, 14, 15, 0) 20%); height: 62svh; max-height: 520px; }
  .panel:not(.is-active)::after { background: linear-gradient(180deg, rgba(6, 14, 15, .4) 0%, rgba(6, 14, 15, 0) 20%); }
  .panel-content { position: relative; padding: 20px 18px 24px; background: var(--marine-2); }
  .panel-head { position: absolute; bottom: 100%; inset-inline: 18px; padding-bottom: 18px; }
  .panel-head::before { content: ''; position: absolute; inset: -80px -18px 0; z-index: -1; background: linear-gradient(180deg, transparent, rgba(6, 14, 15, .7)); }
  .panel-detail-inner { padding-top: 4px; }
  .stats { gap: 20px; flex-wrap: wrap; }
  .panel-actions { gap: 16px; }
  .panel-actions .btn { width: 100%; }

  .step h3 { font-size: 34px; }
  .step p { font-size: 16px; }
  .film-item { height: 110px; }
  .btn-lg { width: 100%; justify-content: space-between; }

  .setting-media { height: 70svh; min-height: 460px; }
  .setting-overlay h2 { font-size: clamp(44px, 12vw, 64px); }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact strong { font-size: 44px; }

  .closing-inner { top: 120px; }
  .closing h2 { font-size: clamp(52px, 14vw, 80px); }
  .orb { width: 150px; inset-inline-end: 16px; bottom: 36px; }

  .footer-nav { grid-template-columns: 1fr 1fr; gap: 14px 24px; font-size: 15px; }
  .sheet { padding: 24px; }
  .language-list { grid-template-columns: 1fr; }
  .g-head { padding: 12px 16px; }
  .g-main { padding: 12px 12px 12px; }
  .g-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
  .g-meta p { text-align: start; }
  .g-arrow { width: 44px; height: 44px; margin-top: -22px; }
  .g-thumb { height: 52px; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 44px; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-height: 760px) and (min-width: 981px) {
  .live-note { display: none; }
  .hero-title { font-size: clamp(50px, 7vw, 110px); }
  .light-copy { display: none; }
  .light-note { margin-top: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  body::after { display: none; }
  .light-pin { height: auto; }
  .light-sticky { position: relative; }
  .film { overflow-x: auto; }
  .film-track { animation: none; }
  .hud-hint { visibility: hidden; }
}
