/* Cascade order matters: tokens -> base -> controls -> layout -> sections -> dialogs -> motion */
/* Design tokens. The charcoal + tan palette is the approved one from the original site.
   Additions: --accent-text (a darker tan that passes WCAG AA on every light surface), --on-accent, radii, motion. */
:root {
  --bg: #ffffff;
  --ink: #333333;
  --ink-2: #555555;
  --muted: #6b6b6b;
  --line: #eeeeee;
  --rule: #dddddd;
  --band: #2f2f2f;
  --band-hi: #3d3d3d;
  --tile: #4a4a4a;
  --tile-hi: #5a5a5a;
  --accent: #85724f;
  --accent-soft: #ab977a;
  --accent-text: #74603f;
  --on-accent: #ffffff;
  --on-band: #f2f2f2;
  --on-band-accent: #c9b69b;
  --slot: #f4f2ee;
  --slot-line: #e1ddd3;
  --slot-ink: #aaa293;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -8px rgba(0, 0, 0, .12);
  --shadow-hi: 0 2px 4px rgba(0, 0, 0, .05), 0 18px 40px -12px rgba(0, 0, 0, .2);

  --f-head: 'Montserrat', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --f-body: 'Roboto', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --pill: 999px;

  --gutter: max(16px, min(4vw, 48px));
  --container: 1240px;
  --header-h: 72px;
  --gap: clamp(12px, 1.6vw, 24px);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 160ms;
  --t: 280ms;
  --t-slow: 600ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #161616;
    --ink: #e8e8e8;
    --ink-2: #cfcfcf;
    --muted: #9a9a9a;
    --line: #2a2a2a;
    --rule: #3a3a3a;
    --band: #262626;
    --band-hi: #333333;
    --tile: #3a3a3a;
    --tile-hi: #484848;
    --accent: #c9b69b;
    --accent-soft: #ab977a;
    --accent-text: #c9b69b;
    --on-accent: #161616;
    --slot: #1f1e1c;
    --slot-line: #34322d;
    --slot-ink: #6f695d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-hi: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #161616;
  --ink: #e8e8e8;
  --ink-2: #cfcfcf;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --rule: #3a3a3a;
  --band: #262626;
  --band-hi: #333333;
  --tile: #3a3a3a;
  --tile-hi: #484848;
  --accent: #c9b69b;
  --accent-soft: #ab977a;
  --accent-text: #c9b69b;
  --on-accent: #161616;
  --slot: #1f1e1c;
  --slot-line: #34322d;
  --slot-ink: #6f695d;
  color-scheme: dark;
}

@media (min-width: 1800px) {
  :root {
    --container: 1440px;
    --header-h: 80px;
  }
}
/* Reset, typography, helpers, accessibility utilities */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
html.dialog-open { overflow: hidden; }

