@font-face {
  font-family: 'Kaspersky Sans Display';
  src: url('/assets/fonts/Kaspersky_Sans_Display_Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Kaspersky Sans Display';
  src: url('/assets/fonts/Kaspersky_Sans_Display_Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Kaspersky Sans Display';
  src: url('/assets/fonts/Kaspersky_Sans_Display_SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --navy: #141928;
  --dark-blue: #29434f;
  --cyan: #00e3e3;
  --violet: #7733ff;
  --white: #ffffff;
  --muted: #aeb9bf;
  --line: rgba(255, 255, 255, 0.16);
  --card: #213542;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background: var(--navy);
  font-family: 'Kaspersky Sans Display', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.app-shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 1040px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--safe-top) clamp(22px, 4vw, 48px) var(--safe-bottom);
}

.brand-bar,
.footer-line,
.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-bar {
  min-height: 50px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: clamp(146px, 18vw, 176px);
  height: auto;
}

.brand-tag,
.footer-line,
.progress-row,
.eyebrow,
.question-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: clamp(28px, 5vh, 52px) 0 28px;
  animation: screen-in 360ms cubic-bezier(.2,.8,.2,1) both;
}

.screen--active { display: flex; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.start-layout,
.result-layout {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(280px, .9fr) minmax(340px, 1.1fr);
  gap: clamp(42px, 8vw, 96px);
  align-items: center;
}

.start-copy,
.result-copy { min-width: 0; }

.hero-visual,
.result-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 430px);
  aspect-ratio: 1;
  justify-self: center;
}

.hero-visual img,
.result-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-count,
.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-count strong,
.score-value strong {
  font-size: clamp(64px, 10vw, 104px);
  font-weight: 500;
  line-height: .82;
  letter-spacing: -.06em;
}

.hero-count span,
.score-value span {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .08em;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--cyan);
}

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

h1 {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

.lead {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.48;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 60px;
  padding: 0 22px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  margin-top: clamp(28px, 5vh, 48px);
  border: 0;
  color: #101820;
  background: var(--cyan);
  font-weight: 600;
}

.primary-button:hover:not(:disabled) { background: #45eeee; }
.primary-button:active,
.secondary-button:active,
.option-button:active { transform: scale(.985); }
.primary-button:disabled { cursor: default; opacity: .28; }

.secondary-button {
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--white);
  background: transparent;
}

.secondary-button:hover { border-color: rgba(255,255,255,.38); }

.progress-row { margin-bottom: 12px; }
.progress-row span:last-child { color: var(--cyan); }
.progress-track {
  height: 2px;
  margin-bottom: clamp(32px, 5vh, 52px);
  overflow: hidden;
  background: var(--line);
}
.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--cyan);
  transition: width 350ms ease;
}

.question-card {
  flex: 1;
  width: min(100%, 780px);
}

.question-label {
  margin-bottom: 18px;
  color: var(--cyan);
}

.question-label span { color: var(--white); }

h2 {
  margin-bottom: clamp(26px, 4vh, 38px);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

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

.option-button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 12px 18px;
  color: var(--white);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.option-button:hover { border-color: rgba(255,255,255,.28); }
.option-letter { color: var(--muted); font-size: 12px; font-weight: 600; }
.option-button[aria-checked="true"] {
  border-color: var(--cyan);
  background: rgba(0, 227, 227, .1);
}
.option-button[aria-checked="true"] .option-letter { color: var(--cyan); }

#quiz-screen > .primary-button { width: min(100%, 420px); }

.result-visual { width: min(100%, 410px); }
.score-value strong { font-size: clamp(62px, 9vw, 96px); }

.share-status {
  min-height: 20px;
  margin: 18px 0 0;
  color: var(--cyan);
  font-size: 14px;
  line-height: 1.4;
}
.share-status:empty { display: none; }
.share-status--error { color: #ff8095; }

.result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
  width: min(100%, 680px);
  margin: clamp(28px, 4vh, 44px) 0 0 auto;
}
.result-actions .primary-button { margin-top: 0; }

.error-code {
  margin: auto 0 18px;
  color: var(--violet);
  font-size: 13px;
  letter-spacing: .14em;
}

.footer-line {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

@media (max-width: 700px) {
  .app-shell { width: min(100%, 560px); }
  .screen { padding-top: 28px; }

  .start-layout,
  .result-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  .hero-visual,
  .result-visual {
    width: min(72vw, 300px);
    margin: -8px auto 0;
  }

  .hero-count strong,
  .score-value strong { font-size: clamp(64px, 19vw, 90px); }

  h1 { font-size: clamp(38px, 10vw, 54px); }
  .lead { font-size: 17px; }
  .options { grid-template-columns: 1fr; gap: 10px; }
  .option-button { min-height: 60px; }
  #quiz-screen > .primary-button { width: 100%; }
  .result-actions { grid-template-columns: 1fr; width: 100%; margin-top: 28px; }
}

@media (max-height: 740px) and (max-width: 700px) {
  .screen { padding-top: 22px; }
  .hero-visual,
  .result-visual { width: min(54vw, 220px); }
  .start-layout,
  .result-layout { gap: 8px; }
  .eyebrow { margin-bottom: 10px; }
  h1 { margin-bottom: 14px; font-size: clamp(34px, 9vw, 46px); }
  .primary-button { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
