/* ============================================================
   Aman's Curious Studio — style.css
   Cinematic day/night studio environment
   ============================================================ */


/* ─────────────────────────────────────────────────────────────
   TYPEFACES — the only two the site uses
   Maison Neue: headings, display text, titles.
   Inter:       body copy, navigation, labels, metrics, UI
                (loaded from Google Fonts in index.html: 300 / 400 / 500).

   Maison Neue is a commercial typeface (Milieu Grotesque). Each face
   first uses an installed copy (local), then the licensed web font in
   assets/fonts/maison-neue/ — add the .woff2 files from your web
   licence there with these exact names.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Maison Neue';
  font-weight: 300; font-style: normal; font-display: swap;
  src: local('Maison Neue Light'), local('MaisonNeue-Light'),
       url('assets/fonts/maison-neue/MaisonNeue-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'Maison Neue';
  font-weight: 400; font-style: normal; font-display: swap;
  src: local('Maison Neue Book'), local('MaisonNeue-Book'),
       url('assets/fonts/maison-neue/MaisonNeue-Book.woff2') format('woff2');
}
@font-face {
  font-family: 'Maison Neue';
  font-weight: 400; font-style: italic; font-display: swap;
  src: local('Maison Neue Book Italic'), local('MaisonNeue-BookItalic'),
       url('assets/fonts/maison-neue/MaisonNeue-BookItalic.woff2') format('woff2');
}
@font-face {
  font-family: 'Maison Neue';
  font-weight: 500; font-style: normal; font-display: swap;
  src: local('Maison Neue Medium'), local('MaisonNeue-Medium'),
       url('assets/fonts/maison-neue/MaisonNeue-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Maison Neue';
  font-weight: 600; font-style: normal; font-display: swap;
  src: local('Maison Neue Demi'), local('MaisonNeue-Demi'),
       url('assets/fonts/maison-neue/MaisonNeue-Demi.woff2') format('woff2');
}

:root {
  --font-display: 'Maison Neue', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
}


/* ─────────────────────────────────────────────────────────────
   @property — registers custom properties so CSS can
   animate them inside gradient() functions
   ───────────────────────────────────────────────────────────── */

@property --room-core {
  syntax: '<color>';
  inherits: true;
  initial-value: #C47840;
}
@property --room-mid {
  syntax: '<color>';
  inherits: true;
  initial-value: #8A4A28;
}
@property --room-edge {
  syntax: '<color>';
  inherits: true;
  initial-value: #2A1005;
}
@property --v-opacity {
  syntax: '<number>';
  inherits: true;
  initial-value: 0.50;
}
@property --g-opacity {
  syntax: '<number>';
  inherits: true;
  initial-value: 0.055;
}


/* ─────────────────────────────────────────────────────────────
   DAY PALETTE  (default)
   ───────────────────────────────────────────────────────────── */

:root {
  --room-core:  #C47840;   /* warm terracotta, lit by window */
  --room-mid:   #8A4A28;   /* deeper brown, mid wall        */
  --room-edge:  #2A1005;   /* dark shadow at corners/floor  */
  --v-opacity:  0.50;
  --g-opacity:  0.055;
}


/* ─────────────────────────────────────────────────────────────
   NIGHT PALETTE  (toggled via body.night)
   ───────────────────────────────────────────────────────────── */

body.night {
  --room-core:  #1E1430;
  --room-mid:   #100C1C;
  --room-edge:  #040208;
  --v-opacity:  0.80;
  --g-opacity:  0.082;
}


/* ─────────────────────────────────────────────────────────────
   GLOBAL TRANSITION — all @property values animate together
   ───────────────────────────────────────────────────────────── */

body {
  transition:
    --room-core  1.4s ease-in-out,
    --room-mid   1.4s ease-in-out,
    --room-edge  1.4s ease-in-out,
    --v-opacity  1.4s ease-in-out,
    --g-opacity  1.4s ease-in-out;
}


/* ─────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin:  0;
  padding: 0;
}

/* The hero (.scene) is one full screen; the work section scrolls below it */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: #0d0804;    /* fallback while scene loads */
}


/* ─────────────────────────────────────────────────────────────
   SCENE CONTAINER
   ───────────────────────────────────────────────────────────── */

.scene {
  position: relative;
  width:  100%;
  height: 100vh;
  overflow: hidden;
}

/* Shared base for all absolute scene layers */
.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}


/* ─────────────────────────────────────────────────────────────
   LAYER 1 — ROOM BASE GRADIENT
   A radial-gradient centred on the window position.
   The @property colour tokens animate on day↔night switch,
   making the whole room breathe between warm and cool.
   ───────────────────────────────────────────────────────────── */

.room-base {
  background:
    /* subtle warm bounce light from left wall */
    radial-gradient(ellipse 28% 55% at -4% 48%,
      rgba(210, 130, 60, 0.18) 0%,
      transparent              65%
    ),
    /* main room illumination — centred on window area */
    radial-gradient(ellipse 88% 82% at 50% 32%,
      var(--room-core)   0%,
      var(--room-mid)   38%,
      var(--room-edge)  70%,
      #000000           100%
    );
}


/* ─────────────────────────────────────────────────────────────
   LAYER 2 — WALL TEXTURE (SVG fractal noise, inline data URI)
   An SVG feTurbulence filter tile painted at low opacity.
   Breaks up the smooth gradient so the wall reads as plaster.
   ───────────────────────────────────────────────────────────── */

.wall-texture {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: 0.062;
  mix-blend-mode: overlay;
}


/* ─────────────────────────────────────────────────────────────
   LAYER 3 — ARCHED WINDOW
   ───────────────────────────────────────────────────────────── */

