/* Victoria Group — web system
   Colour anchors come from the original logo files: navy #142339, gold #B0963F. */
:root {
  color-scheme: dark;
  --ink-0: #0a1220;   /* midnight — shared draft token, Victoria-Brand-Books */
  --navy: #142339;
  --gold: #b0963f;
  --gold-hi: #e4d3a6; /* champagne — shared draft token */
  --gold-lo: #8a7330;
  --text: #f3efe6;
  --text-2: rgba(243, 239, 230, 0.72);
  --text-3: rgba(243, 239, 230, 0.48);
  --line: rgba(255, 255, 255, 0.12);
  --glass-top: rgba(255, 255, 255, 0.085);
  --glass-bot: rgba(255, 255, 255, 0.025);
  --radius: 28px;
  --radius-s: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --f-latin: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-serif: 'Source Serif 4', Georgia, serif;
  --f-display: var(--f-serif);
  --f-arabic: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
  --f: var(--f-latin);
}
/* The site is a single dark composition by design; tokens are restated for both schemes. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --text: #f3efe6; } }
:root[data-theme="dark"] { --text: #f3efe6; }
:root[lang="ar"] { --f: var(--f-arabic); --f-display: var(--f-arabic); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink-0); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--ink-0); color: var(--text);
  font-family: var(--f); font-size: 17px; line-height: 1.6; font-weight: 300;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(176, 150, 63, 0.4); }
:focus-visible { outline: 1.5px solid var(--gold-hi); outline-offset: 4px; border-radius: 8px; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 0; display: block; }
.gl-fallback { display: none; }
.gl-failed .gl-fallback { display: block; position: fixed; inset: 0; margin: auto; width: 18vh; opacity: 0.9; z-index: 0; }
.gl-failed body { background: radial-gradient(120% 80% at 50% 20%, #142339, var(--ink-0)); }
main, .bar { position: relative; z-index: 1; }

/* ---------- liquid glass ---------- */
.glass, .glass-strong {
  position: relative;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 30px 80px -40px rgba(0, 0, 0, 0.7);
  isolation: isolate;
}
.glass-strong { -webkit-backdrop-filter: blur(34px) saturate(170%); backdrop-filter: blur(34px) saturate(170%); --glass-top: rgba(255,255,255,.1); }
/* a hairline that brightens toward the light, like a polished glass edge */
.glass::before, .glass-strong::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.38), rgba(255,255,255,.06) 38%, rgba(230,210,154,.08) 70%, rgba(255,255,255,.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  transition: transform .6s var(--ease), opacity .6s var(--ease);
}
.bar-mark { justify-self: start; opacity: 0; transition: opacity .8s var(--ease); }
.bar-mark img { height: 44px; width: auto; filter: drop-shadow(0 0 10px rgba(176,150,63,.25)); }
.scrolled .bar-mark { opacity: 1; }
.bar-nav { display: flex; gap: 4px; padding: 6px; border-radius: 999px; }
.bar-nav a {
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 400; color: var(--text-2);
  transition: color .3s, background .3s;
}
.bar-nav a:hover { color: var(--text); background: rgba(255,255,255,.07); }
.bar-lang {
  justify-self: end; border: 0; color: var(--text); cursor: pointer;
  font: 400 14px/1 var(--f-arabic); padding: 13px 18px; border-radius: 999px;
}
:root[lang="ar"] .bar-lang { font-family: var(--f-latin); letter-spacing: .08em; }

