/* ============================================
   Solo z Maszyną — Brand Tokens & Base Styles
   ============================================ */

:root {
  /* Colors */
  --bg: #0A0A0A;
  --red: #FF4444;
  --text-primary: #FFFFFF;
  --text-secondary: #AAAAAA;
  --text-muted: #555555;
  --border: #222222;
  --selected-bg: rgba(255, 68, 68, 0.1);
  --selected-border: rgba(255, 68, 68, 0.27);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.015) 2px,
    rgba(255, 255, 255, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

.hidden {
  display: none !important;
}

/* ============================================
   Hero
   ============================================ */

#hero {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  min-height: 40vh;
}

.hero-content {
  max-width: 500px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.hero-accent {
  color: var(--red);
  font-style: italic;
}

.hero-hosts {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 3px;
  margin-top: var(--space-lg);
}

.hero-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  margin: var(--space-lg) 0;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-yt {
  display: inline-flex;
  margin-top: var(--space-lg);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.hero-yt:hover {
  opacity: 1;
}

/* ============================================
   Quiz Layout
   ============================================ */

.quiz-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-2xl);
}

.quiz-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Ring */
.ring-container {
  position: sticky;
  top: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-container svg {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.ring-container g[id^="state-"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ring-container g[id^="state-"].active {
  opacity: 1;
}

/* Progress */
.progress {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.progress-track {
  flex: 1;
  height: 3px;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
}

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

.progress-label {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Question */
.question-text {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

/* Answers */
.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s;
  user-select: none;
}

.answer:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.answer.selected {
  border-color: var(--selected-border);
  background: var(--selected-bg);
  color: var(--text-primary);
}

.answer-letter {
  color: var(--red);
  font-weight: 700;
  flex-shrink: 0;
}

.answer-text {
  flex: 1;
}

/* Multi-select next button */
.btn-next {
  margin-top: var(--space-md);
  padding: 12px 24px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-next:hover {
  opacity: 0.85;
}

/* Custom text input for "Inne" */
.custom-input {
  margin-top: var(--space-sm);
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  width: 100%;
  outline: none;
}

.custom-input:focus {
  border-color: var(--red);
}

/* ============================================
   Result Screen
   ============================================ */

.result-level {
  font-size: 11px;
  color: var(--red);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.result-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.result-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

/* ============================================
   Email Form
   ============================================ */

#email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

#email-form input[type="text"],
#email-form input[type="email"] {
  padding: 14px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

#email-form input[type="text"]:focus,
#email-form input[type="email"]:focus {
  border-color: var(--red);
}

#email-form input::placeholder {
  color: var(--text-muted);
}

.checkbox-label {
  display: flex;
  gap: var(--space-sm);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  align-items: flex-start;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--red);
}

.checkbox-label a {
  color: var(--red);
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.btn-submit {
  padding: 14px 24px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-submit:hover {
  opacity: 0.85;
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.consultation-cta {
  display: inline-block;
  margin-top: var(--space-md);
  font-size: 13px;
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
}

.consultation-cta:hover {
  opacity: 0.8;
}

.form-error {
  font-size: 12px;
  color: var(--red);
}

/* Confirmation */
.confirmation-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  margin-bottom: var(--space-sm);
}

.confirmation-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================
   Privacy Page
   ============================================ */

.privacy-page {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.privacy-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  margin-bottom: var(--space-xl);
}

.privacy-content h2 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  margin: var(--space-xl) 0 var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.privacy-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.privacy-content a {
  color: var(--red);
  text-decoration: none;
}

.back-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: var(--space-xl);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--red);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 767px) {
  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .ring-container {
    position: relative;
    top: 0;
    max-height: 180px;
    overflow: hidden;
    margin-bottom: var(--space-md);
    justify-content: center;
  }

  .ring-container svg {
    max-width: 220px;
  }

  .hero-title {
    font-size: 40px;
  }

  .result-title {
    font-size: 22px;
  }

  .quiz-section {
    padding: 0 var(--space-md) var(--space-2xl);
  }
}