/* The wrap is sized to the frame PNG (assets/window-frame.png, 1086 × 1448).
   Measured in that image: frame top y=101, sill bottom y=1246, frame
   centre x=533, glass opening x 270–793 with a 262px-radius arch whose
   centre is at y≈511, glass bottom y=1084.
   --fs scales the PNG so frame-top → sill-bottom fills the same span the
   old window used (10px → 498px), keeping the page composition. */
.window-wrap {
  --fs: 0.4262;                        /* 488 / 1145 */
  --wrap-top: 10px;                    /* where the frame's top edge sits */
  position: absolute;
  top: calc(var(--wrap-top) - 101px * var(--fs));
  left: 50%;
  translate: calc(-533px * var(--fs)) 0;   /* centre the frame (not the image) on the page;
                                              separate from `transform` so fadeUp can't override it */
  width:  calc(1086px * var(--fs));
  height: calc(1448px * var(--fs));
  pointer-events: none;
  z-index: 3;
}

/* Foreground: the frame image. Its glass panes are transparent,
   so the view below shows through them. */
.window-asset {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  user-select: none;
  filter: brightness(1) saturate(1);
  transition: filter 1.4s ease-in-out;
}

/* Same wood, lit only by the moon */
body.night .window-asset {
  filter: brightness(0.42) saturate(0.6);
}

/* Contact shadow: a blurred, blacked-out copy of the same frame image,
   sitting BEHIND the view. The wall gets a tight shadow hugging the
   mouldings plus a deeper one under the sill; the landscape gets none
   (the view covers the copy's bars). */
.window-shadow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  user-select: none;
  filter:
    brightness(0)
    blur(calc(4px * var(--fs) / 0.4262))
    drop-shadow(0 calc(18px * var(--fs) / 0.4262) calc(16px * var(--fs) / 0.4262) rgba(0, 0, 0, 0.75));
  opacity: 0.85;
  translate: 0 calc(5px * var(--fs) / 0.4262);
  transition: opacity 1.4s ease-in-out;
}

body.night .window-shadow { opacity: 0.95; }

/* The view: an arch matching the PNG's glass opening, 8 source px
   larger all round so it tucks under the frame with no gaps.
   overflow:hidden keeps video + animations inside the opening. */
.window {
  position: absolute;
  z-index: 1;
  left:   calc(262px * var(--fs));
  top:    calc(241px * var(--fs));
  width:  calc(539px * var(--fs));
  height: calc(855px * var(--fs));     /* to y≈1096, behind the bottom rail */
  border-radius: calc(270px * var(--fs)) calc(270px * var(--fs)) 0 0;
  overflow: hidden;

  box-shadow:
    /* ① inset depth — simulates wall thickness / window reveal */
    inset 0 0 70px rgba(0, 0, 0, 0.32),
    /* ② dark frame ring — the physical window frame on the wall */
    0 0 0 18px rgba(28, 10, 3, 0.80),
    /* ③ close warm glow — light on wall nearest the frame */
    0 0  55px  22px rgba(255, 165,  50, 0.40),
    /* ④ mid-distance glow scatter */
    0 0 130px  60px rgba(255, 148,  32, 0.20),
    /* ⑤ far atmospheric halo */
    0 0 290px 125px rgba(255, 130,  15, 0.085);

  transition: box-shadow 1.4s ease-in-out;
}

body.night .window {
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.62),
    0 0 0  18px rgba(6,  4, 16, 0.90),
    0 0  45px  15px rgba( 80, 105, 230, 0.32),
    0 0 110px  52px rgba( 60,  85, 200, 0.15),
    0 0 250px 110px rgba( 50,  65, 170, 0.07);
}

/* ── Sky inside the window (day / night crossfade) ── */

.sky {
  position: absolute;
  inset: 0;
  transition: opacity 1.4s ease-in-out;
}

/* Golden-hour sky: low sun sitting just above the far hills.
   All sizes are % so the scene scales with the window on mobile. */
.sky--day {
  background:
    /* sun disk (9% × 5.5% of the arch = a circle) */
    radial-gradient(ellipse 9% 5.5% at 50% 64%,
      #FFFDF0 0%,
      #FFF0BC 55%,
      rgba(255, 226, 150, 0) 100%
    ),
    /* warm haze around the sun */
    radial-gradient(ellipse 85% 34% at 50% 64%,
      rgba(255, 214, 130, 0.85) 0%,
      rgba(255, 170,  80, 0.40) 38%,
      rgba(255, 140,  60, 0)    72%
    ),
    /* sky: dusky amber above → golden at the horizon */
    linear-gradient(to bottom,
      #8C4634  0%,
      #B95A32 18%,
      #DE8440 38%,
      #F4AE5C 54%,
      #FFD38E 64%,
      #F2A35C 74%,
      #C8703A 100%
    );
  opacity: 1;
}

/* Moonlit sky: deep blue overhead, faint lift at the horizon */
.sky--night {
  background:
    /* soft halo around the moon */
    radial-gradient(ellipse 34% 20% at 70% 22%,
      rgba(190, 208, 255, 0.24) 0%,
      rgba(190, 208, 255, 0)    70%
    ),
    linear-gradient(to bottom,
      #040817  0%,
      #08122C 32%,
      #12204A 56%,
      #22335E 66%,
      #18244A 100%
    );
  opacity: 0;
}

body.night .sky--day   { opacity: 0; }
body.night .sky--night { opacity: 1; }