/* ---------- type ---------- */
.label {
  font-family: var(--f-latin); font-size: 11.5px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-hi);
}
:root[lang="ar"] .label { font-family: var(--f-arabic); letter-spacing: 0; font-size: 14px; font-weight: 400; }
h2 { font-family: var(--f-display); font-size: clamp(32px, 4.6vw, 64px); line-height: 1.08; font-weight: 300; letter-spacing: -0.02em; }
:root[lang="ar"] h2 { font-weight: 300; letter-spacing: 0; line-height: 1.3; }
.section-head { display: grid; justify-items: center; text-align: center; gap: 18px; margin: 0 auto clamp(48px, 7vw, 96px); max-width: 860px; }
.hint { color: var(--text-3); font-size: 15px; }
.gold-text {
  background: linear-gradient(100deg, var(--gold-lo), var(--gold-hi) 45%, var(--gold) 70%, var(--gold-hi));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* reveal: rise, fade and come into focus */
.reveal { opacity: 0; transform: translateY(26px); filter: blur(14px);
  transition: opacity 1.1s var(--ease), transform 1.3s var(--ease), filter 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; filter: blur(0); }
.hero .reveal.in { opacity: 0; }
.intro-done .hero .reveal.in { opacity: 1; }

/* ---------- sections ---------- */
section { padding: clamp(96px, 14vw, 200px) var(--gutter); scroll-margin-top: var(--bar-height, 80px); }
/* the top padding reserves a band for the 3D mark above the copy; on short or landscape screens the hero
   grows past one screen instead of letting the V land on the wordmark */
.hero { padding-top: calc(var(--bar-height, 80px) + clamp(220px, 30vh, 320px)); min-height: 100svh; display: grid; align-content: end; justify-items: center; padding-bottom: clamp(40px, 9vh, 96px); text-align: center; }
.hero-copy { display: grid; justify-items: center; gap: clamp(12px, 2.2vh, 22px); }
.hero .wordmark { width: clamp(200px, min(24vw, 34vh), 340px); filter: blur(0) drop-shadow(0 0 24px rgba(176,150,63,.25)); }
.wordmark { fill: var(--gold); }
.hero-title { font-family: var(--f-display); font-size: clamp(34px, min(6vw, 7.4vh), 92px); line-height: 1.04; font-weight: 250; letter-spacing: -0.025em; display: grid; }
.hero-title .line:nth-child(2) { transition-delay: 160ms; }
:root[lang="ar"] .hero-title { font-weight: 300; letter-spacing: 0; line-height: 1.28; }
.hero-lede { color: var(--text-2); font-size: clamp(16px, 1.4vw, 19px); transition-delay: 320ms; }
.cue { margin-top: clamp(28px, 5vh, 56px); display: grid; justify-items: center; gap: 10px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); opacity: 0; transition: opacity 1s 1.2s; }
.intro-done .cue { opacity: 1; }
.cue i { width: 1px; height: 44px; background: linear-gradient(var(--gold-hi), transparent); transform-origin: top; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.statement { min-height: 110vh; display: grid; align-content: center; max-width: var(--max); margin: 0 auto; }
.statement-lines { font-family: var(--f-display); display: grid; font-size: clamp(44px, 8.4vw, 132px); line-height: 1; letter-spacing: -0.03em; max-width: 9.5em; }
.statement-lines .g1 { font-weight: 200; color: var(--text-3); }
.statement-lines .g2 { font-weight: 300; color: var(--text-2); --i: 1; }
.statement-lines .g3 { font-weight: 400; --i: 2;
  background: linear-gradient(100deg, var(--gold-hi), var(--gold) 55%, var(--gold-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[lang="ar"] .statement-lines { letter-spacing: 0; line-height: 1.22; }
.statement-note { margin-top: clamp(32px, 4vw, 56px); max-width: 30em; color: var(--text-2); font-size: clamp(17px, 1.5vw, 21px); --i: 3; }

.divisions { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.division-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.4vw, 20px); }
.division {
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; min-height: 380px;
  padding: clamp(24px, 2.4vw, 34px); transition: transform .8s var(--ease), background .6s;
}
.division:hover { transform: translateY(-6px); --glass-top: rgba(255,255,255,.12); }
.division-mark { height: 64px; width: auto; justify-self: start; opacity: .92; margin-bottom: 28px; }
.division h3 { font-size: 26px; font-weight: 300; letter-spacing: -0.02em; }
:root[lang="ar"] .division h3 { letter-spacing: 0; font-weight: 400; }
.division p { color: var(--text-2); font-size: 15.5px; }
.division a { font-family: var(--f-latin); font-size: 13px; color: var(--gold-hi); justify-self: start; letter-spacing: .02em; }
.division a:hover { text-decoration: underline; text-underline-offset: 4px; }

.work { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 3vw, 44px) clamp(12px, 1.4vw, 20px); }
.card { display: grid; gap: 16px; }
.card-media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-s); overflow: hidden; background: #0d1626; transform: translateZ(0); }
button.card-media { border: 0; padding: 0; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
button.card-media:focus-visible { outline: 1.5px solid var(--gold-hi); outline-offset: 4px; }
.card-media img, .card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media img { transform: scale(1.02); transition: transform 1.6s var(--ease), filter 1s var(--ease); }
.card-media video { opacity: 0; transform: scale(1.06); transition: opacity .9s var(--ease), transform 1.6s var(--ease); }
.card:hover .card-media img, .card-media:focus-visible img, .card.playing .card-media img { transform: scale(1.08); }
.card.playing .card-media video { opacity: 1; transform: scale(1); }
.card.playing .card-media img { filter: blur(8px); }
.card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); background: linear-gradient(180deg, transparent 60%, rgba(10,18,32,.45)); pointer-events: none; }
.card-kind {
  position: absolute; inset-inline-start: 12px; inset-block-start: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; font-size: 12px; color: var(--text);
}
.card-meta { display: grid; gap: 4px; padding-inline: 4px; }
.card-division { font-size: 12.5px; color: var(--gold-hi); letter-spacing: .04em; }
.card h3 { font-size: 19px; font-weight: 400; letter-spacing: -0.01em; }
:root[lang="ar"] .card h3 { letter-spacing: 0; }
.card-source { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-3); }
.card-source a { color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.card-source a:hover { color: var(--text); }

.edit { min-height: 100vh; display: grid; align-items: center; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.edit-card { justify-self: end; width: min(100%, 560px); padding: clamp(32px, 4vw, 56px); display: grid; gap: 20px; border-radius: 36px; }
.edit-logo { width: 150px; height: auto; margin-bottom: 12px; }
.edit-card h2 { font-size: clamp(28px, 3.2vw, 44px); }
.edit-card .body { color: var(--text-2); }
.button { justify-self: start; margin-top: 8px; padding: 15px 26px; border-radius: 999px; font-size: 15px; font-weight: 400; transition: transform .5s var(--ease); }
.button:hover { transform: translateY(-2px); }

.contact { max-width: calc(1080px + 2 * var(--gutter)); margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.4vw, 20px); }
.contact-card { padding: clamp(28px, 3vw, 44px); }
.contact-card:nth-child(2) { --i: 1; }
.contact dl { margin: 0; display: grid; gap: 26px; }
.contact dt { font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.contact dd { margin: 0; font-size: clamp(18px, 1.7vw, 22px); font-weight: 300; }
.contact dd a:hover { color: var(--gold-hi); }
:root[lang="ar"] .contact dd a[dir="ltr"] { display: inline-block; }
.accounts { display: grid; gap: 4px; font-family: var(--f-latin); font-size: 17px !important; }
:root[lang="ar"] .accounts { text-align: right; }

.finale { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; justify-items: center; text-align: center; padding-bottom: 28px; }
.finale-copy { align-self: start; display: grid; justify-items: center; gap: 18px; padding-top: calc(52svh - clamp(96px, 14vw, 200px)); }
.finale .wordmark { width: clamp(220px, 24vw, 340px); }
.finale-line { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 32px); font-weight: 200; color: var(--text-2); --i: 1; }
.foot { width: 100%; max-width: var(--max); display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.foot a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .division-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { grid-template-columns: 1fr auto; row-gap: 8px; }
  .bar-nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 100%; gap: 0; padding: 4px; }
  .bar-nav a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 8px; white-space: nowrap; }
  .bar-mark img { height: 38px; }
  .hero { padding-bottom: 36px; }
  .statement { min-height: auto; }
  .division-grid, .work-grid, .contact-grid { grid-template-columns: 1fr; }
  .division { min-height: 0; }
  .division-mark { height: 52px; margin-bottom: 12px; }
  .edit { min-height: auto; }
  .edit-card { justify-self: stretch; }
  .foot { flex-direction: column; align-items: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: opacity .4s; transform: none; filter: none; }
  .cue i { animation: none; }
}

/* keep the bar legible over content once the page moves */
.bar::before { content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease);
  background: linear-gradient(180deg, rgba(10,18,32,.82), rgba(10,18,32,0)); }
.scrolled .bar::before { opacity: 1; }

/* phones: the two-row bar needs an opaque-enough night backdrop so passing titles never read through it */
@media (max-width: 760px) {
  .bar::before { inset: 0 0 -28px; background: linear-gradient(180deg, rgba(10,18,32,.96) 0, rgba(10,18,32,.92) calc(100% - 40px), rgba(10,18,32,0)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-mask: linear-gradient(#000 calc(100% - 28px), transparent); mask: linear-gradient(#000 calc(100% - 28px), transparent); }
}
