
/* -------------------- SLIDE CONTAINERS -------------------- */
.slides-container {
    position: relative;
    width: 100vw;
    max-width: 100vw;
}

.slide {
    width: 100vw;
    position: relative;
    max-width: 100vw;
    overflow: hidden;
    height: 100vh;
}

/* -------------------- SLIDE 1 GRIDS -------------------- */
.slide-1-grid-desktop {
    display: grid;
    grid-template-columns: 5% 10% 5% 60% 5% 10% 5%;
    grid-template-rows: max(5%, 36px) 10% 30% 10% 30% 10% max(5%, 36px);
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.slide-1-grid-mobile {
    display: grid;
    grid-template-columns: 5% 10% 5% 60% 5% 10% 5%;
    /* Rows 3 and 5 trimmed 30% -> 27% so the auto marquee row (row 4) goes from 12% to
       18% of the slide — exactly 1.5x thicker, and proportional at every screen height.
       Rows 3-5 still total 72%, so .s1m-b1v-img (which spans 3/6) is unaffected. */
    grid-template-rows: max(2%, 10px) max(12%, 20px) 27% auto 27% max(12%, 20px) max(2%, 10px);
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.slide-1-grid-mobile .grid-cell { position: relative; z-index: 1; }

.grid-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
}

.s1d-2-2-3 { grid-column: 2 / span 2; grid-row: 2; }
.s1d-2-5-6 { grid-column: 5 / span 2; grid-row: 2; }
.s1d-4-1-7 { grid-column: 1 / span 7; grid-row: 4; }

.s1m-2-4   { grid-column: 4; grid-row: 2; }
.s1m-4-1-7 { grid-column: 1 / span 7; grid-row: 4; }
.s1m-6-4   { grid-column: 4; grid-row: 6; }

/* -------------------- SLIDE 3 GRID -------------------- */
#slide-3 {
    display: grid;
    grid-template-columns: 10% 80% 10%;
    grid-template-rows: 10% 20% 0% 45% 10% 10% 5%;
    width: 100vw;
    max-width: 100vw;
}

.s3-1-1 { grid-area: 1 / 1 / 2 / 2; }
.s3-2-2 { grid-area: 2 / 2 / 3 / 3; }
.s3-2-3 { grid-area: 6 / 2 / 7 / 3; }
.s3-3-1 { grid-area: 3 / 1 / 4 / 2; }
.s3-4-2 { grid-area: 4 / 2 / 5 / 3; }
.s3-5-1 { grid-area: 6 / 1 / 7 / 2; }
.s3-6-1 { grid-area: 7 / 1 / 8 / 2; }
.s3-1-3 { grid-area: 1 / 3 / 2 / 4; }
.s3-3-3 { grid-area: 3 / 3 / 4 / 4; }
.s3-5-3 { grid-area: 6 / 3 / 7 / 4; }
.s3-6-3 { grid-area: 7 / 3 / 8 / 4; }

/* Base: desktop-first */
.slide-1-grid-desktop { display: grid; }
.slide-1-grid-mobile  { display: none; }

/* Slide 1 grids — orientation based */
@media screen and (orientation: portrait) {
    .slide-1-grid-desktop { display: none; }
    .slide-1-grid-mobile  { display: grid; }
}

@media screen and (orientation: landscape) {
    .slide-1-grid-desktop { display: grid; }
    .slide-1-grid-mobile  { display: none; }
}

@media screen and (orientation: portrait) {
    #slide-3 { grid-template-rows: 6% 10% max(4%, 10px) 60% max(4%, 10px) 10% 6%; }
}

@media screen and (orientation: landscape) {
    #slide-3 { grid-template-rows: 6% 9% max(2%, 10px) 66% max(2%, 10px) 9% 6%; }
}


