:root {
  --ink: #1e2430;
  --muted: #586173;
  --paper: #fff9ef;
  --surface: #ffffff;
  --line: #d9e1ec;
  --blue: #2364a6;
  --blue-dark: #173f70;
  --green: #3f8d55;
  --coral: #ec624f;
  --yellow: #f3b73f;
  --teal: #168a93;
  --shadow: 0 18px 45px rgba(23, 47, 79, 0.14);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a.button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-180%);
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--blue-dark);
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding: 0.7rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(255, 249, 239, 0.94);
  border-bottom: 1px solid rgba(30, 36, 48, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 0.18rem;
  background: #fff;
  border-radius: var(--radius);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.main-nav a {
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #fff;
  background: var(--blue);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(86svh - 70px);
  isolation: isolate;
  overflow: hidden;
  background: #173f70;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(11, 25, 43, 0.5);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 92vw);
  padding: clamp(2rem, 7vw, 6rem);
  color: #fff;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--coral);
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffe082;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.1rem, 8vw, 6.5rem);
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.24);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

h3 {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
}

.hero-content p:not(.eyebrow) {
  max-width: 680px;
  margin: 1rem 0 0;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 800;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.65rem;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 950;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button {
  padding: 0.75rem 1rem;
}

.button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.button.primary {
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.button.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.button.secondary {
  color: #fff;
  background: var(--blue);
}

.button:hover,
.button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-2px);
  outline: 3px solid rgba(243, 183, 63, 0.55);
  outline-offset: 3px;
}

.section-inner {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.section-pad {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.intro-band {
  padding: clamp(2.2rem, 5vw, 4.5rem) 0;
  background: #fff;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(95px, 160px) minmax(0, 1fr) minmax(95px, 160px);
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
}

.intro-grid h2 {
  max-width: 14ch;
}

.intro-grid p:not(.eyebrow) {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  font-weight: 750;
}

.intro-character {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.intro-character.mauri {
  transform: scaleX(-1);
}

.section-heading {
  max-width: 820px;
  margin-bottom: clamp(1.5rem, 4vw, 2.8rem);
}

.section-heading.compact {
  max-width: 720px;
}

.section-heading p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.13rem;
  font-weight: 750;
}

.story {
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.65)),
    var(--paper);
}

.story-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.scene-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 0.6rem;
}

.scene-tab {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0.65rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 8px 22px rgba(23, 47, 79, 0.06);
}

.scene-tab span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
}

.scene-tab.is-active {
  color: #fff;
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.scene-tab.is-active span {
  color: var(--ink);
  background: var(--yellow);
}

.scene-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.scene-progress {
  height: 8px;
  background: #edf2f8;
}

.scene-progress span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--green);
  transition: width 220ms ease;
}

.scene-visual {
  margin: 0;
  background: #edf2f8;
}

.scene-visual img {
  width: 100%;
  aspect-ratio: 4 / 2.65;
  object-fit: cover;
}

.scene-copy {
  padding: clamp(1rem, 3vw, 2rem);
}

.scene-count {
  margin: 0 0 0.55rem;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 950;
  text-transform: uppercase;
}

.scene-copy > p[data-scene-text] {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 750;
}

.dialogues {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.dialogue {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  background: #f6f9fc;
  border-left: 5px solid var(--yellow);
  border-radius: var(--radius);
}

.dialogue:nth-child(2) {
  border-left-color: var(--green);
}

.dialogue img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  object-position: top center;
}

.dialogue p {
  margin: 0;
  font-weight: 760;
}

.scene-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.icon-button {
  width: 50px;
  height: 50px;
  color: #fff;
  background: var(--blue-dark);
}

.icon-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.7;
}

.actions {
  background: #ffffff;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.action-card {
  min-height: 250px;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(23, 47, 79, 0.08);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1rem;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
}

.action-icon.coral {
  background: var(--coral);
}

.action-icon.green {
  background: var(--green);
}

.action-icon.yellow {
  color: var(--ink);
  background: var(--yellow);
}

.action-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.action-card h3 {
  font-size: 1.55rem;
}

.action-card p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-weight: 750;
}

.badge-section {
  overflow: hidden;
  background: #173f70;
  color: #fff;
}

.badge-layout {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) minmax(220px, 310px);
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: center;
}

.badge-section .eyebrow {
  color: #ffe082;
}

.badge-copy p:not(.eyebrow) {
  max-width: 740px;
  margin: 1rem 0 0;
  font-size: 1.15rem;
  font-weight: 750;
}

.badge-character {
  max-height: 360px;
  object-fit: contain;
}

.quote-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

blockquote {
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
}

blockquote p {
  margin: 0;
  font-weight: 850;
}

cite {
  display: block;
  margin-top: 0.55rem;
  color: var(--blue-dark);
  font-style: normal;
  font-weight: 950;
}

.badge-medal {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 1.5rem;
  color: var(--ink);
  text-align: center;
  background: #ffe082;
  border: 10px solid var(--yellow);
  border-radius: 50%;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.badge-medal img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  padding: 0.25rem;
  background: #fff;
  border-radius: var(--radius);
}

.badge-medal strong {
  max-width: 12rem;
  font-size: 1.25rem;
  line-height: 1.12;
}

.badge-medal small {
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 2.5rem);
  color: #fff;
  background: #101925;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 980px) {
  .story-layout,
  .badge-layout {
    grid-template-columns: 1fr;
  }

  .scene-nav {
    position: static;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

  .scene-tab {
    min-width: 148px;
  }

  .action-grid,
  .quote-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .badge-character {
    justify-self: center;
    max-height: 250px;
  }

  .badge-medal {
    justify-self: center;
    width: min(310px, 84vw);
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
  }

  .main-nav a {
    flex: 0 0 auto;
  }

  .hero {
    min-height: 78svh;
  }

  .hero-media img {
    object-position: 54% center;
  }

  .hero-content {
    padding: 2rem 1rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.45rem, 12vw, 3.7rem);
    line-height: 1.02;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .intro-character {
    justify-self: center;
    max-height: 190px;
  }

  .intro-character.mauri {
    display: none;
  }

  .scene-visual img {
    aspect-ratio: 4 / 3;
  }

  .scene-controls {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 50px;
  }

  .scene-controls .button {
    min-width: 0;
    padding-inline: 0.6rem;
  }

  .action-grid,
  .quote-pair {
    grid-template-columns: 1fr;
  }

  .action-card {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
  }
}

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