:root {
  --bg: #0d1117;
  --panel: rgba(16, 22, 30, 0.55);
  --panel-strong: rgba(10, 14, 20, 0.72);
  --line: rgba(255, 255, 255, 0.25);
  --text: #eef4ff;
  --muted: rgba(238, 244, 255, 0.74);
  --accent: #c7d2fe;
  --accent-2: #93c5fd;
  --gold: #fde68a;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

body {
  overflow: hidden;
}

button {
  font: inherit;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1d232d;
}

.scene {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 500ms ease, transform 700ms ease;
  background-size: cover;
  background-position: center;
}


/* debug: scene id footer */
.scene-id-footer {
  position: fixed;
  right: 12px;
  bottom: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  padding: 6px 8px;
  border-radius: 6px;
  z-index: 9999;
  pointer-events: none;
}
.scene.active {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(12, 16, 20, 0.52), rgba(12, 16, 20, 0.18) 42%, rgba(12, 16, 20, 0.44)),
    radial-gradient(circle at top left, rgba(147, 197, 253, 0.12), transparent 38%);
}

.scene__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 6vh 6vw;
}

.scene__content--announcement {
  /* align announcement cards like team: content left-bottom, portrait top-right */
  justify-content: center;
  align-items: center;
  padding-top: 6vh;
}

.title-card {
  width: min(880px, 72vw);
  padding: clamp(1.25rem, 2vw, 2rem);
  border: 1px solid var(--line);
  background: rgba(11, 15, 24, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px var(--shadow);
  animation: floatIn 1.1s ease-out both;
}

.title-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.title-card__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #fff);
  box-shadow: 0 0 18px rgba(253, 230, 138, 0.8);
}

.title-card h1 {
  margin: 1.1rem 0 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  text-transform: uppercase;
  color: #f5f7ff;
  text-shadow: 0 0 40px rgba(147, 197, 253, 0.3);
}

.title-card h1 .muted {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  letter-spacing: -0.04em;
}

.title-card__tagline {
  max-width: 52ch;
  margin: 0.5rem 0 1rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.3rem);
  line-height: 1.6;
}

.title-card__line {
  width: 100%;
  height: 1px;
  margin: 1.5rem 0 1rem;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.4), rgba(255,255,255,0));
}

.title-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.title-card__footer span {
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
}

.scene__panel {
  /* position generic panels like team-copy (left / bottom) */
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  bottom: clamp(1.5rem, 3vw, 3rem);
  z-index: 2;
  width: min(760px, 70vw);
  min-height: min(280px, 40vh);
  padding: clamp(1rem, 1.8vw, 1.6rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 18, 0.38);
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.announcement-card {
  position: relative;
  width: min(1120px, 82vw);
  min-height: min(420px, 52vh);
  padding: clamp(1.2rem, 2.2vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(9, 14, 20, 0.18);
  backdrop-filter: blur(2px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

/* position announcement copy like team-copy (left / bottom) */

.announcement-card--dark {
  background: rgba(11, 12, 15, 0.32);
  border-color: rgba(255, 255, 255, 0.12);
}

.announcement-card--single-line {
  /* center single-line announcements */
  display: block;
}

/* top-aligned announcement variant (for laura-exit) */
.announcement-card--top .announcement-copy {
  left: clamp(1.5rem, 4vw, 4rem);
  bottom: auto;
  top: clamp(6vh, 8vw, 5rem);
  transform: none;
  max-width: min(60ch, 62%);
}

.announcement-copy {
  /* align announcement copy like team-copy: absolute left-bottom */
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  bottom: clamp(1.5rem, 3vw, 3rem);
  z-index: 2;
  max-width: min(60ch, 62%);
  padding: 0.5rem 0 0.5rem 0.4rem;
}

.announcement-copy h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 5rem);
  letter-spacing: -0.06em;
  text-transform: uppercase;
  text-shadow: 0 12px 32px rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.98);
}

.announcement-copy p:last-child {
  margin: 1.1rem 0 0;
  color: rgba(250, 252, 255, 0.98);
  line-height: 1.35;
  font-size: clamp(1.05rem, 1.7vw, 1.6rem);
  max-width: 40ch;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.announcement-copy p {
  word-wrap: break-word;
  white-space: normal;
}

.announcement-copy--dark p:last-child {
  color: rgba(245, 246, 247, 0.96);
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.announcement-copy--single-line {
  max-width: min(60ch, 70%);
}

.announcement-copy--single-line p:last-child {
  margin-top: 0.6rem;
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  line-height: 1.05;
  max-width: 30ch;
  text-align: center;
}

/* adjust single-line announcement copy centering */
.announcement-card--single-line .announcement-copy {
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(50% - 1rem);
  max-width: 60ch;
  text-align: center;
}

.final-line {
  display: inline;
  text-transform: uppercase;
}

.announcement-portrait {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: min(260px, 24vw);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  z-index: 1;
}

.announcement-portrait--dark {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 22px 55px rgba(0,0,0,0.34);
}

.announcement-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.9) contrast(1.08);
}

.scene__content--team {
  justify-content: center;
  align-items: center;
}

.team-card {
  position: relative;
  width: min(1180px, 85vw);
  min-height: min(480px, 60vh);
  padding: clamp(1.2rem, 2vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 18, 0.14);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.team-copy {
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  bottom: clamp(1.5rem, 3vw, 3rem);
  z-index: 2;
  max-width: min(60ch, 62%);
}

.team-copy h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 5rem);
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.team-portrait {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: min(260px, 24vw);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  z-index: 3;
}

.team-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.05);
}

