:root {
  --bg: #fbf9f4;
  --surface: #fbf9f4;
  --surface-low: rgba(251, 249, 244, 0.82);
  --surface-high: rgba(255, 255, 255, 0.72);
  --surface-highest: rgba(255, 255, 255, 0.88);
  --primary: #5c5c5c;
  --secondary: #725b2f;
  --tertiary: #516050;
  --text: rgba(33, 33, 33, 0.94);
  --text-soft: rgba(33, 33, 33, 0.62);
  --text-light: rgba(248, 244, 236, 0.96);
  --outline-variant: rgba(33, 33, 33, 0.2);
  --line: rgba(33, 33, 33, 0.12);
  --shadow: 0 12px 40px rgba(33, 33, 33, 0.06);
  --hover-shadow: 0 18px 55px rgba(33, 33, 33, 0.1);
  --serif: "Noto Serif", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Manrope", "Aptos", "Segoe UI", Helvetica, Arial, sans-serif;
  --top-bar-height: 0px;
}

* {
  box-sizing: border-box;
}

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

body {
  background: radial-gradient(circle at 10% 12%, rgba(114, 91, 47, 0.06) 0%, rgba(251, 249, 244, 1) 56%),
    radial-gradient(circle at 92% 0%, rgba(81, 96, 80, 0.07) 0%, rgba(251, 249, 244, 0) 55%),
    var(--surface);
  color: var(--text);
  font-family: var(--sans);
  overflow: hidden;
}

button,
a {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  background: var(--surface);
}

.screen {
  min-height: 100vh;
}

.screen.is-hidden {
  display: none;
}

.utility-hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.app-title,
.duel-card__label,
.reveal-title,
.top-bar__brand {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 2rem;
  background: rgba(251, 249, 244, 0.85);
  backdrop-filter: blur(20px);
}

.top-bar__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--primary);
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.top-bar__brand-accent {
  color: var(--secondary);
}

.top-bar__brand:focus-visible {
  outline: 2px solid rgba(114, 91, 47, 0.32);
  outline-offset: 6px;
  border-radius: 8px;
}

.top-bar__status {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: rgba(37, 40, 37, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.top-bar__instruction {
  color: rgba(37, 40, 37, 0.52);
  letter-spacing: 0.18em;
}

.top-bar__divider {
  opacity: 0.45;
}

.top-bar__counter {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
  color: rgba(37, 40, 37, 0.82);
  letter-spacing: 0.28em;
}

.top-bar__counter::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.6rem;
  border-radius: 999px;
  background: rgba(114, 91, 47, 0.85);
}

.intro-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 2rem;
  transition: opacity 800ms ease, visibility 800ms ease;
}

.intro-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-screen__video-toggle {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: rgba(251, 249, 244, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 180ms ease, color 180ms ease, background-color 180ms ease;
}

.intro-screen__video-toggle:hover,
.intro-screen__video-toggle:focus-visible {
  opacity: 0.96;
  background: rgba(251, 249, 244, 0.18);
  color: rgba(255, 255, 255, 0.94);
}

.intro-screen__video-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 4px;
}

.intro-screen.is-motion-off .intro-screen__video {
  display: none;
}

.intro-screen.is-motion-off .intro-screen__fallback {
  opacity: 0;
  animation: none;
}

.intro-screen__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    url("./assets/video/intro-frame.png") center / cover no-repeat,
    radial-gradient(circle at 50% 18%, rgba(81, 96, 80, 0.18) 0%, rgba(251, 249, 244, 0.14) 54%),
    linear-gradient(180deg, rgba(46, 66, 70, 0.52), rgba(251, 249, 244, 0.88));
}

.intro-screen__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: none;
}

.intro-screen__fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(251, 249, 244, 0.08), rgba(251, 249, 244, 0.55));
  animation: introFogDrift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.intro-screen.is-video-ready .intro-screen__fallback {
  opacity: 0;
  animation: none;
}