/* -------------------- FONTS -------------------- */
@font-face {
    font-family: 'BebasNeue';
    src: url('BebasNeue-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    /* block, not swap: this face draws the preloader's name, and the intro measures that
       name to know how far the bird slides. With swap, a font arriving mid-intro re-drew
       the name in another typeface — a visible change of width and shape while it plays.
       The file is preloaded in the <head>, so the block period is normally invisible. */
    font-display: block;
}

@font-face {
    font-family: 'Manrope';
    src: url('Manrope-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EmbolismSpark';
    src: url('embolism-spark.regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'InconsolataLGC';
    src: url('inconsolata-lgc.bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Oswald';
    src: url('the-free-font.regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}


/* -------------------- GLOBAL RESET -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button, a, input, label { outline: none; }
button:focus-visible, a:focus-visible { outline: none; }

/* -------------------- AMPERSAND -------------------- */
.ampersand {
    font-family: 'InconsolataLGC', monospace;
    font-weight: bold;
    font-size: 1.0em;
}


/* -------------------- PRELOADER -------------------- */
body.preloader-active {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

.preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* The dark is a background, not the element's opacity: at the end only the dark
       lifts, while the mark stays visible and travels onto slide 1's logo. */
    background: #0b0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ---- Unveil + hand-off (preloader.js drives every step; 2.6s in all) ----
   1. The bird comes into focus out of a blur.
   2. It slides left; the name is drawn open beside it, from the bird outward.
   3. The whole mark shrinks and travels onto slide 1's own logo while the dark lifts,
      and slide 1's logo takes over in the same frame — no fade, no flash (a
      launch should be "nearly identical to the first screen").
      On phones slide 1 shows the bird alone, so there the name fades out on the way.
   The swap is seamless because both marks are built from the SAME --mark-* numbers
   below: slide 1's desktop logo is this mark at full size, scaled down by one
   transform. Same layout, same drawing, nothing to jump. */

.preloader-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Anchor for .preloader-text, and the box that travels in the hand-off. Its size is the
   logo's alone (the text is absolute), so it scales about the logo's centre. */
.preloader-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    --pl-gap: var(--mark-gap);
}

/* The slide lives on the logo's own column, so the name — placed at its final spot from
   the start — never moves; it is only drawn open. */
.preloader-logo-col {
    display: flex;
    align-items: center;
}

.preloader-logo {
    width: auto;
    height: var(--mark-logo);
    object-fit: contain;
    opacity: 0;               /* the hold brings it in; the unveil brings it into focus */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    /* Promoted before anything animates, so the first frame of the unveil is not also the
       frame that creates the layer. */
    will-change: transform, filter, opacity;
}

/* The hold: the unveil's own first frame, painted as soon as the mark can be drawn and
   left there until everything the sequence needs is ready. Blurred and slightly small —
   exactly the values the unveil starts from — so when the animation takes over there is
   nothing to jump. The browser spends the opening moments parsing, decoding and laying
   out; starting a blur-and-scale animation in the middle of that is what made a first
   visit look rushed. This way the page shows something immediately, the work finishes
   underneath it, and the animation begins on a clean frame.
   Its fade is an animation rather than a transition so it runs from a standing start, and
   it is short: if the assets are already warm the hold is over before it is noticed. */
body.preloader-hold .preloader-logo {
    opacity: 1;
    filter: blur(10px);
    transform: scale(0.9);
    animation: preloaderHold 300ms ease-out both;
}

@keyframes preloaderHold {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    body.preloader-hold .preloader-logo { animation: none; }
}

.preloader-text {
    font-family: 'BebasNeue', sans-serif;
    font-size: var(--mark-text);
    letter-spacing: var(--mark-track);
    line-height: 1;
    color: #eae7df;
    text-transform: uppercase;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    /* Absolute against .preloader-content, just past the logo's right edge and centred
       on it. The margin subtracts --slide-offset so the name sits at its FINAL spot
       from the start: the logo slides left by the same offset, so once it lands the gap
       is exactly --pl-gap and the pair is centred. */
    position: absolute;
    left: 100%;
    margin-left: calc(var(--pl-gap, 12px) - var(--slide-offset, 0px));
    top: 50%;
    transform: translateY(-50%);
}

/* Slide 1's logo waits hidden under the preloader, and is shown in the exact frame the
   travelling mark reaches it. */
body.preloader-handoff .logo-target { visibility: hidden; }

/* ---- The mark: one set of numbers for the preloader AND slide 1's desktop logo ----
   --mark-home is how far slide 1 scales the mark down: its logo height / the preloader's
   (96/136, 88/120, 66/90), which keeps slide 1's logo exactly the size it always was. */
:root {
    --mark-logo: 136px; --mark-text: 45px; --mark-track: 3px;   --mark-gap: 15px; --mark-home: 0.70588;
}
@media screen and (min-width: 701px) and (max-width: 1024px) {
    :root { --mark-logo: 120px; --mark-text: 40px; --mark-track: 2px;   --mark-gap: 11px; --mark-home: 0.73333; }
}
@media screen and (max-width: 700px) {
    :root { --mark-logo: 90px;  --mark-text: 30px; --mark-track: 1.5px; --mark-gap: 9px;  --mark-home: 0.73333; }
}


/* -------------------- SLIDE 1 LOGO TARGET -------------------- */
.logo-target {
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-target-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-target-logo { object-fit: contain; }

.logo-target-text {
    font-family: 'BebasNeue', sans-serif;
    color: #eae7df;
    text-transform: uppercase;
    font-weight: 400;
    white-space: nowrap;
}

/* Built at the preloader mark's full size and scaled down by one transform (about its
   centre, so it sits where it always did). This is what lets the preloader's travelling
   mark hand over to it without a single pixel of difference: rendered natively at the
   smaller size, text is laid out with rounded letter widths and the name came out a
   little narrower, which showed as a jump. The mobile logo overrides the height below. */
.logo-target-logo    { width: auto; height: var(--mark-logo); }
.logo-target-text    { font-size: var(--mark-text); letter-spacing: var(--mark-track); line-height: 1; }
.logo-target-content { gap: var(--mark-gap); }
#logo-target-desktop .logo-target-content { transform: scale(var(--mark-home)); }

/* The -6px nudge existed to optically centre the logo+text pair. The mobile logo has no
   text any more, so it centres on its own. Desktop keeps its text and its nudge. */
#logo-target-mobile .logo-target-content { transform: none; }

/* ---- Corner token (vertical only) ----
   One value drives BOTH the logo's inset and its size, so the mark and its margin scale
   as a single unit instead of drifting apart as independent numbers.

   max(5vw, 2vh) = the larger of the two corner margins (col 1 is 5% of width, row 1 is 2%
   of height), applied to both axes so the gap above and to the left is always equal.

   The clamp is what makes deriving the logo size from this safe: unbounded, the 5vw term
   reaches 41px+ on a tablet and would drag the logo to ~129px. The floor also holds the
   phone size exactly where it is today.

   Defined on .slide-1-grid-mobile, which is display:none in landscape — the desktop logo
   never sees any of this. */
.slide-1-grid-mobile {
    --corner: clamp(21px, max(5vw, 2vh), 27px);
}

#logo-target-mobile {
    position: absolute;
    top: var(--corner);
    left: var(--corner);
    width: auto;
    height: auto;
    z-index: 2;
}

/* The rule: the logo is 3.14x its corner margin. Height only — width stays auto so the
   file's own aspect ratio decides it. Higher specificity than the .logo-target-logo
   breakpoint tiers, so it replaces them here without touching the desktop logo. */
#logo-target-mobile .logo-target-logo {
    height: calc(var(--corner) * 2.50);
    width: auto;
}

.slide-1-grid-desktop .s1d-2-2-3,
.slide-1-grid-desktop .s1d-2-5-6,
.slide-1-grid-mobile .s1m-2-2,
.slide-1-grid-mobile .s1m-2-4,
.slide-1-grid-mobile .s1m-6-4 { overflow: visible; }

/* Vertical only (this cell exists only in .slide-1-grid-mobile).
   Optical centring for BUY NOW. The picture's visible bottom sits exactly on the row-5
   boundary, so the space under it is rows 6+7 — but the button is centred in row 6 alone,
   which reads ~9px high. The correction is the gap between those two centres, which works
   out to exactly half of row 7 at any screen size. Done as a transform rather than by
   spanning the cell into row 7, which would collide with the row-7 cells and reshuffle
   the grid. */
.slide-1-grid-mobile .s1m-6-4 .interested-container {
    transform: translateY(max(1vh, 5px));
}


/* -------------------- INTERESTED BUTTON -------------------- */
.interested-container {
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.interested-btn {
    background: transparent;
    border: none;
    color: #eae7df;
    font-family: 'Oswald', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    font-weight: normal;
    padding: 8px 16px;
}

/* BUY NOW is a real link now (<a href>), so search engines, AI agents and screen readers
   can see where buying happens. These lines undo what browsers do to links by default,
   so it looks exactly like the old button. */
a.interested-btn { display: inline-block; text-decoration: none; line-height: normal; }

@media screen and (min-width: 1025px) {
    .interested-btn { font-size: 29px; letter-spacing: 1.9px; }
}
@media screen and (min-width: 701px) and (max-width: 1024px) {
    .interested-btn { font-size: 26px; letter-spacing: 1.3px; }
}
@media screen and (max-width: 700px) {
    .interested-btn { font-size: 19px; letter-spacing: 1px; }
}


/* ==================== MARQUEE ==================== */
.s1d-4-1-7,
.s1m-4-1-7 {
    background-color: rgba(11, 10, 10, 0.85);
    color: #eae7df;
    font-family: 'BebasNeue', sans-serif;
    text-transform: uppercase;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    transition: opacity 0.6s;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-track {
    display: inline-flex;
    white-space: nowrap;
    animation: marquee linear infinite;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-animation: marquee linear infinite;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* The nudge is optical centring, not a layout fix: the line box is already dead centre in
   the band (flex align-items: center does that), but the ink inside the line box is not.
   BebasNeue reserves a 300/1000em descender that uppercase all but never uses. Measured
   at 2000px, where canvas metrics stop rounding: ascent 900, cap height 718.75, descent
   300, ink below the baseline 15.625. That leaves 181.25 of air above the caps against
   284.375 below, so the glyphs sit high by half the difference — 0.0516em, the same ratio
   at every size. 2.97px at 57.6px type, 1.86px at 36px.
   Invisible until the rims arrived; with a line drawn on each edge, the top one reaches
   the caps sooner than the bottom one reaches the baseline.
   position/top rather than a transform: .marquee-track above is already a compositing
   layer (will-change, translateZ) and this avoids giving every copy of the text its own. */
.marquee-content {
    flex-shrink: 0;
    font-size: inherit;
    letter-spacing: inherit;
    position: relative;
    top: 0.0516em;
}

/* Vertical only: marquee text 1.5x. Scaling with em rather than restating a size means
   this rides on top of all ~12 existing font-size breakpoints instead of duplicating
   them. letter-spacing is re-expressed in em (the original ratio is ~font/16 at every
   breakpoint) so it scales with the text instead of staying at its old pixel value.
   .s1m- prefix keeps this off the desktop marquee, which shares .marquee-content.
   Scroll speed self-corrects: marquee.js derives duration from track scrollWidth. */
.s1m-4-1-7 .marquee-content {
    font-size: 1.03em;
    letter-spacing: 0.0625em;
}

.s1d-4-1-7.fade-out,
.s1m-4-1-7.fade-out {
    opacity: 0;
    pointer-events: none;
}

.s1d-4-1-7::before, .s1d-4-1-7::after,
.s1m-4-1-7::before, .s1m-4-1-7::after {
    content: '';
    position: absolute;
    top: 0; height: 100%; width: 100px;
    z-index: 2; pointer-events: none;
}
.s1d-4-1-7::before, .s1m-4-1-7::before {
    left: 0;
    background: linear-gradient(to right, rgba(11,10,10,0.85) 0%, transparent 100%);
}
.s1d-4-1-7::after, .s1m-4-1-7::after {
    right: 0;
    background: linear-gradient(to left, rgba(11,10,10,0.85) 0%, transparent 100%);
}

/* -------------------- MARQUEE RIMS --------------------
   A gold edge along the top and bottom of the band. Real elements rather than
   pseudo-elements: ::before and ::after above are already the band's left and right fade
   masks, and an element can only have one of each.

   Two tones, not one — #e9d59b over #9f8023, each half of the 2px. A single flat line
   reads as a stripe painted on the band; the bright-over-dim pair reads as a lit edge with
   its own thickness, which is the whole point of a rim. Hue 45 is deliberately off the
   29-38 measured from the gold photographs: that range is correct for a photographed
   object and reads orange as a graphic line.

   The mask fades both ends out by 11%, so the rims stop the way the text does instead of
   being cut off hard at the screen edge. z-index 3 keeps them over the fade masks (z 2).
   Tuned in gild-rim-preview.html (Double). */
.s1d-4-1-7 .rim,
.s1m-4-1-7 .rim {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
    /* Fully saturated at hue 44 — #ffe294 over #d19900. The earlier pair was the same hue
       held back to 64% saturation; this is the same gold with nothing taken off it. */
    background-image: linear-gradient(to bottom, #ffe294 0 50%, #d19900 50% 100%);
    /* Ends faded over the outer 48%, so the pair is solid across only the middle 4% and
       spends the rest dissolving. Eased rather than a straight two-stop ramp: linear alpha
       does not read as linear — the last stretch before transparent is where a line looks
       like it dies, and a hard ramp made the two rims appear to give up at different
       points. Four intermediate steps, slow at first and decisive at the very end.
       mask-clip: no-clip stays even with no shadow to protect: the moment a mask is set the
       default border-box would clip any future glow or seat to the 2px box. Unprefixed
       only — -webkit-mask-clip does not accept no-clip. */
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.06) 13.44%, rgba(0,0,0,0.30) 26.4%, rgba(0,0,0,0.70) 38.4%, rgb(0,0,0) 48%, rgb(0,0,0) 52%, rgba(0,0,0,0.70) 61.6%, rgba(0,0,0,0.30) 73.6%, rgba(0,0,0,0.06) 86.56%, rgba(0,0,0,0) 100%);
            mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.06) 13.44%, rgba(0,0,0,0.30) 26.4%, rgba(0,0,0,0.70) 38.4%, rgb(0,0,0) 48%, rgb(0,0,0) 52%, rgba(0,0,0,0.70) 61.6%, rgba(0,0,0,0.30) 73.6%, rgba(0,0,0,0.06) 86.56%, rgba(0,0,0,0) 100%);
            mask-clip: no-clip;
}

.s1d-4-1-7 .rim-top, .s1m-4-1-7 .rim-top { top: 0; }
.s1d-4-1-7 .rim-bot, .s1m-4-1-7 .rim-bot { bottom: 0; }

/* Mirrored, so the bottom rim's BRIGHT half faces out the way the top rim's does. Running
   the same gradient on both put the dim half on the outside down there, and the bottom
   line read thinner and duller than the top one. */
.s1d-4-1-7 .rim-bot, .s1m-4-1-7 .rim-bot {
    background-image: linear-gradient(to top, #ffe294 0 50%, #d19900 50% 100%);
}

/* The glint: a soft highlight that crosses the rim, then waits. One animation does both —
   it travels during the first 10% of the cycle and parks off-screen and invisible for the
   rest, so the gap is just the period minus the pass. Moves by transform on a pseudo
   element, so it stays on the compositor instead of repainting a full-width line every
   frame. Same gesture as slide 3's CTA light pass, in gold. */
.s1d-4-1-7 .rim::after, .s1m-4-1-7 .rim::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6vw;
    background: linear-gradient(90deg, rgba(255,250,235,0) 0%, rgba(255,250,235,1) 50%, rgba(255,250,235,0) 100%);
    animation: rimGlint 12s linear infinite;
    will-change: transform;
}

/* 8% of 12s = 0.96s to cross, then just over 11s parked. The share sets the SPEED of the
   pass; the period sets how often it comes round. Narrower and brighter than before — a
   6vw highlight at full strength, so it reads as a quick catch of light rather than a
   drifting band. */
@keyframes rimGlint {
    0%    { transform: translateX(-6vw);  opacity: 1; }
    8%    { transform: translateX(100vw); opacity: 1; }
    8.01% { opacity: 0; }
    100%  { transform: translateX(100vw); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .s1d-4-1-7 .rim::after, .s1m-4-1-7 .rim::after { animation: none; opacity: 0; }
}

@media screen and (min-width: 1025px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 57.6px; letter-spacing: 3.6px; }
}
@media screen and (min-width: 701px) and (max-width: 1024px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 41px; letter-spacing: 2.5px; }
}
@media screen and (max-width: 700px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 35px; letter-spacing: 2.2px; }
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ==================== SLIDE 2 — COPY AND LOGOS (base styles) ==================== */

.icon-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%; height: 100%;
    opacity: 1; visibility: visible;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}
.icon-buttons.hidden { opacity: 0; visibility: hidden; }

/* Each icon sits in a transparent button. The icons are ~4.4:1, so on a phone they are
   only ~14px tall — far below the usual 44px tap target. Vertical padding grows the tap
   area to 44px and the matching negative margin cancels it out, so the row lays out
   exactly as before and the <img> keeps its own size. */
.icon-hit {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 15px 0;
    margin: -15px 0;
    cursor: pointer;
}
a.icon-hit { text-decoration: none; }   /* the marketplace logos are real links now too */
.icon-hit .icon-button { display: block; }

/* The marketplace logos' shared base. Their size and their monochrome look come from
   slide 2's .veil-icons rules (SLIDE 2 — VEIL). */
.icon-button {
    width: auto; height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 4px;
    background: #ffffff;
    padding: 4px;
    box-sizing: border-box;
}
.icon-button:hover { transform: scale(1.1); cursor: pointer; }

.icon-link { cursor: pointer; }

#slide-2 .icon-button {
    box-sizing: border-box;
    transition: transform 0.3s ease;
}
#slide-2 .icon-button:hover,
#slide-2 .icon-button:focus,
#slide-2 .icon-button:focus-visible,
#slide-2 .icon-button:active {
    box-shadow: none !important;
}