body {
  margin: 0;
  min-block-size: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(1rem, .96rem + .2vw, 1.0625rem)/1.75 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (min-width: 1800px) { body { font-size: 1.125rem; } }

.page { overflow-x: clip; }

h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
img, svg, video { display: block; max-inline-size: 100%; }
img { block-size: auto; }
button { font: inherit; color: inherit; }
address { font-style: normal; }

a { color: var(--accent-text); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus-visible { outline: none; }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.icon { inline-size: 1.25em; block-size: 1.25em; flex: none; }
.sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }

/* keeps Latin words and digits left-to-right inside Arabic text */
.lat { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.nb { white-space: nowrap; }

/* chevrons and arrows point "forward" in either direction */
[dir='rtl'] .flip-rtl, [dir='ltr'] .flip-ltr { transform: scaleX(-1); }

.container {
  inline-size: 100%;
  max-inline-size: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--bg);
  font: 500 .9rem var(--f-head);
  transform: translateY(-160%);
  transition: transform var(--t) var(--ease);
}
.skip-link:focus-visible { transform: none; color: var(--bg); }

.crash {
  min-block-size: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

/* Arabic script must never be letter-spaced or upper-cased; English gets the tracked small caps */
:lang(ar) .tracked { letter-spacing: 0; }
:lang(en) .tracked { letter-spacing: .14em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* Buttons, icon buttons, chips, spinner, progress */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 48px;
  padding: 0 24px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 500 .95rem/1.2 var(--f-head);
  cursor: pointer;
  user-select: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
:lang(en) .btn { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { min-block-size: 56px; padding-inline: 28px; }
.btn-icon { inline-size: 1.15em; block-size: 1.15em; transition: transform var(--t) var(--ease); }
.btn:hover .btn-icon.flip-rtl { transform: translateX(3px); }
[dir='rtl'] .btn:hover .btn-icon.flip-rtl { transform: scaleX(-1) translateX(3px); }

.btn-solid { --btn-bg: var(--accent); --btn-fg: var(--on-accent); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-solid:hover { --btn-bg: color-mix(in srgb, var(--accent) 86%, var(--ink)); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent); }

.btn-outline { --btn-bd: var(--ink); }
.btn-outline:hover { --btn-bg: var(--ink); --btn-fg: var(--bg); }

.btn-ghost-light { --btn-fg: var(--on-band); --btn-bd: rgba(255, 255, 255, .38); }
.btn-ghost-light:hover { --btn-bg: rgba(255, 255, 255, .1); --btn-bd: rgba(255, 255, 255, .7); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: var(--pill);
  background: color-mix(in srgb, currentColor 6%, transparent);
  color: inherit;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), color var(--t-fast);
}
.icon-btn:hover { background: color-mix(in srgb, currentColor 14%, transparent); border-color: color-mix(in srgb, currentColor 55%, transparent); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .icon { inline-size: 20px; block-size: 20px; }
.icon-btn--outline { color: var(--ink-2); background: transparent; }
.icon-btn--outline:hover { color: var(--accent-text); }
.icon-btn--outline .icon { inline-size: 18px; block-size: 18px; }

.chip {
  padding: 4px 12px;
  border: 1px solid var(--slot-line);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.6;
}

.spinner {
  inline-size: 36px;
  block-size: 36px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-block-start-color: var(--on-band-accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.progress {
  display: block;
  inline-size: min(280px, 72vw);
  block-size: 4px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}
.progress-fill {
  display: block;
  block-size: 100%;
  background: var(--on-band-accent);
  border-radius: inherit;
  transition: inline-size 200ms linear;
}

/* image frame with loading shimmer and error fallback */
.media { position: relative; display: block; overflow: hidden; background: var(--tile); }
.media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: opacity var(--t) var(--ease), transform var(--t-slow) var(--ease); }
.media[data-state='loading'] img { opacity: 0; }
.media[data-state='loading']::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .45); }
.media-fallback .icon { inline-size: 40px; block-size: 40px; }
/* Header, hero, section scaffolding, footer */

/* ---------- header ---------- */
.header-sentinel { position: absolute; inset-block-start: 0; inline-size: 1px; block-size: 1px; }

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-block-end: 1px solid transparent;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.site-header[data-scrolled] { border-block-end-color: var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }

.header-row { display: flex; align-items: center; gap: 16px; min-block-size: var(--header-h); }

.logo { display: block; flex: none; border-radius: var(--radius-sm); }
.logo img { block-size: clamp(36px, 3.4vw, 46px); inline-size: auto; }

.site-nav { margin-inline-start: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative;
  display: block;
  padding: 8px 14px;
  border-radius: var(--pill);
  color: var(--ink-2);
  font: 500 .95rem/1.4 var(--f-head);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
:lang(en) .nav-link { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.nav-link:hover { color: var(--ink); background: var(--slot); }
.nav-link::after {
  content: '';
  position: absolute;
  inset-inline: 14px;
  inset-block-end: 3px;
  block-size: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--t) var(--ease);
}
.nav-link[aria-current]::after { transform: scaleX(1); }
.nav-link[aria-current] { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  min-block-size: 40px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink);
  font: 500 .9rem/1 var(--f-head);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent-text); }
.lang-switch:lang(ar) { font-family: 'Tajawal', sans-serif; font-size: 1rem; }

.menu-toggle { display: none; color: var(--ink); }

@media (max-width: 899px) {
  .menu-toggle { display: inline-grid; }
  .header-actions { margin-inline-start: auto; }
  .site-nav {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    display: none;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-block-end: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-header[data-menu] .site-nav { display: block; animation: drop var(--t) var(--ease); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 14px 12px; border-radius: var(--radius-sm); font-size: 1.05rem; }
  :lang(en) .nav-link { font-size: .85rem; }
  .nav-link::after { inset-inline: auto 0; inset-inline-start: 0; inset-block: 12px; inline-size: 3px; block-size: auto; transform: scaleY(0); }
  .nav-link[aria-current]::after { transform: scaleY(1); }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(8px, 2vw, 24px) 0; }
.hero-band {
  position: relative;
  display: grid;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-lg);
  background: var(--band);
  color: var(--on-band);
}
.hero-media { aspect-ratio: 3 / 2; background: #1b1b1b; }
.hero-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2vw, 24px);
  padding: clamp(4px, 2vw, 16px) clamp(20px, 5vw, 64px) clamp(28px, 5vw, 64px);
  margin-block-start: -12%;
  position: relative;
}
.hero-kicker { color: var(--on-band-accent); font: 500 .85rem/1.4 var(--f-head); }
:lang(en) .hero-kicker { letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; }
.hero-title {
  color: var(--on-band);
  font-weight: 300;
  font-size: clamp(1.55rem, 1rem + 2.4vw, 2.75rem);
  line-height: 1.5;
  max-inline-size: 22em;
}
:lang(en) .hero-title { font-size: clamp(1.35rem, .9rem + 2vw, 2.3rem); line-height: 1.45; }
.hero-title strong {
  font-weight: 700;
  background: linear-gradient(transparent 70%, color-mix(in srgb, var(--on-band-accent) 40%, transparent) 70%);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 8px; }

@media (min-width: 900px) {
  .hero-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-block-size: min(600px, calc(100dvh - var(--header-h) - 48px)); }
  .hero-media { order: 2; aspect-ratio: auto; }
  .hero-media img {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32%);
    mask-image: linear-gradient(to right, transparent 0, #000 32%);
  }
  [dir='rtl'] .hero-media img {
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 32%);
    mask-image: linear-gradient(to left, transparent 0, #000 32%);
  }
  .hero-copy { margin: 0; padding: clamp(40px, 5vw, 72px); padding-inline-end: 0; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section--tint { background: var(--slot); }
.section--tint .card, .section--tint .chip { background: var(--bg); }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-block-end: clamp(28px, 4vw, 48px); }
.section-head::after { content: ''; flex: 1; align-self: center; block-size: 1px; background: var(--rule); }
.section-index { color: var(--accent-text); font: 500 .9rem/1 var(--f-head); letter-spacing: .08em; }
.section-title { font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.2; }
:lang(en) .section-title { letter-spacing: -.01em; }

.sub-title { margin-block-end: 18px; color: var(--muted); font: 500 .95rem/1.4 var(--f-head); }
:lang(en) .sub-title { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; }

.block { margin-block-start: clamp(40px, 6vw, 72px); }
.section-head + .block { margin-block-start: 0; }
.section-cta { margin-block-start: clamp(32px, 4vw, 48px); text-align: center; }
.lead { color: var(--ink-2); font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem); line-height: 1.95; max-inline-size: 62ch; }
.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--slot-line);
  border-radius: var(--radius);
  background: var(--slot);
  color: var(--muted);
  text-align: center;
}

