/* Can you Survive? - Proprietary software by IETC Training & Consulting. All rights reserved. */

:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6678;
  --paper: #f7f9ff;
  --panel: #ffffff;
  --panel-strong: #eef4ff;
  --ietc-purple: #4a2bb8;
  --ietc-violet: #7254e8;
  --ietc-blue: #1379d6;
  --ietc-cyan: #20b9f2;
  --ietc-deep: #1d1b68;
  --ietc-soft: #edf1ff;
  --forest: var(--ietc-purple);
  --forest-dark: var(--ietc-deep);
  --ember: #5b6ee1;
  --sun: #20b9f2;
  --blue: var(--ietc-blue);
  --violet: var(--ietc-violet);
  --line: rgba(29, 27, 104, 0.16);
  --shadow: 0 24px 80px rgba(38, 55, 132, 0.16);
  --brand-gradient: linear-gradient(135deg, var(--ietc-purple), var(--ietc-blue) 58%, var(--ietc-cyan));
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(247, 249, 255, 0.94), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 10% 10%, rgba(114, 84, 232, 0.2), transparent 28%),
    radial-gradient(circle at 90% 4%, rgba(32, 185, 242, 0.22), transparent 30%),
    repeating-linear-gradient(
      135deg,
      rgba(74, 43, 184, 0.07) 0,
      rgba(74, 43, 184, 0.07) 1px,
      transparent 1px,
      transparent 34px
    ),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible {
  outline: 4px solid rgba(32, 185, 242, 0.38);
  outline-offset: 3px;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(14px, 4vw, 42px);
}

.ietc-header,
.ietc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(14px, 3vw, 24px);
  padding: 12px 14px;
  border: 1px solid rgba(74, 43, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 34px rgba(38, 55, 132, 0.08);
}

.ietc-footer {
  margin-top: clamp(18px, 4vw, 36px);
  margin-bottom: 0;
}

.ietc-header p,
.ietc-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.copyright-notice {
  font-size: 0.82rem;
}

.ietc-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ietc-logo {
  width: auto;
  max-width: 172px;
  height: auto;
  max-height: 46px;
  object-fit: contain;
}

.ietc-logo-fallback {
  padding: 8px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand-gradient);
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.screen {
  min-height: calc(100vh - clamp(28px, 8vw, 84px));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: stretch;
}

.brand-lockup {
  min-height: 360px;
  padding: clamp(22px, 5vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.94)),
    var(--panel);
  box-shadow: var(--shadow);
}

.home-brand {
  margin-bottom: auto;
  align-self: flex-start;
}

.eyebrow,
.tagline,
.scenario-label,
.result-kicker,
.hud-label,
.scenario-meta,
.percentile {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 8.6em;
  margin: 10px 0 14px;
  font-size: clamp(3rem, 10vw, 7.25rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.05;
}

.tagline {
  max-width: 32rem;
  color: var(--ietc-deep);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.4;
  text-transform: none;
}

.survival-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(74, 43, 184, 0.2);
  background:
    linear-gradient(160deg, rgba(74, 43, 184, 0.94), rgba(19, 121, 214, 0.92) 58%, rgba(32, 185, 242, 0.9)),
    var(--ietc-purple);
  box-shadow: var(--shadow);
}

.survival-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
}

.sun {
  position: absolute;
  width: 118px;
  height: 118px;
  right: 9%;
  top: 12%;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.42);
}

.skyline {
  position: absolute;
  inset-inline: 7%;
  bottom: 0;
  height: 48%;
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.3fr 0.9fr;
  align-items: end;
  gap: 12px;
}

.skyline span {
  display: block;
  border-radius: 8px 8px 0 0;
  background: rgba(29, 27, 104, 0.58);
}

.skyline span:nth-child(1) {
  height: 58%;
}

.skyline span:nth-child(2) {
  height: 84%;
}

.skyline span:nth-child(3) {
  height: 68%;
}

.skyline span:nth-child(4) {
  height: 92%;
}

.signal-lines {
  position: absolute;
  left: 9%;
  top: 16%;
  display: grid;
  gap: 12px;
}

.signal-lines span {
  display: block;
  width: 180px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.signal-lines span:nth-child(2) {
  width: 132px;
}

.signal-lines span:nth-child(3) {
  width: 88px;
}

.phone-tile {
  position: absolute;
  right: 10%;
  bottom: 12%;
  width: min(190px, 42%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ietc-deep);
}

.phone-tile span {
  font-size: clamp(3rem, 8vw, 5.25rem);
  font-weight: 950;
  line-height: 0.9;
}

.phone-tile small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.scenario-picker {
  margin-top: clamp(18px, 4vw, 34px);
}

.section-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading.slim {
  align-items: start;
}

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

.scenario-card {
  min-height: 190px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 250, 241, 0.94);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(31, 47, 43, 0.10);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.scenario-card:hover,
.scenario-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(74, 43, 184, 0.46);
  box-shadow: 0 20px 44px rgba(38, 55, 132, 0.16);
}

.scenario-card.is-selected {
  background: linear-gradient(180deg, #ffffff, #eef4ff);
}

.scenario-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand-gradient);
  font-size: 1.35rem;
  font-weight: 950;
}