/* ---- Icon row entrance / exit ----
   A plain fade, all three together — no stagger, no movement. Opacity stays on the
   container so they can't drift apart. visibility flips instantly on the way in and
   waits out the fade on the way out, so it never cuts the animation short while still
   blocking clicks once hidden. */
#slide-2 .icon-buttons {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s;
}
#slide-2 .icon-buttons.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
}

.carousel-headline {
    font-family: 'BebasNeue', sans-serif;
    font-size: 32px;
    margin: 0 0 25px 0;
    font-weight: normal;
    letter-spacing: 1px;
    line-height: 1.2;
    color: #eae7df;
    text-transform: uppercase;
}

.carousel-body {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* ---- Marquee only — small viewport height ---- */
/* Uses marquee-specific classes only, no slide 2 classes touched */
@media screen and (max-height: 700px) and (min-width: 1025px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 38px; letter-spacing: 2.4px; }
}
@media screen and (max-height: 600px) and (min-width: 1025px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 32px; letter-spacing: 2.0px; }
}
@media screen and (max-height: 500px) and (min-width: 1025px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 27px; letter-spacing: 1.7px; }
}
@media screen and (max-height: 400px) and (min-width: 1025px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 21px; letter-spacing: 1.3px; }
}
@media screen and (max-height: 700px) and (min-width: 701px) and (max-width: 1024px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 30px; letter-spacing: 1.9px; }
}
@media screen and (max-height: 600px) and (min-width: 701px) and (max-width: 1024px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 25px; letter-spacing: 1.6px; }
}
@media screen and (max-height: 500px) and (min-width: 701px) and (max-width: 1024px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 21px; letter-spacing: 1.3px; }
}
@media screen and (max-height: 400px) and (min-width: 701px) and (max-width: 1024px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 16px; letter-spacing: 1.0px; }
}
@media screen and (max-height: 700px) and (max-width: 700px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 26px; letter-spacing: 1.6px; }
}
@media screen and (max-height: 600px) and (max-width: 700px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 21px; letter-spacing: 1.3px; }
}
@media screen and (max-height: 500px) and (max-width: 700px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 18px; letter-spacing: 1.1px; }
}
@media screen and (max-height: 400px) and (max-width: 700px) {
    .s1d-4-1-7, .s1m-4-1-7 { font-size: 14px; letter-spacing: 0.9px; }
}


/* ==================== SLIDE 3 ==================== */

#slide-3 { background-color: #F3F3F3; position: relative; overflow: hidden; }

.slide3-video {
    grid-area: 3 / 2 / 6 / 3;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

/* Fullscreen typewriter mode — portrait < 400px */
#slide-3.typewriter-fullscreen .slide3-video {
    opacity: 0;
    pointer-events: none;
}
#slide-3.typewriter-fullscreen .s3-4-2 {
    overflow: visible;
}
#slide-3.typewriter-fullscreen .s3-4-2 .typewriter-wrapper {
    aspect-ratio: unset !important;
    padding: 0 32px;
    z-index: 10;
    background: transparent;
    transition: background 1s ease;
}
#slide-3.typewriter-fullscreen.typewriter-dim .s3-4-2 .typewriter-wrapper {
    background: #161616;
}

.slide3-video img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    filter: blur(0px);
    transition: filter 2s ease;
}

#slide-3.typewriter-active .slide3-video img {
    filter: blur(5px) brightness(0.3);
}

/* Upright and landscape show DIFFERENT paintings, and while the window turns the browser
   keeps drawing the old one until the new file has arrived. deferred-media.js adds
   .s3-swapping for exactly that moment, so the slot stays empty instead of showing the
   wrong painting. No fade: the right painting simply appears once it is ready. */
.slide3-video.s3-swapping img,
.slide3-video.s3-swapping::after { visibility: hidden; }

@media screen and (orientation: portrait) {
    /* Portrait does NOT blur the photo itself — ::after carries a pre-blurred copy and
       this simply fades out underneath it. Two reasons the filter had to go: it was
       applied with no transition, so the picture snapped to blurred the moment the button
       was pressed; and blurring an image feathers its edges outward, which looks exactly
       like the picture getting bigger. brightness(1) rather than none keeps a filter on
       the element at all times so its layer is never torn down and rebuilt. */
    #slide-3.typewriter-active .slide3-video img {
        filter: brightness(1);
    }
}

@media screen and (orientation: landscape) {
    .slide3-video {
        grid-area: 4 / 2 / 5 / 3;
        width: auto;
        height: 100%;
        max-width: 100%;
        aspect-ratio: 2.35 / 1;
        align-self: center;
        justify-self: center;
    }
}

/* Slide 3's doors as ONE NUMBER: 0 = closed (at rest), 1 = open (typewriter running).
   Only this number animates, never the clip itself. The clip's edges are worked out from
   the screen size, so while clip-path was what transitioned, every resize or rotation
   glided the doors to the new size as if the button had been pressed: the picture showed
   up too narrow, then slid out. Now a new screen size lands at once and only the button
   moves the doors. Set for both orientations, so a rotation mid-typewriter never changes
   it either. (A browser without @property support simply snaps the doors.) */
@property --s3-door {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}
#slide-3.typewriter-active .slide3-video { --s3-door: 1; }