/* ---------- footer ---------- */
.site-footer { border-block-start: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-copy { color: var(--muted); font-size: .9rem; }
.social { display: flex; gap: 10px; }
.back-top { color: var(--ink-2); font: 500 .9rem var(--f-head); }
.back-top:hover { color: var(--accent-text); }
@media (max-width: 599px) {
  .footer-row { flex-direction: column; text-align: center; }
  .social { order: -1; }
}
/* Films, gallery, services, about, contact */

/* ---------- films ---------- */
.film-grid { display: grid; gap: var(--gap); }
.film-grid--landscape { grid-template-columns: 1fr; }
.film-grid--portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .film-grid--landscape { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .film-grid--landscape > li:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 900px) { .film-grid--portrait { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .film-grid--landscape { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .film-grid--landscape > li:first-child:nth-last-child(odd) { grid-column: auto; }
}

.film-card { block-size: 100%; }
.film-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--tile);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.film-card--landscape .film-link { aspect-ratio: 16 / 9; }
.film-card--portrait .film-link { aspect-ratio: 9 / 16; }
.film-link:hover, .film-link:focus-visible { color: #fff; box-shadow: var(--shadow-hi); transform: translateY(-3px); }
.film-link:active { transform: translateY(-1px); }
.film-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-lg); }

.film-media { position: absolute; inset: 0; }
.film-link:hover .film-media img, .film-link:focus-visible .film-media img { transform: scale(1.05); }

.film-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 70%);
  transition: opacity var(--t) var(--ease);
}

