:root {
  --bg: #000;
  --fg: #f2f2f2;
  --muted: #9a9a9a;
  --pill: rgba(255, 255, 255, 0.82);
  --glass: rgba(120, 120, 120, 0.42);
  --page-bg: #9db5b2;
  --page-fg: #0b0b0b;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.02em; }

#gl {
  position: fixed; inset: 0; width: 100vw; height: 100vh; display: block;
  cursor: grab; touch-action: none;
}
body.is-dragging #gl { cursor: grabbing; }
body.is-hovering:not(.is-dragging) #gl { cursor: pointer; }

/* Edge darkening + top fade so the HUD stays legible (matches the reference's dark rim). */
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 9%, rgba(0,0,0,0) 18%),
    linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 14%),
    radial-gradient(ellipse 85% 80% at 50% 52%, rgba(0,0,0,0) 62%, rgba(0,0,0,0.4) 88%, rgba(0,0,0,0.8) 100%);
}

/* ---------- HUD ---------- */
.hud { position: fixed; left: 0; right: 0; z-index: 20; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top {
  top: 0; padding: 18px 20px;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto auto;
  align-items: start; column-gap: 28px;
  transition: color 0.6s var(--ease);
}
body.page-open .hud-top { color: var(--page-fg); }

.logo { display: flex; align-items: center; gap: 10px; color: currentColor; }
.logo-word { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.logo-word sup { font-size: 9px; font-weight: 600; margin-left: 1px; }

.page-close {
  width: 40px; height: 40px; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: rotate(-45deg);
  transition: opacity 0.4s, transform 0.6s var(--ease), visibility 0s 0.4s;
}
body.page-open .page-close { opacity: 1; visibility: visible; transform: none; transition: opacity 0.4s 0.4s, transform 0.8s 0.4s var(--ease); }

.sound { position: relative; display: flex; align-items: center; gap: 10px; font-size: 10.5px; margin-top: 4px; justify-self: end; touch-action: none; user-select: none; -webkit-user-select: none; }
/* volume indicator: a 2px line under the button, filled to the current level */
/* only shown while the button is held (or the level is being changed from the keyboard) */
.sound-level { position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; }
/* hover hints for the volume control appear only while Sound is on */
@media (hover: hover) { .sound[aria-pressed="true"]:hover .sound-level { opacity: 0.2; } }
.sound.is-holding .sound-level, .sound.is-keying .sound-level { opacity: 1; }
.sound-level::before { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0.2; }
.sound-level-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 30%; background: currentColor; opacity: 0.45; transition: width 0.2s ease, opacity 0.3s; }
.sound[aria-pressed="true"] .sound-level-fill { opacity: 1; }
.sound.is-adjusting .sound-level-fill { transition: none; }
/* affordance tooltip: appears on a short hover or keyboard focus, gives way to the volume line once held.
   Anchored to the button's right edge so it opens leftward, clear of the tagline beside it. */
.sound { z-index: 1; }
.sound-tip {
  position: absolute; top: calc(100% + 14px); right: 0; transform: translateY(-4px);
  padding: 7px 10px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font-size: 10px; line-height: 1; color: #f2f2f2; background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}
@media (hover: hover) { .sound[aria-pressed="true"]:hover .sound-tip { opacity: 1; transform: none; transition-delay: 0.35s; } }
.sound[aria-pressed="true"]:focus-visible .sound-tip { opacity: 1; transform: none; }
.sound.is-holding .sound-tip, .sound.is-keying .sound-tip { opacity: 0; transition-delay: 0s; }
body.is-adjusting-volume, body.is-adjusting-volume * { cursor: ns-resize !important; }
.sound em { font-style: normal; }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 9px; }
.bars i { width: 2px; height: 3px; background: currentColor; opacity: 0.55; }
.sound.is-playing .bars i { animation: eq 0.9s ease-in-out infinite alternate; opacity: 1; }
.sound.is-playing .bars i:nth-child(2n) { animation-delay: -0.3s; }
.sound.is-playing .bars i:nth-child(3n) { animation-delay: -0.6s; }
@keyframes eq { from { height: 2px; } to { height: 9px; } }

.tagline { font-size: 10.5px; line-height: 1.3; max-width: 22ch; margin-top: 4px; font-weight: 500; }
.clocks { display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; line-height: 1.25; margin-top: 4px; }
.clock { color: var(--muted); position: relative; padding-left: 13px; }
body.page-open .clock { color: rgba(0,0,0,0.5); }
.clock.is-live { color: currentColor; }
body.page-open .clock.is-live { color: var(--page-fg); }
.clock .dot { position: absolute; left: 0; top: 3px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.clock.is-live .dot { background: currentColor; }

.talk {
  background: #fff; color: #000; border-radius: 999px;
  padding: 13px 20px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  transition: transform 0.5s var(--ease);
}
.talk:hover { transform: scale(1.05); }

.hud-bottom {
  bottom: 0; padding: 0 22px 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.view-toggle {
  display: flex; flex-direction: column; gap: 3px; padding: 4px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;   /* fully rounded, like the other glass pills */
}
.view-toggle span { width: 36px; height: 30px; display: grid; place-items: center; border-radius: 999px; color: #ddd; }
.view-toggle .vt-on { background: #fff; color: #000; height: 36px; border-radius: 50%; }

.nav {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; padding: 4px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav a { position: relative; z-index: 1; padding: 9px 15px; font-size: 13.5px; font-weight: 500; color: #fff; transition: color 0.4s; }
.nav a.is-active { color: #000; }
.nav-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; background: #fff; border-radius: 999px; }

.filter-wrap { position: relative; }
.filter {
  padding: 13px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s;
}
.filter:hover, .filter.is-on { background: rgba(170,170,170,0.55); }
.filter-menu {
  position: absolute; right: 0; bottom: calc(100% + 10px); min-width: 180px;
  padding: 8px; border-radius: 18px; font-size: 11px;
  background: rgba(30,30,30,0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
}
.filter-menu button { text-align: left; padding: 9px 12px; border-radius: 10px; color: #bbb; display: flex; justify-content: space-between; }
.filter-menu button:hover { background: rgba(255,255,255,0.08); color: #fff; }
.filter-menu button.is-active { background: #fff; color: #000; }

.hint {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 5; pointer-events: none; font-size: 11px; color: #fff;
  padding: 10px 14px; border-radius: 999px; background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px); opacity: 0;
}

/* ---------- Project page ---------- */
.page {
  position: fixed; inset: 0; z-index: 10;
  background: var(--page-bg); color: var(--page-fg);
  clip-path: inset(100% 0 0 0);
  visibility: hidden;
}
.page-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; user-select: text; }
.page-inner { padding: 120px 20px 140px; }
.page-title {
  font-weight: 900; text-transform: uppercase; text-align: center;
  font-size: clamp(54px, 11.5vw, 220px); line-height: 0.86; letter-spacing: -0.055em;
  padding-bottom: 0.08em;
}
.page-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.04em; }
.page-title .c { display: inline-block; will-change: transform; }
.page-meta {
  display: flex; align-items: center; gap: 8px; font-size: 10.5px;
  border-top: 1px solid rgba(0,0,0,0.25); margin-top: 36px; padding-top: 12px;
}
.page-meta .label { margin-right: 6px; }
.page-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.page-tags span { background: rgba(0,0,0,0.1); padding: 7px 10px; border-radius: 999px; }
.page-year { margin-left: auto; }
.page-hero { margin-top: 18px; overflow: hidden; background: #f1f1f1; aspect-ratio: 16 / 9; }
.page-hero img, .page-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-body { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 70px 0; }
.page-facts { display: flex; flex-direction: column; gap: 16px; font-size: 11px; }
.page-facts div { display: flex; flex-direction: column; gap: 4px; }
.label { opacity: 0.55; }
.page-copy { font-size: clamp(22px, 2.6vw, 40px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 500; max-width: 26ch; }
.page-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.page-gallery figure { aspect-ratio: 4 / 5; overflow: hidden; background: rgba(0,0,0,0.08); }
.page-back { margin: 60px auto 0; display: block; font-size: 11px; padding: 14px 20px; border-radius: 999px; background: rgba(0,0,0,0.08); }
.page-back:hover { background: rgba(0,0,0,0.16); }

@media (max-width: 860px) {
  .hud-top { grid-template-columns: auto auto 1fr auto; column-gap: 14px; padding: 14px 16px; }
  .tagline, .sound { display: none; }
  .clocks { justify-self: end; }
  .logo-word { display: none; }
  .talk { padding: 11px 16px; font-size: 14px; }
  .hud-bottom { padding: 0 16px 18px; }
  .nav { bottom: 18px; }
  .nav a { padding: 8px 11px; font-size: 13px; }
  .filter { padding: 11px 14px; font-size: 13px; }
  .view-toggle { display: none; }
  .page-body { grid-template-columns: 1fr; gap: 28px; padding: 44px 0; }
  .page-inner { padding: 100px 16px 120px; }
}
@media (max-width: 480px) {
  .clocks { display: none; }
  .hud-top { grid-template-columns: auto auto 1fr auto; }
}

/* ---------- Empty gallery (nothing published in the CMS) ---------- */
.empty {
  display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5;
  max-width: 32ch; text-align: center; font-size: 11px; line-height: 1.5; color: var(--muted);
}
.empty a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
body.is-empty .empty { display: block; }
body.is-empty .hint { display: none; }

/* ---------- Liquid glass (set by liquid-glass.js in Chromium) ----------
   The refraction itself is an SVG backdrop filter set inline per element. Here: a lighter tint so the
   bent backdrop shows through, and specular rims so the surface reads as polished glass, not flat frost. */
.has-liquid-glass :is(.nav, .filter, .view-toggle, .filter-menu) {
  background: rgba(120, 120, 120, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.7),
    inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, 0.35),
    0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.has-liquid-glass .filter:hover, .has-liquid-glass .filter.is-on { background: rgba(170, 170, 170, 0.3); }
.has-liquid-glass .filter-menu { background: rgba(30, 30, 30, 0.42); }
.has-liquid-glass .hint {
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.5);
}
