:root {
  --blue: #006794;
  --blue-deep: #004f73;
  --orange: #f29224;
  --orange-soft: #ffe3bf;
  --ink: #26333b;
  --muted: #6e7479;
  --grey: #9f9aa0;
  --line: #d9e4e9;
  --paper: #ffffff;
  --mist: #edf6f9;
  --shadow: 0 22px 55px rgba(0, 79, 115, 0.16);
  --title: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --body: "Aaux", "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 82px;
  padding: 14px clamp(18px, 4vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 103, 148, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  width: min(244px, 42vw);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.main-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a {
  padding: 8px 0;
}

.main-nav a:hover {
  color: var(--blue);
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-action,
.button.primary {
  background: var(--orange);
  color: #17120c;
  box-shadow: 0 12px 28px rgba(242, 146, 36, 0.28);
}

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

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

.button:hover,
.header-action:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.hero {
  position: relative;
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  align-items: stretch;
  overflow: hidden;
  background: var(--blue);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding: clamp(44px, 7vw, 92px) clamp(22px, 5vw, 74px);
  color: #fff;
}

.hero h1,
.demo-copy h2,
.donation h2,
.qr-flow h2,
.mission-panel h2 {
  margin: 0;
  font-family: var(--title);
  font-weight: 900;
  line-height: 0.98;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(4rem, 11vw, 10.5rem);
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 680px;
  margin: 28px 0 0;
  font-size: clamp(1.06rem, 2vw, 1.32rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
  max-width: 650px;
}

.hero-stats p {
  margin: 0;
  padding-top: 14px;
  border-top: 3px solid var(--orange);
}

.hero-stats strong {
  display: block;
  font-family: var(--title);
  font-size: 2rem;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
}

.hero-visual {
  position: relative;
  min-height: 520px;
  background:
    radial-gradient(circle at 35% 28%, rgba(242, 146, 36, 0.35), transparent 26%),
    linear-gradient(140deg, #fff 0 26%, var(--mist) 26% 100%);
}

.scan-grid {
  position: absolute;
  inset: 46px;
  border: 2px solid rgba(0, 103, 148, 0.14);
  background-image:
    linear-gradient(rgba(0, 103, 148, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 103, 148, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.scan-grid::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--orange);
  box-shadow: 0 0 26px rgba(242, 146, 36, 0.85);
  animation: scan 4.2s ease-in-out infinite;
}

.cell {
  position: absolute;
  width: clamp(82px, 11vw, 150px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  border: 12px solid var(--blue);
  box-shadow: var(--shadow);
}

.cell::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: var(--orange);
}

.cell-a {
  right: 16%;
  top: 16%;
  animation: float 6s ease-in-out infinite;
}

.cell-b {
  left: 18%;
  bottom: 22%;
  transform: scale(0.78);
  animation: float 7s ease-in-out infinite reverse;
}

.cell-c {
  right: 28%;
  bottom: 14%;
  transform: scale(0.58);
  border-color: var(--grey);
  animation: float 5.5s ease-in-out infinite;
}

.dna-track {
  position: absolute;
  right: 9%;
  top: 52%;
  display: grid;
  gap: 12px;
  width: min(260px, 34vw);
  transform: rotate(-12deg);
}

.dna-track span {
  display: block;
  height: 8px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--blue) 0 45%, var(--orange) 45% 55%, var(--blue) 55% 100%);
  animation: pulse 1.8s ease-in-out infinite;
}

.dna-track span:nth-child(even) {
  animation-delay: 300ms;
}

section {
  scroll-margin-top: 96px;
  padding: clamp(56px, 7vw, 96px) clamp(20px, 5vw, 72px);
}

.section-heading h2,
.demo-copy h2,
.donation h2 {
  color: var(--blue);
  font-size: clamp(2.4rem, 5vw, 5rem);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 34px;
}

.steps,
.scenario-grid,
.info-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.steps article,
.info-cards article,
.scenario-detail,
.app-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 103, 148, 0.08);
}

.steps article {
  min-height: 230px;
  padding: 22px;
}

.steps article:nth-child(2n) {
  background: var(--blue);
  color: #fff;
}

.steps article:nth-child(3n) {
  border-top: 5px solid var(--orange);
}

.steps span {
  color: var(--orange);
  font-family: var(--title);
  font-size: 2.3rem;
  font-weight: 900;
}

.steps h3,
.info-cards h3 {
  margin: 12px 0 8px;
  font-family: var(--title);
  color: inherit;
  font-size: 1.65rem;
  text-transform: uppercase;
}

.steps p,
.info-cards p {
  margin: 0;
  color: inherit;
}

.scenario-section {
  background: linear-gradient(180deg, #fff 0, var(--mist) 100%);
}

.scenario-card {
  display: flex;
  min-height: 172px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 14px 28px rgba(0, 103, 148, 0.08);
  cursor: pointer;
  text-align: left;
}

.scenario-card span {
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scenario-card strong {
  display: block;
  margin: 18px 0 8px;
  font-family: var(--title);
  color: var(--blue);
  font-size: 1.8rem;
  line-height: 1;
  text-transform: uppercase;
}

.scenario-card small {
  color: var(--muted);
}

.scenario-card.active {
  border-color: var(--orange);
  background: #fff9f1;
}

.scenario-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 28px;
  margin-top: 18px;
  padding: clamp(22px, 4vw, 42px);
}

.scenario-detail h3 {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: var(--title);
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.scenario-clue {
  align-self: stretch;
  padding: 22px;
  border-left: 6px solid var(--orange);
  background: var(--mist);
}

.scenario-clue span {
  color: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
}

.demo {
  display: grid;
  place-items: center;
  background: var(--blue);
}

.app-shell {
  overflow: hidden;
  width: min(100%, 680px);
  max-width: 680px;
  margin: 0 auto;
  border-color: rgba(255, 255, 255, 0.2);
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--ink);
  color: #fff;
}

.phone-header p {
  margin: 0;
}

.phone-header strong {
  margin-left: auto;
  color: var(--orange);
}

.status-dot {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #68d391;
  box-shadow: 0 0 16px rgba(104, 211, 145, 0.9);
}

.progress {
  height: 8px;
  background: #dfe8ec;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 250ms ease;
}

.qr-flow,
.mission-panel {
  padding: 26px;
}

.qr-flow h2,
.mission-panel h2 {
  color: var(--blue);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  margin: 0 0 14px;
}

.hidden {
  display: none;
}

.start-screen,
.patient-file {
  display: grid;
  gap: 16px;
}

.start-screen.hidden,
.patient-file.hidden {
  display: none;
}

.scenario-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scenario-pill {
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.scenario-pill.active {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--ink);
}

.room-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  max-height: 480px;
  overflow: auto;
  padding-right: 4px;
}

.room-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.room-card span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-family: var(--title);
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
}

.room-card span::before {
  content: "Salle";
  display: block;
  font-family: var(--body);
  font-size: 0.62rem;
  line-height: 1;
}

.room-card strong {
  color: var(--blue);
  font-family: var(--title);
  font-size: 1.55rem;
  line-height: 1;
  text-transform: uppercase;
}

.room-card small {
  color: var(--muted);
}

.room-card.active {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.room-card.done {
  border-color: rgba(0, 103, 148, 0.35);
  background: var(--mist);
  opacity: 0.72;
}

.scanner-screen {
  text-align: center;
}

.qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(285px, 82vw);
  aspect-ratio: 1;
  margin: 16px auto 24px;
  border: 3px solid var(--blue);
  border-radius: 18px;
  background: var(--mist);
  overflow: hidden;
}

.qr-frame > span {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 5px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 22px rgba(242, 146, 36, 0.95);
  animation: scan 1.6s ease-in-out infinite;
}

.qr-code {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  gap: 10px;
  padding: 18px;
  background: #fff;
}

.qr-code i {
  display: block;
  width: 42px;
  aspect-ratio: 1;
  background: var(--blue);
}

.qr-code i:nth-child(2),
.qr-code i:nth-child(4),
.qr-code i:nth-child(8) {
  background: var(--orange);
}

.room-brief {
  margin: 22px 0;
  padding: 18px;
  border-left: 6px solid var(--orange);
  background: var(--mist);
}

.room-brief span {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.room-brief p {
  margin: 0;
}

.puzzle-area {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.puzzle-title {
  margin: 0;
  color: var(--blue);
  font-weight: 900;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.puzzle-grid.sequence,
.puzzle-grid.trial {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.puzzle-grid.budget {
  grid-template-columns: 1fr;
}

.puzzle-choice {
  position: relative;
  min-height: 72px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.puzzle-choice.cell-choice {
  display: grid;
  place-items: center;
  min-height: 92px;
}

.puzzle-choice.cell-choice::before,
.puzzle-choice.cell-choice::after {
  content: none;
}

.cell-token {
  position: relative;
  display: block;
  width: min(62px, 58%);
  aspect-ratio: 1;
  border: 8px solid var(--blue);
  border-radius: 50%;
  background: #fff;
}

.cell-token::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--orange);
}

.cell-token.irregular {
  border-color: var(--orange);
  border-radius: 46% 54% 35% 65%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.puzzle-choice.sequence {
  font-family: var(--title);
  font-size: 1.3rem;
}

.puzzle-choice.molecule,
.puzzle-choice.trial {
  display: grid;
  gap: 4px;
  min-height: 94px;
}

.puzzle-choice small {
  color: var(--muted);
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
}

.puzzle-choice.budget {
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 14px;
}

.puzzle-choice.trial::before {
  content: "";
  width: 80%;
  height: 28px;
  border-left: 8px solid var(--blue);
  border-bottom: 8px solid var(--blue);
  background: linear-gradient(135deg, transparent 0 45%, var(--orange) 46% 54%, transparent 55% 100%);
}

.puzzle-choice.selected {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.puzzle-choice.correct {
  border-color: var(--blue);
  background: var(--mist);
}

.code-entry {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--blue);
  font-weight: 900;
}

.code-entry input {
  width: 100%;
  min-height: 54px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
}

.code-entry input:focus {
  border-color: var(--orange);
  outline: 3px solid rgba(242, 146, 36, 0.22);
}

.feedback {
  min-height: 52px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.mission-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.exit-scan {
  width: 100%;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.exit-scan.ready {
  color: var(--orange);
}

.demo-copy {
  color: #fff;
}

.demo-copy h2 {
  color: #fff;
}

.demo-copy p {
  max-width: 670px;
  font-size: 1.1rem;
}

.test-codes {
  display: grid;
  gap: 10px;
  max-width: 330px;
  margin-top: 28px;
}

.test-codes span {
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
}

.test-codes strong {
  border-left: 5px solid var(--orange);
  border-radius: 6px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.demo-copy ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
}

.demo-copy li {
  position: relative;
  padding-left: 30px;
}

.demo-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 16px;
  height: 5px;
  background: var(--orange);
}

.info-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-cards article {
  padding: 24px;
  border-top: 5px solid var(--orange);
}

.info-grid {
  background: var(--mist);
}

.info-grid h2 {
  max-width: 980px;
  margin: 0;
  color: var(--blue);
  font-family: var(--title);
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.98;
  text-transform: uppercase;
}

.donation {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 28px;
  align-items: center;
  background: var(--orange);
  color: #211304;
}

.donation .section-kicker,
.donation h2 {
  color: #211304;
}

.donation p {
  max-width: 820px;
  margin-bottom: 0;
}

@keyframes scan {
  0%,
  100% {
    top: 8%;
  }
  50% {
    top: 88%;
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -22px;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scaleX(0.92);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 1050px) {
  .hero,
  .demo,
  .scenario-detail,
  .donation {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 360px;
    order: -1;
  }

  .steps,
  .scenario-grid,
  .info-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    width: min(230px, 72vw);
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 16px;
    margin-left: 0;
    padding-bottom: 4px;
  }

  .header-action {
    margin-left: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 42px;
  }

  .hero h1 {
    font-size: clamp(3.8rem, 18vw, 6.4rem);
  }

  .hero-stats,
  .steps,
  .scenario-grid,
  .info-cards,
  .puzzle-grid,
  .scenario-pills {
    grid-template-columns: 1fr;
  }

  .mission-actions,
  .hero-actions {
    flex-direction: column;
  }

  .button,
  .header-action {
    width: 100%;
  }

  .donation .button {
    width: 100%;
  }
}