.film-play { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; }
.film-play .icon {
  inline-size: clamp(44px, 5vw, 60px);
  block-size: clamp(44px, 5vw, 60px);
  padding: 2px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: .92;
  transition: transform var(--t) var(--ease), opacity var(--t), background var(--t);
}
.film-link:hover .film-play .icon, .film-link:focus-visible .film-play .icon {
  transform: scale(1.12);
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}

.film-info { position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 2; display: grid; gap: 4px; padding: clamp(14px, 1.6vw, 20px); }
.film-title { color: #fff; font-weight: 700; font-size: clamp(1rem, .92rem + .4vw, 1.2rem); line-height: 1.4; }
:lang(en) .film-title { font-size: clamp(.9rem, .85rem + .35vw, 1.05rem); letter-spacing: .02em; text-transform: uppercase; }
.film-card--portrait .film-title { font-size: clamp(.9rem, .86rem + .25vw, 1.02rem); }
.film-cat { color: rgba(255, 255, 255, .82); font-size: .82rem; }

.film-dur {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  z-index: 2;
  padding: 2px 9px;
  border-radius: var(--pill);
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  font: 500 .75rem/1.6 var(--f-head);
  font-variant-numeric: tabular-nums;
}

/* ---------- gallery ---------- */
#photos .container { container-type: inline-size; }
.photo-grid {
  --cols: 2;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: calc((100cqi - (var(--cols) - 1) * var(--gap)) / var(--cols) * .72);
  grid-auto-flow: dense;
  gap: var(--gap);
}
@media (min-width: 640px) { .photo-grid { --cols: 3; } }
@media (min-width: 1000px) { .photo-grid { --cols: 4; } }

.photo-cell--tall { grid-row: span 2; }
.photo-cell--feature { grid-column: span 2; grid-row: span 2; }
.photo-cell--hero { grid-column: 1 / -1; grid-row: span 2; }
@media (min-width: 1000px) { .photo-cell--hero { grid-column: span 2; } }

.photo-btn {
  position: relative;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
  cursor: zoom-in;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.photo-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent 50%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.photo-media { position: absolute; inset: 0; }
.photo-btn:hover, .photo-btn:focus-visible { box-shadow: var(--shadow-hi); }
.photo-btn:hover::after, .photo-btn:focus-visible::after { opacity: 1; }
.photo-btn:hover img, .photo-btn:focus-visible img { transform: scale(1.04); }
.photo-btn:active { transform: scale(.99); }
.photo-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- services ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); gap: var(--gap); }
.card {
  block-size: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid var(--slot-line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hi); border-color: color-mix(in srgb, var(--accent) 40%, var(--slot-line)); }