@media screen and (orientation: portrait) {
    /* Shrink-wrapping the card to the image was tried here and does NOT work: the image's
       max-height would resolve against a picture whose own height is auto, so it cannot
       constrain anything. At 760x1000 that gave a 608x938 image inside a 608x600 card —
       a 338px overflow. The card therefore keeps a definite box and object-fit: contain
       letterboxes inside it; typewriter.js measures that letterbox once and shares it. */
    /* ---- The widening window ----
       The picture spans all three columns so it can reach the screen edges, but at rest it
       is only 80vw wide — exactly the middle column it used to occupy, so nothing looks
       different. overflow: hidden makes it a window; the photo inside is a fixed size and
       does not move, so opening the window reveals more of it rather than rescaling it.
       The photo is 80vw * 1600/960 = 133.33vw wide, which is the extended file drawn at
       precisely the scale the old 960-wide crop had in the 80vw column. So at rest the
       window shows the middle 960 of 1600 — the original picture, pixel for pixel — and at
       100vw it shows the middle 1200. Height is untouched throughout.
       Superseded below: the flip card's aspect-ratio and 3D rules no longer apply, since
       the flip is not triggered in portrait any more. */
    .slide3-video {
        grid-area: 4 / 1 / 5 / 4;
        justify-self: center;
        /* EXACTLY the width of the PHOTO as it used to render, so nothing moves until the
           window is opened. Not the old box width — object-fit: contain often did not fill
           that box. On a tall window it was width-limited and letterboxed top and bottom
           (photo width = the box); on a squatter one it was height-limited and PILLARBOXED,
           the photo narrower than its box with slide background either side. Matching the
           box would have filled those side margins with extra picture, which is the second
           way this came out wider than before.
           960/1481 of the row height is the photo's width when height-limited; 80vw is the
           column when width-limited. The smaller wins, and the window then shows exactly
           960 natural px — the original file, whole — at every window shape. */
        /* The box is now ALWAYS the full screen width and the doors are a clip, not a
           resize. width is a layout property: transitioning it ran style -> layout ->
           paint -> composite on this subtree every frame for 2.4s, on the main thread,
           and re-invalidated the blurred surface each time. clip-path changes nothing
           about the box, so there is no layout at all — the photo is simply revealed,
           which is what the window was always meant to mean. */
        width: 100vw;
        height: 100%;
        max-width: none;
        aspect-ratio: auto;
        overflow: hidden;
        /* Both of these override the flip card's leftovers below, and both are required.
           preserve-3d renders children in a shared 3D space, and a 3D rendering context
           cannot clip — so overflow: hidden is silently ignored and the whole 500px photo
           paints, 100px past the window on each side. The permanent perspective() transform
           went with it: it existed only to keep the card's rasterisation stable through a
           flip that no longer happens here. */
        transform-style: flat;
        -webkit-transform-style: flat;
        transform: none;
        /* Elevator doors. 0.22,1,.36,1 was an ease-OUT — it bolted away from the closed
           position and crept into the open one, which reads as a snap, not a mechanism.
           A symmetric in-out eases off the stop, travels, and settles, and because one
           transition serves both directions the close is the exact mirror of the open. */
        /* Closed (--s3-door 0): the shutters meet at the photo's rest width, so the visible
           strip is exactly min(60dvh * 960/1481, 80vw) — the identical pixels the old box
           showed. Open (--s3-door 1): inset(0 0), edge to edge. */
        clip-path: inset(0 calc((100vw - min(60dvh * 960 / 1481, 80vw)) / 2 * (1 - var(--s3-door))));
        /* The DARKENING lives here, on the parent, and that is the whole point. Landscape
           dims with ONE ramp on ONE layer (blur(0) -> blur(5px) brightness(0.3)), so the
           picture keeps full contrast the whole way and simply gets darker.
           Portrait cross-fades two layers, and when the sharp copy was brightness(1) and
           the blurred copy brightness(0.3), the half-way point was 50% of a bright image
           superimposed on 50% of a dark one — a low-contrast double exposure that read as
           the picture going grey before it went dark.
           Putting brightness on the parent applies it to BOTH layers equally, so the
           cross-fade only ever changes SHARPNESS and the luminance follows the same single
           ramp landscape uses. A brightness filter is also a per-pixel multiply, not a
           convolution, and the blur radius underneath it never changes — so this costs
           nothing like animating the blur did.
           It has to be the parent rather than a dark overlay: brightness leaves transparent
           pixels transparent, where a black veil would darken the slide background too and
           leave a rim around the photo's soft edge. */
        filter: brightness(1);
        will-change: clip-path, filter;
        /* The doors animate through --s3-door (see @property above), never clip-path. */
        transition: --s3-door 1.6s cubic-bezier(0.65, 0, 0.35, 1),
                    filter 1.6s cubic-bezier(0.65, 0, 0.35, 1),
                    opacity 0.6s ease;
        /* The box spans the viewport now, so it must not sit in front of anything. */
        pointer-events: none;
        align-self: center;
        justify-self: center;
    }
}

/* Cells sitting on top of the video need z-index > 0 */
#slide-3 .s3-4-2,
#slide-3 .s3-3-1, #slide-3 .s3-3-3,
#slide-3 .s3-5-1, #slide-3 .s3-5-3 {
    position: relative;
    z-index: 1;
}

/* Button cells must sit above the fullscreen wrapper (z-index 10) */
#slide-3 .s3-2-2,
#slide-3 .s3-2-3 {
    position: relative;
    z-index: 20;
}

/* Fullscreen typewriter — buttons fade with opacity */
.typewriter-fs-element {
    transition: opacity 1s ease !important;
}

/* Remove default centering from all slide 3 cells */
#slide-3 .grid-cell {
    align-items: flex-start;
    justify-content: flex-start;
}
/* Re-apply centering only to the content cells */
#slide-3 .s3-4-2 {
    align-items: stretch;
    justify-content: center;
}
/* Approach the Light — top of cell, horizontally centered */
#slide-3 .s3-2-2 {
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
}
/* Contact — bottom of cell, horizontally centered */
#slide-3 .s3-2-3 {
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}

/* Phones: both buttons belong to the picture, not to the screen edges ("group
   related items"). Each sits against the picture's side of its row, so the gap to the
   picture is the same above and below and only grows gently with the screen (the 4% row
   between them), while the spare height goes to the outer margins. It also brings the
   main button down, toward the thumb (controls are easiest to reach "in the middle
   or bottom area of the display"). */
@media screen and (orientation: portrait) {
    #slide-3 .s3-2-2 { align-items: flex-end; }
    #slide-3 .s3-2-3 { align-items: flex-start; }
}

/* "Approach the Light". The words are painted, not coloured: a #161616 gradient with one
   narrow silver band in it, clipped to the glyphs (background-clip: text). At rest the
   band is parked off the left edge, so the words read as plain #161616; .glint-pass
   slides it through the letters and off the right while the button lifts 3px and settles
   — the light passes through the words, never as a box around them.
   typewriter.js plays it: when the button becomes ready again after the text, on hover,
   and as an idle nudge (5s, then 10s, then every 20s without a press). */
.cta {
    border: none;
    color: transparent;
    background-image: linear-gradient(100deg, #161616 0 44%, #a4a4a4 50%, #161616 56% 100%);
    background-size: 250% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
            background-clip: text;
    font-weight: normal;
    text-transform: uppercase;
    font-size: 16px;
    padding: 12px 24px;
    cursor: pointer;
    /* Only what actually changes. `all` would also have tweened the parked band. */
    transition: opacity 0.3s ease, scale 0.12s ease;
    font-family: 'BebasNeue', sans-serif;
    text-decoration: none;
    max-width: 100%;
    white-space: nowrap;
}

@media screen and (min-width: 1025px)                        { .cta { font-size: 32px; } }
@media screen and (min-width: 701px) and (max-width: 1024px) { .cta { font-size: 29px; } }
@media screen and (max-width: 700px)                         { .cta { font-size: 26px; } }

/* Press state (every custom button needs one). `scale`, not transform, so it
   never fights the lift animation for the same property. */
.cta:active:not(:disabled) { scale: 0.96; }

/* KEEP IN SYNC: NUDGE_MS in typewriter.js (1300). */
.cta.glint-pass {
    animation: ctaGlint 1.3s cubic-bezier(0.4, 0, 0.2, 1),
               ctaLift  1.3s linear;
}
@keyframes ctaGlint {
    from { background-position: 100% 0; }
    to   { background-position: 0% 0; }
}
/* Rises with the light, then settles with a hair of spring. */
@keyframes ctaLift {
    0%   { transform: translateY(0); }
    40%  { transform: translateY(-3px); animation-timing-function: cubic-bezier(0.3, 0, 0.3, 1); }
    75%  { transform: translateY(0.8px); }
    88%  { transform: translateY(-0.3px); }
    100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .cta.glint-pass { animation: none; }
}

.s3-4-2 {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    position: relative;
    overflow: visible;
    max-width: 100%;
}

/* Wrapper is positioned by JS to exactly match the rendered picture */
.s3-4-2 .typewriter-wrapper {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 24px;
}

.s3-4-2 .typewriter-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    box-sizing: border-box;
    width: 100%;
}

.typewriter-line {
    font-size: 18px;
    line-height: 1.6;
    font-family: 'EmbolismSpark', cursive;
    color: #f5f0e0;
    font-weight: 500;
    text-shadow: 0 0 7px #161616, 0 0 7px #161616, 0 0 7px #161616, 0 0 7px #161616, 0 0 7px #161616, 0 0 5px #161616, 0 0 3px #161616;
    text-align: left;
    white-space: nowrap;
    margin: 0; padding: 0;
    height: 38.4px;
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    overflow: visible;
    position: relative;
    width: 100%; max-width: 100%;
}
.typewriter-line.visible { opacity: 1; transform: translateY(0); }