/* A few delicate stars, kept to the upper sky */
.sky--night::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 16%, rgba(255,255,255,0.85) 0 0.6px, transparent 1.3px),
    radial-gradient(circle at 27% 34%, rgba(255,255,255,0.55) 0 0.5px, transparent 1.1px),
    radial-gradient(circle at 38% 11%, rgba(255,255,255,0.70) 0 0.6px, transparent 1.2px),
    radial-gradient(circle at 46% 27%, rgba(255,255,255,0.45) 0 0.4px, transparent 1px),
    radial-gradient(circle at 57%  8%, rgba(255,255,255,0.60) 0 0.5px, transparent 1.1px),
    radial-gradient(circle at 84% 12%, rgba(255,255,255,0.75) 0 0.6px, transparent 1.3px),
    radial-gradient(circle at 88% 38%, rgba(255,255,255,0.45) 0 0.4px, transparent 1px),
    radial-gradient(circle at 20% 48%, rgba(255,255,255,0.40) 0 0.4px, transparent 1px),
    radial-gradient(circle at 62% 44%, rgba(255,255,255,0.35) 0 0.4px, transparent 1px),
    radial-gradient(circle at 32% 22%, rgba(220,230,255,0.50) 0 0.5px, transparent 1.1px),
    radial-gradient(circle at 76% 52%, rgba(220,230,255,0.30) 0 0.4px, transparent 1px),
    radial-gradient(circle at  9% 32%, rgba(220,230,255,0.45) 0 0.5px, transparent 1.1px);
}

/* Moon: small, soft, slightly mottled — not a cartoon disc */
.sky--night::after {
  content: '';
  position: absolute;
  left: 70%;
  top: 22%;
  width: 9%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 40%, rgba(150, 160, 185, 0.35) 0 12%, transparent 22%),
    radial-gradient(circle at 38% 64%, rgba(150, 160, 185, 0.28) 0 10%, transparent 20%),
    radial-gradient(circle at 40% 36%, #F6F8FF 0%, #DFE5F4 55%, #BAC4DC 100%);
  box-shadow:
    0 0 14px  3px rgba(205, 220, 255, 0.32),
    0 0 46px 14px rgba(150, 175, 240, 0.14);
}

/* Distant hills — fills crossfade with the rest of the scene */
.landscape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hill {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: fill 1.4s ease-in-out, stroke 1.4s ease-in-out;
}

.hill--far  { fill: #C47448; stroke: rgba(255, 205, 140, 0.45); }  /* hazy, lit rim */
.hill--mid  { fill: #85421F; stroke: rgba(255, 180, 110, 0.22); }
.hill--near { fill: #3E180A; stroke: transparent; }

body.night .hill--far  { fill: #26315A; stroke: rgba(160, 180, 235, 0.16); }
body.night .hill--mid  { fill: #151D3A; stroke: rgba(140, 160, 220, 0.08); }
body.night .hill--near { fill: #080B18; }

/* Sun / moon bloom — sits over the hills so the sun bleeds across the ridge.
   Day and night blooms are separate layers so they crossfade smoothly. */
.sky-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.sky-glare::before,
.sky-glare::after {
  content: '';
  position: absolute;
  inset: 0;
  transition: opacity 1.4s ease-in-out;
}

.sky-glare::before {
  background: radial-gradient(ellipse 48% 20% at 50% 64%,
    rgba(255, 238, 195, 0.60) 0%,
    rgba(255, 200, 120, 0.18) 42%,
    rgba(255, 200, 120, 0)    72%
  );
}

.sky-glare::after {
  background: radial-gradient(ellipse 24% 15% at 70% 22%,
    rgba(220, 232, 255, 0.22) 0%,
    rgba(220, 232, 255, 0)    70%
  );
  opacity: 0;
}

body.night .sky-glare::before { opacity: 0; }
body.night .sky-glare::after  { opacity: 1; }

/* ── Glass: reflections, slight tint and edge darkening ── */

/* Highlights only, blended with `screen` so they read like real
   reflections: faint against the bright sunset, clearer at night. */
.glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    /* two soft diagonal reflection streaks */
    linear-gradient(118deg,
      transparent               14%,
      rgba(255, 255, 255, 0.13) 21%,
      rgba(255, 255, 255, 0.04) 27%,
      transparent               31%,
      transparent               56%,
      rgba(255, 255, 255, 0.07) 60%,
      transparent               66%
    ),
    /* bright catch-light along the upper-left of the arch */
    radial-gradient(ellipse 70% 38% at 22% 0%,
      rgba(255, 250, 240, 0.12) 0%,
      transparent              70%
    ),
    /* faint reflection of the lit room in the lower glass */
    linear-gradient(to top,
      rgba(255, 214, 170, 0.06) 0%,
      transparent              38%
    ),
    /* glass haze — not perfectly clear, slightly lifts the blacks */
    rgba(255, 240, 225, 0.04);
}

/* Depth: the frame's rebate shades the glass edges, strongest at the
   top where the arch overhangs. Sits above video + glass, under the frame. */
.window::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.30),          /* glazing bead, tucked under frame */
    inset 0 14px 20px -6px rgba(0, 0, 0, 0.38),   /* overhang shadow from the arch */
    inset 0 0 34px rgba(0, 0, 0, 0.30);           /* soft fall-off at every edge */
  transition: box-shadow 1.4s ease-in-out;
}

body.night .window::after {
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.40),
    inset 0 14px 20px -6px rgba(0, 0, 0, 0.45),
    inset 0 0 34px rgba(0, 0, 0, 0.38);
}

/* At night the dark glass reflects a little of the room behind you */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(150, 140, 190, 0.07) 0%,
    rgba(150, 140, 190, 0)    55%
  );
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

body.night .glass::after { opacity: 1; }

/* ── Landscape video (day / night) ──
   Sits above the CSS sky + hills and below the glass. Each video stays
   invisible until ambient.js marks it .is-ready, so if a file is missing
   the CSS scene underneath shows through as a fallback. */

.outside-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  opacity: 0;
  /* slight over-scale gives room for the cursor parallax */
  transform: scale(1.06) translate(calc(var(--mx, 0) * -4px), calc(var(--my, 0) * -2px));
  transition: opacity 1.4s ease-in-out;
  pointer-events: none;
}