.card-icon {
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  margin-block-end: 4px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-text);
}
.card-icon .icon { inline-size: 26px; block-size: 26px; }
.card-title { font-size: 1.12rem; font-weight: 700; line-height: 1.4; }
:lang(en) .card-title { font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.card-text { color: var(--ink-2); font-size: .97rem; line-height: 1.8; }

.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  padding-block-end: 28px;
}
.step::before {
  content: '';
  position: absolute;
  inset-inline-start: 27px;
  inset-block: 52px 0;
  inline-size: 1px;
  background: var(--slot-line);
}
.step:last-child::before { display: none; }
.step-num {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border: 1px solid var(--slot-line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent-text);
  font: 700 1rem var(--f-head);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.step:hover .step-num { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.step-title { align-self: end; font-size: 1.08rem; font-weight: 700; line-height: 1.5; padding-block-start: 4px; }
.step-text { color: var(--ink-2); font-size: .95rem; line-height: 1.75; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
  .step { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; row-gap: 10px; padding: 0; }
  .step-num { grid-row: auto; margin-block-end: 6px; }
  .step::before { inset-block: 28px auto; inset-inline: 64px calc(-1 * var(--gap)); inline-size: auto; block-size: 1px; }
}

/* ---------- about ---------- */
.about-layout { display: grid; gap: clamp(36px, 5vw, 64px); }
@media (min-width: 960px) { .about-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--t), transform var(--t) var(--ease);
}
.fact:hover { border-color: var(--slot-line); transform: translateY(-2px); }
.fact-icon { color: var(--accent-text); }
.fact-icon .icon { inline-size: 28px; block-size: 28px; }
.fact-text { font-size: .98rem; line-height: 1.55; }
:lang(en) .fact-text { font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }

.gear { display: grid; gap: 0; border-block-start: 1px solid var(--line); }
.gear-row {
  display: grid;
  gap: 8px;
  padding-block: 16px;
  border-block-end: 1px solid var(--line);
}
@media (min-width: 640px) { .gear-row { grid-template-columns: 200px 1fr; align-items: center; } }
.gear dt { color: var(--muted); font: 500 .95rem var(--f-head); }
:lang(en) .gear dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.gear dd { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- contact ---------- */
.contact-layout { display: grid; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 960px) { .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.contact-intro { display: grid; justify-items: start; gap: 28px; }

.contact-list { display: grid; gap: 12px; }
.contact-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--t), background var(--t);
}
.contact-row:hover { border-color: var(--slot-line); background: color-mix(in srgb, var(--slot) 50%, transparent); }
.contact-icon {
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  background: var(--slot);
  color: var(--accent-text);
}
.contact-icon .icon { inline-size: 22px; block-size: 22px; }
.contact-body { display: grid; min-inline-size: 0; }
.contact-label { color: var(--muted); font: 500 .85rem/1.5 var(--f-head); }
:lang(en) .contact-label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }
.contact-value { color: var(--ink); font-size: 1.02rem; overflow-wrap: anywhere; justify-self: start; }
a.contact-value:hover { color: var(--accent-text); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 36px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink-2);
  font: 500 .8rem/1 var(--f-head);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.copy-btn .icon { inline-size: 16px; block-size: 16px; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.copy-btn[data-done] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text); }
:lang(en) .copy-btn { letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; }
@media (max-width: 420px) {
  .contact-row { grid-template-columns: 40px minmax(0, 1fr); }
  .contact-icon { inline-size: 40px; block-size: 40px; }
  .copy-btn { grid-column: 2; justify-self: start; }
}
/* Photo viewer and film player: full-screen native <dialog> elements */
.viewer {
  position: fixed;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  max-block-size: none;
  margin: 0;
  padding: clamp(64px, 7vw, 88px) clamp(12px, 4vw, 72px) max(16px, env(safe-area-inset-bottom, 0px));
  border: 0;
  background: rgba(12, 12, 12, .95);
  color: #f2f2f2;
  overscroll-behavior: contain;
}
.viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; animation: fade var(--t) var(--ease); }
.viewer::backdrop { background: transparent; }
@keyframes fade { from { opacity: 0; } }

.viewer-close { position: absolute; inset-block-start: max(16px, env(safe-area-inset-top, 0px)); inset-inline-end: 16px; z-index: 2; }