.typewriter-cursor::after { content: ''; animation: blink 1s infinite; }
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.typewriter-container.fade-out { animation: fadeOut 1.5s ease forwards; }
@keyframes fadeOut {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* typewriter-active no longer changes background — video plays continuously */

@media screen and (min-width: 1025px) { .typewriter-line { font-size: 40px; height: 46.4px; } }
@media screen and (max-width: 1024px) { .typewriter-line { font-size: 28px; height: 28px; } }


/* ==================== SLIDE 3 — PORTRAIT ONLY ====================
   Everything below is scoped to portrait on purpose. Landscape keeps its existing
   behaviour (dimmed background, light text, blurred photo, no card flip). Placed after
   the rules above so these overrides win without needing !important. */
@media screen and (orientation: portrait) {

    /* Approaching the light no longer darkens the slide — the fullscreen text wrapper
       stays clear and the text goes dark instead of light. */
    #slide-3.typewriter-fullscreen .s3-4-2 .typewriter-wrapper,
    #slide-3.typewriter-fullscreen.typewriter-dim .s3-4-2 .typewriter-wrapper {
        background: transparent;
    }

    /* No portrait override any more: the text takes the base styling, which is landscape's
       — #f5f0e0 with the stacked #161616 halo that lets it hold up over a photograph.
       It was dark and shadowless here because portrait typed onto a light flat field; now
       it sits on the dimmed picture exactly as landscape does. */

    /* ---- Picture flip card ----
       No DOM change: the <picture> itself is the card, its <img> is the front face and
       ::after is the blank back. perspective() sits inside the transform so no ancestor
       has to become a 3D context (which would have re-based absolutely positioned
       descendants elsewhere on the slide). */
    /* The 3D context and the permanent identity transform that used to live here are gone.
       They existed solely for the flip — preserve-3d to give the card a back face, and the
       held perspective() to stop the rasterisation switching at the end of a turn. Neither
       is reachable now that portrait takes the dim-and-widen path, and preserve-3d actively
       broke it: a 3D rendering context cannot clip, so the window's overflow: hidden was
       ignored and the full 500px photo painted 100px beyond each edge — the picture looked
       permanently wider than it used to be. */
    /* NOTE: no `transition` here. This rule sits after the window rule above and shares its
       specificity, so declaring one would replace the door transition wholesale rather than
       add to it — which silently left the width un-animated. Both transitions are declared
       together up there instead. */
    .slide3-video {
        position: relative;
    }

    /* The flip transition is deliberately NOT on by default. If it were, rotating into
       portrait mid-session would animate a flip on its own: pic-flipped is already on the
       slide, so the instant this media query matches, the transform AND its transition
       both come alive together and the card rotates. No JS can suppress that — the resize
       handler is debounced and runs long after the animation has started. With the
       transition parked behind a class that JS only adds for a deliberate flip, an
       orientation change simply lands on the finished state. */

    /* Fixed size, centred, and NOT sized by the window — that is the whole trick. The
       window's width animates around it, so the photo never rescales and never shifts; it
       is simply revealed. width:auto / object-fit would both re-fit it to the window and
       the picture would appear to zoom instead. */
    .slide3-video img {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        /* Sized by HEIGHT, and from the window's REST width rather than its current one —
           so opening the window reveals more of the photo instead of growing it.
           This is what object-fit: contain used to resolve to for the original 960-wide
           file: rendered height = min(rowHeight, restWidth x 1481/960). Written out, that
           is min(60dvh, 80vw x 1481/960), which covers both regimes — height-limited on a
           squat window, width-limited on a tall one — and matches the old pixels in each.
           Width follows the extended file's own ratio, so the middle 960 of it fills the
           window precisely: the original picture, unchanged, until the window opens. */
        height: min(60dvh, calc(80vw * 1481 / 960));
        width: auto;
        max-width: none;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        /* The card flips to a blank face, so blurring the photo underneath buys nothing.
           During a turn the light falloff below animates brightness() on this img —
           checked, and safe: the img is a leaf, so being a grouping element flattens
           nothing, and the flip stays 3D with its back hidden.
           brightness(1) rather than none, deliberately: it changes nothing visually, but
           it keeps a filter on the element at ALL times. Letting the filter disappear at
           the end of a turn tears the layer down and the browser redraws the picture from
           scratch — a one-pixel twitch exactly as it lands. Same idea as the permanent
           matrix3d on the card above. */
        filter: brightness(1);
        /* Deliberately NOT faded out under the blurred copy, and this is the subtle one.
           Two stacked layers at opacity 0.5 do not add up to 1 — the backdrop still shows
           through (1 - 0.5) x (1 - 0.5) = 25% of the way, and on this slide the backdrop
           is #F3F3F3. That quarter of white haze washing over the midpoint was the
           picture "going grey" before it went dark.
           Holding this at full opacity keeps total coverage at 1 for the whole move: the
           blurred copy simply fades in ON TOP of a solid photo. The only trace is a hair
           of extra sharpness in the few px where the blurred layer's own edge is soft —
           and since the parent dims both equally, that rim differs in focus, not in
           brightness, so it cannot be seen. */
    }

    /* Dimmed like landscape now, and on the same clock as the window opening, so the two
       read as one move. The old rule here forced brightness(1) during the typewriter —
       correct when the card flipped to a blank face and there was nothing to dim, wrong now
       that the text sits on the photograph. */
    #slide-3.typewriter-active .slide3-video {
        /* The doors open through --s3-door: 1, set for both orientations (see @property). */
        /* Same 0.3 landscape lands on. */
        filter: brightness(0.3);
    }

    /* ---- The dim: a blurred, darkened COPY of the photo, cross-faded on opacity ----
       This used to be the flip card's blank back face. It is now the dim, and moving the
       dim here is the other half of the performance fix.
       A blur is a per-pixel convolution, so TRANSITIONING the img's own
       blur(0 -> 5px) forced the browser to re-blur a 1600x1481 bitmap on every one of
       the ~144 frames, on the main thread, at the same time as the doors. That was the
       lag. Here the radius never changes: this layer is rasterised exactly once and the
       compositor just fades it up, which is free.
       Sized from the img's own expressions with background-size 100% 100%, so the copy
       registers with the sharp photo underneath it.
       scale(1.06) pushes the blur's feathered edge outside the photo's rectangle — a
       filter blurs an element's own border too, which would otherwise read as a soft
       halo of the sharp picture around the dimmed one.
       --s3-img comes from deferred-media.js, off the <picture>'s resolved currentSrc:
       no filename duplicated here, no extra request (same URL, cache hit), nothing
       fetched early, and it follows an orientation source swap. */
    .slide3-video::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        height: min(60dvh, calc(80vw * 1481 / 960));
        width: calc(min(60dvh, 80vw * 1481 / 960) * 1600 / 1481);
        /* EXACTLY 1:1 with the <img> underneath — same box, same scale, same centre.
           Nothing here may resize the content. An earlier version scaled this to 1.05 and
           clipped back to the photo's rectangle, to push the blur's feathered edge out of
           sight. The rectangle matched, but the CONTENT was 5% bigger, so fading it in
           zoomed the picture very slightly. The picture must be completely static, so the
           scale is gone; the sharp img fades out beneath this instead, which is what
           keeps the edges clean without touching the magnification. */
        transform: translate(-50%, -50%);
        background-image: var(--s3-img, none);
        background-size: 100% 100%;
        background-repeat: no-repeat;
        /* Blur ONLY. Brightness is the parent's job now; if it were in this chain the two
           layers would again be at different brightnesses mid-fade, which is what made the
           picture go grey. Keeping the chain constant also means this is rasterised once. */
        filter: blur(5px);
        opacity: 0;
        /* Same 2.4s and same curve as the doors, so the darkening is part of the opening
           rather than a second event running alongside it. */
        transition: opacity 1.6s cubic-bezier(0.65, 0, 0.35, 1);
        pointer-events: none;
    }

    #slide-3.typewriter-active .slide3-video::after { opacity: 1; }

    /* Orientation changes land on the finished state instead of animating into it.
       suppressFlipAnimation() in typewriter.js silences the <picture> and the <img> with
       inline styles, which cannot reach a pseudo-element — so the dim needs a class. */
    #slide-3.s3-no-anim .slide3-video,
    #slide-3.s3-no-anim .slide3-video img,
    #slide-3.s3-no-anim .slide3-video::after { transition: none !important; }

    /* The ::before shadow plate is gone with the flip. It was the card's drop shadow and
       had nothing to cast since portrait stopped turning the picture over; it sat at zero
       alpha generating a pseudo-element box on every render. */



    /* The way back. Written as its own keyframes rather than `animation-direction:
       reverse`, because reverse also reverses the easing — the shadow would stop tracking
       the card, which plays this curve forwards. Same shapes, opposite order. */


    /* ---- Light falloff, spring seat, spring release -----------------------
       Three things make the flip read as a physical card under a light:

       1. FALLOFF. As a face turns away from the viewer it turns away from the light, so
          it darkens — to half brightness edge-on, following 1 - cos(angle). The photo
          does it through brightness() on the img; the blank back through its own colour
          (::after). The back arrives dim, and lands a touch BRIGHTER than the wall
          (#FAFAFA on #F3F3F3): lifted off the wall, it catches more light.

       2. SEAT. On landing the card is pressed into the wall on a spring: it recedes
          (scales to 0.972), goes a hair past flush and settles back. The shadow and the
          extra light run out at the exact moment of contact, so the card vanishes with a
          click rather than a fade — flush, it is #F3F3F3 on #F3F3F3 with no shadow.

       3. RELEASE. The same spring the other way: the card pops back out, a hair past its
          lifted height (shadow a touch deeper), and settles exactly on the resting shadow
          and the lifted #FAFAFA, so the turn back starts without a jump.

       The keyframes are sampled from the spring and the turn curve rather than written
       by hand — the maths lives in flip-click-preview.html, which is where this was
       tuned. KEEP IN SYNC: SHADOW_SINK_MS and SHADOW_RISE_MS in typewriter.js (750).

       Selectors are ordered, not just specific: the turn-down rules and the seat rules
       overlap for 100ms (flip-anim comes off at FLIP_MS + 100, the seat starts at
       FLIP_MS), so the seat rules share the turn rules' specificity and come after them
       — later wins, and the seat is never held back behind a finished turn. */


    /* Fullscreen text mode used to fade the picture out, which would hide the flip
       entirely — keep the card on screen so its blank face backs the text. */
    #slide-3.typewriter-fullscreen .slide3-video { opacity: 1; }
}

/* Reduced motion: no spring and no light play — the card simply is where it ends up. */
@media screen and (orientation: portrait) and (prefers-reduced-motion: reduce) {
    #slide-3 .slide3-video,
    #slide-3 .slide3-video img,
    #slide-3 .slide3-video::before,
    #slide-3 .slide3-video::after { animation-duration: 0.01ms !important; }
}


/* ==================== CONTACT ==================== */

.contact-container {
    position: relative;
    display: inline-block;
    width: 120px; height: 44px;   /* 44 = the recommended tap height */
    cursor: pointer;
}

.contact-btn, .email-reveal {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1), color 1s ease, -webkit-text-fill-color 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #161616;
    font-size: 18px;
    cursor: pointer;
}

/* A STATIC positioning box — it never animates. The reveal lives on .email-text below.
   It used to carry the scaleX itself, but a transform applies to the whole subtree, so
   the copy button got squeezed in along with the address. The button can't simply move
   out either: the offset that anchors it (`right: 100%` landscape, `top: 100%` portrait)
   is measured against an address whose width depends on the domain, and putting it in
   flow shoves the address off centre. Animating one level down solves both — the button
   stays anchored to a box that never moves. */