/* Day clip: 30% down puts the horizon on the lower third of the glass
   (clear of the horizontal bar) while keeping the source's bottom-right
   watermark (~95% down) cropped away. A touch less saturation and
   brightness stops the sun from blowing out against the room. */
.outside-video--day {
  object-position: center 30%;
  filter: saturate(0.9) brightness(0.95) contrast(1.04);
}

/* Night clip: sit slightly low so more of the tree line grounds the view */
.outside-video--night {
  object-position: center 62%;
  filter: brightness(0.92) contrast(1.05);
}

body:not(.night) .outside-video--day.is-ready { opacity: 1; }
body.night       .outside-video--night.is-ready { opacity: 1; }


/* ─────────────────────────────────────────────────────────────
   LAYER 4 — LIGHT SPILL
   Two separate divs, crossfaded via opacity.
   Day: warm golden ellipse centred below the window.
   Night: cool indigo ellipse in the same position.
   ───────────────────────────────────────────────────────────── */

.spill {
  transition: opacity 1.4s ease-in-out;
  z-index: 4;
}

.spill--day {
  background: radial-gradient(ellipse 60% 48% at 50% 44%,
    rgba(255, 185, 55,  0.44)  0%,
    rgba(255, 165, 35,  0.23) 38%,
    rgba(255, 148, 20,  0.10) 65%,
    transparent                85%
  );
  opacity: 1;
}

.spill--night {
  background: radial-gradient(ellipse 60% 48% at 50% 44%,
    rgba( 80, 100, 220, 0.20)  0%,
    rgba( 60,  80, 190, 0.09) 38%,
    rgba( 50,  65, 160, 0.03) 65%,
    transparent                85%
  );
  opacity: 0;
}

body.night .spill--day   { opacity: 0; }
body.night .spill--night { opacity: 1; }

/* Soft shafts of light falling from the sill into the room.
   The fan's source sits up inside the window; blur keeps them hazy. */
.spill::before {
  content: '';
  position: absolute;
  left: 50%;
  top: var(--sill-bottom, 498px);   /* bottom of the frame asset's sill */
  translate: -50% 0;
  width: 980px;
  height: 72vh;
  filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.5) 45%, transparent 90%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.5) 45%, transparent 90%);
}

.spill--day::before {
  background:
    /* warm pool of light on the floor in front of the window */
    radial-gradient(ellipse 22% 26% at 50% 34%,
      rgba(255, 190, 100, 0.14) 0%,
      rgba(255, 190, 100, 0)    70%
    ),
    conic-gradient(from 152deg at 50% -38%,
      transparent               0deg,
      rgba(255, 196, 110, 0.12) 9deg,
      transparent              15deg,
      rgba(255, 196, 110, 0.08) 23deg,
      transparent              29deg,
      rgba(255, 196, 110, 0.12) 36deg,
      transparent              42deg,
      rgba(255, 196, 110, 0.07) 49deg,
      transparent              56deg
    );
}

.spill--night::before {
  background:
    radial-gradient(ellipse 20% 24% at 50% 34%,
      rgba(150, 170, 245, 0.06) 0%,
      rgba(150, 170, 245, 0)    70%
    ),
    conic-gradient(from 152deg at 50% -38%,
      transparent               0deg,
      rgba(150, 170, 245, 0.05) 9deg,
      transparent              15deg,
      rgba(150, 170, 245, 0.035) 23deg,
      transparent              29deg,
      rgba(150, 170, 245, 0.05) 36deg,
      transparent              42deg,
      rgba(150, 170, 245, 0.03) 49deg,
      transparent              56deg
    );
}


/* ─────────────────────────────────────────────────────────────
   LAYER 5 — ATMOSPHERIC FILM GRAIN
   A finer-frequency SVG noise tile, blended at very low opacity.
   Gives the smooth gradients a photographic, physical quality.
   ───────────────────────────────────────────────────────────── */

.grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: var(--g-opacity);
  mix-blend-mode: overlay;
  z-index: 5;
}


/* ─────────────────────────────────────────────────────────────
   LAYER 6 — CINEMATIC VIGNETTE
   Dark radial gradient from edges inward.
   Deepens on night mode, focusing the eye on the window.
   ───────────────────────────────────────────────────────────── */

.vignette {
  background: radial-gradient(ellipse 82% 70% at 50% 32%,
    transparent                           0%,
    rgba(0, 0, 0, 0.10)                 48%,
    rgba(0, 0, 0, var(--v-opacity))     100%
  );
  z-index: 6;
}


/* ─────────────────────────────────────────────────────────────
   LAYER 7 — CONTENT
   ───────────────────────────────────────────────────────────── */

.content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 44px 56px;
  pointer-events: none;   /* pass clicks through; children opt-in */
  z-index: 7;
}


/* ── Navigation ── */

.nav {
  display: flex;
  justify-content: center;
  gap: 44px;
  pointer-events: auto;

  /* fade-in on load */
  animation: fadeUp 1.0s ease both;
  animation-delay: 0.4s;
}

.nav a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(245, 232, 213, 0.78);
  text-decoration: none;
  position: relative;
  transition: color 1.4s ease-in-out, opacity 0.3s ease;
}

/* Underline slides in on hover */
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.35s ease;
}

.nav a:hover::after { width: 100%; }

body.night .nav a { color: rgba(237, 224, 208, 0.72); }