.viewer-figure {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 14px;
  inline-size: 100%;
  min-block-size: 0;
}
.viewer-img {
  inline-size: auto;
  block-size: auto;
  max-inline-size: 100%;
  max-block-size: 100%;
  min-block-size: 0;
  object-fit: contain;
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: scale(.985);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.viewer-img[data-loaded] { opacity: 1; transform: none; }
.viewer-figure > .spinner { position: absolute; inset: 0; margin: auto; }
.viewer-caption { max-inline-size: 60ch; color: rgba(255, 255, 255, .78); font-size: .92rem; text-align: center; }
.viewer-bar { display: flex; align-items: center; justify-content: center; gap: 20px; padding-block: 14px 4px; }
.viewer-count { min-inline-size: 4.5em; text-align: center; color: rgba(255, 255, 255, .7); font: 500 .9rem var(--f-head); font-variant-numeric: tabular-nums; }

/* ---------- player ---------- */
.player { grid-template-rows: minmax(0, 1fr); }
.player .viewer-figure { grid-template-rows: auto auto; align-content: center; }
.player-frame { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.player-frame--landscape { aspect-ratio: 16 / 9; inline-size: min(100%, calc((100dvh - 200px) * 16 / 9)); }
.player-frame--portrait { aspect-ratio: 9 / 16; inline-size: min(100%, calc((100dvh - 200px) * 9 / 16)); }
.player-video { inline-size: 100%; block-size: 100%; object-fit: contain; background: #000; }
.player-video:focus-visible { outline: none; }

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  background: rgba(0, 0, 0, .58);
  text-align: center;
}
.player-overlay--error { background: rgba(0, 0, 0, .78); }
.player-alert { inline-size: 40px; block-size: 40px; color: var(--on-band-accent); }
.player-status { font: 500 .95rem/1.5 var(--f-head); }
.player-caption { display: grid; justify-items: center; gap: 2px; text-align: center; }
.player-title { font: 700 1.05rem/1.4 var(--f-head); }
.player-cat { color: rgba(255, 255, 255, .7); font-size: .85rem; }
/* Motion: opening logo, hero entrance, scroll reveals, marquee, pointer effects, progress, back-to-top,
   language cross-fade. Everything here is decoration: with reduced motion it is switched off (see the end). */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- opening logo ---------- */
.intro { display: none; }
.has-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: intro-failsafe .01s linear 8s forwards;
}
.has-intro .site-header .logo { visibility: hidden; animation: intro-show .01s linear 8s forwards; }
.has-intro.intro-skip .site-header .logo { visibility: visible; animation: none; }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes intro-show { to { visibility: visible; } }
.intro-bg { position: absolute; inset: 0; background: var(--bg); }
.intro-logo { position: relative; inline-size: clamp(250px, 62vw, 480px); aspect-ratio: 806 / 369; will-change: transform; }
.intro .lyr, .intro .grp { position: absolute; inset: 0; }
.intro .lyr img { display: block; inline-size: 100%; block-size: 100%; user-select: none; -webkit-user-drag: none; }
.intro .v-d { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .intro .v-l { display: none; }
  :root:not([data-theme='light']) .intro .v-d { display: block; }
}
:root[data-theme='dark'] .intro .v-l { display: none; }
:root[data-theme='dark'] .intro .v-d { display: block; }
.intro .v-l.r1 { clip-path: inset(0 0 62.06% 0); }
.intro .v-l.r2 { clip-path: inset(37.94% 0 26.83% 0); }
.intro .v-l.r3 { clip-path: inset(73.17% 0 0 0); }
.intro .v-d.r1 { clip-path: inset(0 0 58% 0); }
.intro .v-d.r2 { clip-path: inset(42.01% 0 22.22% 0); }
.intro .v-d.r3 { clip-path: inset(77.78% 0 0 0); }
.intro .r img { transform: translateY(40%); opacity: 0; }
.intro .grp.v-l { transform-origin: 86.1% 67.1%; }
.intro .grp.v-d { transform-origin: 86.5% 68.4%; }
.intro .ic, .intro .arm { opacity: 0; }
.intro .arm img { transform: rotate(-26deg); }
.intro .v-l .arm img { transform-origin: 75.93% 56.72%; }
.intro .v-d .arm img { transform-origin: 76.04% 57.43%; }
.intro.rm .r img { transform: none; opacity: 1; }
.intro.rm .ic, .intro.rm .arm { opacity: 1; }
.intro.rm .arm img { transform: none; }

/* ---------- hero entrance (waits under the opening cover, then plays) ---------- */
.hero-media img { animation: hero-settle 1.8s var(--ease-out) both; }
.hero-copy > * { animation: rise-blur 1s var(--ease-out) both; }
.hero-copy > :nth-child(1) { animation-delay: .15s; }
.hero-copy > :nth-child(2) { animation-delay: .3s; }
.hero-copy > :nth-child(3) { animation-delay: .5s; }
.has-intro .hero-media img, .has-intro .hero-copy > * { animation-play-state: paused; }
@keyframes hero-settle { from { scale: 1.12; filter: saturate(.6) brightness(.8); } }
@keyframes rise-blur { from { opacity: 0; translate: 0 24px; filter: blur(8px); } }

/* slow drift on the hero still while it is on screen (desktop only) */
@media (min-width: 900px) and (hover: hover) {
  .hero-band:hover .hero-media img { scale: 1.03; transition: scale 2.4s var(--ease-out); }
  .hero-media img { transition: scale 2.4s var(--ease-out); }
}

.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  inline-size: max-content;
  margin: 18px auto 0;
  padding: 6px 12px;
  border-radius: var(--pill);
  color: var(--muted);
  font: 500 .8rem var(--f-head);
  animation: rise-blur 1s var(--ease-out) .9s both;
}
:lang(en) .scroll-hint { letter-spacing: .14em; text-transform: uppercase; font-size: .68rem; }
.scroll-hint:hover { color: var(--accent-text); }
.scroll-hint-mouse {
  position: relative;
  inline-size: 18px;
  block-size: 28px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
}
.scroll-hint-mouse::after {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 5px;
  inline-size: 3px;
  block-size: 6px;
  margin-inline-start: -1.5px;
  border-radius: 2px;
  background: currentColor;
  animation: wheel 1.8s var(--ease-out) infinite;
}
@keyframes wheel { 0% { opacity: 0; translate: 0 -2px; } 30% { opacity: 1; } 70% { opacity: 0; translate: 0 8px; } 100% { opacity: 0; } }
@media (max-height: 640px) { .scroll-hint { display: none; } }