.email-reveal {
    font-size: 17px;
    pointer-events: none;
    /* Sized to the address instead of inheriting the button's 120px, so the box tracks
       the text rather than the contact button it replaces. */
    left: 50%;
    width: max-content;
    transform: translateX(-50%);
    transition: none;
    /* Finger, matching the contact button it replaces — it's still a click target that
       toggles back. Not selectable: copying is the copy button's job. */
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

/* The reveal itself. */
/* The reveal itself. */
.email-text {
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.4s cubic-bezier(0.65, 0, 0.35, 1),
                transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Absolute, hung off the address — its left edge here, BELOW it in portrait (see the
   portrait block after this rule). Deliberately OUT of the flex flow either way.
   In flow it was a sibling of the text, so the row's width included it and the address
   sat off-centre by half the button. Now .email-reveal sizes to the address alone, stays
   centred by its own translateX(-50%), and the button hangs outside that box: adding,
   renaming, removing or REPOSITIONING it cannot move the address by a single pixel —
   which is what lets portrait move it without a second layout for the text. */
.email-copy {
    /* One knob for the whole button — text, padding, corner and gap all scale together,
       so "15% smaller" is a single number rather than four that can drift apart. Same
       pattern as --tile-w and --corner elsewhere. The 1px border stays 1px on purpose:
       scaling it would land on a sub-pixel and render fuzzy. */
    --copy-scale: 1;
    position: absolute;
    right: 100%;
    margin-right: calc(8px * var(--copy-scale));
    opacity: 0;
    pointer-events: none;
    top: 50%;
    /* Straight box centring — the two text runs land on the same centre axis on their
       own. Measured: the visible ink of "copy" and of the address share a centre to
       within 0.000px at 16px and 0.367px at 18px. No offset, no per-breakpoint numbers. */
    transform: translateY(-50%);
    padding: calc(2px * var(--copy-scale)) calc(6px * var(--copy-scale));
    /* currentColor, so the border is exactly the ink of its own label — a fixed rgba()
       sat under the element's opacity as well, which compounded into a washed-out grey
       that didn't match the text. */
    border: 1px solid currentColor;
    border-radius: calc(4px * var(--copy-scale));
    background: transparent;
    color: inherit;
    cursor: pointer;
    /* Same face as the address, a size down — set piecemeal because the `font`
       shorthand would drag font-size back to inherit along with the family. */
    font-family: inherit;
    font-weight: inherit;
    /* Floored at 13px — at 0.7em it came out ~10px, under the usual minimum text size. */
    font-size: max(13px, calc(0.7em * var(--copy-scale)));
    line-height: 1.25;
    white-space: nowrap;
    /* Hidden, not just transparent: see the show state below for why. visibility flips
       only once the fade-out has finished, so leaving still fades. */
    visibility: hidden;
    /* Leaving is quicker than arriving — on the way back it should just get out of the
       way, not linger. The entrance is set on the show state below. */
    transition: opacity 0.3s ease, visibility 0s 0.3s, transform 0.15s ease, background-color 0.2s ease;
    /* NO will-change here, deliberately, and it is worth knowing why it was tried.
       Pinning this button to its own layer looked like the cure for the flicker on click.
       It was not — the toast's opacity transition was — and pinning it caused a second
       problem: this element is a CHILD of .email-reveal, whose centring is
       translateX(-50%) over a max-content box. That box is an odd width, so the translate
       lands on a half pixel. Text painted normally at a fractional offset is fine, but a
       permanent layer inside that subtree keeps the address composited, and composited
       text at a half-pixel offset renders soft — which is why the address came up blurry
       on first reveal and snapped sharp again on any resize.
       The toast carries the pin instead. It sits in .contact-container, outside this
       subtree, so it costs the address nothing. */
}

/* Invisible tap area. The button draws at ~22px tall; this stretches the clickable box to
   ~44px without changing what you see. Inherits pointer-events: none while hidden. */
.email-copy::after {
    content: '';
    position: absolute;
    inset: -11px -8px;
}

.email-copy:hover {
    background: rgba(22, 22, 22, 0.07);
}

.email-copy:active { transform: translateY(-50%) scale(0.94); }

/* Sits below the address so it never covers it — ABOVE it in portrait, see the single
   portrait block below. Absolute either way, so showing it can't nudge the address
   sideways. */
.copied-toast {
    position: absolute;
    top: calc(100% - 6px);
    left: 50%;
    width: max-content;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #161616;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    /* Same fix as on .email-copy, and needed for the same reason. Chrome promotes an
       element to its own compositing layer for the duration of a transition on a
       compositor-animatable property — transform is one, OPACITY IS THE OTHER. This
       toast sits 3px from the address, so every copy was promoting it, running 0.25s,
       then demoting it, and the address a few pixels away got re-rasterised at both
       ends. It never moved; it was redrawn with grayscale instead of subpixel
       antialiasing, which is what read as the address losing focus for an instant.
       Pinning it up front means there is no promote/demote cycle left to cause it.
       Both properties are listed because both are still transitioned in landscape. */
    will-change: opacity, transform;
}

.contact-container.copied .copied-toast {
    opacity: 0.75;
    transform: translateX(-50%) translateY(0);
}

/* -------------------- CONTACT, VERTICAL --------------------
   The copy button is 15% smaller and moves from the left of the address to underneath
   it; the toast moves out of that space to above the address. Only anchors change —
   the button stays absolute inside .email-reveal and the toast stays absolute inside
   .contact-container, so THE ADDRESS DOES NOT MOVE. Everything else (scale knob,
   border, padding, font, the slow drift-in) is shared with landscape and set once.

   This block is LAST in the contact section on purpose, and must stay last. A media
   query adds no specificity, so each rule here is an exact tie with its landscape
   counterpart above — source order is the only thing deciding it. Move this block up
   past .email-copy:active or .copied-toast and those overrides silently stop applying,
   with no warning and no visual clue except on a phone. */
@media screen and (orientation: portrait) {
    .email-copy {
        --copy-scale: 0.92;
        /* Centred WITHOUT a transform: left and right both pinned to 0, an intrinsic
           width, and auto side margins. The absolute box then centres itself inside
           .email-reveal, which is sized to the address — so the button's centre lands on
           the address's centre.
           It used to be left:50% + translateX(-50%). That works too, but it spends the
           transform property on layout, and transform is a single value: anything else
           that wants it — the press feedback below, or any future animation — has to
           remember to re-state the -50% or the button jumps to starting AT the centre
           line instead of straddling it. This form cannot be knocked out that way.
           The margin shorthand also clears the landscape margin-right in one go. */
        left: 0;
        right: 0;
        width: max-content;
        /* No top margin. The VISIBLE gap is not this number: .email-reveal is 44px tall
           and the address's line box is centred in it, so there is already ~9px of dead
           box below the text's ink before this margin adds anything. At 0 the gap reads
           as ~9px, which is the floor for this rule — going tighter means shortening
           .email-reveal, and that moves the address itself.
           A measured version was tried — JS centring the button between the address and
           the bottom of the slide — and it was exact to 0.01px but looked wrong: some 48
           of those 58px are slide 3's empty bottom gutter, so it centred against an edge
           nobody can see. */
        margin: 0 auto;
        top: 100%;
        transform: none;
    }

    /* Now that centring is not a transform, the press feedback is just the scale —
       nothing to re-state, nothing to keep in sync. */
    .email-copy:active { transform: scale(0.94); }

    /* The button now occupies the space under the address, where this used to sit, so
       the toast goes above. Mirrored exactly: `bottom` replaces `top`, and the same
       -6px still tightens the gap toward the address, just from the other side.
       Coupled to .email-copy's `top: 100%` above — if the button ever goes back to the
       side in portrait, this goes back under the address. */
    .copied-toast {
        top: auto;
        bottom: calc(100% - 6px);
        /* Pure fade here — no drift. The landscape version slides 4px on entry, but the
           toast sits only 7px above the address in this layout, and animating `transform`
           promotes it to its own compositing layer for the duration. That re-rasterises
           the text next to it, which Chrome typically redraws with grayscale instead of
           subpixel antialiasing — the address does not move, but it visibly changes
           weight for a moment and reads as a twitch.
           translateY(0) rather than dropping the Y entirely, so this matches the settled
           value in .contact-container.copied exactly: identical transforms at both ends
           means there is nothing for the browser to animate, and no layer gets promoted.
           opacity alone in the transition list for the same reason. */
        transform: translateX(-50%) translateY(0);
        transition: opacity 0.25s ease;
    }
}

.contact-container.show-email .contact-btn  { opacity: 0; transform: scaleX(0); pointer-events: none; user-select: none; }
.contact-container.show-email .email-reveal { pointer-events: auto; }
.contact-container.show-email .email-text   { opacity: 1; transform: scaleX(1); }

/* The button arrives well AFTER the address has settled, on its own slow fade — it no
   longer rides the reveal. Longer hold before it starts and a gentler curve than plain
   `ease`, which brightened too early and made it read as a pop. Coming back it leaves at
   once on the base rule, no delay.
   Only OPACITY is animated here on purpose: putting the entrance on `transform` would
   collide with the press feedback, since that shares the property and the class stays on
   for the whole session. */
.contact-container.show-email .email-copy {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Slow and even. cubic-bezier(0.4, 0, 0.2, 1) front-loads the brightness — most of the
       opacity lands in the first third and the rest crawls, which is what read as sharp
       even at half a second. A near-linear curve spreads it evenly across the whole
       duration, so it genuinely drifts in.
       1.8s hold before it starts, so the address is read on its own first.
       visibility waits out the same hold: pointer-events alone went live at once, so for
       the whole hold the button was invisible but clickable — a tap there copied. */
    transition: opacity 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) 1.8s,
                visibility 0s 1.8s,
                transform 0.15s ease,
                background-color 0.2s ease;
}

.contact-btn  { font-family: 'Oswald', sans-serif; font-weight: normal; }
.email-reveal { font-family: 'Manrope', sans-serif; font-weight: 500; }

@media screen and (min-width: 1025px) {
    .contact-btn  { font-size: 22px; }
    .email-reveal { font-size: 18px; }
}
@media screen and (min-width: 701px) and (max-width: 1024px) {
    .contact-btn  { font-size: 20px; }
    .email-reveal { font-size: 16px; }
}
@media screen and (max-width: 700px) {
    .contact-btn  { font-size: 17px; }
    .email-reveal { font-size: 16px; }
}


/* ==================== GLOBAL ==================== */

#slide-1, #slide-2 { position: relative; overflow: hidden; }
#slide-1 { background-color: #161616; }

/* The <picture> around the phone photo, and the <source> line inside it, make no box of their
   own, so the grid lays out the <img> exactly as before. (A visible <source> would get a grid
   cell of its own: an extra row that shrinks the photo and lifts BUY NOW.) */
.s1m-b1v-pic { display: contents; }
.s1m-b1v-pic > source { display: none; }

.s1m-b1v-img {
    grid-column: 1 / span 7;
    /* Starts at row 2 (not 3) so the picture has a higher roof. Row 2 holds the logo,
       which stays on top: cells are z-index 1, this image is z-index 0. */
    grid-row: 2 / 6;
    position: absolute;
    /* 120% wide, pulled back 10%, so the outer 10% on each side hangs off screen and is
       clipped by #slide-1's overflow:hidden. The middle 80% is the safe zone. Still
       object-fit: contain, so the picture simply grows into that wider box instead of
       being capped at the screen width — taller picture, edges sacrificed. */
    width: 120%;
    /* Top edge capped at the MIDDLE of row 2 rather than its top. The box spans rows 2-5
       = 84% of the slide; half of row 2 is 6% of the slide, i.e. 6/84 = 1/14 of the box.
       So drop the top by 1/14 and take the same off the height. */
    top: calc(100% / 14);
    height: calc(100% - 100% / 14);
    object-fit: contain;
    /* Bottom-aligned, not centred. `contain` leaves empty space above and below the
       picture; centring split it in two, which put the picture's visible bottom ~45px
       above the box bottom — an edge CSS can't see, so anything aligned below it (the
       BUY NOW button) looked wrong. Pinning to the bottom makes the visible edge and the
       box edge the same line, and stacks all the slack at the top instead. */
    object-position: center bottom;
    z-index: 0;
    left: -10%;
    /* Matches .hero-bg so the portrait picture gets the same bottom-anchored parallax
       scale as landscape (driven from slide.js). */
    transform-origin: bottom center;
    will-change: transform;
    /* Soft fade on the bottom edge: it only
       covers the last ~20%, so the statue's legs dissolve into the dark instead of ending
       on a hard line above BUY NOW. Eased so the fade has no visible starting seam. The
       box is bottom-aligned to the picture (see object-position above), so 100% here is
       the picture's real bottom edge. This element only exists in the portrait grid. */
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, rgba(0,0,0,0.75) 86%, rgba(0,0,0,0.35) 93%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 80%, rgba(0,0,0,0.75) 86%, rgba(0,0,0,0.35) 93%, transparent 100%);
}

