/* RiVER — Particle / Signal identity (homepage) */

:root {
  --void: #050507;
  --surface: #0c0c12;
  --line: #1e1e28;
  --static: #8a8a99;
  --signal: #ededf2;
  --sky: #a8dcff;
  --azure: #3d8bff;
  --cobalt: #2f5bff;
  --royal: #1e40d8;
  --particle-gradient: linear-gradient(180deg, #a8dcff 0%, #3d8bff 45%, #2f5bff 75%, #1e40d8 100%);

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;

  --pad-x: clamp(20px, 4.45vw, 64px);
  --section-y: clamp(88px, 9.7vw, 140px);
  --content-max: 1440px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--void);
  color: var(--signal);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 1px solid var(--sky);
  outline-offset: 4px;
}

::selection {
  background: var(--cobalt);
  color: var(--signal);
}

/* Shared type */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--sky);
  white-space: nowrap;
}

.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--static);
  white-space: nowrap;
}

.section {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.section-header__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  font-weight: 300;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 24px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn--primary {
  background: var(--signal);
  color: var(--void);
  border: 1px solid var(--signal);
}

.btn--primary:hover {
  background: var(--sky);
  border-color: var(--sky);
}

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--signal);
}

.btn--ghost:hover {
  border-color: var(--azure);
  color: var(--sky);
}

.btn--sm {
  padding: 13px 20px;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 26px var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 7, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.nav-logo__word {
  font-family: 'Cormorant Garamond', var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.dot-i {
  position: relative;
  margin-right: 0.04em;
  letter-spacing: 0;
  color: var(--azure);
}

.dot-i__stem {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--signal);
  clip-path: inset(var(--dot-cut, 42%) -20% 0 -20%);
}

.nav-logo__mark {
  width: 48px;
  height: 48px;
  transform: scaleX(-1);
}

.nav-links {
  display: flex;
  gap: 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--static);
  white-space: nowrap;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--signal);
}

.sound-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--signal);
  transition: border-color 0.2s ease;
}

.sound-toggle:hover {
  border-color: var(--azure);
}

.sound-toggle__eq {
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__eq {
  opacity: 1;
  animation: eq-pulse 1.2s ease-in-out infinite;
}

@keyframes eq-pulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.7); }
}

/* Hero */

