:root {
  --red: #bd221a;
  --red-dark: #831611;
  --red-soft: #fff0ed;
  --navy: #111f3a;
  --ink: #171b24;
  --muted: #667085;
  --paper: #fffaf7;
  --white: #ffffff;
  --green: #1f7a5d;
  --gold: #c9962e;
  --line: rgba(131, 22, 17, 0.16);
  --shadow: 0 22px 70px rgba(40, 28, 24, 0.12);
  --nav-height: 100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  direction: ltr;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.presentation-shell,
.splash,
.slide-nav,
.page-hero,
.content-band {
  direction: rtl;
}

a {
  color: inherit;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(17, 31, 58, 0.92), rgba(131, 22, 17, 0.94)),
    url("assets/presentation/psp-flag.svg") center / min(680px, 78vw) no-repeat;
  color: #fff;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash::before {
  content: "";
  position: absolute;
  inset: 8vh 8vw;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.flag-stage {
  width: min(520px, 76vw);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.flag-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.36));
  animation: flagFloat 2.5s ease-in-out infinite;
}

.loading-copy {
  position: absolute;
  bottom: 8vh;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.loading-copy p {
  margin: 0;
  font-size: clamp(1.5rem, 4.6vw, 3.6rem);
  font-weight: 900;
}

.loader {
  width: min(360px, 64vw);
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
}

.loader span {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  transform-origin: right;
  animation: loadBar 10s linear forwards;
}

.presentation-shell {
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  transition: opacity 0.6s ease;
}

.presentation-shell.is-hidden {
  opacity: 0;
}

.slide-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: var(--nav-height);
  padding: 12px clamp(16px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 247, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(27, 18, 16, 0.08);
  max-width: 100vw;
  overflow: hidden;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--red-dark);
  text-decoration: none;
}

.brand-mark img {
  width: 64px;
  height: 46px;
  object-fit: cover;
  border: 1px solid rgba(131, 22, 17, 0.18);
  box-shadow: 0 10px 24px rgba(131, 22, 17, 0.16);
}

.brand-mark span {
  display: grid;
  gap: 2px;
}

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

.brand-mark strong {
  font-size: 1.15rem;
  font-weight: 900;
}

.thumb-shell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.thumb-track {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(131, 22, 17, 0.45) transparent;
  max-width: 100%;
}

.thumb-track::-webkit-scrollbar {
  height: 8px;
}

.thumb-track::-webkit-scrollbar-thumb {
  background: rgba(131, 22, 17, 0.38);
}

.slide-thumb {
  position: relative;
  flex: 0 0 172px;
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(131, 22, 17, 0.15);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.slide-thumb::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--red);
  transition: transform 0.25s ease;
}

.slide-thumb:hover,
.slide-thumb.is-active {
  border-color: rgba(189, 34, 26, 0.56);
  background: #fff;
  transform: translateY(-2px);
}

.slide-thumb.is-active::after {
  transform: scaleX(1);
}

.thumb-kicker,
.slide-thumb em {
  color: var(--red-dark);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.slide-thumb strong {
  grid-column: 1 / -1;
  font-size: 0.98rem;
  line-height: 1.25;
}

.thumb-button {
  width: 38px;
  height: 52px;
  border: 1px solid rgba(131, 22, 17, 0.18);
  background: #fff;
  color: var(--red-dark);
  font-size: 1.7rem;
  font-weight: 900;
  cursor: pointer;
}

.thumb-button:hover {
  background: var(--red-soft);
}

.page-hero,
.content-band {
  max-width: 100vw;
  padding: clamp(44px, 6vw, 82px) clamp(18px, 5vw, 82px);
}

.page-hero {
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 250, 247, 0.94), rgba(255, 240, 237, 0.72)),
    linear-gradient(135deg, transparent 0 72%, rgba(17, 31, 58, 0.08) 72% 100%);
}

.page-hero.compact {
  min-height: auto;
}

.hero-copy {
  max-width: 840px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: clamp(2.6rem, 6.8vw, 6.2rem);
  line-height: 1.05;
}

h2 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.12;
}

h3 {
  color: var(--red-dark);
  font-size: 1.25rem;
}

.lead {
  max-width: 760px;
  color: #334155;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.85;
}

.hero-visual,
.visual-panel {
  min-width: 0;
  min-height: 380px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-visual:not(.flag-composition) {
  padding: 18px;
}

.flag-composition {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(17, 31, 58, 0.95), rgba(131, 22, 17, 0.92)),
    var(--white);
}

.flag-composition::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.flag-composition img {
  width: 78%;
  max-height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.32));
}