/* ==================== SLIDE 1 — SCROLL HINT ====================
   A whispered "pssst" in the typewriter font (slide 3's voice) and a hand-drawn arrow,
   beside the statue's legs at the foot of the page; the top of slide 2 nudges up along
   the bottom edge and drops back — progressive disclosure: show that there is
   more by letting a little of it through. scroll-hint.js types the word, draws the arrow
   and runs the nudge: once after the preloader, then after 5s, 10s and every 20s idle
   on slide 1. Everything is sized in em off the word, so the pair keeps its proportions
   at every screen size. Tuned in scroll-hint-preview-2.html (D1). */
.scroll-hint {
    position: absolute;
    left: 66%;
    bottom: 6.5%;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    gap: 0.1em;
    color: #eae7df;
    pointer-events: none;
    font-family: 'EmbolismSpark', cursive;
    font-size: clamp(22px, 3.1vw, 40px);
    line-height: 1;
}
.scroll-hint-text { white-space: nowrap; letter-spacing: 0.02em; }
.scroll-hint-text span { opacity: 0; }
.scroll-hint-text span.on { opacity: 1; }

/* Beside the word, curling down past it — only a little taller than the word, so the word
   itself sits right down at the foot of the page. */
.scroll-hint-arrow {
    width: 1.43em;
    height: 2.17em;
    margin-top: 0.5em;
    overflow: visible;
}
.scroll-hint-arrow path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Scales with the arrow (about 1.1px on a phone, 2px on a big screen). Not
       non-scaling-stroke: that measures the dash in screen pixels while the draw-in
       animation measures the path in its own units, and the arrow would stop short. */
}

/* The top of slide 2, along the bottom edge. Height 0 at rest; the nudge lifts it. */
.scroll-peek {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

/* Landscape: a replica of slide 2 as it really is, anchored at the peek's top so only its
   top edge shows — the dark ground and the first picture on the right. Same numbers as the
   VEIL section (stage from 38vw, no fade), and the same file the slide loads, so it's
   cached. */
.scroll-peek-inner {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #161616;
}
.scroll-peek-stage {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    left: 38vw;
    overflow: hidden;
}
/* Framed like slide 2's first picture: 1x, as shot.
   The file is NOT named here: deferred-media.js points --peek-img at whatever the browser
   actually chose for that picture (img.currentSrc) and re-points it if a resize makes it
   choose another. Naming a file here downloaded a second size of the same photo just for
   this strip. No var, no image — the peek is simply dark until slide 2's picture exists. */
.scroll-peek-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--peek-img) no-repeat center / cover;
    transform-origin: 50% 42%;
    transform: scale(1);
}
.scroll-peek::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(22, 22, 22, 0.6), transparent);
}

@media screen and (orientation: portrait) {
    /* Right of the legs, clear of BUY NOW (centred in the middle column). */
    .scroll-hint { left: 66%; bottom: 5%; font-size: clamp(17px, 5.4vw, 26px); }
    /* Phones: the replica of slide 2's phone layout — the picture full width across the
       top 62% of the slide, framed the same (45% closer, on the woman). No side fade or
       bleed here; only its top edge ever shows. Same file the phone layout loads. */
    .scroll-peek-inner { background: #161616; }
    .scroll-peek-stage {
        left: 0;
        bottom: auto;
        height: 62%;
    }
    /* Same picture, same rule as landscape: the file comes from --peek-img. */
    .scroll-hint-arrow { width: 1.69em; height: 2.57em; }
}

/* Reduced motion: the word and arrow are simply there; no nudge. */
@media (prefers-reduced-motion: reduce) {
    .scroll-hint-text span { opacity: 1; }
}

.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: var(--hero-h, url('B1-H.jpg'));   /* the size picked in template.html's <head> */
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 100%;
    will-change: transform;
    transform-origin: bottom center;
    /* The same bottom fade portrait carries on .s1m-b1v-img, down to the stop positions,
       so the two orientations end the picture the same way. The jobs differ slightly:
       portrait is object-fit: contain inside a box that stops above BUY NOW, so the fade
       ends the shape, while here background-size: auto 100% runs the picture to the full
       height and its bottom edge IS the bottom of the screen — so this is softening a
       crop, taking the hard slice off the statue's thighs. Masking makes this a stacking
       context; harmless, since the grid cells above it are already z-index 1 and this one
       stays at auto, exactly as the portrait image does. Portrait blanks the
       background-image below, so there is nothing for the mask to act on there.
       Tuned in hero-fade-preview.html (Match portrait). */
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, rgba(0,0,0,0.75) 86%, rgba(0,0,0,0.35) 93%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 80%, rgba(0,0,0,0.75) 86%, rgba(0,0,0,0.35) 93%, transparent 100%);
}

@media screen and (orientation: portrait) {
    .hero-bg { background-image: none; }
}

.slides-container {
    position: relative;
    width: 100vw; max-width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.slides-container::-webkit-scrollbar { display: none; }

body { overflow: hidden; }

.slide { height: 100dvh; }

.slides-wrapper {
    transition: transform 0.3s ease-out;
    will-change: transform;
}


/* ==================== SLIDE 2 — VEIL ====================
   The picture fills the right of the slide; the copy sits on plain ground on the left.
   Replaces the flip carousel and the ripple field, whose rules were removed (2026-11-28).

   Type is in rem so it follows the reader's browser text size (keep the hierarchy
   at every text size). 1rem = 16px at the default setting.

   No fade between picture and copy (removed 2026-11-28). A gradient mask used to dissolve
   the picture into the dark, from the left in landscape and from the bottom on phones;
   over the pictures' faintly darker backdrop it rounded into visible stripes. The pictures
   are made on the slide's own #161616, so the stage's edge never shows: any new picture
   needs #161616 at its edges too, or the edge of its frame will. The copy sits above the
   stage (z-index 2), on #161616 either way. */
#slide-2 { background: #161616; }

.veil-stage {
    position: absolute;
    inset: 0 0 0 38%;
    /* The frame clips: the pictures zoom INSIDE it, so zooming one never pushes the
       photo over the copy. */
    overflow: hidden;
}

.veil-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    /* Each picture is framed at its own zoom (--zoom), centred on its subject (--focus).
       The incoming one settles from 4% past that to it over six seconds — slow enough to
       read as the image breathing in, not as a zoom. */
    transform-origin: var(--focus, 50% 50%);
    transform: scale(calc(var(--zoom, 1) * 1.04));
    transition: opacity 1.2s ease, transform 6s ease-out;
}
.veil-img.on { opacity: 1; transform: scale(var(--zoom, 1)); }

/* Framing: every picture sits at 1x, as shot. (Within Reach was framed 45% closer and
   A Good Name 15%; both are back to full frame.) --zoom stays in the rule above so a
   single picture can be framed again later without restructuring anything. */

/* Left edge, a little above the middle — the optical centre, where a gallery hangs its
   wall text. The texts share one grid cell, so the block's height, and therefore its
   centring, never changes between pictures. */
