/* ============================================================
   PRIMAL QUESTION TEST — Styled to match dmitriyostapenko.com
   Design system: Bebas Neue + IBM Plex Sans, #FFE400 accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-base:    #101010;
  --clr-surface: #1A1A1A;
  --clr-surf2:   #222222;
  --clr-accent:  #FFE400;
  --clr-white:   #FFFFFF;
  --clr-gray:    #7D8799;
  --clr-dim:     #4A4A4A;
  --border:      rgba(255,255,255,0.08);
  --font-d:      'Bebas Neue', Arial, sans-serif;
  --font-b:      'IBM Plex Sans', sans-serif;
  --ease:        cubic-bezier(0.25,1,0.5,1);
  --t:           0.25s var(--ease);
  --r:           6px;
  --max:         680px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-white);
  background: var(--clr-base);
  min-height: 100vh;
}

/* ── Language Switch ── */
.lang-switch {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 4px;
  z-index: 100;
}

.lang-btn {
  font-family: var(--font-b);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--clr-surface);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--t);
}

.lang-btn:hover,
.lang-btn.active { color: var(--clr-accent); border-color: var(--clr-accent); }

/* ── Layout ── */
.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.25rem 4rem;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--max);
  padding-top: 3rem;
  animation: fadeUp 0.35s var(--ease) both;
}

.screen.active { display: flex; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Brand ── */
.brand {
  font-family: var(--font-d);
  font-size: 1.375rem;
  letter-spacing: 0.12em;
  color: var(--clr-accent);
  margin-bottom: 3rem;
  align-self: flex-start;
}

.brand.small {
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ── Start screen ── */
.h1 {
  font-family: var(--font-d);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  align-self: flex-start;
}

.sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: rgba(255,255,255,0.65);
  font-weight: 300;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.hint {
  font-size: 0.875rem;
  color: var(--clr-gray);
  border-left: 2px solid var(--clr-accent);
  padding-left: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-b);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clr-accent);
  color: var(--clr-base);
}

.btn-primary:hover {
  background: #f0d800;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: rgba(255,255,255,0.3); color: var(--clr-white); }

/* ── Progress ── */
.progress-wrap {
  width: 100%;
  margin-bottom: 2.5rem;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--clr-gray);
  letter-spacing: 0.06em;
  margin-bottom: 0.625rem;
}

.progress-bar {
  height: 3px;
  background: var(--clr-surf2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--clr-accent);
  border-radius: 2px;
  transition: width 0.4s var(--ease);
}

/* ── Question ── */
.question-wrap { width: 100%; }

.question-text {
  font-family: var(--font-d);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 3rem;
  min-height: 4rem;
}

/* ── Slider ── */
.slider-wrap { width: 100%; margin-bottom: 2rem; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--clr-surf2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clr-accent);
  box-shadow: 0 0 0 4px rgba(255,228,0,0.15);
  transition: box-shadow var(--t);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 8px rgba(255,228,0,0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--clr-accent);
  border: none;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--clr-gray);
}

.slider-value {
  font-family: var(--font-d);
  font-size: 2rem;
  color: var(--clr-accent);
  line-height: 1;
}

/* ── Nav row ── */
.nav-row {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2.5rem;
}

/* ── Result ── */
.result-preheading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-gray);
  margin-bottom: 1.25rem;
  align-self: flex-start;
}

.result-gift-wrap {
  width: 100%;
  padding: 2rem;
  background: var(--clr-surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 1.5rem;
}

.result-category {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 0.75rem;
}

.result-gift {
  font-family: var(--font-d);
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.result-description {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 2rem;
  width: 100%;
}

/* ── Panels ── */
.result-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1rem;
}

.panel {
  padding: 1.5rem;
  border-radius: var(--r);
  background: var(--clr-surface);
  border: 1px solid var(--border);
}

.panel-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

.panel-nourishes .panel-title { color: #5BCA7A; }
.panel-drains    .panel-title { color: #E05F5F; }
.panel-advice    .panel-title { color: var(--clr-accent); }

.panel-advice { width: 100%; margin-bottom: 2rem; }

.panel-body {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255,255,255,0.8);
}

/* ── CTA ── */
.cta-wrap {
  width: 100%;
  padding: 2rem;
  background: linear-gradient(135deg, var(--clr-surface) 0%, var(--clr-surf2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-gray);
}

.cta-primary { align-self: stretch; text-align: center; }

.cta-secondary {
  font-family: var(--font-b);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-decoration: underline;
  transition: color var(--t);
}

.cta-secondary:hover { color: var(--clr-white); }

/* ── Score breakdown ── */
.result-scores {
  width: 100%;
  margin-bottom: 2rem;
}

.result-scores-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-gray);
  margin-bottom: 1rem;
}

#result-scores {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#result-scores li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--clr-surface);
  border-radius: 4px;
  font-size: 0.9375rem;
}

.btn-retake { margin-top: 1rem; align-self: center; }

/* ── Footer ── */
.footer {
  margin-top: 4rem;
  font-size: 0.75rem;
  color: var(--clr-dim);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ── Mobile ── */
@media (max-width: 520px) {
  .result-panels { grid-template-columns: 1fr; }
  .nav-row { justify-content: stretch; }
  .nav-row .btn { flex: 1; }
  .wrap { padding: 1.5rem 1rem 3rem; }
  .lang-switch { top: 0.875rem; right: 0.875rem; }
}