.hero-metrics {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-metrics span,
.reference-chip {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-weight: 900;
  text-align: center;
}

.reference-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.reference-chip {
  border-color: var(--line);
  background: #fff;
  text-align: start;
}

.content-band {
  background: #fff;
}

.content-band.tint {
  background: var(--red-soft);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 28px;
}

.two-col,
.three-col {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.source-card,
.step-card,
.value-card,
.role-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 36px rgba(40, 28, 24, 0.07);
}

.card,
.source-card,
.step-card,
.value-card,
.role-card,
.callout {
  padding: clamp(18px, 3vw, 28px);
}

.card p,
.source-card p,
.step-card p,
.value-card p,
.role-card p,
.callout p,
.timeline p,
.org-chart p,
.process-line p {
  color: #475467;
  line-height: 1.85;
}

.card ul,
.source-card ul {
  display: grid;
  gap: 10px;
  padding-right: 22px;
  color: #475467;
  line-height: 1.8;
}

.number-badge {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  margin-bottom: 16px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  padding-right: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 4px;
  width: 4px;
  background: linear-gradient(var(--red), var(--gold), var(--green));
}

.timeline-item {
  position: relative;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: #fff;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 24px;
  right: -28px;
  width: 14px;
  height: 14px;
  background: var(--red);
}

.timeline-item strong {
  color: var(--red-dark);
  font-size: 1.12rem;
}

.principle-wheel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
}

.principle-core {
  grid-column: 1 / -1;
  padding: 26px;
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.principle-core strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.65rem;
}

.value-card {
  display: grid;
  align-content: start;
  min-height: 160px;
}

.value-card:nth-child(3n + 1) {
  border-top: 4px solid var(--green);
}

.value-card:nth-child(3n + 2) {
  border-top: 4px solid var(--gold);
}

.value-card:nth-child(3n + 3) {
  border-top: 4px solid var(--red);
}

.law-flow,
.process-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.step-card {
  position: relative;
  min-height: 180px;
}

.step-card::after {
  content: "";
  position: absolute;
  top: 28px;
  left: -14px;
  width: 14px;
  height: 2px;
  background: rgba(131, 22, 17, 0.28);
}

.step-card:last-child::after {
  display: none;
}

.org-chart {
  display: grid;
  gap: 14px;
}

.org-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.org-node {
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-weight: 900;
  text-align: center;
}

.org-node.primary {
  grid-column: 1 / -1;
  background: var(--red);
  color: #fff;
}

.org-node.region {
  border-color: rgba(31, 122, 93, 0.32);
  background: rgba(31, 122, 93, 0.08);
}

.chain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chain span {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--red-dark);
  font-weight: 900;
}

.chain i {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.membership-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.check-list {
  display: grid;
  gap: 12px;
}

.check-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  list-style: none;
  color: #475467;
  line-height: 1.7;
}

.check-list li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: rgba(31, 122, 93, 0.12);
  color: var(--green);
  font-weight: 900;
}

.impact-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.impact-map .role-card:first-child {
  grid-row: span 2;
  background: var(--navy);
  color: #fff;
}

.impact-map .role-card:first-child p,
.impact-map .role-card:first-child h3 {
  color: #fff;
}

.quote-panel,
.callout {
  border-right: 6px solid var(--red);
  background: #fff;
  box-shadow: var(--shadow);
}

.quote-panel {
  padding: clamp(22px, 4vw, 40px);
}

.quote-panel blockquote {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.65;
  font-weight: 900;
}

.source-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 12px 18px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.map-link:hover {
  background: var(--red-dark);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes flagFloat {
  0%, 100% { transform: rotateY(-5deg) translateY(0); }
  50% { transform: rotateY(5deg) translateY(-12px); }
}

@keyframes loadBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 1050px) {
  :root {
    --nav-height: 154px;
  }

  .slide-nav {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    justify-content: center;
  }

  .page-hero,
  .two-col,
  .membership-grid,
  .impact-map {
    grid-template-columns: 1fr;
  }

  .law-flow,
  .process-line,
  .three-col,
  .org-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  :root {
    --nav-height: 168px;
  }

  .slide-nav {
    padding: 10px;
  }

  .brand-mark img {
    width: 52px;
    height: 38px;
  }

  .thumb-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .thumb-track {
    direction: ltr;
  }

  .slide-thumb {
    direction: rtl;
  }

  .thumb-button {
    display: none;
  }

  .slide-thumb {
    flex-basis: 148px;
  }

  .page-hero,
  .content-band {
    width: 100vw;
    max-width: 100vw;
    direction: ltr;
    display: block;
    padding: 34px 16px;
  }

  .page-hero > *,
  .content-band > * {
    direction: rtl;
  }

  .hero-copy {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin-left: 0;
    margin-right: auto;
    text-align: center;
  }

  .hero-visual {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin-left: 0;
    margin-right: auto;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.25rem, 5.2vw, 1.55rem);
    line-height: 1.18;
    text-wrap: auto;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .lead {
    width: min(100%, 300px);
    margin-right: auto;
    margin-left: auto;
    font-size: 0.94rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
  }

  .reference-bar {
    justify-content: center;
  }

  .reference-chip {
    width: min(100%, 300px);
    text-align: center;
  }

  .hero-visual,
  .visual-panel {
    min-height: 260px;
  }

  .law-flow,
  .process-line,
  .three-col,
  .org-row,
  .principle-wheel {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }
}