/* ---------- scroll reveals (useReveal adds .reveal-ready and data-inview) ---------- */
.reveal-ready :is(.section-head, .sub-title, .lead, .film-grid > li, .card-grid > li, .steps > li, .facts > li,
  .gear-row, .contact-row, .contact-intro .btn):not([data-inview]),
.reveal-ready .photo-grid > li:not([data-inview]) { opacity: 0; }
.reveal-ready :is(.sub-title, .lead, .film-grid > li, .card-grid > li, .steps > li, .facts > li, .gear-row,
  .contact-row, .contact-intro .btn)[data-inview] { animation: rise .9s var(--ease-out) var(--d, 0ms) both; }
@keyframes rise { from { opacity: 0; translate: 0 32px; } }

/* photos open like a shutter */
.reveal-ready .photo-grid > li[data-inview] { animation: unveil 1.1s var(--ease-out) var(--d, 0ms) both; }
.reveal-ready .photo-grid > li[data-inview] img { animation: unveil-img 1.4s var(--ease-out) var(--d, 0ms) both; }
@keyframes unveil { from { opacity: 0; clip-path: inset(18% 0 18% 0 round var(--radius)); } to { opacity: 1; clip-path: inset(0 round var(--radius)); } }
@keyframes unveil-img { from { scale: 1.25; } }

/* section titles: number slides in, title rises, rule draws from the title outward */
.reveal-ready .section-head[data-inview] { animation: fade-in .4s ease-out both; }
.reveal-ready .section-head[data-inview] .section-index { animation: slide-in .8s var(--ease-out) .05s both; }
.reveal-ready .section-head[data-inview] .section-title { animation: rise .9s var(--ease-out) .12s both; }
.reveal-ready .section-head[data-inview]::after { animation: draw 1.2s var(--ease-out) .25s both; }
.section-head::after { transform-origin: left; }
:root[dir='rtl'] .section-head::after { transform-origin: right; }
:root[dir='rtl'] .section-index { --slide: 16px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { opacity: 0; translate: var(--slide, -16px) 0; } }
@keyframes draw { from { transform: scaleX(0); } }

/* timeline steps: the connecting line draws itself after the step appears */
.reveal-ready .steps > li[data-inview]::before { animation: draw-y 1s var(--ease-out) calc(var(--d, 0ms) + .3s) both; transform-origin: top; }
@media (min-width: 900px) {
  .reveal-ready .steps > li[data-inview]::before { animation-name: draw; transform-origin: left; }
  :root[dir='rtl'].reveal-ready .steps > li[data-inview]::before { transform-origin: right; }
}
@keyframes draw-y { from { transform: scaleY(0); } }