.scene__eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.scene__panel h2 {
  /* place generic panels like team copy (left / bottom) */
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  bottom: clamp(1.5rem, 3vw, 3rem);
  z-index: 2;
  width: min(760px, 70vw);
  min-height: min(420px, 52vh);
  padding: clamp(1.25rem, 2.2vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 16, 21, 0.46);
  backdrop-filter: blur(10px);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  line-height: 1.7;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.scene__panel .badge {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.82);
}

.nav-button {
  position: absolute;
  z-index: 2;
  bottom: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 16, 21, 0.52);
  color: white;
  width: 3.7rem;
  height: 3.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.nav-button:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255,255,255,0.3);
  background: rgba(32, 42, 57, 0.7);
}

/* fanfara corner image for Danilo scene */
.fanfara-corner {
  position: absolute;
  left: 1.25rem;
  top: 1.25rem;
  width: min(160px, 18vw);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.4);
  z-index: 6;
  transform: rotate(-4deg);
}

/* corner for masini portrait on final Danilo exit */
.masini-corner {
  position: absolute;
  left: 1.25rem;
  top: 1.25rem;
  width: min(140px, 16vw);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.4);
  z-index: 6;
  transform: rotate(-2deg);
}

.nav-button:active {
  transform: translateY(0) scale(0.98);
}

.nav-button:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.nav-button--left {
  left: 2.2rem;
}

.nav-button--right {
  right: 2.2rem;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1100px) {
  .scene__content {
    padding: 5vh 4vw;
  }

  .title-card {
    width: min(82vw, 760px);
  }

  .announcement-card,
  .team-card {
    width: min(90vw, 960px);
    min-height: min(420px, 58vh);
  }

  .announcement-copy,
  .team-copy {
    max-width: min(56ch, 56%);
  }

  .announcement-portrait,
  .team-portrait {
    width: min(220px, 28vw);
  }
}

@media (max-width: 820px) {
  .scene__content {
    padding: 3.2vh 1rem 5vh;
  }

  .title-card {
    width: min(92vw, 620px);
  }

  .announcement-card,
  .team-card {
    width: min(92vw, 700px);
    min-height: 390px;
    padding: 1rem;
  }

  .announcement-copy,
  .team-copy {
    left: 1rem;
    bottom: 1rem;
    max-width: calc(100% - 6.5rem);
  }

  .announcement-copy h2,
  .team-copy h2 {
    font-size: clamp(2rem, 7vw, 3.2rem);
  }

  .announcement-copy p:last-child {
    font-size: clamp(1rem, 2.7vw, 1.3rem);
  }

  .announcement-portrait,
  .team-portrait {
    top: 1rem;
    right: 1rem;
    width: min(180px, 34vw);
  }

  .fanfara-corner,
  .masini-corner {
    width: min(120px, 24vw);
  }

  .nav-button {
    bottom: 1.1rem;
    width: 3.1rem;
    height: 3.1rem;
  }

  .nav-button--left {
    left: 1rem;
  }

  .nav-button--right {
    right: 1rem;
  }
}

@media (max-width: 560px) {
  .title-card {
    width: min(94vw, 520px);
    padding: 1.1rem 1rem 1.2rem;
  }

  .title-card__meta {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }

  .title-card h1 {
    font-size: clamp(2.7rem, 16vw, 4.2rem);
  }

  .title-card__tagline {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .title-card__footer {
    gap: 0.5rem;
  }

  .title-card__footer span {
    letter-spacing: 0.12em;
    font-size: 0.54rem;
    padding: 0.45rem 0.6rem;
  }

  .scene__panel {
    width: min(92vw, 620px);
  }

  .scene__content--announcement {
    justify-content: center;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .announcement-card,
  .team-card {
    width: min(94vw, 520px);
    min-height: 350px;
    padding: 0.85rem;
  }

  .announcement-copy,
  .team-copy {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.8rem;
    max-width: calc(100% - 1.5rem);
  }

  .announcement-copy h2,
  .team-copy h2 {
    font-size: clamp(1.7rem, 9vw, 2.5rem);
  }

  .announcement-copy p:last-child {
    font-size: clamp(0.96rem, 4.5vw, 1.1rem);
  }

  .announcement-portrait,
  .team-portrait {
    position: static;
    width: min(160px, 44vw);
    margin: 0.25rem 0 0 auto;
  }

  .announcement-card--single-line .announcement-copy {
    left: 50%;
    right: auto;
    bottom: 1.5rem;
    transform: translateX(-50%);
    width: calc(100% - 1.5rem);
    max-width: 100%;
    text-align: center;
  }

  .announcement-copy--single-line p:last-child {
    font-size: clamp(1.15rem, 6vw, 1.8rem);
  }

  .fanfara-corner,
  .masini-corner {
    width: min(90px, 22vw);
  }

  .nav-button {
    bottom: 0.8rem;
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1rem;
  }

  .nav-button--left {
    left: 0.8rem;
  }

  .nav-button--right {
    right: 0.8rem;
  }
}