.veil-copy {
    position: absolute;
    left: 10vw;
    top: 46%;
    transform: translateY(-50%);
    width: 30vw;
    z-index: 2;
}

/* One grid cell, three texts: the cell sizes to the tallest. The outgoing text fades
   first; the incoming one waits 0.5s and then fades in, so the two never overlap.
   visibility keeps the hidden two out of screen readers and clicks. */
.veil-texts { display: grid; }
.veil-text {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0s 0.5s;
}
.veil-text.on {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease 0.5s, visibility 0s 0.5s;
}

/* (1,2,0): the base .carousel-headline / .carousel-body rules give the type its face and
   colour; these set its size and spacing. */
#slide-2 .veil-copy .carousel-headline { font-size: 2.5rem;   margin: 0 0 1.125rem; }
#slide-2 .veil-copy .carousel-body     { font-size: 1.375rem; max-width: 34ch; text-wrap: pretty; }   /* no lone last word */

/* The second, smaller line under a text (Within Reach, Make Your Move): the body's face, a
   step down in size and a little quieter, with some air above it. 40ch at this size is
   about as wide as the body's 34ch. Balanced, so a two-line note never ends on one word. */
#slide-2 .veil-copy .carousel-note {
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
    max-width: 40ch;
    margin: 1.125rem 0 0;
    text-wrap: balance;
}

/* Short landscape screens: same steps as before, now in rem. */
@media screen and (orientation: landscape) and (max-height: 700px) {
    #slide-2 .veil-copy .carousel-headline { font-size: 1.875rem; }
    #slide-2 .veil-copy .carousel-body     { font-size: 1.0625rem; }
    #slide-2 .veil-copy .carousel-note     { font-size: 0.9375rem; margin-top: 0.875rem; }
}
@media screen and (orientation: landscape) and (max-height: 500px) {
    #slide-2 .veil-copy .carousel-headline { font-size: 1.375rem; margin-bottom: 0.625rem; }
    #slide-2 .veil-copy .carousel-body     { font-size: 0.875rem; }
    #slide-2 .veil-copy .carousel-note     { font-size: 0.8rem; margin-top: 0.5rem; }
}

/* Marketplace row. These are controls, not copy ("Differentiate controls from
   content"), so they leave the text block and join the dots on one bottom row: logos on
   the copy's left edge (10vw), dots under the picture. Same 44px height and 4vh inset
   as .veil-dots, so the two share a centre line. Shown on the first picture only. */
#slide-2 .veil-icons {
    position: absolute;
    left: 10vw;
    bottom: 4vh;
    z-index: 2;
    width: auto; height: 44px;
    justify-content: flex-start;
    gap: 16px;
    /* Load-bearing for the logo recolour below: this row is its own stacking context
       (positioned, z-index), so mix-blend-mode can only blend with what is painted
       inside it. Without a ground here the logos screen against nothing and their black
       box shows. Same colour as the slide, so the row itself is invisible. */
    background: #161616;
}
#slide-2 .veil-icons .icon-button { max-width: 112px; max-height: none; }

/* Same beat as .veil-text, so the logos leave and arrive with the copy: out over 0.5s,
   then in over 0.5s after a 0.5s hold. Overrides the old #slide-2 .icon-buttons timing
   (0.4s, no hold) — same specificity, later in the file. */
#slide-2 .veil-icons        { transition: opacity 0.5s ease 0.5s, visibility 0s 0.5s; }
#slide-2 .veil-icons.hidden { transition: opacity 0.5s ease,      visibility 0s 0.5s; }

/* Monochrome logos. The files are colour logos on white JPG, so they are recoloured
   rather than replaced: invert turns the white ground black and the logo a bright
   complement; grayscale + brightness push every logo colour, light teal and dark blue
   alike, to near-white; a touch of sepia warms that toward the site's cream. Screen
   blending then drops the black ground out entirely, leaving only the mark on #161616.
   No white plate, no padding. Hover and keyboard focus bring it to full strength. */
#slide-2 .veil-icons .icon-button {
    background: none;
    padding: 0;
    border-radius: 0;
    filter: invert(1) grayscale(1) brightness(2.6) sepia(0.18);
    mix-blend-mode: screen;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
#slide-2 .veil-icons .icon-hit:hover .icon-button,
#slide-2 .veil-icons .icon-hit:focus-visible .icon-button { opacity: 1; transform: none; }

/* The control row — "Center a page control at the bottom of the view." Centred
   under the picture rather than the whole slide: the stage runs from 38vw to 100vw, so
   its middle is 69vw. In landscape it holds an arrow, the dots and an arrow; on phones
   the arrows are hidden and the dots sit on their own exactly as before. */
.veil-controls {
    position: absolute;
    left: 69vw;
    bottom: 4vh;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    z-index: 2;
}

.veil-dots { display: flex; }

/* The arrows: small marks in a full 44x44 target, quiet until pointed at, with a press
   state ("Always include a press state for a custom button"). */
.veil-nav {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: none; border: 0; padding: 0; cursor: pointer;
    color: #eae7df; opacity: 0.62;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s ease;
}
.veil-nav:hover { opacity: 1; }
.veil-nav:active { scale: 0.92; }
.veil-nav svg { width: 12px; height: 21px; display: block; }
.veil-nav svg path {
    fill: none; stroke: currentColor;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.veil-dots button {
    width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer;
    display: grid; place-items: center;
}
.veil-dots button::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #eae7df;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}
.veil-dots button[aria-current="true"]::before { opacity: 1; }
.veil-dots button:hover::before { opacity: 0.8; }
.veil-dots button[aria-current="true"]:hover::before { opacity: 1; }

/* The marks: the current one stretches into a short bar, so position reads at a glance.
   Both orientations. (No rule behind them — the marks carry it on their own.) */
.veil-dots button::before {
    border-radius: 3px;
    transition: opacity 0.4s ease, width 0.4s cubic-bezier(0.2, 0, 0, 1);
}
.veil-dots button[aria-current="true"]::before { width: 18px; }

/* Phones: a column — picture, copy, controls — everything centred on one axis.
   The picture takes 62% of the height and may shrink on short phones; the copy takes the
   band that is left and centres itself in it, so the text sits in the middle of the free
   space instead of being pushed up against the picture. Controls close the column. */
@media screen and (orientation: portrait) {
    #slide-2 { display: flex; flex-direction: column; }

    .veil-stage {
        position: relative;
        inset: auto;
        flex: 0 1 62%;
        min-height: 0;
    }
    /* Pinned to the top of the band, not centred in it. Centring put the pair 9.6% of the
       slide below the top of its row and only 4% above the bottom — the band's own middle
       sits lower than the row's. flex-start plus no top padding starts the headline on the
       picture's bottom edge, which is as high as it can go without overlapping it; the
       slack all falls below. The gap between headline and body is untouched — that is the
       headline's own margin-bottom and nothing here moves it. */
    .veil-copy {
        position: relative;
        left: auto; top: auto;
        transform: none;
        width: auto;
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0 7vw 1rem;
        text-align: center;
    }
    /* One step below common phone defaults, to give the column room to breathe:
       24px sits between Title 2 (22pt) and Title 1 (28pt) — Bebas is tall and condensed,
       so it still reads as a strong heading — and 16px is the usual callout size. Both well above
       the 11pt minimum. Balanced wrapping evens the lines and stops a lone last word. */
    #slide-2 .veil-copy .carousel-headline { font-size: 1.5rem; margin-bottom: 0.5rem; }
    #slide-2 .veil-copy .carousel-body     { font-size: 1rem; line-height: 1.5; margin-inline: auto; text-wrap: balance; }
    /* 30ch keeps the second line narrower than the text above it, so all three read as
       the same shape: headline, a three-line text, a two-line caption under it. */
    #slide-2 .veil-copy .carousel-note     { font-size: 0.875rem; line-height: 1.5; margin: 0.75rem auto 0; text-wrap: balance; max-width: 30ch; }

    /* Directly above the dots, so the two controls read as one group at the foot.
       The row is only as tall as the logos (~16px) — the 46px tap targets hang over the
       space around it — so the hidden row on pictures 2 and 3 costs 24px, not 72. */
    #slide-2 .veil-icons {
        position: relative;
        left: auto; bottom: auto;
        height: 24px;
        justify-content: center;
    }
    #slide-2 .veil-icons .icon-button { max-width: 72px; }

    /* Centred in row 6 of the placement grid rather than sitting on the floor. Row 6 runs
       86%-98% of the slide, so its middle is 92dvh; the row is 44px tall (the tap targets),
       so its bottom lands at 92dvh + 22px and the margin below it is the rest — hence
       8dvh - 22px. The 22px is half the row's height: if .veil-nav ever stops being 44px,
       this number moves with it. max() keeps the old floor on very short screens, where
       that calc would otherwise go negative.
       .veil-copy is the only child that grows, so it gives up the extra space and both
       this row and the icons above it rise by the same amount. */
    .veil-controls {
        position: static;
        transform: none;
        justify-content: center;
        margin: 0.5rem 0 max(calc(8dvh - 22px), 8px);
    }
    /* The arrows are here too — swiping still works, but nothing on a phone said the
       pictures could be changed.
       Everything is drawn smaller than in landscape (the slide itself is smaller, and the
       row sits close to the copy), and the arrows stand 10px clear of the three marks so
       the row reads as arrow — position — arrow. The 44x44 targets are untouched: only
       the marks inside them shrink. */
    .veil-nav svg { width: 10px; height: 17px; }
    .veil-nav.prev { margin-right: 10px; }
    .veil-nav.next { margin-left: 10px; }
    .veil-dots button::before { width: 5px; height: 5px; }
    .veil-dots button[aria-current="true"]::before { width: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .veil-img, .veil-text, .veil-text.on,
    #slide-2 .veil-icons, #slide-2 .veil-icons.hidden { transition-duration: 0.01ms; transition-delay: 0s; }
}