@keyframes introFogDrift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1.06);
    opacity: 0.7;
  }
  to {
    transform: translate3d(2%, 1%, 0) scale(1.1);
    opacity: 0.88;
  }
}

.intro-screen__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 35%, rgba(12, 12, 10, 0.12) 0%, rgba(12, 12, 10, 0.28) 52%, rgba(12, 12, 10, 0.38) 100%);
  backdrop-filter: none;
}

.intro-screen__inner {
  position: relative;
  z-index: 1;
  width: min(94vw, 52rem);
  padding: clamp(3.2rem, 4.8vw, 5rem);
  border-radius: 18px;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  text-align: center;
}

.app-title {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 5.7rem);
  line-height: 0.92;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.intro-supporting {
  width: min(100%, 26rem);
  margin: 1.25rem auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.7;
  text-shadow: 0 14px 44px rgba(0, 0, 0, 0.26);
}

.intro-status {
  min-height: 1.5rem;
  margin: 1rem auto 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.intro-status.is-error {
  color: #7d3529;
}

.primary-button,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0 1.6rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

.primary-button {
  margin-top: 2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(92, 92, 92, 0.98), rgba(68, 68, 68, 0.98));
  color: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(33, 33, 33, 0.12);
}

.intro-screen .primary-button {
  background: rgba(251, 249, 244, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.intro-screen .primary-button:hover,
.intro-screen .primary-button:focus-visible {
  background: rgba(114, 91, 47, 0.22);
  box-shadow: 0 22px 66px rgba(0, 0, 0, 0.24);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(33, 33, 33, 0.16);
}

.primary-button--dark {
  background: rgba(92, 92, 92, 0.98);
}

.duel-screen {
  position: relative;
  height: 100vh;
  background: #f6f4ee;
}

.duel-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 10, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1200ms ease;
  z-index: 10;
}

.duel-screen.is-dimmed::after {
  opacity: 1;
}

.duel-instruction,
.progress-copy,
.reveal-country,
.meta-label,
.meta-value,
.secondary-link,
.facts-list {
  margin: 0;
}

.duel-instruction,
.progress-copy,
.reveal-country,
.meta-label,
.secondary-link,
.facts-list,
.facts-list li {
  color: rgba(31, 35, 40, 0.76);
}

.duel-instruction,
.progress-copy,
.reveal-country,
.meta-label,
.secondary-link {
  font-size: 0.95rem;
}

.progress-copy,
.duel-footer__links,
.duel-footer__note {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.duel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  min-height: 0;
  height: 100vh;
  background: rgba(76, 80, 74, 0.14);
}

.duel-card {
  position: relative;
  min-height: 74vh;
  border: 0;
  padding: 0;
  background: #c9d0d8;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 1000ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1000ms ease;
}

.duel-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: -6px;
}

.duel-card__image,
.duel-card__overlay {
  position: absolute;
  inset: 0;
}

.duel-card__image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1);
  transition: transform 2200ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 900ms ease;
}

.duel-card__overlay {
  background: linear-gradient(180deg, rgba(17, 19, 23, 0.02) 0%, rgba(17, 19, 23, 0.08) 42%, rgba(17, 19, 23, 0.62) 100%);
}

.duel-card__content {
  position: absolute;
  right: clamp(1.6rem, 2.5vw, 2.6rem);
  bottom: clamp(1.2rem, 2.4vw, 2rem);
  left: clamp(1.6rem, 2.5vw, 2.6rem);
  z-index: 1;
}

.duel-card__label {
  color: var(--text-light);
  font-size: clamp(2.75rem, 5.2vw, 5rem);
  line-height: 0.9;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.duel-card:hover .duel-card__image,
.duel-card:focus-visible .duel-card__image {
  transform: scale(1.045);
  filter: saturate(1.04);
}

.reveal-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(22rem, 0.82fr);
  background: var(--surface);
  backdrop-filter: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1200ms ease, visibility 1200ms ease;
}

.reveal-screen.is-armed {
  visibility: visible;
  pointer-events: auto;
}

