:root {
  --bg: #08090b;
  --ink: #e8e6e1;
  --ink-bright: #f3f1ec;
  --ink-dim: #a8a59d;
  --ink-mute: #8a8780;
  --ink-faint: #57544d;
  --gold: #c9a86a;
  --gold-bright: #e6cf9e;
  --good: #8fbf8a;
  --bad: #c96a6a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  height: 100%;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: #ddc492;
}

button {
  font: inherit;
}

@keyframes sf-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sf-fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sf-drift {
  0% {
    transform: translate(-2%, -2%) scale(1);
  }
  50% {
    transform: translate(2%, 2%) scale(1.08);
  }
  100% {
    transform: translate(-2%, -2%) scale(1);
  }
}

@keyframes sf-scan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(2200%);
  }
}

@keyframes sf-spin {
  to {
    transform: rotate(360deg);
  }
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% -10%, #14161b 0%, #0b0c0f 45%, #060708 100%);
}

.stage__grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
}

.stage__glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.stage__glow--top {
  top: -20%;
  left: 50%;
  width: 900px;
  height: 900px;
  margin-left: -450px;
  background: radial-gradient(circle, rgba(201, 168, 106, 0.1) 0%, transparent 60%);
  animation: sf-drift 22s ease-in-out infinite;
}

.stage__glow--bottom {
  bottom: -30%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(70, 110, 130, 0.1) 0%, transparent 60%);
  animation: sf-drift 28s ease-in-out infinite reverse;
}

.stage__frame {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin: 18px;
  pointer-events: none;
}

.phase {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  animation: sf-fadein 0.7s ease;
}

.phase.is-active {
  display: flex;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  opacity: 0;
  animation: sf-rise 0.7s ease forwards;
  animation-delay: 0.1s;
}

.brand__rule {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.brand__rule--right {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.brand__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.5em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ---------- Intro ---------- */

.intro__inner {
  width: min(680px, 92vw);
  text-align: center;
}

.intro__title {
  margin: 0 0 24px;
  font-family: "Newsreader", serif;
  font-weight: 300;
  font-size: clamp(52px, 11vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink-bright);
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 0.4s;
}

.intro__copy {
  margin: 0 auto 42px;
  max-width: 460px;
  font-size: clamp(15px, 2.4vw, 17px);
  line-height: 1.65;
  color: var(--ink-dim);
  text-wrap: pretty;
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 0.6s;
}

.intro__action {
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 0.8s;
}

.btn {
  border: none;
  border-radius: 11px;
  cursor: pointer;
}

.btn--primary {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0c0d0f;
  background: linear-gradient(180deg, #d8bd85, var(--gold));
  padding: 16px 40px;
  box-shadow: 0 16px 40px -14px rgba(201, 168, 106, 0.7);
  transition: filter 0.15s ease;
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.intro__meta {
  margin-top: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ---------- Analyzing ---------- */

.phase--analyzing {
  background: var(--bg);
  z-index: 40;
}

.scan {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(rgba(201, 168, 106, 0.06), transparent);
  animation: sf-scan 4s linear infinite;
  pointer-events: none;
}

.analyzing__inner {
  width: min(560px, 86vw);
}

.analyzing__heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 106, 0.2);
  border-top-color: var(--gold);
  animation: sf-spin 0.9s linear infinite;
}

.analyzing__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.boot-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 38px;
}

.boot-line {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.28;
  transition: opacity 0.4s ease;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.boot-line.is-active,
.boot-line.is-done {
  opacity: 1;
}

.boot-line__glyph {
  width: 14px;
  text-align: center;
  color: #3a382f;
}

.boot-line.is-active .boot-line__glyph,
.boot-line.is-done .boot-line__glyph {
  color: var(--gold);
}

.boot-line__text {
  letter-spacing: 0.02em;
  color: #4a473f;
}

.boot-line.is-active .boot-line__text {
  color: var(--ink);
}

.boot-line.is-done .boot-line__text {
  color: #c8c5bd;
}

.progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8a6f38, var(--gold));
  transition: width 0.5s ease;
  box-shadow: 0 0 12px rgba(201, 168, 106, 0.6);
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #6a675f;
  text-transform: uppercase;
}

/* ---------- Results ---------- */

.phase--results {
  overflow-y: auto;
  animation: sf-fadein 0.9s ease;
}

.results__inner {
  width: min(720px, 92vw);
  text-align: center;
}

.results__title {
  margin: 0 0 22px;
  font-family: "Newsreader", serif;
  font-weight: 300;
  font-size: clamp(52px, 11vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink-bright);
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 0.4s;
}

.results__title em {
  font-style: italic;
  color: var(--gold);
}

.results__copy {
  margin: 0 auto 40px;
  max-width: 500px;
  font-size: clamp(15px, 2.4vw, 17px);
  line-height: 1.65;
  color: var(--ink-dim);
  text-wrap: pretty;
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 0.6s;
}

.card {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(24, 26, 31, 0.9), rgba(14, 15, 18, 0.9));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 0.8s;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}

.card__title {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.card__case {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #6a675f;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.row:last-child {
  border-bottom: none;
}

.row.is-shown {
  opacity: 1;
  transform: translateX(0);
}

.row__label {
  font-size: 14px;
  color: #97948c;
}

.row__value {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.row__value--good {
  color: var(--good);
}

.row__value--bad {
  color: var(--bad);
}

.row__value--gold {
  color: var(--gold-bright);
}

.verdict {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 34px 0 8px;
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 1.9s;
}

.verdict__badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 26px;
  border: 1px solid rgba(201, 168, 106, 0.4);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.14), rgba(201, 168, 106, 0.04));
  box-shadow: 0 0 40px -10px rgba(201, 168, 106, 0.4);
}

.verdict__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.verdict__value {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-size: 22px;
  color: var(--gold-bright);
}

.verdict__sub {
  margin-top: 12px;
  font-size: 13px;
  color: #7d7a72;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 30px;
  opacity: 0;
  animation: sf-rise 0.9s ease forwards;
  animation-delay: 2.1s;
}

.btn--ghost {
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #c8c5bd;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 14px 26px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.btn--gold {
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #0c0d0f;
  background: linear-gradient(180deg, #d8bd85, var(--gold));
  padding: 14px 26px;
  box-shadow: 0 12px 30px -12px rgba(201, 168, 106, 0.7);
  transition: filter 0.15s ease;
}

.btn--gold:hover {
  filter: brightness(1.08);
}

.further {
  margin: 18px auto 0;
  max-width: 440px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-mute);
  animation: sf-fadein 0.4s ease;
  display: none;
}

.further.is-open {
  display: block;
}

.disclaimer {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: sf-fadein 1s ease forwards;
  animation-delay: 2.4s;
}

.disclaimer__text {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-transform: uppercase;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

  .stage__glow--top,
  .stage__glow--bottom,
  .scan,
  .spinner {
    animation: none !important;
  }
}
