/*
  THE COURAGE TEST - HACK UI (knife-edge)
  v2026-01-12

  Goals:
  - matte-black stage, muted teal haze
  - scanline interference + soft vignette
  - hard edges (no rounding)
  - outline CTAs (border = signal)
  - footer always anchored to the bottom
*/

:root {
  /* Align quiz ambience with brakepoint.xyz (matte-black + teal field + scanlines) */
  --bg0: #0b0f10;
  --bg1: #111515;

  --fg: #EDEEEE;
  --fg2: rgba(237, 238, 238, 0.78);
  --muted: rgba(237, 238, 238, 0.50);

  --line: rgba(255, 255, 255, 0.14);
  --line2: rgba(255, 255, 255, 0.09);

  --accent: #22d3ee;
  --accentRgb: 34, 211, 238;

  --radius: 0px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

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

body {
  background:
    radial-gradient(1200px 900px at 18% 0%, rgba(var(--accentRgb), 0.04), transparent 62%),
    radial-gradient(900px 700px at 98% 16%, rgba(255,255,255, 0.03), transparent 58%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--fg);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 18px;
  overflow: hidden;
}

/* scanlines + vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0px, rgba(255,255,255,.018) 1px, transparent 1px, transparent 6px);
  opacity: 1;
  mix-blend-mode: normal;
  z-index: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: -20vh;
  pointer-events: none;
  background:
    radial-gradient(700px 420px at 22% 10%, rgba(var(--accentRgb), 0.10), transparent 62%),
    radial-gradient(520px 340px at 86% 18%, rgba(var(--accentRgb), 0.06), transparent 70%),
    radial-gradient(closest-side, rgba(0,0,0,0) 54%, rgba(0,0,0,0.58) 100%);
  opacity: 0.86;
  z-index: 0;
}

a { color: inherit; }

.wrap {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* --- SCREENS --- */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  padding: 0 5vw;
}

.screen[data-active="true"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- TOP BAR --- */
.topbar {
  flex: 0 0 72px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line2);
  background: transparent;
}

/* --- MAIN BLOCKS --- */
.block, .result {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  min-height: 0;
}

/* --- FOOTER (always bottom) --- */
.footer {
  margin-top: auto;
  flex: 0 0 60px;
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 12px;
  color: rgba(237, 238, 238, 0.58);
  border-top: 1px solid rgba(255,255,255,0.12);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer a {
  color: rgba(237, 238, 238, 0.58);
  text-decoration: none;
}

.footer a:hover { color: var(--fg2); }

.dot {
  opacity: 0.6;
}

/* --- TYPO / KICKERS --- */
.kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(237, 238, 238, 0.58);
  font-weight: 700;
}

.kicker-title,
.kicker-strong { color: rgba(var(--accentRgb), 0.9); }

/* --- LINKS (Exit/Restart/etc) --- */
.link {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: rgba(237, 238, 238, 0.58);
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}

.link:hover {
  color: var(--fg2);
  border-color: rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.55);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg2);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

a.btn,
a.btn:visited,
a.btn:hover,
a.btn:active {
  text-decoration: none !important;
}

.btn:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.03);
  color: var(--fg);
}

.btn-primary {
  border-color: rgba(var(--accentRgb), 0.9);
  color: rgba(var(--accentRgb), 0.95);
}

.btn-primary:hover {
  background: rgba(var(--accentRgb), 0.08);
  box-shadow: 0 0 18px rgba(var(--accentRgb), 0.16);
}

/* --- HOME (ENTER) --- */
.block-home {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  padding-top: clamp(96px, 14vh, 170px);
}

.main-title {
  font-size: clamp(28px, 3.4vw, 46px);
  margin: 0 0 10px 0;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0.16em; /* wider tracking */
  word-spacing: 0.22em;
  text-transform: uppercase;
}

.home-subtitle {
  font-size: 18px;
  color: rgba(237, 238, 238, 0.58);
  margin: 0 0 28px 0;
}

#btn-start {
  border-width: 3px; /* bolder border */
  border-color: rgba(var(--accentRgb), 0.95);
  color: rgba(var(--accentRgb), 0.95);
  padding: 12px 26px;
  min-width: 120px;
}

#btn-start:hover {
  background: rgba(var(--accentRgb), 0.08);
  box-shadow: 0 0 18px rgba(var(--accentRgb), 0.14);
}

.home-disclaimer {
  font-size: 16px;
  color: rgba(237, 238, 238, 0.58);
  opacity: 0.72;
  margin-top: 18px; /* a bit lower than the button */
}

/* --- TEST (QUESTION) --- */
.block-test {
  justify-content: flex-start;
  padding-top: clamp(190px, 38vh, 420px);
}

#q-text {
  margin: 0;
  font-size: clamp(30px, 3.9vw, 46px);
  line-height: 1.16;
  font-weight: 700;
  color: var(--fg);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 34px;
  width: 100%;
}

.btn-option {
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg2);
  text-align: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  line-height: 1.35;
}

.btn-option:hover {
  border-color: rgba(var(--accentRgb), 0.9);
  background: rgba(255,255,255,0.03);
  color: var(--fg);
}

/* back rail on test screen (keeps "Back" low, above footer) */
.back-rail {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  margin-top: auto;
  padding: 0 0 10px 0;
}

.link-back {
  background: transparent;
  border: 1px solid var(--line);
  color: rgba(237, 238, 238, 0.58);
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}