.hero {
  position: relative;
  height: clamp(760px, 62.5vw, 900px);
  overflow: hidden;
  background: var(--void);
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Center of the orbit system; particle sphere is anchored here too */
.hero-art {
  position: absolute;
  left: 50%;
  top: var(--hero-cy, 47.78%);
  width: 0;
  height: 0;
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(var(--hero-scale, 1));
  transform-origin: center;
}

.hero-axis {
  position: absolute;
  background: rgba(30, 30, 40, 0.6);
  pointer-events: none;
}

.hero-axis--x {
  left: 0;
  right: 0;
  top: var(--hero-cy, 47.78%);
  height: 1px;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(110px, 10.4vw, 150px) var(--pad-x) 0;
  text-align: center;
}

.hero-content .eyebrow {
  white-space: pre;
}

.hero-title {
  position: relative;
  margin-top: clamp(28px, 5.4vw, 78px);
  font-family: 'Cormorant Garamond', var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(120px, 22.2vw, 320px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--signal);
}

.hero-title__word {
  position: relative;
  z-index: 1;
  display: block;
}

.hero-title__flow {
  position: absolute;
  left: 50%;
  width: 2.55em;
  height: 0.23em;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-title__flow--a { top: 74%; }
.hero-title__flow--b { top: 78.5%; }

.hero-lede {
  max-width: 560px;
  margin-top: clamp(32px, 4.9vw, 70px);
  font-size: 18px;
  line-height: 1.55;
  color: var(--static);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

.btn--text {
  gap: 8px;
  padding-left: 12px;
  padding-right: 12px;
  color: var(--sky);
}

.btn--text:hover {
  color: var(--signal);
}

.hero-meta {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 80px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
  white-space: pre;
}

.hero-meta a {
  justify-self: end;
  transition: color 0.2s ease;
}

.hero-meta a:hover {
  color: var(--signal);
}

/* Work */

.work .section-header {
  margin-bottom: 64px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.card-cover {
  --cover-scale: 1;
  position: relative;
  width: 100%;
  aspect-ratio: 421.33 / 520;
  overflow: hidden;
  border-radius: 6px;
}

.card-cover--echo { background: linear-gradient(180deg, #0a1a3f 0%, #050816 100%); }
.card-cover--cem { background: linear-gradient(129deg, #2f5bff 0%, #0b1e5b 71.43%); }
.card-cover--trace { background: radial-gradient(circle at 75% 15%, rgba(217, 65, 43, 0.28), transparent 55%), #14161a; }

/* Mockups are authored at the Figma card size and scaled to fit */
.cover-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 421.33px;
  height: 520px;
  transform: scale(var(--cover-scale));
  transform-origin: 0 0;
}

.cover-index {
  position: absolute;
  left: 20px;
  top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
}

.cover-index--light {
  color: rgba(255, 255, 255, 0.8);
}

.cover-arrow {
  position: absolute;
  left: 387.33px;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
  transition: transform 0.35s ease;
}

.card:hover .cover-arrow {
  transform: translate(3px, -3px);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--sky);
}

.card-title {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.card:hover .card-title {
  color: var(--sky);
}

.card-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--static);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--static);
}

/* Project screens */

.shot {
  position: absolute;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 0 4px #1a2236, 0 24px 48px rgba(0, 0, 0, 0.55);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shot--echo-a { left: 14.67px; top: 56px; width: 186px; border-radius: 14px; }
.shot--echo-b { left: 220.67px; top: 104px; width: 186px; border-radius: 14px; }
.shot--cem,
.shot--trace { left: 102.67px; top: 40px; width: 216px; }
.shot--cem { box-shadow: 0 0 0 4px #dce5f7, 0 24px 48px rgba(0, 0, 0, 0.55); }
.shot--trace { box-shadow: 0 0 0 4px #2a2c31, 0 24px 48px rgba(0, 0, 0, 0.55); }

.card:hover .shot--echo-a { transform: translateY(-6px); }
.card:hover .shot--echo-b,
.card:hover .shot--cem,
.card:hover .shot--trace { transform: translateY(-10px); }

/* About */

.about {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: clamp(48px, 6.7vw, 96px);
  align-items: start;
  border-top: 1px solid var(--line);
}

.about-intro {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-title {
  font-weight: 300;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 24px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.panel:hover {
  border-color: var(--line);
}

.panel__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.panel__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
}

.panel__title {
  font-weight: 500;
  font-size: 18px;
  line-height: normal;
}

.panel__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--static);
}

/* Sound */

.sound {
  display: flex;
  flex-direction: column;
  gap: 56px;
  border-top: 1px solid var(--line);
}

.saturn {
  position: relative;
  width: 100%;
  height: clamp(240px, 26.4vw, 380px);
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.saturn__wave {
  position: absolute;
  left: 4.57%;
  right: 4.57%;
  top: 15.66%;
  width: 90.86%;
  height: 68.68%;
}

.saturn__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 39.63%;
  width: 1px;
  background: rgba(237, 237, 242, 0.7);
  pointer-events: none;
}

.saturn__file,
.saturn__time {
  position: absolute;
  top: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
  pointer-events: none;
}

.saturn__file { left: 24px; }
.saturn__time { right: 24px; }

.player {
  display: flex;
  align-items: center;
  gap: 24px;
}

.player__play {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--signal);
  color: var(--void);
  font-size: 16px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.player__play:hover {
  background: var(--sky);
  transform: scale(1.04);
}

.player__track {
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: nowrap;
}

.player__title {
  font-weight: 500;
  font-size: 20px;
  line-height: normal;
}

.player__credit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
}

.player__note {
  max-width: 480px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--static);
}

/* Contact */

.contact {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--void);
}

.contact__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 139px var(--pad-x) 0;
}

.contact__title {
  margin: 24px 0 0 -8px;
  font-weight: 300;
  font-size: clamp(76px, 11.67vw, 168px);
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.contact__email {
  position: relative;
  margin-top: 72px;
  padding-bottom: 6px;
  font-size: clamp(22px, 2.1vw, 30px);
  letter-spacing: -0.01em;
  line-height: normal;
}

.contact__email::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--particle-gradient);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.contact__email:hover::after {
  transform: scaleX(1.06);
}

.contact__links {
  display: flex;
  gap: 12px;
  margin-top: 38px;
}

.footer {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 80px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
}

.footer a {
  justify-self: end;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--signal);
}

/* Case study pages */

.case-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(640px, 52vw, 780px);
  border-bottom: 1px solid var(--line);
}

.case-hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(96px, 10vw, 150px) var(--pad-x) 56px;
}

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--signal);
}