/* ── Hero text ── */

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;

  animation: fadeUp 1.0s ease both;
  animation-delay: 0.75s;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 232, 213, 0.52);
  transition: color 1.4s ease-in-out;
}

body.night .eyebrow { color: rgba(237, 224, 208, 0.48); }

.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  line-height: 1.08;
  color: #F5E8D5;
  text-shadow:
    0 2px 55px rgba(0, 0, 0, 0.70),
    0 1px  8px rgba(0, 0, 0, 0.30);
  transition: color 1.4s ease-in-out;
}

.hero-name em {
  font-style: italic;
  font-weight: 400;
}

body.night .hero-name { color: #EDE0D0; }

.hero-bio {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.82rem, 1.4vw, 0.95rem);
  line-height: 1.75;
  letter-spacing: 0.03em;
  color: rgba(245, 232, 213, 0.60);
  max-width: 400px;
  transition: color 1.4s ease-in-out;
}

body.night .hero-bio { color: rgba(237, 224, 208, 0.56); }


/* ─────────────────────────────────────────────────────────────
   PULL CORD
   ───────────────────────────────────────────────────────────── */

.cord {
  /* Reset <button> defaults */
  all: unset;

  position: absolute;
  right: 9%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  animation: fadeUp 0.9s ease both;
  animation-delay: 1.1s;
}

.cord:focus-visible .cord__ring {
  outline: 2px solid rgba(255, 220, 160, 0.70);
  outline-offset: 4px;
}

/* Thin cord line, fading at both ends via CSS mask */
.cord__line {
  display: block;
  width: 1.5px;
  height: 118px;
  background: #A05030;
  mask-image: linear-gradient(to bottom,
    transparent  0%,
    black       16%,
    black       87%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom,
    transparent  0%,
    black       16%,
    black       87%,
    transparent 100%
  );
  transition: background 1.4s ease-in-out;
}

body.night .cord__line { background: #8878C0; }

/* Ring / handle at the bottom of the cord */
.cord__ring {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #A05030;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.52),
    inset 0 1px 2px rgba(255, 200, 140, 0.22);
  transition:
    border-color 1.4s ease-in-out,
    box-shadow   1.4s ease-in-out,
    transform    0.25s ease;
}

.cord:hover .cord__ring {
  transform: scale(1.14);
}

body.night .cord__ring {
  border-color: #8878C0;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.62),
    inset 0 1px 2px rgba(180, 170, 255, 0.22);
}


/* ─────────────────────────────────────────────────────────────
   CORD PULL ANIMATION
   Physics-ish bounce decay — most energy at first pull,
   then smaller and smaller oscillations.
   ───────────────────────────────────────────────────────────── */

@keyframes cordPull {
  0%   { transform: translateY(0px);  }
  15%  { transform: translateY(22px); }
  34%  { transform: translateY(-8px); }
  50%  { transform: translateY(12px); }
  65%  { transform: translateY(-4px); }
  80%  { transform: translateY(5px);  }
  92%  { transform: translateY(-1px); }
  100% { transform: translateY(0px);  }
}

/* fadeUp is kept in the list (same values as .cord) so the browser treats it
   as the same, already-finished animation and never replays the entrance */
.cord.pulling {
  animation:
    fadeUp 0.9s ease 1.1s both,
    cordPull 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* ─────────────────────────────────────────────────────────────
   PAGE LOAD ANIMATION
   ───────────────────────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

/* Window fades in first (the centrepiece) */
.window-wrap {
  animation: fadeUp 1.4s ease both;
  animation-delay: 0.05s;
}


/* ─────────────────────────────────────────────────────────────
   AMBIENT LIFE — the world outside the window
   Everything lives inside .window (clipped to the arch) and inside
   the day / night sky layers, so it crossfades with the existing
   1.4s transition. --mx / --my (-1…1) come from ambient.js; they
   default to 0, so without JS the scene simply sits still.
   ───────────────────────────────────────────────────────────── */

/* ── Parallax: nearer layers shift further ── */

.hill--far  { transform: translate(calc(var(--mx, 0) * -1.5px), calc(var(--my, 0) * -0.8px)); }
.hill--mid  { transform: translate(calc(var(--mx, 0) * -3.5px), calc(var(--my, 0) * -1.6px)); }
.hill--near { transform: translate(calc(var(--mx, 0) * -7px),   calc(var(--my, 0) * -3px));   }

.clouds {
  position: absolute;
  inset: 0;
  transform: translate(calc(var(--mx, 0) * -3px), calc(var(--my, 0) * -1.5px));
}

/* ── DAY: drifting clouds ──
   Soft, warm-lit wisps built from overlapping radial gradients.
   Each travels its own width × 3.6 so it fully enters and leaves. */

.cloud {
  position: absolute;
  left: 0;
  width: 46%;
  height: 9%;
  filter: blur(3px);
  background:
    radial-gradient(ellipse 48% 42% at 30% 62%, var(--cloud-c) 0%, transparent 70%),
    radial-gradient(ellipse 38% 50% at 54% 46%, var(--cloud-c) 0%, transparent 70%),
    radial-gradient(ellipse 44% 38% at 76% 64%, var(--cloud-c) 0%, transparent 70%);
  animation: cloudDrift linear infinite;
  will-change: transform;
}

.cloud--1 { --cloud-c: rgba(255, 196, 160, 0.40); top: 13%; animation-duration: 140s; animation-delay: -55s;  }
.cloud--2 { --cloud-c: rgba(255, 210, 165, 0.34); top: 29%; animation-duration: 190s; animation-delay: -140s; height: 7%; width: 38%; }
.cloud--3 { --cloud-c: rgba(255, 222, 170, 0.30); top: 44%; animation-duration: 240s; animation-delay: -30s;  height: 6%; width: 54%; }

@keyframes cloudDrift {
  from { transform: translateX(-100%); }
  to   { transform: translateX(260%);  }
}

/* ── DAY: an occasional distant flock ──
   52s loop: crosses in ~15s, then the sky is empty for ~37s. */

.flock {
  position: absolute;
  left: 0;
  top: 46%;
  width: 11%;
  height: auto;
  fill: none;
  stroke: rgba(60, 26, 14, 0.70);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0;
  animation: flockFly 52s linear 6s infinite;
}

.flock path {
  transform-box: fill-box;
  transform-origin: center;
  animation: wingFlap 0.9s ease-in-out infinite alternate;
}
.flock path:nth-child(2) { animation-delay: -0.3s; animation-duration: 1.0s; }
.flock path:nth-child(3) { animation-delay: -0.6s; animation-duration: 0.85s; }
.flock path:nth-child(4) { animation-delay: -0.15s; animation-duration: 0.95s; }

@keyframes flockFly {
  0%   { transform: translate(-130%, 0);    opacity: 0;    }
  3%   {                                    opacity: 0.75; }
  27%  {                                    opacity: 0.75; }
  30%  { transform: translate(920%, -70%);  opacity: 0;    }
  100% { transform: translate(920%, -70%);  opacity: 0;    }
}

@keyframes wingFlap {
  from { transform: scaleY(1);    }
  to   { transform: scaleY(0.45); }
}

/* ── DAY: sun glow and sunlight gently breathe ──
   Uses transform/filter only — opacity stays free for the
   existing day ↔ night crossfade. */

.sky-glare::before {
  transform-origin: 50% 64%;
  animation: sunBreath 11s ease-in-out infinite alternate;
}

@keyframes sunBreath {
  from { transform: scale(1);    filter: brightness(0.9);  }
  to   { transform: scale(1.06); filter: brightness(1.1);  }
}

.spill::before {
  animation: lightBreath 13s ease-in-out infinite alternate;
}

@keyframes lightBreath {
  from { opacity: 0.72; }
  to   { opacity: 1;    }
}

/* ── NIGHT: moon glow ── */

.sky-glare::after {
  transform-origin: 70% 22%;
  animation: moonBreath 14s ease-in-out infinite alternate;
}

@keyframes moonBreath {
  from { transform: scale(1);    filter: brightness(0.88); }
  to   { transform: scale(1.08); filter: brightness(1.12); }
}

/* ── NIGHT: twinkling stars ── */

.sky--night::before {
  animation: starField 9s ease-in-out infinite alternate;
}

@keyframes starField {
  from { opacity: 0.65; }
  to   { opacity: 1;    }
}

.stars i {
  position: absolute;
  left: var(--x);
  top:  var(--y);
  width:  2px;
  height: 2px;
  border-radius: 50%;
  background: #F4F7FF;
  box-shadow: 0 0 4px 0.5px rgba(205, 220, 255, 0.75);
  animation: twinkle var(--t) ease-in-out var(--d) infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.18; transform: scale(0.7); }
  to   { opacity: 0.95; transform: scale(1);   }
}

/* ── NIGHT: an occasional shooting star ──
   26s loop; the streak itself lasts under a second. */

.shooting-star {
  position: absolute;
  top: 13%;
  left: 60%;
  width: 24%;
  height: 1.5px;
  border-radius: 1px;
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(205, 220, 255, 0.35) 30%,
    transparent              100%
  );
  transform-origin: left center;
  opacity: 0;
  animation: shootingStar 26s linear 7s infinite;
}

