:root {
  color-scheme: light;
  --blue: #0066cc;
  --blue-focus: #0071e3;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --hairline: rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 18px;
  --radius-lg: 28px;
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--parchment);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--parchment);
  word-break: keep-all;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--hairline);
  background: rgba(245, 245, 247, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 5px solid var(--ink);
}

.demo-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.demo-tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.demo-tabs a[aria-current="page"] {
  color: white;
  background: var(--ink);
}

.pause-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  cursor: pointer;
}

.pause-button:hover {
  background: var(--blue-focus);
}

.pause-icon {
  font-size: 12px;
  font-weight: 700;
}

main {
  overflow: hidden;
}

.intro {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(58px, 8vw, 104px) 24px clamp(32px, 5vw, 56px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro-copy {
  max-width: 630px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
}

.demo-view {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 88px;
}

.lens-stage,
.soundscape,
.metal-stage {
  min-height: min(680px, 72vh);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lens-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background: var(--canvas);
  touch-action: none;
}

.poster {
  position: relative;
  min-height: 620px;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
}

.poster-a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  background: #1d1d1f;
}

.poster-a::before,
.poster-a::after {
  content: "";
  position: absolute;
  left: -10%;
  width: 120%;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(-18deg);
}

.poster-a::before {
  top: 37%;
}

.poster-a::after {
  top: 58%;
}

.poster-a p,
.poster-a span {
  position: relative;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.poster-a strong {
  position: relative;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.poster-b {
  color: var(--ink);
  background-color: #dce9f4;
  background-image:
    linear-gradient(rgba(29, 29, 31, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 29, 31, 0.16) 1px, transparent 1px);
  background-size: 42px 42px;
}

.orbit {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.orbit-one {
  width: 420px;
  height: 420px;
  right: -130px;
  top: 48px;
}

.orbit-two {
  width: 210px;
  height: 210px;
  left: 13%;
  bottom: 8%;
}

.poster-index {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: clamp(72px, 10vw, 144px);
  font-weight: 600;
  letter-spacing: -0.07em;
  transform: translate(-42%, -50%);
}

.lens-mount {
  position: absolute;
  left: calc(50% - 108px);
  top: calc(50% - 108px);
  width: 216px;
  height: 216px;
  cursor: grab;
  user-select: none;
  z-index: 10;
}

.lens-mount:active {
  cursor: grabbing;
}

.lens-mount .glass-container {
  width: 216px;
  height: 216px;
  padding: 0;
  z-index: 1;
  isolation: isolate;
}

.drag-hint {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.56);
  font-size: 12px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.interaction-note {
  margin: 16px 4px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.soundscape {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(32px, 6vw, 80px);
  color: white;
  background: #171719;
  transition: background-color 420ms ease;
}

.soundscape[data-mode="restore"] {
  background: #213146;
}

.soundscape[data-mode="breathe"] {
  background: #394032;
}

.sound-orb {
  position: absolute;
  width: min(62vw, 660px);
  aspect-ratio: 1;
  left: 9%;
  top: 48%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  transform: translateY(-50%);
}

.sound-orb::before,
.sound-orb::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.sound-orb::after {
  inset: 34%;
}

.sound-copy {
  position: relative;
  z-index: 2;
  max-width: 440px;
}

.sound-copy span {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sound-copy strong {
  display: block;
  margin: 10px 0 16px;
  font-size: clamp(50px, 7vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.sound-copy p {
  max-width: 340px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.panel-mount {
  position: relative;
  z-index: 4;
}

.panel-mount > .glass-container {
  width: 334px;
  min-height: 156px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 1;
  isolation: isolate;
}

.panel-mount .glass-button {
  box-shadow: none !important;
}

.panel-mount .glass-button-text {
  font-size: 14px !important;
  font-weight: 600;
}

.metal-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.metal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(720px, 74vh);
  background: #000;
}

#metal-canvas,
.metal-fallback {
  width: min(82%, 720px);
  aspect-ratio: 1;
}

#metal-canvas {
  display: block;
}

.metal-fallback {
  display: none;
  place-items: center;
  color: #d2d2d7;
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 800;
  letter-spacing: -0.09em;
}

.metal-stage.is-fallback #metal-canvas {
  display: none;
}

.metal-stage.is-fallback .metal-fallback {
  display: grid;
}

.metal-caption {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  margin: 0;
  color: #a1a1a6;
  font-size: 12px;
}

.metal-caption span {
  color: white;
}

.license-note {
  align-self: end;
  padding: 24px;
  border-radius: var(--radius-md);
  background: white;
}

.license-note strong {
  font-size: 17px;
}

.license-note p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

footer {
  padding: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

footer a {
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid rgba(0, 102, 204, 0.38);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .demo-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .demo-tabs a {
    flex: 1;
    text-align: center;
  }

  .pause-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .lens-stage {
    grid-template-columns: 1fr;
  }

  .poster {
    min-height: 330px;
  }

  .poster-b {
    min-height: 280px;
  }

  .soundscape {
    min-height: 680px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
  }

  .panel-mount > .glass-container {
    width: 100%;
  }

  .metal-view {
    grid-template-columns: 1fr;
  }

  .license-note {
    align-self: auto;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 10px;
    padding: 10px 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .demo-tabs a {
    padding-inline: 8px;
    font-size: 12px;
  }

  .demo-view {
    width: calc(100% - 20px);
  }

  .lens-mount,
  .lens-mount .glass-container {
    width: 164px;
    height: 164px;
  }

  .lens-mount {
    left: calc(50% - 82px);
    top: calc(50% - 82px);
  }

  .panel-mount > .glass-container {
    grid-template-columns: 1fr;
    min-height: 244px;
  }
}

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