.case-title {
  max-width: min(820px, 60%);
  margin-top: 24px;
  font-weight: 300;
  font-size: clamp(52px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.case-lede {
  max-width: min(560px, 60%);
  margin-top: 32px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--static);
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 880px;
  margin-top: clamp(48px, 6vw, 88px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.case-facts dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--static);
}

.case-facts dd {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--signal);
}

/* Showcase stage — the homepage card cover, scaled up */

.case-showcase {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(56px, 6vw, 96px) var(--pad-x) 0;
}

.showcase-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.4vw, 40px);
  overflow: hidden;
  padding: clamp(48px, 6vw, 96px) clamp(16px, 3vw, 48px);
  border-radius: 6px;
  background: var(--stage-bg, var(--surface));
}

.showcase-stage .stage-shot {
  flex: 0 1 250px;
  min-width: 0;
  height: auto;
  border-radius: clamp(12px, 1.6vw, 22px);
  box-shadow: 0 0 0 4px var(--bezel, #1a2236), 0 32px 64px rgba(0, 0, 0, 0.55);
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.showcase-stage .stage-shot:nth-child(odd) { transform: translateY(28px); }
.showcase-stage .stage-shot:nth-child(even) { transform: translateY(-28px); }
.showcase-stage:hover .stage-shot:nth-child(odd) { transform: translateY(16px); }
.showcase-stage:hover .stage-shot:nth-child(even) { transform: translateY(-40px); }

.stage--echo { --stage-bg: linear-gradient(180deg, #0a1a3f 0%, #050816 100%); }
.stage--cem { --stage-bg: linear-gradient(129deg, #2f5bff 0%, #0b1e5b 71.43%); --bezel: #dce5f7; }
.stage--trace { --stage-bg: radial-gradient(circle at 75% 15%, rgba(217, 65, 43, 0.28), transparent 55%), #14161a; --bezel: #2a2c31; }

/* Sections */

.case-section {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
  border-bottom: 1px solid var(--line);
}

.case-section__head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
  position: sticky;
  top: 120px;
}

.case-h2 {
  font-weight: 300;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.case-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--static);
}

.case-body strong {
  font-weight: 400;
  color: var(--signal);
}

.case-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.point {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface);
  transition: border-color 0.3s ease;
}

.point:hover {
  border-color: var(--line);
}

.point__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--sky);
}

.point__title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
}

.point p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--static);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brand-board + .principles {
  margin-top: 12px;
}

.brand-board {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* Flows */

.flows {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-y) 0;
  border-bottom: 1px solid var(--line);
}

.flows > .section-header {
  padding: 0 var(--pad-x);
  margin-bottom: 72px;
}

.flow + .flow {
  margin-top: clamp(72px, 8vw, 120px);
}

.flow__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--pad-x);
  margin-bottom: 32px;
}