.scenario-card h3 {
  font-size: 1.1rem;
}

.scenario-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.38;
}

.scenario-meta {
  color: var(--ietc-purple);
}

.home-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 12px;
  align-items: center;
}

.topbar {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scenario-pill {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ietc-deep);
  font-size: 0.9rem;
  font-weight: 900;
}

.play-screen,
.result-screen,
.leaderboard-screen {
  display: grid;
  align-content: center;
}

.play-panel,
.result-card,
.leaderboard-panel {
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.inline-brand .ietc-logo {
  max-width: 138px;
  max-height: 34px;
}

.inline-brand .ietc-logo-fallback {
  font-size: 0.74rem;
}

.play-panel {
  display: grid;
  gap: 18px;
}

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

.hud-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, var(--panel-strong));
}

.hud-item strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.35rem, 5vw, 2.35rem);
  line-height: 1;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 24, 22, 0.12);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transition: width 220ms ease;
}

.question-block {
  display: grid;
  gap: 10px;
}

.question-block h2 {
  max-width: 900px;
}

.scenario-label,
.result-kicker {
  color: var(--ietc-purple);
}

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

.choice-button {
  width: 100%;
  min-height: 92px;
  padding: 14px;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(18, 24, 22, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(31, 47, 43, 0.08);
}

.choice-key {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fffaf1;
  background: var(--forest-dark);
  font-size: 0.9rem;
  font-weight: 950;
}

.choice-text {
  min-width: 0;
  font-weight: 850;
  line-height: 1.28;
}

.choice-button.is-correct {
  border-color: rgba(25, 107, 84, 0.58);
  background: #edf7ff;
}

.choice-button.is-risky {
  border-color: rgba(114, 84, 232, 0.5);
  background: #f2efff;
}

.choice-button:disabled {
  cursor: default;
}

.feedback {
  min-height: 54px;
  margin: 0;
  padding: 14px 16px;
  border-left: 5px solid var(--ietc-blue);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.result-card {
  display: grid;
  gap: 14px;
}

.result-brand {
  justify-self: start;
}

.survival-time {
  margin: 0;
  color: var(--ietc-deep);
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  font-weight: 950;
  line-height: 0.9;
}

.result-score {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ietc-purple);
}

.result-score [data-value="final-score"] {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 950;
  line-height: 0.9;
}

.result-score-label {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 950;
}

.result-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.nickname-form {
  display: grid;
  gap: 8px;
}

.nickname-form label {
  color: var(--forest-dark);
  font-weight: 900;
}

.nickname-row {
  display: grid;
  grid-template-columns: 1fr minmax(96px, 0.32fr);
  gap: 10px;
}

.nickname-row input {
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

.share-panel,
.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.primary-action,
.secondary-action,
.ghost-action,
.share-action {
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 950;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.primary-action {
  color: #ffffff;
  background: var(--brand-gradient);
  box-shadow: 0 14px 30px rgba(74, 43, 184, 0.26);
}

.secondary-action {
  color: var(--ietc-deep);
  background: #e8edff;
}

.ghost-action {
  border: 1px solid var(--line);
  color: var(--ietc-deep);
  background: rgba(255, 255, 255, 0.92);
}

.share-action {
  color: #fffaf1;
}

.whatsapp {
  background: linear-gradient(135deg, #178b61, #20b9f2);
}

.x {
  background: linear-gradient(135deg, #151515, var(--ietc-purple));
}

.linkedin {
  background: linear-gradient(135deg, #246fa8, var(--ietc-blue));
}

.copy {
  background: var(--brand-gradient);
}

.compact {
  width: auto;
  min-height: 44px;
}

.inline {
  min-height: 52px;
}

.primary-action:hover,
.secondary-action:hover,
.ghost-action:hover,
.share-action:hover {
  transform: translateY(-1px);
}

.status-text {
  min-height: 1.35em;
  margin: 0;
  color: var(--ietc-deep);
  font-weight: 850;
}

.leaderboard-panel {
  min-width: 0;
}

.leaderboard-panel.standalone {
  width: min(900px, 100%);
  margin: 0 auto;
}

.leaderboard-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand-gradient);
  font-weight: 950;
}

.leader-name {
  font-weight: 950;
}

.leader-detail {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.3;
}

.leader-score {
  color: var(--ietc-purple);
  font-size: 1.1rem;
  font-weight: 950;
}

.empty-state {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.is-hidden {
  display: none;
}

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

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

@media (max-width: 680px) {
  .app-shell {
    padding: 12px;
  }

  .screen {
    min-height: calc(100vh - 24px);
  }

  .brand-lockup,
  .survival-card {
    min-height: 280px;
  }

  .section-heading,
  .topbar,
  .home-actions {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .scenario-grid,
  .choices,
  .share-panel,
  .result-actions,
  .nickname-row,
  .hud {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    min-height: 150px;
  }

  .choice-button {
    min-height: 76px;
    grid-template-columns: 34px 1fr;
  }

  .choice-key {
    width: 34px;
    height: 34px;
  }

  .leaderboard-list li {
    grid-template-columns: 34px 1fr;
  }

  .leader-score {
    grid-column: 2;
  }

  .ietc-header,
  .ietc-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ietc-logo-fallback {
    white-space: normal;
  }
}
