:root {
  --text: #f3eee6;
  --muted: rgba(243, 238, 230, 0.76);
  --panel: rgba(7, 10, 14, 0.56);
  --panel-strong: rgba(6, 9, 13, 0.8);
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.24);
  --shadow: 0 34px 110px rgba(0, 0, 0, 0.42);
  --bg-top: #090b10;
  --bg-bottom: #050608;
  --ambient-a: 255, 150, 79;
  --ambient-b: 185, 220, 245;
  --ambient-c: 255, 215, 145;
  --frame-glow: 255, 150, 79;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 18% 14%, rgba(var(--ambient-a), 0.17), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(var(--ambient-b), 0.13), transparent 28%),
    radial-gradient(circle at 50% 86%, rgba(var(--ambient-c), 0.11), transparent 40%);
  filter: blur(8px);
}

body::after {
  background:
    radial-gradient(circle at center, transparent 34%, rgba(3, 5, 8, 0.18) 66%, rgba(3, 5, 8, 0.78) 100%),
    linear-gradient(90deg, rgba(3, 5, 8, 0.56), transparent 20%, transparent 80%, rgba(3, 5, 8, 0.5)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.012));
}

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

.scene-page--nightfall {
  --bg-top: #090b10;
  --bg-bottom: #030406;
  --ambient-a: 255, 118, 42;
  --ambient-b: 116, 152, 184;
  --ambient-c: 68, 78, 93;
  --frame-glow: 255, 138, 82;
}

.scene-page--winter {
  --bg-top: #08111a;
  --bg-bottom: #04070e;
  --ambient-a: 106, 146, 192;
  --ambient-b: 212, 233, 255;
  --ambient-c: 70, 92, 120;
  --frame-glow: 164, 208, 246;
}

.scene-page--unmoved {
  --bg-top: #190f08;
  --bg-bottom: #070606;
  --ambient-a: 255, 169, 76;
  --ambient-b: 214, 156, 88;
  --ambient-c: 112, 60, 24;
  --frame-glow: 255, 184, 102;
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
}

.brand,
.poster,
.caption,
.scene-rail,
.button {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--panel-strong));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 24px;
}

.brand img {
  width: 36px;
  height: auto;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand__copy strong,
.brand__copy small,
.button {
  text-transform: uppercase;
}

.brand__copy strong {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.brand__copy small {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 0;
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.stage::before {
  inset: 8% 14%;
  border-radius: 54px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008)),
    radial-gradient(circle at center, rgba(var(--frame-glow), 0.08), transparent 54%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stage::after {
  inset: 20% 24%;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(var(--frame-glow), 0.18), transparent 64%);
  filter: blur(38px);
  opacity: 0.7;
}

.scene-page--landscape .stage::before {
  inset: 10% 8%;
}

.scene-page--landscape .stage::after {
  inset: 24% 14%;
}

.scene-stack {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.poster {
  position: relative;
  padding: 12px;
  border-radius: 32px;
}

.poster::before {
  content: "";
  position: absolute;
  inset: -26px;
  z-index: -1;
  border-radius: 44px;
  background: radial-gradient(circle, rgba(var(--frame-glow), 0.18), transparent 72%);
  filter: blur(18px);
}

.poster img {
  display: block;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.poster--portrait {
  width: min(30vw, 430px);
  max-width: calc(100vw - 40px);
}

.poster--portrait img {
  width: 100%;
  max-height: min(62vh, 760px);
}

.poster--landscape {
  width: min(54vw, 920px);
  max-width: calc(100vw - 40px);
}

.poster--landscape img {
  width: 100%;
  max-height: min(60vh, 700px);
}

.caption {
  position: relative;
  width: min(100%, 640px);
  padding: 18px 20px;
  border-radius: 24px;
  text-align: center;
}

.caption--wide {
  width: min(100%, 860px);
}

.caption::before {
  content: "";
  display: block;
  width: 84px;
  height: 1px;
  margin: 0 auto 12px;
  background: linear-gradient(90deg, transparent, rgba(var(--frame-glow), 0.8), transparent);
}

.caption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.dock {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
}

.scene-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 84px;
  padding: 8px;
  border-radius: 999px;
  overflow-x: auto;
}

.thumb {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 18px;
  padding: 4px;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.thumb:hover,
.thumb:focus-visible {
  transform: translateY(-2px);
}

.thumb.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.thumb img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.scene-controls {
  display: flex;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  font-weight: 800;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.button--primary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(var(--frame-glow), 0.18), transparent);
}

.button--ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

@media (max-width: 1120px) {
  .poster--portrait {
    width: min(36vw, 430px);
  }

  .poster--landscape {
    width: min(66vw, 920px);
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .site-shell {
    padding: 14px;
  }

  .poster--portrait,
  .poster--landscape {
    width: min(90vw, 620px);
  }

  .poster--portrait img,
  .poster--landscape img {
    max-height: none;
  }

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

  .stage::before {
    inset: 6% 0;
    border-radius: 32px;
  }

  .stage::after {
    inset: 18% 8%;
  }

  .scene-controls {
    justify-content: stretch;
  }

  .button {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .brand__copy strong,
  .button {
    letter-spacing: 0.16em;
  }

  .brand {
    padding: 12px 14px;
  }

  .poster {
    padding: 8px;
    border-radius: 24px;
  }

  .poster img {
    border-radius: 16px;
  }

  .caption {
    padding: 16px 16px 18px;
  }

  .caption p {
    font-size: 0.9rem;
  }

  .thumb img {
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thumb,
  .button {
    transition: none;
  }
}