@keyframes shootingStar {
  0%   { transform: rotate(-24deg) translateX(0);     opacity: 0; }
  0.8% {                                              opacity: 1; }
  3.2% { transform: rotate(-24deg) translateX(-170%); opacity: 0; }
  100% { transform: rotate(-24deg) translateX(-170%); opacity: 0; }
}

/* ── Glass: a faint sheen that slides as you move ── */

.glass::before {
  content: '';
  position: absolute;
  inset: -25%;
  background: linear-gradient(118deg,
    transparent               42%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent               58%
  );
  transform: translate(calc(var(--mx, 0) * 16px), calc(var(--my, 0) * 9px));
}


/* ─────────────────────────────────────────────────────────────
   REDUCED MOTION — instant switches, no animations
   ───────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:  0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  /* Looping ambient effects would flicker at 0.01ms — stop them
     outright and leave a calm, still scene. */
  .cloud,
  .flock,
  .flock path,
  .stars i,
  .shooting-star,
  .sky--night::before,
  .sky-glare::before,
  .sky-glare::after,
  .spill::before {
    animation: none !important;
  }

  .flock,
  .shooting-star { display: none; }

  .cloud--1 { transform: translateX(20%);  }
  .cloud--2 { transform: translateX(150%); }
  .cloud--3 { transform: translateX(60%);  }
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — mobile
   ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {

  /* Same footprint as the old mobile window: frame top 2px → sill 378px.
     Everything inside the wrap scales from --fs. */
  .window-wrap {
    --fs: 0.3284;           /* 376 / 1145 */
    --wrap-top: 2px;
  }

  :root {
    --sill-bottom: 378px;
  }

  .cord {
    right: 5%;
  }

  .content {
    padding: 22px 24px 40px;
  }

  .nav {
    gap: 28px;
  }

  .hero-name {
    font-size: clamp(2.2rem, 8.5vw, 3rem);
  }

  .hero-bio {
    font-size: 0.84rem;
  }

}


/* ═════════════════════════════════════════════════════════════
   SELECTED WORK — shared tokens (from the hero) + project component
   ═════════════════════════════════════════════════════════════ */
