/* The sections of the single page after the opening, the 3D world's layout, and the 404. Loaded after style.css.
   The finished composition is the natural state; entrances start from script classes. */
.lime { stroke: var(--lime); stroke-width: 2; }
.ground { stroke: var(--core-600); stroke-width: 2; }
.clip { display: block; pointer-events: none; }
[dir="rtl"] .clip { transform: scaleX(-1); }   /* composition and motion follow the reading direction */

/* ---------- closing: the approved clip takes the place of the drawn horizon (wide screens) ---------- */
.horizon-stage { display: grid; justify-items: center; }
.horizon-stage > * { grid-area: 1 / 1; }
.closing-clip { display: none; width: min(960px, 100%); aspect-ratio: 4 / 1; object-fit: cover; object-position: 50% 90%; align-self: end; margin-top: 24px; opacity: 0; -webkit-mask-image: radial-gradient(farthest-side, #000 84%, transparent); mask-image: radial-gradient(farthest-side, #000 84%, transparent); }

/* ---------- about ---------- */
.a1 { position: relative; overflow: hidden; isolation: isolate; background: var(--core-900); }
.a1 .wrap { position: relative; z-index: 1; }
.a1 h2 { font-size: var(--fs-page); line-height: 1.25; margin: 18px 0; clip-path: inset(-15% -2% -15% -2%); transition: clip-path .85s var(--ease); }
.a1.pre h2 { clip-path: inset(-15% -2% 115% -2%); }
.a1-art { display: block; width: min(250px, 62vw); height: auto; margin: 24px auto 0; }
[dir="rtl"] .a1-art { transform: scaleX(-1); }

.a2 { background: var(--core-900); }
.a2-grid { display: grid; gap: 24px; align-items: center; }
.a2-form { display: flex; justify-content: center; }   /* phone: heading and text first, like every section */
.a2 .clip.tall { height: min(45svh, 520px); aspect-ratio: 9 / 16; width: auto; }
.a2 .clip.wide { display: none; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.a2 .clip { -webkit-mask-image: radial-gradient(farthest-side, #000 82%, transparent); mask-image: radial-gradient(farthest-side, #000 82%, transparent); }

/* ---------- what we do: the six disciplines ---------- */
.w3-title { font-size: var(--fs-item); margin-top: 48px; }
.w3-grid { display: grid; margin-top: 20px; }
.disc { list-style: none; }
.disc li { position: relative; padding-block: 20px; padding-inline: 22px 0; border-top: 1px solid var(--line); }
.disc li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 26px; height: 52px; width: 3px; background: var(--core-600); transform: skewX(calc(-1 * var(--slant) / 3)); transition: background var(--t-ui); }
.disc li:hover::before { background: var(--white-300); }
.disc li.on::before { background: var(--lime); }
.disc h4 { font-size: var(--fs-item); }
.disc button { display: block; width: 100%; min-height: 48px; padding: 4px 0; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit; text-align: start; cursor: pointer; }
html:not(.js) .disc button { cursor: auto; }
.disc p { font-size: 15px; color: var(--white-300); }
.scene-panel { display: none; background: var(--core-900); }
.disc .scene-panel { margin-block: 14px 0; }
.js .disc .scene-panel { display: block; }
.d-art { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
[dir="rtl"] .d-art { transform: scaleX(-1); }
.pc { transition: fill var(--t-scene) var(--ease), stroke var(--t-scene) var(--ease); stroke: transparent; stroke-width: 1; }
.pc.metal { fill: url(#d-metal); stroke: var(--white-300); }
.pc.glass { fill: rgba(243,243,243,.12); stroke: rgba(243,243,243,.5); }

/* ---------- approach: the path ---------- */
.path { list-style: none; margin-top: 40px; }
.path li { position: relative; padding-inline-start: 46px; padding-bottom: 30px; }
.path li:last-child { padding-bottom: 0; }
.path .num { display: block; }
.path strong { display: block; font-family: "Reem Kufi", sans-serif; font-weight: 700; font-size: var(--fs-item); }
html:lang(en) .path strong { font-family: "Michroma", sans-serif; font-weight: 400; font-size: 15px; line-height: 1.9; }
.path .d { display: block; font-size: 15px; color: var(--white-300); }
/* phone: a vertical path */
.path .run { position: absolute; inset-inline-start: 10px; top: 0; bottom: 0; width: 2px; background: var(--white); transition: background var(--t-ui); }
.path li:last-child .run { display: none; }
.path .riser { display: none; }
.path .node { position: absolute; inset-inline-start: 3px; top: 6px; width: 16px; height: 26px; background: var(--white); transform: skewX(calc(var(--lean, -1) * var(--slant))); transition: translate var(--t-ui) var(--ease), background var(--t-ui); }
[dir="rtl"] .path .node { --lean: 1; }
.path li.ahead .node { background: var(--core-600); translate: 0 8px; }
.path li.ahead .run, .path li.now .run { background: var(--core-600); }
.path li.ahead .riser, .path li.now .riser { background: var(--core-600); }
.path li.now .node { background: var(--lime); }

/* ---------- contact: the finale ---------- */
section.contact { padding: 0; }
.c1 { position: relative; overflow: hidden; container-type: inline-size; padding: 40px 0 28px; background: var(--core-900); --quarter: 72px; --peek: 14cqw; }
.c1 .wrap { position: relative; z-index: 1; }
.c1 h2 { font-size: var(--fs-page); margin: 10px 0; }
/* two masses rest in opposite corners and part as the section arrives */
.gate { position: absolute; z-index: 0; top: 0; bottom: 0; width: calc(50% + 360px); pointer-events: none; background: var(--core-800); transform: translateX(var(--park)) skewX(var(--skew, calc(-1 * var(--slant)))); transition: transform .8s var(--ease); }
.gate.a { left: -360px; border-right: 2px solid var(--lime); --park: calc(-50cqw + var(--peek) - var(--quarter)); }
.gate.b { right: -360px; background: var(--core-700); --park: calc(50cqw - var(--peek) + var(--quarter)); }
.contact.pre .gate { z-index: 2; transform: translateX(0) skewX(var(--skew, calc(-1 * var(--slant)))); }
/* left to right: mirrored, so the lit edge stays on the side away from the text */
[dir="ltr"] .gate { --skew: var(--slant); }
[dir="ltr"] .gate.a { border-right: 0; background: var(--core-700); }
[dir="ltr"] .gate.b { border-left: 2px solid var(--lime); background: var(--core-800); }

.c2 { padding: 24px 0 40px; }
.c2 .sec-title { margin: 0; }
.c2 dl { display: grid; gap: 14px; margin-top: 14px; }
.c2 dt { font-size: 15px; color: var(--white-300); padding-inline-start: 26px; }
.c2 dd { display: flex; }
.c2 dd a { position: relative; display: inline-block; min-height: 56px; padding: 6px 4px 6px 26px; font-size: clamp(22px, 6vw, 64px); line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; background: linear-gradient(116.565deg, transparent 42%, rgba(183,255,53,.16) 50%, transparent 58%) 120% 0 / 300% 100% no-repeat; }
[dir="rtl"] .c2 dd a { padding: 6px 26px 6px 4px; }
/* a full slanted edge at rest; lime grows over it on hover and focus */
.c2 dd a::before, .c2 dd a::after { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 4px; background: var(--core-600); transform: skewX(calc(-1 * var(--slant))); transform-origin: bottom; }
.c2 dd a::after { background: var(--lime); transform: skewX(calc(-1 * var(--slant))) scaleY(0); transition: transform var(--t-ui) var(--ease); }
[dir="ltr"] .c2 dd a::before, [dir="ltr"] .c2 dd a::after { left: -14px; }
[dir="rtl"] .c2 dd a::before, [dir="rtl"] .c2 dd a::after { left: auto; right: 6px; }
.c2 dd a:hover::after, .c2 dd a:focus-visible::after { transform: skewX(calc(-1 * var(--slant))) scaleY(1); }
.c2 dd a:active { background-position: -20% 0; transition: background-position .5s var(--ease); }

/* ---------- 404 ---------- */
.lost-art { display: block; width: min(460px, 100%); height: auto; margin-top: 56px; overflow: visible; }
[dir="rtl"] .lost-art { transform: scaleX(-1); }

@media (min-width: 761px) {
  .c1 { padding: 72px 0 56px; }
  .c2 { padding: 48px 0 72px; }
  .c2 .sec-title { margin-bottom: 8px; }
  .c2 dl { gap: 24px; }
  .c2 dd a { font-size: clamp(30px, 4.6vw, 64px); }
}
@media (min-width: 961px) {
  .a1 { display: flex; align-items: center; min-height: calc(86svh - var(--bar)); }
  .a1 .lead { max-width: min(640px, 56%); }
  .a1 h2 { max-width: 62%; }
  .a1-art { position: absolute; bottom: 4%; inset-inline-end: 6vw; height: 88%; width: auto; margin: 0; }
  .a2-grid { grid-template-columns: 5fr 7fr; gap: 48px; }
  .a2 .clip.tall { display: none; }
  .a2 .clip.wide { display: block; }
  .closing-clip { display: block; }
  .w3-grid { grid-template-columns: 5fr 6fr; gap: 56px; align-items: start; }
  .js .w3-grid > .scene-panel { display: block; align-self: stretch; background: none; }
  .w3-grid > .scene-panel .d-stick { position: sticky; top: calc(var(--bar) + 32px); background: var(--core-900); }
  html.smooth .w3-grid > .scene-panel .d-stick { position: static; top: auto; }
  /* the finale: title and direct contact side by side, both links on one screen */
  section.contact { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - var(--bar)); }
  .c1 { display: flex; align-items: center; --quarter: calc((100svh - var(--bar)) / 4); --peek: 12cqw; }
  .c2 { display: flex; align-items: center; }
  .contact .c1 .wrap, .contact .c2 .wrap { flex: 1; width: auto; margin: 0; }
  .contact .c1 .wrap { padding-inline: 5vw 3vw; }
  .contact .c2 .wrap { padding-inline: 4vw 5vw; }
  .c1 h2 { font-size: min(6.4vw, 12svh, 104px); }
  html:lang(en) .c1 h2 { font-size: min(3.7vw, 8svh, 60px); }
  .c2 .sec-title { font-size: min(var(--fs-section), 6svh); }
  .c2 dd a { font-size: clamp(26px, 3vw, 52px); }
}
/* wide screens: the path rises one step per column along the 1:2 angle */
@media (min-width: 1100px) {
  .path { display: grid; grid-template-columns: repeat(6, 1fr); --rise: 44px; margin-top: 28px; }
  .path li { padding: calc((5 - var(--i)) * var(--rise)) 0 0; }
  .path li:nth-child(1) { --i: 0; } .path li:nth-child(2) { --i: 1; } .path li:nth-child(3) { --i: 2; }
  .path li:nth-child(4) { --i: 3; } .path li:nth-child(5) { --i: 4; } .path li:nth-child(6) { --i: 5; }
  .path .track { display: block; position: relative; height: var(--rise); margin-bottom: 18px; }
  .path .run, .path li:last-child .run { display: block; inset-inline: 0 calc(var(--rise) / 2); top: auto; bottom: -1px; width: auto; height: 2px; }
  .path li:last-child .run { inset-inline-end: 0; }
  .path .riser { display: block; position: absolute; inset-inline-start: calc(100% - var(--rise) / 2 - 1px); bottom: 0; width: 2px; height: var(--rise); background: var(--white); transform-origin: bottom; transform: skewX(calc(var(--lean, -1) * var(--slant))); transition: background var(--t-ui); }
  [dir="rtl"] .path .riser { --lean: 1; }
  .path li:last-child .riser { display: none; }
  .path .node { inset-inline-start: 12px; top: auto; bottom: 6px; width: 20px; height: 30px; }
  .path :is(.num, strong, .d) { padding-inline-end: 16px; }
}

/* ==========================================================================================================
   The cinematic journey (world.js, D-43). "w3d" is set before the first paint where it can run and lays the page
   out for it; "world" once it draws. Without them the page keeps its drawn, still layout above.
   ========================================================================================================== */
.stage, .brand .mono { display: none; }
.world-canvas { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s var(--ease); }
html.world .world-canvas { opacity: 1; }
/* a soft shade on the reading side keeps the words clear of the scene */
.world-shade { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(to right, rgba(10,10,10,0) 34%, rgba(10,10,10,.6) 100%); }
[dir="ltr"] .world-shade { background: linear-gradient(to left, rgba(10,10,10,0) 34%, rgba(10,10,10,.6) 100%); }

html.w3d body { background: var(--core-900); }
html.w3d main, html.w3d footer { position: relative; z-index: 1; }
html.w3d #smooth-wrapper { z-index: 1; }
html.w3d :is(.h1s, section, section.alt, .a1, .a2, .home-closing, .c1, .scene-panel, .d-stick) { background: transparent; }
html.w3d section { border-top: 0; }
html.w3d .w3-grid > .scene-panel .d-stick { background: transparent; }
html.w3d main :is(h1, h2, h3, h4, p, dt, .num, strong, .d, .kicker) { text-shadow: 0 0 22px rgba(10,10,10,.95); }
html.w3d :is(.a1, .a2, .shapes, .w3, .w4, .home-closing, section.contact) { min-height: 100svh; }
html.w3d :is(.a2, .shapes, .w4, .home-closing) { display: flex; flex-direction: column; justify-content: center; }
html.w3d :is(.a2, .shapes, .w4, .home-closing) > .wrap { width: var(--wrap); }
html.w3d .home-closing { padding-bottom: var(--space); }
/* the drawings keep their room (the scene is framed onto it) but the scene replaces them */
html.w3d :is(.h1-art, .a1-art, .d-art, .gate, .horizon) { visibility: hidden; }
html.w3d .clip { opacity: 0 !important; }   /* the approved clips are shown inside the scene */
html.w3d .horizon-stage { height: clamp(220px, 42svh, 440px); }
html.w3d .closing-clip { height: 100%; aspect-ratio: auto; }
html.w3d .stage { display: block; height: clamp(240px, 46svh, 520px); }
html.w3d .stage-path { height: clamp(220px, 38svh, 420px); }
html.w3d .w4 { padding-block: calc(var(--bar) + 8px) 24px; }
html.w3d .format-art { display: none; }
html.w3d .formats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 12px; }
html.w3d .format { display: block; padding: 18px 16px 22px; background: rgba(10,10,10,.62); border-top: 1px solid var(--line); cursor: pointer; transition: box-shadow var(--t-ui), background var(--t-ui); }
html.w3d .format.on { background: rgba(27,27,27,.82); box-shadow: inset 0 -3px 0 var(--lime); }

/* the bar lies over the scene, with the approved white lockup (no black plate) */
html.w3d .bar { position: fixed; inset-inline: 0; background: linear-gradient(to bottom, #0A0A0A, rgba(10,10,10,.93) 68%, rgba(10,10,10,0)); }
html.w3d.menu-open .bar { background: var(--core); }
html.w3d .nav { border-bottom: 0; }
html.w3d .brand .colour { display: none; }
html.w3d .brand .mono { display: block; }
html.w3d.smooth #smooth-content { padding-top: 0; }

/* ---------- the opening film: headline, introduction and actions take the screen in turn ---------- */
html.w3d .h1s { display: block; height: 100vh; height: 100svh; min-height: 0; }
html.w3d .h1s .h1-art { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; animation: none; }
html.w3d .h1s .h1-copy { position: absolute; inset: 0; width: auto; margin: 0; }
html.w3d .h1s .h1-copy > * { position: absolute; margin: 0; animation: none; }
html.w3d .h1s .h1-copy h1 { inset-inline-start: 6vw; top: 50%; translate: 0 -50%; max-width: min(760px, 60vw); font-size: min(10vw, 19svh, 190px); line-height: 1.22; }
html.w3d:lang(en) .h1s .h1-copy h1 { font-size: min(5.4vw, 10svh, 96px); line-height: 1.32; }
html.w3d .h1s .h1-copy .intro { inset-inline-start: 6vw; top: 50%; translate: 0 -50%; max-width: min(720px, 52vw); font-size: clamp(20px, 2.5vw, 40px); line-height: 1.85; text-wrap: balance; }
html.w3d:lang(en) .h1s .h1-copy .intro { line-height: 1.55; }
html.w3d .h1s .h1-copy .actions { inset-inline: 0; bottom: 11svh; max-width: none; justify-content: center; padding: 0; opacity: 0; }
html.w3d .h1s .h1-copy .actions:focus-within { opacity: 1 !important; transform: none !important; pointer-events: auto !important; }
html.w3d:not(.world) .h1s .h1-copy .intro { opacity: 0; }
.word { display: inline-block; }
.meter { position: absolute; z-index: 2; inset-inline-end: 2.4vw; top: 30svh; bottom: 30svh; width: 2px; background: rgba(243,243,243,.14); }
.meter i { position: absolute; inset: 0; background: var(--lime); transform-origin: top; transform: scaleY(0); }

@media (min-width: 961px) {
  html.w3d .formats { grid-template-columns: repeat(4, 1fr); }
  html.w3d .a1 { min-height: 100svh; }
}
@media (max-width: 960px) {
  .world-shade { background: linear-gradient(to bottom, rgba(10,10,10,.35), rgba(10,10,10,.12) 50%, rgba(10,10,10,.35)); }
  [dir="ltr"] .world-shade { background: linear-gradient(to bottom, rgba(10,10,10,.35), rgba(10,10,10,.12) 50%, rgba(10,10,10,.35)); }
}
@media (max-width: 760px) {
  .meter { display: none; }
  html.w3d .h1s .h1-copy :is(h1, .intro) { inset-inline: 6vw; top: calc(var(--bar) + 6svh); translate: none; max-width: none; }
  html.w3d .h1s .h1-copy h1 { font-size: min(17vw, 11svh); }
  html.w3d:lang(en) .h1s .h1-copy h1 { font-size: min(9vw, 6.4svh); }
  html.w3d .h1s .h1-copy .intro { font-size: 21px; }
  html.w3d .h1s .h1-copy .actions { inset-inline: 6vw; bottom: 5svh; flex-direction: column; align-items: stretch; gap: 10px; }
  html.w3d .h1s .h1-copy .actions .btn { text-align: center; }
  /* a shade behind the words keeps them clear of the brightest masses */
  html.w3d .h1s::before { content: ""; position: absolute; inset: 0 0 30% 0; background: linear-gradient(to bottom, rgba(10,10,10,.75) 70%, rgba(10,10,10,0)); pointer-events: none; }
}
@media (max-width: 760px) and (max-height: 640px) {
  html.w3d:lang(en) .h1s .h1-copy .intro { font-size: 18px; }   /* the longer English text keeps to the upper half */
}
@media (max-width: 440px) {
  html.w3d .format { padding: 14px 10px 18px; }
  html.w3d:lang(en) .format h3 { font-size: 12.5px; }
}
/* phones and tablets: every section starts at the same place under the bar and reads as heading, text, then its
   piece of the scene; nothing shows through the bar */
@media (max-width: 960px) {
  html.w3d .bar { background: var(--core-900); }
  html.w3d .bar::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 28px; background: linear-gradient(to bottom, #0A0A0A, rgba(10,10,10,0)); pointer-events: none; }
  html.w3d.menu-open .bar::after { content: none; }
  html.w3d main [id] { scroll-margin-top: 0; }
  html.w3d :is(.a1, .a2, .shapes, .w3, .w4, .home-closing, .c1) { padding-top: calc(var(--bar) + 28px); }
  html.w3d :is(.a1, .a2, .shapes, .w4) { padding-bottom: 32px; }
  html.w3d :is(.a2, .shapes, .w4) { justify-content: flex-start; }
  html.w3d .a1-art { width: auto; height: min(390px, 40svh); }
  html.w3d .stage { height: clamp(150px, 28svh, 320px); }
  html.w3d .stage-path { height: clamp(150px, 24svh, 280px); }
  html.w3d .horizon-stage { height: clamp(160px, 28svh, 300px); }
  html.w3d .home-closing { min-height: 82svh; }
}
@media (min-width: 1100px) {
  /* the rise is carried by the steps in the scene: the texts sit on one line */
  html.w3d .path li { padding-top: 14px; border-top: 1px solid var(--line); }
  html.w3d .path .track { display: none; }
  html.w3d .path li.now { border-top-color: var(--lime); }
}
