/* Home page: scroll-driven 3D opening (hero3d.js) and the sections built by scripts/build_home.py. Loaded after style.css. */
.h3 { position: relative; height: 390vh; background: #130c08; color: var(--cream); padding: 0; }
.h3-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
/* The still picture the page opens on is set in the page's own <head> (scripts/build_home.py), so that it carries the build version like the preload link beside it. */
.h3 canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s; }
.h3.ready canvas { opacity: 1; }
.h3-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(19,12,8,.78) 0%, rgba(19,12,8,.38) 34%, rgba(19,12,8,0) 58%), linear-gradient(to top, rgba(19,12,8,.7) 0%, rgba(19,12,8,0) 26%); }
[dir=rtl] .h3-shade { background: linear-gradient(270deg, rgba(19,12,8,.78) 0%, rgba(19,12,8,.38) 34%, rgba(19,12,8,0) 58%), linear-gradient(to top, rgba(19,12,8,.7) 0%, rgba(19,12,8,0) 26%); }
.h3-steps { position: absolute; inset: 0; pointer-events: none; }
.h3-step { position: absolute; inset-inline-start: 28px; top: 0; bottom: 0; width: min(560px, calc(100% - 56px)); display: flex; flex-direction: column; justify-content: center; opacity: 0; will-change: opacity, transform; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.h3-step:first-child { opacity: 1; pointer-events: auto; }
.h3-step h1 { font-size: clamp(46px, 7vw, 96px); margin-bottom: 22px; }
.h3-step h2 { font-size: clamp(30px, 4.2vw, 54px); margin-bottom: 16px; }
.h3-step p { font-size: clamp(17px, 1.7vw, 22px); font-weight: 500; color: #F1E9DA; max-width: 24em; }
.h3-step .eyebrow { color: var(--gold2); }
.h3-step .cta { display: flex; flex-wrap: wrap; flex: none; align-items: flex-start; align-content: flex-start; gap: 14px; margin-top: 32px; }
.h3-step .cta .btn { flex: none; white-space: nowrap; }
.h3-bar { position: absolute; inset-inline-end: 26px; top: 50%; width: 2px; height: 140px; margin-top: -70px; background: rgba(248,244,236,.2); }
.h3-bar i { position: absolute; inset: 0; background: var(--gold2); transform: scaleY(0); transform-origin: top; }
.h3-scroll { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-family: Mono, monospace; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: rgba(248,244,236,.75); padding-bottom: 30px; }
.h3-scroll::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 22px; background: var(--gold2); animation: h3s 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes h3s { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.h3-credit { position: absolute; inset-inline-end: 24px; bottom: 18px; font-size: 12px; color: rgba(226,216,198,.7); }
.h3.nogl { height: auto; }
.h3.nogl .h3-stage { position: relative; height: auto; min-height: 100svh; background: var(--deep) url(images/project-nabitah.webp) center 38% / cover no-repeat; }
.h3.nogl canvas, .h3.nogl .h3-bar, .h3.nogl .h3-scroll, .h3.nogl .h3-credit { display: none; }
.h3.nogl .h3-steps { position: relative; padding-top: 150px; padding-bottom: 70px; }
.h3.nogl .h3-step { position: static; opacity: 1 !important; transform: none !important; margin-bottom: 44px; }

/* about: two real photos and a number row */
.duo { position: relative; padding-bottom: 12%; padding-inline-start: 12%; }
.duo .tall { width: 100%; border-radius: 4px; aspect-ratio: 3 / 4; object-fit: cover; box-shadow: 0 24px 60px rgba(42,26,16,.22); }
.duo .inset { position: absolute; inset-inline-start: 0; bottom: 0; width: 46%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 78%; border-radius: 4px; border: 6px solid var(--cream); box-shadow: 0 18px 40px rgba(42,26,16,.25); }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 72px; border-top: 1px solid var(--line); }
.nums div { padding: 26px 20px 0 0; }
.nums b { display: block; font-family: Playfair, Georgia, serif; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; color: var(--goldtxt); }
.nums span { font-size: 15px; color: var(--soft); }

/* how we explore: six stages in field order */
.how { background: var(--deep); color: var(--cream); }
.how .eyebrow { color: var(--gold2); }
.how p.lead { color: #E2D8C6; }
.stages { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.stages figure { position: relative; overflow: hidden; border-radius: 4px; background: #000; height: 100%; }
.stages img { width: 100%; height: 100%; aspect-ratio: 4 / 3.6; object-fit: cover; opacity: .86; transition: transform .7s, opacity .4s; }
.stages figure:hover img { transform: scale(1.05); opacity: 1; }
.stages figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 20px 18px; background: linear-gradient(to top, rgba(14,9,6,.94) 30%, rgba(14,9,6,0)); }
.stages i { font-style: normal; font-family: Mono, monospace; font-size: 13px; letter-spacing: 2px; color: var(--gold2); }
.stages h3 { margin: 4px 0 6px; color: #fff; font-size: 21px; }
.stages p { font-size: 15px; line-height: 1.5; color: #DDD2BD; }

/* projects by belt, with a stage pipeline */
.belts { display: grid; gap: 22px; margin-top: 36px; }
.belt { display: grid; grid-template-columns: .8fr 1.2fr; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.belt .bh { padding: 30px 30px 28px; background: var(--brown); color: var(--cream); }
.belt .bh h3 { font-family: Playfair, Georgia, serif; font-size: 27px; }
.belt .bh span { display: block; margin-top: 8px; font-weight: 600; font-size: 15px; color: var(--gold2); }
.belt .bh p { margin-top: 12px; font-size: 15px; color: #D6CAB4; }
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; padding: 16px 26px; border-top: 1px solid var(--line); transition: background .2s; }
.prow:first-child { border-top: 0; }
.prow:hover { background: #FAF5EA; }
.pn b { font-weight: 700; font-size: 17px; }
.pn > small { display: block; color: var(--soft); font-size: 14px; }
.pn b + small.ltr { display: inline; margin-inline-start: 4px; }
.pbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.pbar i { font-style: normal; position: relative; padding-top: 11px; font-size: 12px; color: #7C6D5F; text-align: center; white-space: nowrap; }
.pbar i::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 3px; background: #E7DDCB; }
.pbar i.on::before { background: var(--gold); }
.pbar i.on { color: var(--soft); }
.pbar i.cur { color: var(--goldtxt); font-weight: 700; }
.gloss { margin-top: 18px; font-size: 14px; color: var(--soft); max-width: 84ch; }
#projects .feature { margin-top: 56px; }

/* full-width band on a real core photo */
.band { position: relative; padding: 130px 0; color: #fff; background: #1C1410 center / cover no-repeat; }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,13,8,.86), rgba(20,13,8,.5) 60%, rgba(20,13,8,.25)); }
[dir=rtl] .band::before { background: linear-gradient(270deg, rgba(20,13,8,.86), rgba(20,13,8,.5) 60%, rgba(20,13,8,.25)); }
.band .wrap { position: relative; }
.band h2 { max-width: 16em; }
.band p { max-width: 36em; font-size: 19px; color: #F1E9DA; }

@media (max-width: 900px) {
  .h3-shade { background: linear-gradient(to bottom, rgba(19,12,8,.86) 0%, rgba(19,12,8,.5) 34%, rgba(19,12,8,0) 56%), linear-gradient(to top, rgba(19,12,8,.7) 0%, rgba(19,12,8,0) 22%) !important; }
  .h3-step { justify-content: flex-start; padding-top: 108px; }
  .h3-bar { height: 90px; margin-top: -45px; inset-inline-end: 14px; }
  .h3-credit { inset-inline: 16px; bottom: 12px; font-size: 10.5px; line-height: 1.5; }
  /* on a phone the credit runs to four lines: the scroll hint stands clear above it */
  .h3-scroll { bottom: 92px; } [dir=rtl] .h3-scroll { bottom: 122px; }
  .stages { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stages h3 { font-size: 17px; }
  .stages p { font-size: 13.5px; }
  .stages figcaption { padding: 50px 12px 12px; }
  .belt { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 1fr; gap: 10px; padding: 16px 20px; }
  .nums { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .band { padding: 84px 0; }
}
@media (prefers-reduced-motion: reduce) { .h3-scroll::after { animation: none; } }

/* Arabic */
[dir=rtl] .h3-step h1 { line-height: 1.3; }
[dir=rtl] .h3-step h2 { line-height: 1.4; }
[dir=rtl] .h3-scroll { font-family: PlexAr, Mont, sans-serif; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
[dir=rtl] .nums div { padding: 26px 0 0 20px; }
[dir=rtl] .nums b, [dir=rtl] .belt .bh h3 { font-family: PlexAr, Mont, sans-serif; }
[dir=rtl] .stages h3 { line-height: 1.5; }
[dir=rtl] .stages p { line-height: 1.75; }
[dir=rtl] .pbar i { font-size: 13px; }

/* goal statement and proof strip (after the opening) */
.goal { background: var(--cream); padding: 110px 0 96px; }
.goal h2 { font-size: clamp(32px, 4.6vw, 62px); max-width: 17em; line-height: 1.12; }
.goal p.lead { margin-top: 8px; max-width: 46em; font-size: 20px; }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 64px; border-top: 1px solid var(--line); }
.proof div { padding: 26px 22px 0 0; }
.proof b { display: block; font-family: Playfair, Georgia, serif; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; color: var(--goldtxt); }
.proof span { display: block; margin-top: 6px; font-size: 15px; color: var(--soft); max-width: 15em; }
.about { padding-top: 40px; }

/* interactive exploration concept */
.concept { background: var(--sand); }
.cgrid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 34px; align-items: start; margin-top: 40px; }
.cfig { position: relative; border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(42,26,16,.1); }
.cfig img { width: 100%; height: auto; }
.cpins { position: absolute; inset: 0; pointer-events: none; }
.cpin { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid #1C1410; background: rgba(255,216,110,.9); box-shadow: 0 0 0 0 rgba(28,20,16,.55); animation: cp 1.8s ease-out infinite; }
@keyframes cp { 0% { box-shadow: 0 0 0 0 rgba(28,20,16,.5); } 100% { box-shadow: 0 0 0 26px rgba(28,20,16,0); } }
.clist { list-style: none; display: grid; gap: 8px; }
.clist button { display: grid; grid-template-columns: 34px 1fr; column-gap: 6px; width: 100%; text-align: start; font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 12px 14px; cursor: pointer; transition: background .25s, border-color .25s; }
.clist button i { grid-row: 1 / 3; font-style: normal; font-family: Mono, monospace; font-size: 13px; letter-spacing: 1px; color: var(--goldtxt); padding-top: 3px; }
.clist button b { font-size: 17.5px; font-weight: 700; }
.clist button span { font-size: 15px; line-height: 1.55; color: var(--soft); max-height: 0; overflow: hidden; opacity: 0; transition: max-height .35s, opacity .35s; }
.clist button.on { background: #fff; border-color: var(--line); box-shadow: 0 8px 22px rgba(42,26,16,.07); }
.clist button.on span { max-height: 9em; opacity: 1; margin-top: 4px; color: #4A3829; }
.clist button:hover b { color: var(--goldtxt); }
@media (max-width: 900px) { .proof { grid-template-columns: 1fr 1fr; margin-top: 40px; } .goal { padding: 72px 0 60px; } .cgrid { grid-template-columns: 1fr; gap: 20px; } .cpin { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-width: 2px; } }
@media (prefers-reduced-motion: reduce) { .cpin { animation: none; } }
[dir=rtl] .goal h2 { line-height: 1.4; }
[dir=rtl] .proof div { padding: 26px 0 0 22px; }
[dir=rtl] .proof b { font-family: PlexAr, Mont, sans-serif; }
[dir=rtl] .clist button span { line-height: 1.8; }

/* Project names over the map in the opening (placed by hero3d.js, to the right of each project). */
.h3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; direction: ltr; }
.h3-lab { position: absolute; left: 0; top: 0; margin: -11px 0 0 18px; font-size: 13.5px; font-weight: 600; line-height: 22px; color: #FFF1CF; white-space: nowrap; opacity: 0; text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 10px rgba(0,0,0,.85); will-change: transform, opacity; }
@media (max-width: 700px) { .h3-lab { font-size: 12px; margin-left: 12px; } }

/* Milestone band: the announcement on stage. Official photograph, cropped only; the text sits under it so that nobody in the picture is covered. */
.event { padding: 0; background: var(--deep); color: var(--cream); }
.ev-pic { overflow: hidden; }
.ev-pic img { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: cover; object-position: 70% 50%; }
.ev-cap { padding: 30px 0 38px; border-top: 1px solid rgba(230,194,114,.35); }
.ev-cap .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px 40px; flex-wrap: wrap; }
.ev-cap .eyebrow { color: var(--gold2); }
.ev-cap h2 { font-size: clamp(26px, 3.2vw, 42px); margin: 6px 0 8px; }
.ev-cap p { font-size: clamp(16px, 1.35vw, 19px); color: #EFE6D6; max-width: 36em; }
.ev-more { flex: none; font-weight: 600; color: var(--gold2); border: 1.5px solid rgba(230,194,114,.6); border-radius: 3px; padding: 12px 22px; white-space: nowrap; }
.ev-more:hover { background: var(--gold2); color: var(--deep); }

/* Core in hand, in the art direction of the GBR advert: the real photograph across the section, a dark fall-off towards the text,
   a serif headline with one gold word and a short gold rule. It leads into the 3D core below. */
.hand { position: relative; padding: 0; background: var(--deep); color: var(--cream); overflow: hidden; min-height: min(100vh, 920px); display: flex; align-items: center; }
.hand-pic { position: absolute; inset-block: 0; inset-inline-end: 0; width: 64%; overflow: hidden; }
.hand-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hand-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--deep) 0%, rgba(19,12,8,.78) 20%, rgba(19,12,8,.12) 58%, rgba(19,12,8,0) 100%), linear-gradient(to top, rgba(19,12,8,.9) 0%, rgba(19,12,8,0) 30%); }
[dir=rtl] .hand-pic::after { background: linear-gradient(270deg, var(--deep) 0%, rgba(19,12,8,.78) 20%, rgba(19,12,8,.12) 58%, rgba(19,12,8,0) 100%), linear-gradient(to top, rgba(19,12,8,.9) 0%, rgba(19,12,8,0) 30%); }
.hand .wrap { position: relative; width: 100%; }
.hand-txt { width: min(520px, 100%); padding: 96px 0; }
.hand-txt .eyebrow { color: var(--gold2); }
.hand-txt h2 { font-size: clamp(40px, 5.6vw, 78px); line-height: 1.08; margin: 10px 0 0; }
.hand-rule { display: block; width: 64px; height: 3px; margin: 26px 0 22px; background: linear-gradient(90deg, #B5822A, #F0C864); }
.hand-txt p { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.7; color: #F1E9DA; max-width: 24em; }
@media (max-width: 800px) { .hand { min-height: 0; align-items: flex-end; } .hand-pic { position: relative; width: 100%; inset: auto; height: 82vh; }
  .hand { display: block; } .hand-pic::after, [dir=rtl] .hand-pic::after { background: linear-gradient(to top, var(--deep) 0%, rgba(19,12,8,.72) 26%, rgba(19,12,8,0) 62%); }
  .hand .wrap { margin-top: -34vh; } .hand-txt { padding: 0 0 52px; } .ev-pic img { aspect-ratio: 16 / 10; } }
@media (prefers-reduced-motion: no-preference) { @supports (animation-timeline: view()) {
  @keyframes slowzoom { from { scale: 1.09; } to { scale: 1; } }
  .ev-pic img, .hand-pic img { animation: slowzoom linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
} }

/* Line icons that draw themselves as they come into view (static where the browser cannot do it, or when less motion is asked for). */
.ico { display: block; width: 34px; height: 34px; margin-bottom: 12px; color: var(--gold2); view-timeline-name: --ico; }
.ico svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.proof .ico { color: var(--goldtxt); width: 32px; height: 32px; }
@media (prefers-reduced-motion: no-preference) { @supports (animation-timeline: view()) {
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  .ico svg > * { stroke-dasharray: 1; animation: draw linear both; animation-timeline: --ico; animation-range: entry 20% cover 32%; }
  .stages li, .proof > div { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
} }

/* A slow running strip of the company's milestones under the ceremony photograph (still, and wrapped, when less motion is asked for). */
.tick { overflow: hidden; border-top: 1px solid rgba(230,194,114,.28); background: #1b120c; direction: ltr; }
.tick-run { display: flex; width: max-content; padding: 15px 0; }
.tick span { display: inline-flex; align-items: baseline; gap: 10px; padding: 0 30px; font-size: 14.5px; color: #E9DFCE; white-space: nowrap; border-inline-end: 1px solid rgba(230,194,114,.3); }
[dir=rtl] .tick span { direction: rtl; }
.tick b { font-family: Mono, monospace; font-size: 12.5px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold2); }
[dir=rtl] .tick b { font-family: PlexAr, Mont, sans-serif; letter-spacing: 0; font-size: 14px; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { @keyframes tick { to { transform: translateX(-50%); } } .tick-run { animation: tick 48s linear infinite; } .tick:hover .tick-run { animation-play-state: paused; } }
@media (prefers-reduced-motion: reduce) { .tick-run { width: auto; flex-wrap: wrap; } .tick-run span:nth-child(n+8) { display: none; } }
[dir=rtl] .h3-lab { margin-left: -18px; }
@media (max-width: 899px) { [dir=rtl] .h3-lab { margin-left: 12px; } }

/* Real footage behind the tagline band (site/bandv.js). The still picture shows until the video is playing. */
.band { overflow: hidden; }
.bandv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.band::before { z-index: 1; } .band .wrap { z-index: 2; }
.bandv.on { opacity: 1; }

/* The band as a moment of its own: taller, the footage drifting slowly, and the text rising into place (classes set by site/bandv.js). */
.band { min-height: min(78vh, 760px); display: flex; align-items: center; }
.band .wrap { width: 100%; }
.band h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.16; }
.band h2::after { content: ""; display: block; width: 72px; height: 3px; margin-top: 26px; background: linear-gradient(90deg, #B5822A, #F0C864); }
.band p { margin-top: 22px; }
.bandv.on { animation: banddrift 14s ease-in-out infinite alternate; }
@keyframes banddrift { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.band.anim .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-block: .14em; margin-block: -.14em; }
.band.anim .w i { display: inline-block; font-style: normal; transform: translateY(118%); transition: transform 1s cubic-bezier(.16, .8, .2, 1); transition-delay: calc(var(--i) * 75ms); }
.band.anim h2::after { width: 0; transition: width .9s cubic-bezier(.16, .8, .2, 1); transition-delay: calc(var(--n) * 75ms + 150ms); }
.band.anim p { opacity: 0; transform: translateY(20px); transition: opacity .9s, transform .9s cubic-bezier(.16, .8, .2, 1); transition-delay: calc(var(--n) * 75ms + 350ms); }
.band.anim.in .w i { transform: none; }
.band.anim.in h2::after { width: 72px; }
.band.anim.in p { opacity: 1; transform: none; }
@media (max-width: 900px) { .band { min-height: 64vh; } }