:root {
  --sw-surface: #0D0804;
  --sw-ink:     #F5E8D5;
  --sw-body:    rgba(245, 232, 213, 0.60);
  --sw-quiet:   rgba(245, 232, 213, 0.52);
  --sw-line:    rgba(245, 232, 213, 0.12);
  --sw-accent:  #C47840;
  --text-display: clamp(2.8rem, 5.5vw, 4.8rem);
  --text-section: clamp(2rem, 3.4vw, 2.75rem);   /* section headings: Selected Work, The Playground */
  --text-heading: clamp(1.4rem, 2.75vw, 2.4rem);
  --text-body:    clamp(0.82rem, 1.4vw, 0.95rem);
  --text-label:   0.72rem;
  --text-micro:   0.68rem;
  --space-1: 8px;  --space-2: 16px; --space-3: 28px; --space-4: 44px;
  --space-5: 56px; --space-6: 88px; --space-7: 168px;
  --shadow-object: 0 10px 22px rgba(0, 0, 0, 0.45);
  /* natural depth: tight contact shadow + wide soft ambient falloff */
  --sw-depth: 0 2px 4px rgba(0, 0, 0, 0.28), 0 14px 28px rgba(0, 0, 0, 0.32), 0 40px 80px rgba(0, 0, 0, 0.30);
}
body.night {
  --sw-surface: #040208;
  --sw-ink:     #EDE0D0;
  --sw-body:    rgba(237, 224, 208, 0.56);
  --sw-quiet:   rgba(237, 224, 208, 0.48);
  --sw-line:    rgba(237, 224, 208, 0.10);
  --sw-accent:  #8878C0;
}

.sw {
  position: relative;
  padding: var(--space-7) var(--space-4);
  background-color: var(--sw-surface);
  color: var(--sw-ink);
  transition: background-color 1.4s ease-in-out, color 1.4s ease-in-out;
}
.sw__inner { max-width: 1000px; margin: 0 auto; }   /* centred; side padding handles narrow screens */
.sw__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-section); line-height: 1.1; letter-spacing: -.01em;
  margin-bottom: var(--space-6);
}
.sw__title em { font-style: normal; }

.sw-project + .sw-project { margin-top: 120px; }
.sw-project__media {
  display: block;
  box-shadow: var(--sw-depth);
}
.sw-project__media img { display: block; width: 100%; height: auto; }
.sw-project__title {
  margin-top: 24px;                                    /* image → title */
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-heading); line-height: 1.15;
}
.sw-project__desc {
  margin-top: 12px; max-width: 60ch;                   /* title → desc */
  font-family: var(--font-body); font-weight: 300;
  font-size: var(--text-body); line-height: 1.65; letter-spacing: 0.03em;
  color: var(--sw-body);
}
.sw-metrics {
  /* equal columns spread across the content width */
  display: flex; flex-wrap: wrap; column-gap: 96px; row-gap: 24px;   /* wraps if a card has many figures */
  margin-top: 24px;                                    /* desc → divider */
  padding-top: 20px;                                   /* divider → figures */
  border-top: 1px solid var(--sw-line);
}
.sw-metrics dt {
  font-family: var(--font-body); font-weight: 300;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);           /* moderate: was up to 2.4rem */
  line-height: 1.1; letter-spacing: 0;
  color: var(--sw-ink); opacity: 0.9;
}
.sw-metrics dd {
  margin-top: var(--space-1);
  font-family: var(--font-body); font-weight: 300;
  font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--sw-quiet);
}
.sw-project__cta {
  display: inline-flex; align-items: center; gap: var(--space-1);
  margin-top: 28px; padding-bottom: 4px;               /* metrics → CTA */
  font-family: var(--font-body); font-weight: 300;
  font-size: var(--text-label); letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--sw-ink); text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.35s ease;
}
.sw-project__cta:hover { opacity: 0.75; }
.sw-project__cta:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }

@media (max-width: 720px) {
  .sw { padding: var(--space-6) var(--space-2); }
  .sw__title { margin-bottom: var(--space-5); }
  .sw-metrics { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 20px; }
  .sw-project__title { margin-top: 20px; }
  .sw-project__cta { margin-top: 24px; }
  .sw-project + .sw-project { margin-top: var(--space-6); }
}


/* ═════════════════════════════════════════════════════════════
   SELECTED WORK — interaction layer (sw-motion.js)
   Applies only when JS runs and motion is allowed (.sw-motion).
   ═════════════════════════════════════════════════════════════ */
.sw-project { --sw-tint: 196, 120, 64; }
.sw-project__media { position: relative; overflow: hidden; }
.sw-project__media img {
  transition: scale 1.1s cubic-bezier(.2,.7,.2,1);
}
.sw-light { display: none; }

.sw-motion .sw-project__media {
  box-shadow: none;
  transition: box-shadow 0.9s ease;
  will-change: clip-path;
}
.sw-motion .sw-project__media.is-open { box-shadow: var(--sw-depth); }