/* ---------- marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  margin-block-start: clamp(36px, 6vw, 72px);
  padding-block: clamp(14px, 2vw, 22px);
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; inline-size: max-content; animation: marquee 38s linear infinite; }
[dir='rtl'] .marquee-track { animation-name: marquee-rtl; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-row { display: flex; flex: none; }
.marquee-word {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding-inline-end: clamp(20px, 3vw, 40px);
  color: var(--ink);
  font: 700 clamp(1.4rem, 1rem + 2.4vw, 2.8rem)/1.3 var(--f-head);
  white-space: nowrap;
}
:lang(en) .marquee-word { text-transform: uppercase; letter-spacing: .02em; }
.marquee-word.is-outline { color: transparent; -webkit-text-stroke: 1px var(--muted); }
:lang(ar) .marquee-word.is-outline { color: var(--muted); -webkit-text-stroke: 0; font-weight: 300; }
.marquee-dot { inline-size: 10px; block-size: 10px; flex: none; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- pointer effects ---------- */
.cursor-ring {
  position: fixed;
  inset-block-start: 0;
  left: 0;
  z-index: 60;
  inline-size: 34px;
  block-size: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), inset 0 0 0 1px rgba(0, 0, 0, .12);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease, scale .35s var(--ease-spring), background-color .3s ease, border-color .3s ease;
  will-change: transform;
}
.cursor-ring.on { opacity: .9; }
.cursor-ring.hover { scale: 1.6; background-color: color-mix(in srgb, var(--accent) 14%, transparent); border-color: transparent; }
.cursor-ring.press { scale: .8; }
html.dialog-open .cursor-ring, .has-intro .cursor-ring { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor-ring { display: none; } }

/* spotlight that follows the pointer inside cards (CursorRing sets --mx / --my) */
.card, .contact-row, .fact { position: relative; isolation: isolate; }
.card::before, .contact-row::before, .fact::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .card:hover::before, .contact-row:hover::before, .fact:hover::before { opacity: 1; }
}

/* card icon gives a small nod on hover */
.card:hover .card-icon { animation: nod .6s var(--ease-spring); }
@keyframes nod { 40% { transform: rotate(-8deg) scale(1.08); } 70% { transform: rotate(4deg); } }

/* film tiles: the play button pulses once on hover, the info lifts */
.film-info { transition: translate var(--t) var(--ease-out); }
.film-link:hover .film-info, .film-link:focus-visible .film-info { translate: 0 -4px; }
.film-link:hover .film-play .icon { animation: pulse 1.6s var(--ease-out) infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 18px transparent; }
}

/* ---------- reading progress under the header ---------- */
.scroll-progress {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  block-size: 2px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  display: none;
}
:root[dir='rtl'] .scroll-progress { transform-origin: right; background: linear-gradient(-90deg, var(--accent-soft), var(--accent)); }
@supports (animation-timeline: scroll()) {
  .scroll-progress { display: block; animation: progress linear both; animation-timeline: scroll(root); }
}
@keyframes progress { to { transform: scaleX(1); } }

/* ---------- floating back-to-top ---------- */
.to-top {
  position: fixed;
  inset-block-end: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  inset-inline-end: max(20px, env(safe-area-inset-right, 0px));
  z-index: 30;
  display: grid;
  place-items: center;
  inline-size: 52px;
  block-size: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--ink);
  opacity: 0;
  scale: .6;
  pointer-events: none;
  transition: opacity var(--t) var(--ease), scale .45s var(--ease-spring), box-shadow var(--t);
}
.to-top[data-shown] { opacity: 1; scale: 1; pointer-events: auto; }
.to-top:hover { color: var(--accent-text); box-shadow: var(--shadow-hi); }
.to-top:active { scale: .92; }
.to-top-icon { inline-size: 20px; block-size: 20px; rotate: -90deg; transition: translate var(--t) var(--ease-spring); }
.to-top:hover .to-top-icon { translate: 0 -3px; }
.to-top-ring { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; rotate: -90deg; }
.to-top-ring circle { fill: none; stroke: var(--rule); stroke-width: 2; }
@supports (animation-timeline: scroll()) {
  .to-top-ring circle {
    stroke: var(--accent);
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: ring-fill linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes ring-fill { to { stroke-dashoffset: 0; } }
html.dialog-open .to-top { opacity: 0; pointer-events: none; }

/* ---------- language switch: soft cross-fade (View Transitions) ---------- */
::view-transition-old(root) { animation: vt-out .28s ease-in both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; filter: blur(4px); translate: 0 8px; } }

/* ---------- reduced motion: keep the page still and fully visible ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; inline-size: auto; }
  .marquee-row + .marquee-row { display: none; }
  .marquee-row { flex-wrap: wrap; justify-content: center; }
  .hero-media img, .hero-copy > *, .scroll-hint, .scroll-hint-mouse::after { animation: none; }
  .cursor-ring { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
