:root {
  --resin: #140e0c;
  --resin-2: #221812;
  --ivory: #ede4d4;
  --ivory-dim: #c9bba8;
  --brass: #c9a36a;
  --brass-deep: #8d6a3a;
  --teal: #2ec4b6;
  --iris: #5c3d73;
  --ember: #e07a3d;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --sans: "Schibsted Grotesk", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 700px at 80% 10%, #2a1b16 0%, var(--resin) 52%);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

.home {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100dvh;
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: 8vh clamp(20px, 6vw, 96px);
}

.brand {
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--brass);
}

.home-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.2rem, 12vw, 9rem);
  line-height: 0.8;
  letter-spacing: -0.045em;
  max-width: 8ch;
}

.lede {
  max-width: 34rem;
  margin: 1.6rem 0 2rem;
  color: var(--ivory-dim);
  font-size: 1.05rem;
}

.cta {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #e4c48e 0%, #b8894e 100%);
  color: #1a120e;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 14px 30px rgba(184, 137, 78, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateZ(0);
  transition: transform 160ms ease, filter 160ms ease;
}

.cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.cta:active {
  transform: translateY(1px);
}

.cta-ghost {
  margin: 0 auto 8vh;
  background: transparent;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(201, 163, 106, 0.4);
}

.hint {
  margin: 1rem 0 0;
  color: #8f8072;
  font-size: 0.88rem;
}

.home-stage {
  perspective: 900px;
  display: grid;
  place-items: center;
  min-height: 52vh;
}

.orbit {
  width: min(58vw, 460px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  animation: drift 9s ease-in-out infinite;
}

.lens {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  border-radius: 50%;
}

.lens-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 14px solid var(--brass);
  box-shadow:
    0 30px 50px rgba(0, 0, 0, 0.35),
    inset 0 8px 16px rgba(255, 255, 255, 0.16),
    inset 0 -10px 18px rgba(0, 0, 0, 0.45);
  transform: translateZ(36px);
}

.lens-ring-mid {
  inset: 9%;
  border-width: 6px;
  border-color: #a07b45;
  transform: translateZ(22px);
  opacity: 0.9;
}

.lens-glass {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(237, 228, 212, 0.28), transparent 28%),
    radial-gradient(circle at 50% 50%, #2a1d28 0%, #0c090c 70%);
  transform: translateZ(12px);
  box-shadow: inset 0 0 40px rgba(46, 196, 182, 0.08);
}

.iris {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 8deg, #3a2748 0 18deg, #1b121c 18deg 36deg);
  transform: translateZ(4px) scale(1);
  box-shadow: inset 0 0 18px #000;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lens.is-press .iris {
  transform: translateZ(4px) scale(0.18);
}

.core {
  position: absolute;
  inset: 43%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #7ff0e6, var(--teal) 42%, #0e3f3b 80%);
  transform: translateZ(18px);
  box-shadow: 0 0 32px rgba(46, 196, 182, 0.45);
}

.specular {
  position: absolute;
  left: 18%;
  top: 14%;
  width: 28%;
  height: 16%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
  transform: translateZ(48px) rotate(-18deg);
  filter: blur(0.2px);
}

.page-studio,
.page-watch {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.studio,
.watch {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  gap: 16px;
}

.bezel {
  position: relative;
  flex: 1;
  min-height: 58vh;
  border-radius: 28px;
  overflow: hidden;
  background: #0a0706;
  transform: perspective(1200px) rotateX(7deg) rotateY(-8deg);
  transform-origin: center 70%;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(201, 163, 106, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-studio.is-live .bezel,
.page-watch.is-playing .bezel {
  transform: none;
}

.bezel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0a0706;
}

.bezel-watch video {
  position: absolute;
  inset: 0;
}

.bezel-glass {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 32%, transparent 70%, rgba(201, 163, 106, 0.08));
}

.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 18px;
  z-index: 2;
}

.timer {
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.save-pill,
.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 14, 12, 0.62);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(237, 228, 212, 0.08);
  font-size: 0.86rem;
}

.save-pill i,
.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8f8072;
  display: block;
}

.save-pill.is-live i,
.live-pill.is-live i {
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
}

.live-pill.is-cut i {
  background: var(--ember);
  box-shadow: none;
}

.gate-msg {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 22px;
  margin: 0;
  color: var(--ivory-dim);
  text-shadow: 0 6px 18px #000;
}

.dock {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 4px 8px 8px;
}

.dock-btn {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: rgba(237, 228, 212, 0.06);
  color: var(--ivory);
  display: grid;
  place-items: center;
  cursor: pointer;
  justify-self: center;
  box-shadow: inset 0 0 0 1px rgba(201, 163, 106, 0.16);
}

.dock-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.shutter {
  width: 92px;
  height: 92px;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 600px;
  justify-self: center;
}

.shutter-3d {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: shutter-float 4.8s ease-in-out infinite;
}

.shutter-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 7px solid var(--brass);
  box-shadow:
    0 16px 24px rgba(0, 0, 0, 0.35),
    inset 0 6px 10px rgba(255, 255, 255, 0.18),
    inset 0 -8px 10px rgba(0, 0, 0, 0.35);
  transform: translateZ(16px);
}

.shutter-core {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6ea, #d9b07a 40%, #6b4a28);
  transform: translateZ(24px);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.is-live .shutter-core {
  background: radial-gradient(circle at 35% 30%, #bffcf6, var(--teal) 46%, #145c56);
  box-shadow: 0 0 24px rgba(46, 196, 182, 0.4);
}

.share-sheet {
  border: 0;
  border-radius: 20px;
  padding: 20px;
  background: #1b1410;
  color: var(--ivory);
  width: min(92vw, 420px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.share-sheet::backdrop {
  background: rgba(8, 6, 5, 0.65);
}

.share-sheet p {
  margin: 0 0 10px;
  color: var(--brass);
}

.share-sheet input {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: #2a201a;
  color: var(--ivory);
}

.share-sheet form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.share-sheet button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #e4c48e, #b8894e);
  color: #1a120e;
  cursor: pointer;
}

.share-sheet button[value="close"] {
  background: #2a201a;
  color: var(--ivory);
}

.watch-note {
  text-align: center;
  color: #8f8072;
  margin: 0;
  font-size: 0.9rem;
}

.play-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 16px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e4c48e, #b8894e);
  color: #1a120e;
  font-weight: 600;
  cursor: pointer;
  z-index: 3;
}

.install {
  max-width: 520px;
  margin: 12vh auto;
  padding: 0 20px;
}

.install label {
  display: block;
  margin: 0.8rem 0 0.3rem;
  color: var(--ivory-dim);
}

.install input {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: #2a201a;
  color: var(--ivory);
}

@keyframes drift {
  0%,
  100% { transform: translateY(0) rotateX(8deg) rotateY(-12deg); }
  50% { transform: translateY(-10px) rotateX(4deg) rotateY(10deg); }
}

@keyframes shutter-float {
  0%,
  100% { transform: rotateX(10deg) rotateY(-8deg); }
  50% { transform: rotateX(0deg) rotateY(8deg); }
}

@media (max-width: 860px) {
  .home {
    grid-template-columns: 1fr;
    padding-top: 10vh;
    align-content: start;
  }

  .home-stage {
    order: -1;
    min-height: 38vh;
  }

  .orbit {
    width: min(72vw, 340px);
  }

  .bezel {
    transform: none;
    min-height: 62vh;
  }
}

@media (hover: hover) and (pointer: fine) {
  .orbit:hover {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit,
  .shutter-3d,
  .bezel {
    animation: none;
    transform: none;
  }
}