.link-back:hover {
  color: var(--fg2);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.03);
}

/* --- READY (SCORING) --- */
.block-ready {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 22vh;
}

.ready-subtitle {
  font-size: 16px !important;
  opacity: 0.65;
  margin-bottom: 26px;
}

/* --- SUBMIT (TEST COMPLETE) --- */
.block-submit {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  padding-top: clamp(120px, 18vh, 240px);
}

.submit-pre-title {
  font-size: 16px;
  color: rgba(237, 238, 238, 0.58);
  margin-bottom: 10px;
}

.submit-main-title {
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 800;
  color: var(--fg);
  margin: 0 0 28px 0;
  letter-spacing: -0.01em;
}

#btn-submit {
  margin-top: 8px; /* slightly lower */
}

.back-container {
  margin-top: auto;
  padding-bottom: 18px;
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

/* --- RESULT --- */
.result {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  min-height: 0;
  justify-content: flex-start;
  padding-top: clamp(24px, 4vh, 70px);
  gap: 26px;
}

@media (min-width: 900px) {
  .result {
    display: grid;
    grid-template-columns: minmax(520px, 1.15fr) minmax(420px, 0.85fr);
    align-items: stretch;
    gap: 56px;
    padding-top: clamp(32px, 5vh, 96px);
  }
  .result-media {
    width: 100%;
    flex: unset;
    height: min(clamp(520px, 68vh, 860px), calc(100vh - 72px - 60px - 140px));
  }
  .result-copy {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
  }
  .result-cta {
    margin-top: 52px;
  }
  .result-lower {
    margin-top: auto;
  }
}

.result-media {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(var(--accentRgb), 0.06), 0 18px 40px rgba(0,0,0,0.55);
  /* Mobile/default viewing window */
  height: clamp(320px, 56vh, 680px);
}

.result-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 45%;
  filter: saturate(0.86) contrast(1.02);
}


.result-copy {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#result-id {
  margin-bottom: 10px;
}

#result-title {
  margin: 0;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.05;
  font-weight: 800;
  color: rgba(var(--accentRgb), 0.95); /* accent like img7 */
}

#result-body {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  margin: 14px 0 18px 0;
  color: var(--fg);
}

.result-cta {
  margin-top: 4px;
}


/* RESULT INCLUDES */
.result-includes {
  margin-top: 18px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,0.02);
  padding: 14px 16px;
}
.includes-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.55;
  margin-bottom: 10px;
  font-weight: 700;
}
.includes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  opacity: 0.78;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.includes-list li::before {
  content: "✦ ";
  opacity: 0.7;
}

.result-delivery {
  margin-top: 18px; /* lower than the button */
  font-size: 12px;
  color: rgba(var(--accentRgb), 0.72);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.result-lower {
  margin-top: auto; /* pushes the rail down */
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

#result-note {
  font-size: 14px;
  opacity: 0.45;
  margin: 0;
}

/* small improvements for very small heights */
@media (max-height: 740px) {
  .block-test { padding-top: clamp(140px, 30vh, 320px); }
  .block-home { padding-top: clamp(76px, 12vh, 140px); }
}


/* --- PWYW --- */
.pwyw {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(22px, 4vh, 54px) 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
}

.pwyw-center {
  text-align: center;
  margin-top: clamp(10px, 4vh, 44px);
}

.pwyw-title {
  margin: 0;
  font-size: clamp(44px, 6vw, 78px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(var(--accentRgb), 0.95);
}

.pwyw-sub,
.pwyw-sub2 {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237, 238, 238, 0.58);
  font-weight: 700;
}

.pwyw-sub2 { margin-top: 12px; color: rgba(237, 238, 238, 0.70); }

.pwyw-preview {
  width: min(520px, 82vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.pwyw-preview-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
  font-weight: 700;
}

.pwyw-pdf {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}

/* Prices row */
.pwyw-prices {
  width: min(620px, 92vw);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.pwyw-price {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: rgba(237,238,238,0.82);
  padding: 18px 10px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pwyw-price:hover {
  border-color: rgba(var(--accentRgb), 0.9);
  color: var(--fg);
  background: rgba(255,255,255,0.03);
}

.pwyw-price.is-reco {
  border-color: rgba(var(--accentRgb), 0.9);
  color: rgba(var(--accentRgb), 0.95);
  box-shadow: 0 0 16px rgba(var(--accentRgb), 0.14);
}

.pwyw-free {
  width: min(860px, 92vw);
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: rgba(237,238,238,0.86);
  padding: 18px 16px;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.16s ease;
  margin-top: 6px;
}

.pwyw-free:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.03);
}

.pwyw-hint {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
}

.pwyw-secure {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.35;
}

.pwyw-bottom {
  width: 100%;
  max-width: var(--max-width);
  margin: 18px auto 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pwyw-note { text-transform: uppercase; letter-spacing: 0.16em; }

/* Smaller screens */
@media (max-width: 720px) {
  .pwyw-preview { width: min(520px, 92vw); }
  .pwyw-prices { grid-template-columns: repeat(3, 1fr); }
  .pwyw-prices .pwyw-price:nth-child(4),
  .pwyw-prices .pwyw-price:nth-child(5) { grid-column: span 1; }
}

/* Mobile performance: remove scanlines/vignette */
@media (max-width: 768px) {
  body::before, body::after { display: none !important; background: none !important; }
  body { background: linear-gradient(180deg, var(--bg0), var(--bg1)) !important; }
}
