/* site.css: shared styles and the home page.
   Fonts: put your Alte Haas Grotesk files in /fonts (names below) and they load for
   everyone. Without them the site falls back to Helvetica. Ashton falls back to
   Beth Ellen, which is loaded from Google in the page head. */

/* the sticky note's handwriting: put the font file in /fonts with one of these names */
@font-face {
  font-family: 'Le Jardin Du Bonheur';
  src: local('Le Jardin Du Bonheur'), local('LeJardinDuBonheur'),
       url('../fonts/LeJardinDuBonheur.woff2') format('woff2'),
       url('../fonts/LeJardinDuBonheur.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Alte Haas Grotesk';
  src: local('Alte Haas Grotesk'), local('AlteHaasGrotesk'),
       url('../fonts/AlteHaasGroteskRegular.woff2') format('woff2'),
       url('../fonts/AlteHaasGroteskRegular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Alte Haas Grotesk';
  src: local('Alte Haas Grotesk Bold'), local('AlteHaasGrotesk-Bold'),
       url('../fonts/AlteHaasGroteskBold.woff2') format('woff2'),
       url('../fonts/AlteHaasGroteskBold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* body text in Satoshi (loaded from Fontshare in each page's head); headings and the wordmark stay in Alte Haas */
  --sans: 'Satoshi', 'Alte Haas Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --display: 'Alte Haas Grotesk', 'AlteHaasGrotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --script: 'Ashton', 'P22 Ashton', 'Ashton Script', 'Beth Ellen', cursive;
  --hand: 'Le Jardin Du Bonheur', 'LeJardinDuBonheur', 'Ashton', 'P22 Ashton', 'Beth Ellen', cursive;

  /* the sticky note: paper colour, tilt, and how much to thin the handwriting */
  --note-paper: #FBF2CF;
  --note-tilt: 2deg;
  --note-thin: 0.6px;

  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --ink: #0B1F4D;
  --muted: #4A5B7E;
  --line: #D5DDE9;
  --ph: #E3E9F1;
  --ph-ink: #3A4C72;
  --lift: rgba(11, 31, 77, 0.16);

  --accent: #FF8A4C;
  --accent-ink: #1A1205;

  --night: #0A1229;
  --night-deep: #070D20;
  --night-card: #1B2236;
  --night-muted: #C3CFE6;

  /* glass that sits on the sky */
  --glass: rgba(255, 255, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-line: rgba(255, 255, 255, 0.7);
  --hero-ink: #0B1F4D;
  --hero-muted: #3E4F74;

  --wrap: 1184px;
  --gutter: clamp(20px, 4vw, 56px);
  --pane: 6px;
}

/* after dark in the city in the window, the page goes dark with it */
[data-theme="night"] {
  --bg: #0C1530;
  --surface: #14204A;
  --ink: #EEF2FA;
  --muted: #A9B7D3;
  --line: #26365F;
  --ph: #1A2850;
  --ph-ink: #B3C0DA;
  --lift: rgba(0, 0, 0, 0.45);
  --glass: rgba(14, 26, 56, 0.4);
  --glass-strong: rgba(18, 28, 60, 0.8);
  --glass-line: rgba(255, 255, 255, 0.18);
  --hero-ink: #FFFFFF;
  --hero-muted: #C3CFE6;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s ease, color .6s ease;
}
img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color .2s ease; }
.link:hover, .link:focus-visible { text-decoration-color: currentColor; }

/* ---------- nav ---------- */
.nav {
  position: absolute; z-index: 5; inset: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 30px var(--gutter) 0;
  color: var(--hero-ink);
}
.nav-links { display: flex; gap: 6px; margin-left: -12px; font-size: 18px; }
.nav-links a { padding: 10px 12px; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.wordmark { font-size: 21px; text-decoration: none; padding: 8px 0; }

/* ---------- the time chip ---------- */
.time { position: relative; }
.time-chip {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 16px 0 13px;
  border: 0; border-radius: var(--pane);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer;
}
.time-chip svg { width: 18px; height: 18px; }
.chip-sun { color: #E0692A; }
.chip-moon { color: #C9D6F2; }
.time-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 330px;
  padding: 18px 20px 16px;
  border-radius: var(--pane);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 16px 40px rgba(5, 12, 35, 0.2);
}
.time-panel[hidden] { display: none; }
.time-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.time-now p { margin: 0; font-size: 22px; font-variant-numeric: tabular-nums; }
.time-now small { font-size: 15px; color: var(--hero-muted); }
.text-btn { border: 0; background: none; padding: 10px 2px; cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.time-panel label { display: block; margin-top: 4px; font-size: 13px; color: var(--hero-muted); }
.time-cities { display: flex; gap: 6px; margin-top: 16px; }
.time-cities button {
  flex: 1; height: 44px; border-radius: var(--pane); border: 0;
  background: transparent; cursor: pointer; font-size: 15px;
}
.time-cities button:hover { text-decoration: underline; text-underline-offset: 5px; }
.time-cities button[aria-pressed="true"] { background: var(--hero-ink); color: var(--bg); }
[data-theme="night"] .time-cities button[aria-pressed="true"] { color: #0B1F4D; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(127, 140, 170, 0.45); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(127, 140, 170, 0.45); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(11, 31, 77, 0.3); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(11, 31, 77, 0.3); }

/* ---------- the window ---------- */
.window {
  position: relative; overflow: hidden;
  height: clamp(520px, calc(100vh - 190px), 820px);
  height: clamp(520px, calc(100svh - 190px), 820px);
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, var(--sky-top, #4C88D4) 0%, var(--sky-bottom, #A8CCEA) 86%);
  color: var(--hero-ink);
  touch-action: pan-y;
}
.sky-view { position: absolute; inset: 0; }
.sky-sun, .sky-moon { position: absolute; border-radius: 50%; pointer-events: none; }
.sky-sun {
  left: var(--sun-x); top: var(--sun-y); width: 60px; height: 60px; margin: -30px 0 0 -30px;
  background: var(--sun-color, #FFF7E6); box-shadow: 0 0 80px 28px rgba(255, 232, 196, 0.35);
}
.sky-moon {
  left: var(--moon-x); top: var(--moon-y); width: 40px; height: 40px; margin: -20px 0 0 -20px;
  background: #E7EAF0; box-shadow: 0 0 44px 8px rgba(231, 234, 240, 0.16); display: none;
}
.is-night-sky .sky-sun { display: none; }
.is-night-sky .sky-moon { display: block; }
.sky-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk-stars { fill: #fff; opacity: var(--sk-star-op, 0); }
.sk-far { fill: var(--sk-far); }
.sk-far-line { stroke: var(--sk-far); stroke-width: 3; fill: none; }
.sk-lit { fill: url(#lit); opacity: var(--sk-lit-op, 0); }
.sk-arch { fill: var(--sk-arch); }
.sk-near { fill: var(--sk-near); }
.sk-near-line { stroke: var(--sk-near); fill: none; }
.sk-water { fill: var(--sk-water); }
.sk-refl { fill: var(--sk-refl); opacity: var(--sk-refl-op, .3); }
/* the san diego coast */
.sk-ocean { fill: var(--sk-ocean); }
.sk-cliff { fill: var(--sk-cliff); }
.sk-gully { fill: var(--sk-gully); }
.sk-strata { stroke: #FFF4E0; stroke-width: 3; fill: none; opacity: calc(var(--sk-foam-op, .5) * .22); }
.sk-pine { fill: var(--sk-pine); }
.sk-pine-line { stroke: var(--sk-pine); fill: none; }
.sk-sand { fill: var(--sk-sand); }
.sk-wet { fill: var(--sk-wet); }
.sk-foam { stroke: #fff; stroke-width: 2; fill: none; opacity: var(--sk-foam-op, .5); }
.sk-dots { fill: #FFD9A0; opacity: var(--sk-lit-op, 0); }
.sk-birds { stroke: var(--sk-near); stroke-width: 1.3; stroke-linecap: round; fill: none; }
.sk-wave { stroke: var(--sk-refl); fill: none; stroke-linecap: round; }
.sk-wash { fill: #fff; opacity: calc(var(--sk-foam-op, .5) * .35); }
.sk-sheen { stroke: #fff; stroke-width: 1.2; fill: none; opacity: calc(var(--sk-foam-op, .5) * .45); }
.sk-ridge { stroke: var(--sk-cliff-top); stroke-width: 1.2; fill: none; opacity: .55; }
.sk-scrub { fill: var(--sk-scrub); }
.sk-scrub-dark { fill: var(--sk-scrub-dark); }
.sk-pine-lite { fill: var(--sk-pine-lite); }
.sk-sand-deep { fill: var(--sk-sand-deep); }
.sky-fog { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.window.is-drawing { -webkit-user-select: none; user-select: none; }

.hero-text { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 104px; pointer-events: none; }
.hero-text h1 { margin: 0; font-weight: 400; font-size: clamp(46px, 6.2vw, 88px); line-height: 1; opacity: 0.8;}
.sub { margin: 18px 0 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; pointer-events: auto; width: fit-content; max-width: 100%; }
/* the hint: a sticky note taped to the inside of the glass, above the fog */
.note-spot {
  position: absolute; z-index: 3; right: clamp(20px, 8vw, 116px); top: 46%;
  width: 244px; pointer-events: none;
}
.note-tape {
  position: absolute; z-index: 1; left: 50%; top: -13px; width: 94px; height: 26px; margin-left: -47px;
  /* matte tape: faint streaks along its length, a little grit, and torn ends */
  background-color: rgba(250, 248, 240, 0.5);
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .012' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  .9 0 0 0 -.3'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23t)'/%3E%3C/svg%3E"), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .55  .6 0 0 0 -.38'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23s)'/%3E%3C/svg%3E");
  -webkit-backdrop-filter: blur(2.5px) saturate(115%); backdrop-filter: blur(2.5px) saturate(115%);
  clip-path: polygon(3% 0, 97% 0, 100% 14%, 96% 27%, 99% 41%, 97% 55%, 100% 70%, 96% 84%, 98% 100%, 2% 100%, 0 86%, 3% 72%, 0 58%, 3% 44%, 1% 30%, 4% 16%, 0 4%);
  transform: rotate(-4deg); transition: opacity .8s ease;
}
.note {
  padding: 30px 26px 28px;
  /* paper: fine grain and soft fibre, multiplied into the paper colour so it works for any shade */
  background-color: var(--note-paper);
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32  0 0 0 0 .25  0 0 0 0 .14  .32 0 0 0 -.13'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23g)'/%3E%3C/svg%3E"), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018 .045' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4  0 0 0 0 .3  0 0 0 0 .15  .2 0 0 0 -.08'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size: 180px 180px, 320px 320px;
  background-blend-mode: multiply, multiply;
  /* the shadow sits further out at the bottom right, as if that corner is lifting a little */
  box-shadow: 0 1px 1px rgba(60, 50, 20, 0.1), 5px 14px 18px -12px rgba(30, 36, 70, 0.5);
  font-family: var(--hand); font-size: 22px; font-weight: 300; font-synthesis: none;
  /* a hairline of paper colour around each letter makes the strokes a touch thinner */
  -webkit-text-stroke: var(--note-thin) var(--note-paper);
  line-height: 1.45; letter-spacing: 0.03em; word-spacing: 0.14em; color: #1C2440;
  transform: rotate(var(--note-tilt)); transform-origin: 50% 4%;
  transition: transform .5s ease, opacity .5s ease;
}
.note p { margin: 0; }
.note p + p { margin-top: 16px; }
/* phones have no shift key and no mouse, so the note says what works there */
.for-touch { display: none; }
@media (hover: none) { .for-touch { display: inline; } .for-mouse { display: none; } }
.squiggle { text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: 6px; }
/* after the first real stroke: the bottom lifts, it tips off the glass and falls; the tape stays a moment longer */
.note-spot.is-lift .note { transform: rotate(calc(var(--note-tilt) - 7deg)) translateY(-10px) scale(1.03); transition: transform .26s cubic-bezier(.3, .7, .4, 1); }
.note-spot.is-fall .note { transform: translate(60px, 520px) rotate(calc(var(--note-tilt) + 32deg)); opacity: 0; transition: transform 1.1s cubic-bezier(.55, 0, .8, .3), opacity .5s ease .7s; }
.note-spot.is-fall .note-tape { opacity: 0; transition-delay: 1.4s; }
.note-spot.is-gone { display: none; }

/* the rotating words: one slot changes at a time, slowly */
.rot {
  position: relative; display: inline-block; vertical-align: bottom;
  height: 1.35em; overflow: hidden; white-space: nowrap;
  transition: width .7s cubic-bezier(.2, .7, .2, 1);
}
.rot .w { display: inline-block; white-space: nowrap; font-weight: 600;}
.rot.is-live .w {
  position: absolute; left: 0; top: 0;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .55s ease;
}
.rot .w.is-entering { transform: translateY(100%); opacity: 0; }
.rot .w.is-leaving { transform: translateY(-100%); opacity: 0; }

/* ---------- selected work ---------- */
h1, h2, h3, .wordmark { font-family: var(--display); }
.work { padding: 44px 0 0; }
.work-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.work-head h2 { margin: 0; font-weight: 400; font-size: clamp(40px, 4vw, 56px); line-height: 1; }
.filters { display: flex; flex-wrap: wrap; column-gap: 20px; }
.filters button {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 15px; color: var(--muted); text-underline-offset: 7px; text-decoration-thickness: 1px;
}
.filters button:hover { color: var(--ink); text-decoration: underline; }
.filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; }

/* one spread per project: the cover framed in the window's bronze on one side, its name and facts on the
   other, swapping sides from one project to the next. Every cover shows from the start. */
.spreads { display: grid; gap: clamp(72px, 9vw, 120px); margin-top: 56px; }
.spreads > [hidden] { display: none; }
.spread {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(28px, 4vw, 56px); align-items: end;
  text-decoration: none; color: var(--ink);
}
.spread:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.spread:nth-child(even) .spread-pic { order: 2; }
.spread-pic {
  display: block; padding: 8px; background: var(--bronze, #463A35);
  box-shadow: 0 18px 26px -20px rgba(40, 28, 20, 0.45);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease;
}
.spread-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ph); }
.spread-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.spread-media .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; font-size: 14px; color: var(--ph-ink); }
.spread:hover .spread-pic, .spread:focus-visible .spread-pic { transform: translateY(-2px); box-shadow: 0 24px 30px -20px rgba(40, 28, 20, 0.5); }
.spread:hover .spread-media img, .spread:focus-visible .spread-media img { transform: scale(1.03); }
.spread-text { min-width: 0; padding-bottom: 6px; position: relative; clip-path: inset(-600px -300px 0 -300px); }  /* the light starts at the shelf */
/* every project stands on its own white shelf, like the sill under the window: the cover and the text both sit on it */
.shelf {
  grid-column: 1 / -1; order: 3; display: block; position: relative; height: 14px; margin: 0 -12px;
  background: var(--sill, #fff);
  /* a darker underside edge, and the shelf's shadow falling on the wall below it */
  box-shadow: inset 0 -2px 0 rgba(120, 100, 80, 0.18), 0 6px 8px -4px rgba(40, 28, 20, 0.35);
}
.shelf::after {
  content: ""; position: absolute; left: 2%; right: 2%; top: 100%; height: 34px; pointer-events: none;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(40, 28, 20, 0.22), rgba(40, 28, 20, 0) 100%);
}
[data-theme="night"] .shelf::after { background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 100%); }
.spread-text h3 {
  display: inline; margin: 0; font-weight: 400; font-size: clamp(34px, 4vw, 58px); line-height: 1.04;
  color: var(--bronze, var(--ink));
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s ease;
}
.spread:hover .spread-text h3, .spread:focus-visible .spread-text h3 { background-size: 100% 1px; }
.spread-what { margin: 16px 0 0; max-width: 40ch; }
.spread-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 22px 0 0; font-size: 15px; }
.spread-facts dt { color: var(--muted); }
.spread-facts dd { margin: 0; }
.spread-go { display: inline-block; margin-top: 22px; font-size: 15px; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
[data-theme="night"] .spread-text h3 { color: var(--ink); }

/* a spotlight standing on each shelf, out of view at the outside corner. Its beam is a clean cone: two straight
   edges from the lamp and an even arc where the light lands, brightest at the lamp and fading evenly outwards.
   By day a pastel LED in the project's colour; after dark, warm white. */
.spread-text > *:not(.spot) { position: relative; z-index: 1; }
.spot {
  position: absolute; z-index: 0; bottom: 0; height: calc(100% + 60px); min-height: clamp(240px, 24vw, 330px);
  width: calc(100% + 12px); pointer-events: none; opacity: 0;
  /* the cone (--cone, below): a straight edge from the lamp to the peak, then one even curve down to the shelf */
  -webkit-mask: var(--cone) 0 0 / 100% 100% no-repeat;
          mask: var(--cone) 0 0 / 100% 100% no-repeat;
  /* bright at the lamp, gone before the curved edge, so the edge dissolves instead of crossing the words */
  background: radial-gradient(farthest-corner at var(--ax) 100%,
    color-mix(in srgb, var(--led) 95%, transparent) 0%,
    color-mix(in srgb, var(--led) 58%, transparent) 30%,
    color-mix(in srgb, var(--led) 18%, transparent) 52%,
    transparent 68%);
  filter: blur(4px);
}
/* text on the right of its spread: the lamp is at the bottom right, shining up and to the left */
.spread:nth-child(odd) .spot { --ax: 100%; --cone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100 100 L38 0 A38 100 0 0 0 0 100 Z'/%3E%3C/svg%3E"); right: -12px; }
/* text on the left: the lamp is at the bottom left, shining up and to the right */
.spread:nth-child(even) .spot { --ax: 0%; --cone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100 L62 0 A38 100 0 0 1 100 100 Z'/%3E%3C/svg%3E"); left: -12px; }
.spread.is-lit .spot { animation: spot-on .4s ease-out .15s both; }
[data-theme="night"] .spot { --led: #FFF1DC; mix-blend-mode: screen; }
@keyframes spot-on { 0% { opacity: 0; } 20% { opacity: var(--spot-op); } 32% { opacity: calc(var(--spot-op) * .35); } 46% { opacity: var(--spot-op); } 100% { opacity: var(--spot-op); } }
.spot { --spot-op: .5; }
[data-theme="night"] .spot { --spot-op: .34; }

/* as a project scrolls into view, its cover rises into place, then its words, then its light switches on.
   Without script, or with reduced motion, everything simply shows. */
.reveal .spread-pic, .reveal .spread-text { opacity: 0; transform: translateY(28px) scale(.98); }
.reveal .spread.is-lit .spread-pic, .reveal .spread.is-lit .spread-text {
  opacity: 1; transform: none;
  transition: opacity .3s ease-out, transform .42s cubic-bezier(.22, 1, .36, 1);
}
.reveal .spread.is-lit .spread-text { transition-delay: .05s; }
/* after it has arrived, the cover lifts on hover as before */
.reveal .spread.is-lit:hover .spread-pic { transform: translateY(-2px); transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .spread.is-lit .spot { animation: none; opacity: var(--spot-op); }
}

/* not finished yet: said plainly */
.spread-media .ph.soon { font-family: var(--hand); font-size: clamp(24px, 2.4vw, 32px); color: var(--muted); }
.spread-soon { display: inline-block; margin-top: 18px; font-size: 15px; color: var(--muted); }

/* ---------- the lobby: contact and the record player ---------- */
.lobby {
  position: relative; overflow: hidden;
  margin-top: clamp(120px, 14vw, 176px);
  background: var(--night); color: #fff;
}
.foot-sky { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 300px; }
.lobby-inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px; align-items: center; padding: 120px 0 230px;
}
.lobby h2 { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(48px, 5vw, 64px); line-height: 1.25; }
.lobby .email { display: inline-block; margin-top: 10px; font-size: 20px; text-underline-offset: 6px; text-decoration-thickness: 1px; word-break: break-word; }
.btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 28px; font-size: 16px; }
.btns .link { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration-color: rgb(255 255 255 / 0); }
.btns .link:hover { text-decoration-color: #fff; }
.btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 22px;
  border-radius: 4px; font-size: 15px; text-decoration: none; transition: background-color .2s ease;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #FF9C66; }

/* the player keeps the class names your player.js already uses */
.player {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 26px; border-radius: 8px;
  background: var(--night-card);
}
.deck { position: relative; width: 270px; height: 220px; flex: 0 0 270px; }
.rec {
  position: absolute; left: 0; top: 10px; width: 200px; height: 200px; border-radius: 50%;
  background: #0A1128;
  /* a few grooves, drawn as rings */
  box-shadow: inset 0 0 0 14px #0A1128, inset 0 0 0 15px #1C2546, inset 0 0 0 30px #0A1128, inset 0 0 0 31px #1C2546, inset 0 0 0 46px #0A1128, inset 0 0 0 47px #1C2546;
}
.rec-label { position: absolute; left: 65px; top: 65px; width: 70px; height: 70px; border-radius: 50%; background: var(--accent); }
.rec-hole { position: absolute; left: 96px; top: 96px; width: 8px; height: 8px; border-radius: 50%; background: #0A1128; z-index: 1; }
.arm { position: absolute; left: 228px; top: 4px; width: 26px; height: 196px; transform-origin: 13px 13px; transition: transform .7s cubic-bezier(.3, .7, .2, 1); }
.arm .pivot { position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #C9D3E6; border: 4px solid #6F82AD; }
.arm .bar { position: absolute; left: 10px; top: 20px; width: 6px; height: 150px; border-radius: 3px; background: #C9D3E6; }
.arm .head { position: absolute; left: 1px; top: 160px; width: 24px; height: 34px; border-radius: 6px; background: #6F82AD; }
.player:hover .arm { transform: rotate(4deg); }
.player[data-state="playing"] .arm, .player.is-playing .arm { transform: rotate(19deg); }
.player[data-state="playing"] .rec, .player.is-playing .rec { animation: spin 1.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pl-info { flex: 1 1 220px; min-width: 0; }
.pl-name { display: block; font-weight: 400; font-size: 24px; line-height: 1.2; }
.pl-count { display: block; margin-top: 4px; font-size: 15px; color: var(--night-muted); }
.pl-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.pl-play, .pl-sk { display: grid; place-items: center; border-radius: 50%; cursor: pointer; padding: 0; }
.pl-play { width: 56px; height: 56px; border: 0; background: var(--accent); color: var(--accent-ink); transition: transform .15s ease; }
.pl-play:active { transform: scale(.94); }
.pl-play svg { width: 20px; height: 20px; }
.pl-sk { width: 44px; height: 44px; border: 0; background: #262F4D; color: #fff; }
.pl-sk:hover { background: #313B5C; }
.pl-sk svg { width: 15px; height: 15px; }
.ico-pause { display: none; }
.player[data-state="playing"] .ico-play, .player.is-playing .ico-play { display: none; }
.player[data-state="playing"] .ico-pause, .player.is-playing .ico-pause { display: block; }
.pl-bar { height: 4px; margin-top: 22px; border-radius: 2px; background: #2E3757; overflow: hidden; }
.pl-bar i { display: block; width: 0; height: 100%; background: #fff; }

.foot { background: var(--night-deep); color: var(--night-muted); font-size: 14px; }
.foot-inner { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 24px; padding: 32px 0 40px; }
.foot p { margin: 0; max-width: 540px; }
.foot .back { justify-self: end; color: #fff; }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .lobby-inner { grid-template-columns: minmax(0, 1fr); padding-bottom: 200px; }
}
@media (max-width: 640px) {
  .nav { padding-top: 18px; }
  .nav-links { font-size: 16px; gap: 0; }
  .nav-right { gap: 14px; }
  .wordmark { display: none; }
  .time-panel { width: min(320px, calc(100vw - 32px)); right: -4px; }
  .hero-text { bottom: 96px; }
  .note-spot { top: 100px; right: auto; left: 16px; width: 176px; }
  .note { padding: 24px 20px 22px; font-size: 18px; }
  .spread, .spread:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* on a phone the words all sit under their covers, so every lamp is at the bottom left */
  /* on a phone: one half-circle of light rising from the middle of the shelf, the same for every project */
  .spread:nth-child(odd) .spot, .spread:nth-child(even) .spot {
    --ax: 50%; left: -12px; right: -12px; bottom: -20px; width: auto; height: auto; min-height: 0; aspect-ratio: 2 / 1;  /* down across the row gap, onto the shelf */
    -webkit-mask: radial-gradient(50% 100% at 50% 100%, #000 99%, transparent 100%);
            mask: radial-gradient(50% 100% at 50% 100%, #000 99%, transparent 100%);
    background: radial-gradient(50% 100% at 50% 100%,
      color-mix(in srgb, var(--led) 90%, transparent) 0%,
      color-mix(in srgb, var(--led) 45%, transparent) 45%,
      transparent 96%);
  }
  .spread:nth-child(even) .spread-pic { order: 0; }
  .deck { transform: scale(.85); transform-origin: left center; margin-right: -40px; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); }
  .foot .back { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}