/* 2 · cursor drift — a few px, image slightly overscaled so edges never show */
.sw-motion .sw-project__media img {
  scale: 1.02;
  translate: calc(var(--sw-dx, 0) * -6px) calc(var(--sw-dy, 0) * -4px);
}
/* 3 · hover: gentle zoom + warm light from the project's own colour */
.sw-motion .sw-project.is-hover .sw-project__media img { scale: 1.05; }
.sw-motion .sw-light {
  display: block;
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 90% at var(--sw-lx, 50%) var(--sw-ly, 40%),
      rgba(var(--sw-tint), 0.22) 0%, rgba(var(--sw-tint), 0.06) 45%, transparent 75%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.sw-motion .sw-project.is-hover .sw-light { opacity: 1; }
.sw-motion .sw-project.is-hover .sw-project__media.is-open {
  box-shadow: var(--sw-depth), 0 30px 90px -20px rgba(var(--sw-tint), 0.22);
}

/* 4 · scroll-entry: rise + fade, staggered in reading order */
.sw-motion [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.9s ease, translate 1s cubic-bezier(.2,.7,.2,1);
}
.sw-motion [data-reveal].is-in { opacity: 1; translate: 0 0; }
.sw-motion .sw-project__desc[data-reveal]  { transition-delay: .08s; }
.sw-motion .sw-metrics[data-reveal]        { transition-delay: .16s; }
.sw-motion .sw-project__cta[data-reveal]   { transition-delay: .24s; }

/* Past Work — same component, introduced by a quieter heading and a divider */
.sw__title--past {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--sw-line);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: var(--space-6);
  transition: border-color 1.4s ease-in-out;
}
@media (max-width: 720px) {
  .sw__title--past { margin-top: var(--space-6); padding-top: var(--space-5); margin-bottom: var(--space-5); }
}


/* ═════════════════════════════════════════════════════════════
   SELECTED WORK — living banner (3-Bet Club card)
   A still felt + card background, the Hub recording on a phone, and two
   window-light layers that drift. Designed at 1920×900; all in % of that.
   ═════════════════════════════════════════════════════════════ */
.sw-living {
  position: relative; aspect-ratio: 1920 / 900; overflow: hidden;
  /* each project sets its own layers; 3-Bet Club is the default */
  --l-bg: url(assets/work/living-3bet/bg.jpg); --l-mask: url(assets/work/living-3bet/phone-mask.png);
  --l-shade: url(assets/work/living-3bet/shade.png); --l-glow: url(assets/work/living-3bet/glow.png);
  background-color: #101d17;
  transition: scale 1.1s cubic-bezier(.2,.7,.2,1);
}
/* the 1920×900 scene; the card crops it (wide on desktop, tall around the phone on mobile) */
.sw-living__stage {
  position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 1920 / 900;
  translate: -50% 0;
  background: var(--l-bg) center / cover;
}
.sw-living video {
  position: absolute; height: 86.667%; width: auto;
  left: 52.083%; top: 50%; translate: -50% -50%; rotate: 8deg;          /* phone centre 1000,450, tilted */
  -webkit-mask: var(--l-mask) center / 100% 100% no-repeat;
          mask: var(--l-mask) center / 100% 100% no-repeat;
}
.sw-living__shade, .sw-living__glow {
  position: absolute; left: -6.25%; top: -13.333%; width: 112.5%; height: 126.667%;  /* oversize so the drift never shows an edge */
  background: center / 100% 100% no-repeat; pointer-events: none;
}
.sw-living__shade { background-image: var(--l-shade); mix-blend-mode: multiply; }
.sw-living__glow  { background-image: var(--l-glow);  mix-blend-mode: screen; }
/* P2P: slate leather table · Streak: walnut desk — same window light */
.sw-living--p2p    { --l-bg: url(assets/work/living-p2p/bg.jpg); --l-mask: url(assets/work/living-p2p/phone-mask.png); --l-shade: url(assets/work/living-p2p/shade.png); --l-glow: url(assets/work/living-p2p/glow.png); --l-companion: url(assets/work/living-p2p/companion.png); background-color: #181b24; }
/* Streak's screens are white: soften the sun haze so they don't blow out */
.sw-living--streak .sw-living__glow { opacity: .3; }
.sw-motion .sw-living--streak .sw-living__glow { animation-name: sw-sun; }
.sw-living--streak { --l-bg: url(assets/work/living-streak/bg.jpg); --l-mask: url(assets/work/living-streak/phone-mask.png); --l-shade: url(assets/work/living-streak/shade.png); --l-glow: url(assets/work/living-streak/glow.png); --l-companion: url(assets/work/living-streak/companion.png); background-color: #3a281c; }
/* Streak's white screens glare against the dark walnut: lower their white point and contrast, and warm them slightly so they sit in the room */
.sw-living--streak video, .sw-living--streak .sw-living__companion { filter: brightness(.86) contrast(.84) sepia(.08); }
.sw-motion .sw-living__shade, .sw-motion .sw-living__glow { animation: sw-sun 26s ease-in-out infinite alternate; }
.sw-motion .sw-living__glow { animation-name: sw-sun, sw-cloud; animation-duration: 26s, 9s; }
@keyframes sw-sun   { from { translate: 0 0; } to { translate: -3.2% 1.6%; } }   /* the sun creeping across the table */
@keyframes sw-cloud { 0%, 100% { opacity: .55; } 50% { opacity: .42; } }       /* a cloud thinning the light */
/* No zoom or cursor drift on the living banners: any scale or sub-pixel shift resamples the
   recorded UI and blurs it. The sun drifting across the table is the motion. */
/* The phone screen sits above the room's shade and window-frame shadows: a lit screen
   isn't darkened by the room, so the recorded UI stays crisp and readable. */
.sw-living video { z-index: 1; }
.sw-living__companion { position: absolute; inset: 0; z-index: 1; background: var(--l-companion) center / 100% 100% no-repeat; pointer-events: none; }
.sw-living__glow { z-index: 0; opacity: .55; }               /* the sun haze lies on the table, under the phones, so it never veils the UI */
/* Mobile: a tall crop centred on the phone so the recording is big enough to read */
@media (max-width: 720px) {
  .sw-living { aspect-ratio: 4 / 5; }
  .sw-living__stage { translate: -52.083% 0; }              /* phone centre is at 1000/1920 of the scene */
}