.flow__title {
  margin-top: 14px;
  font-weight: 300;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.flow__desc {
  max-width: 640px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--static);
}

.flow__nav {
  display: flex;
  flex: none;
  gap: 8px;
}

.flow.is-static .flow__nav {
  visibility: hidden;
}

.flow__nav button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--signal);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.flow__nav button:hover:not(:disabled) {
  border-color: var(--azure);
}

.flow__nav button:disabled {
  opacity: 0.3;
  cursor: default;
}

.flow__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 22vw, 300px);
  gap: 28px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--pad-x);
  padding: 8px var(--pad-x) 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  cursor: grab;
}

.flow__track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.flow__track::-webkit-scrollbar { height: 6px; }
.flow__track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.screen {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-snap-align: start;
}

.screen__open {
  display: block;
  border-radius: clamp(16px, 1.8vw, 24px);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.screen__open:hover {
  transform: translateY(-6px);
}

.screen__open img {
  width: 100%;
  height: auto;
  border-radius: inherit;
  box-shadow: 0 0 0 4px var(--bezel, #1a2236), 0 24px 48px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  user-select: none;
}

.flows--cem { --bezel: #dce5f7; }
.flows--trace { --bezel: #2a2c31; }

.screen figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.screen__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--sky);
}

.screen figcaption p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--static);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 40px;
  background: rgba(5, 5, 7, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-height: 100%;
}

.lightbox img {
  max-height: calc(100vh - 160px);
  width: auto;
  border-radius: 28px;
  box-shadow: 0 0 0 4px var(--line);
}

.lightbox figcaption {
  max-width: 440px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--static);
}

.lightbox__btn {
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--signal);
}

.lightbox__btn:hover {
  border-color: var(--azure);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
}

/* Next project */

.next-project {
  position: relative;
  display: block;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x) calc(var(--section-y) + 40px);
}

.next-project__title {
  margin-top: 24px;
  font-weight: 300;
  font-size: clamp(48px, 8vw, 128px);
  line-height: 1;
  letter-spacing: -0.05em;
  transition: color 0.3s ease;
}

.next-project__title span {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.next-project:hover .next-project__title {
  color: var(--sky);
}

.next-project:hover .next-project__title span {
  transform: translateX(16px);
}

.footer--static {
  position: static;
  max-width: calc(var(--content-max) - 2 * var(--pad-x));
  margin: 0 var(--pad-x);
}

@media (min-width: 1440px) {
  .footer--static { margin: 0 auto; }
}

@media (max-width: 1180px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .case-section {
    grid-template-columns: 1fr;
  }

  .case-section__head {
    position: static;
  }

  .case-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-title,
  .case-lede {
    max-width: none;
  }

  .principles,
  .case-points {
    grid-template-columns: 1fr;
  }

  .flow__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .lightbox {
    gap: 8px;
    padding: 16px;
  }

  .lightbox__btn:not(.lightbox__close) {
    display: none;
  }
}

@media (max-width: 720px) {
  .showcase-stage .stage-shot:nth-child(n + 4) {
    display: none;
  }
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sound-toggle[aria-pressed="true"] .sound-toggle__eq { animation: none; }
}

/* Responsive */

@media (max-width: 1180px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto;
    row-gap: 18px;
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 820px;
    padding-bottom: 120px;
  }


  .player {
    flex-wrap: wrap;
  }

  .player__note {
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-meta,
  .footer {
    grid-template-columns: 1fr auto;
  }

  .hero-meta span:nth-child(2),
  .footer span:nth-child(2) {
    display: none;
  }

  .hero-meta span:first-child {
    white-space: normal;
  }

  .contact {
    min-height: 720px;
  }

  .contact__title {
    font-size: clamp(64px, 18vw, 96px);
  }

  .contact__email {
    margin-top: 48px;
  }

  .panel {
    align-items: flex-start;
    padding: 20px;
  }
}