.reveal-screen.is-visible {
  opacity: 1;
}

.reveal-screen__media {
  position: relative;
  min-height: 100vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translateX(6%) scale(0.96);
  transition: transform 1600ms cubic-bezier(0.18, 0.82, 0.2, 1);
}

.reveal-screen__media-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(1.6rem, 2.8vw, 2.4rem);
  background: linear-gradient(180deg, rgba(17, 19, 23, 0.05) 0%, rgba(17, 19, 23, 0.12) 52%, rgba(17, 19, 23, 0.68) 100%);
}

.reveal-vibe-script {
  margin: 0;
  max-width: 26rem;
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  letter-spacing: 0.02em;
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}

.reveal-screen__panel {
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--surface);
  transform: translateX(6rem);
  opacity: 0;
  transition: transform 1400ms cubic-bezier(0.18, 0.82, 0.2, 1), opacity 1200ms ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
}

.reveal-screen.is-visible .reveal-screen__media {
  transform: translateX(-1.6%) scale(1.03);
}

.reveal-screen.is-visible .reveal-screen__panel {
  transform: translateX(0);
  opacity: 1;
}

.reveal-kicker {
  margin: 0 0 1.1rem;
  color: var(--text-soft);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.reveal-title {
  margin: 0;
  font-size: clamp(3.3rem, 7vw, 5.7rem);
  line-height: 0.95;
}

.reveal-country {
  margin-top: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reveal-divider {
  width: 3.2rem;
  height: 2px;
  margin-top: 1.2rem;
  border-radius: 999px;
  background: rgba(114, 91, 47, 0.82);
}

.reveal-summary {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: 1.15rem;
  line-height: 1.75;
}

.reveal-summary::first-letter {
  float: left;
  margin: 0.12rem 0.55rem 0 0;
  color: rgba(92, 92, 92, 0.98);
  font-family: var(--serif);
  font-size: 3.4rem;
  line-height: 0.85;
}

.reveal-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.9rem;
}

.reveal-card {
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow);
}

.card-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.card-value {
  margin: 0.6rem 0 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

.card-note {
  margin: 0.55rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.facts-list {
  margin-top: 0.8rem;
  padding-left: 1.15rem;
  line-height: 1.7;
}

.reveal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.8rem;
  padding-top: 0.2rem;
}

.reveal-actions .primary-button {
  margin-top: 0;
  min-height: 3.05rem;
  padding: 0 1.25rem;
  font-size: 0.95rem;
}

.secondary-link {
  padding: 0.95rem 0.4rem;
  border: 0;
  border-bottom: 1px solid rgba(33, 33, 33, 0.22);
  color: rgba(33, 33, 33, 0.82);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
}

.secondary-link--quiet {
  transition: color 180ms ease, opacity 180ms ease;
}

.secondary-link--quiet:hover,
.secondary-link--quiet:focus-visible {
  transform: none;
  box-shadow: none;
  color: rgba(33, 33, 33, 0.98);
}

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

  .top-bar {
    padding: 1.1rem 1rem;
  }

  .top-bar__brand {
    font-size: 1.9rem;
  }

  .duel-screen__header {
    flex-direction: column;
    align-items: start;
    padding-inline: 1rem;
  }

  .duel-grid,
  .reveal-screen {
    grid-template-columns: 1fr;
  }

  .duel-screen {
    height: 100svh;
    padding-top: var(--top-bar-height);
  }

  .duel-card {
    min-height: 0;
  }

  .reveal-screen__media {
    min-height: 42vh;
  }

  .reveal-cards {
    grid-template-columns: 1fr;
  }

  .intro-screen__inner {
    width: min(100%, 100%);
  }

  .duel-grid {
    height: calc(100svh - var(--top-bar-height));
    grid-template-rows: 1fr 1fr;
  }

  .reveal-screen {
    overflow-y: auto;
  }

  .reveal-screen__panel {
    min-height: auto;
  }
}
