/* ============================================
   Candarra — landing
   Design System: Raycast Physical — Hero Tall + ożywienie
   ============================================ */

:root {
  /* Raycast color palette */
  --bg-near-black-blue: #07080a;
  --bg-surface: #101111;
  --bg-elevated: #1b1c1e;
  --text-primary: #f9f9f9;
  --text-secondary: #9c9c9d;
  --text-tertiary: #6a6b6c;
  --accent-red: #ff6363;
  --accent-blue: #55b3ff;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --warm-glow: rgba(215, 201, 175, 0.05);

  --font: 'Inter', system-ui, -apple-system, sans-serif;

  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 32px;
  --space-2xl: 64px;

  --radius: 12px;
  --radius-sm: 6px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg-near-black-blue);
  color: var(--text-primary);
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.2px;
  font-feature-settings: "calt", "kern", "liga", "ss03";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap--narrow { max-width: 760px; }

a { color: var(--accent-blue); }

/* ---------- tło: pływające orby ---------- */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-red), transparent 70%);
  top: 10%; left: -10%;
  animation: float-1 8s ease-in-out infinite;
}
.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--accent-blue), transparent 70%);
  top: 40%; right: -5%;
  animation: float-2 10s ease-in-out infinite;
}
.orb-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, var(--warm-glow), transparent 60%);
  bottom: 5%; left: 10%;
  animation: float-3 12s ease-in-out infinite;
}
@keyframes float-1 {
  0%, 100% { transform: translate(0, 0); opacity: 0.15; }
  50% { transform: translate(20px, -30px); opacity: 0.25; }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0); opacity: 0.12; }
  50% { transform: translate(-30px, 20px); opacity: 0.20; }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0); opacity: 0.10; }
  50% { transform: translate(15px, 25px); opacity: 0.18; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg-orb { animation: none !important; }
}

/* ---------- hero (tall) ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- przełącznik języka ---------- */
.hero-lang {
  position: absolute;
  top: 20px; right: 20px;
  z-index: 2;
}
#lang-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.2;
  padding: 8px 32px 8px 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239c9c9d' d='M6 8 0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
#lang-select:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}
#lang-select option {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-red);
  letter-spacing: 0.3px;
  margin-bottom: var(--space-lg);
}

.hero-title {
  margin: 0 0 var(--space-lg);
  font-size: clamp(2.6rem, 10vw, 64px);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text-primary);
}

.hero-tagline {
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  font-size: clamp(1.05rem, 2.6vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.2px;
  color: var(--text-secondary);
}

.hero-cta {
  margin-bottom: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.hero-note {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.2px;
}

.hero-glow {
  position: absolute;
  top: -100px; left: 50%;
  width: 500px; height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, var(--warm-glow), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* ---------- Wariant C: 3 mockupy kart obok siebie (hero) ---------- */
.cards-grid {
  position: relative;
  z-index: 1;
  margin: var(--space-xl) auto 0;
  max-width: 960px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.game-card-mock {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
  box-shadow:
    rgb(27, 28, 30) 0px 0px 0px 1px,
    rgb(7, 8, 10) 0px 0px 0px 1px inset;
}
.spice-badge-mock {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: var(--space-sm);
}
.spice-badge-mock.mild { color: var(--accent-blue); }
.spice-badge-mock.spicy { color: var(--accent-red); }
.spice-badge-mock.hot { color: var(--accent-red); text-shadow: 0 0 6px rgba(255, 99, 99, 0.4); }
.game-card-text-mock {
  margin: 0 0 var(--space-md);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.2px;
  color: var(--text-primary);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-buttons-mock {
  display: flex;
  gap: var(--space-xs);
}
.game-btn-mock {
  flex: 1;
  min-height: 40px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.hero-cards-caption {
  position: relative;
  z-index: 1;
  margin: var(--space-sm) auto 0;
  max-width: 960px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  line-height: 1.15;
  border: none;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 150ms ease, background 150ms ease, transform 150ms ease;
  font-feature-settings: "calt", "kern", "liga", "ss03";
}
.btn--hot {
  background: hsla(0, 0%, 100%, 0.815);
  color: #18191a;
  box-shadow:
    rgba(255, 255, 255, 0.1) 0px 1px 0px 0px inset,
    rgba(0, 0, 0, 0.2) 0px -1px 0px 0px inset,
    rgba(0, 0, 0, 0.03) 0px 7px 3px;
}
.btn--hot:hover { background: #fff; opacity: 1; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: rgba(255, 255, 255, 0.1) 0px 1px 0px 0px inset;
}
.btn--ghost:hover { opacity: 0.6; color: var(--text-primary); }
.btn--sm {
  min-height: 40px;
  padding: 9px 18px;
  font-size: .92rem;
}

/* ---------- sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) 0;
}
.section + .section {
  border-top: 1px solid var(--border-subtle);
}
.section-title {
  margin: 0 0 var(--space-xl);
  font-size: clamp(1.4rem, 5vw, 24px);
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.2px;
  color: var(--text-primary);
  text-align: center;
}

/* ---------- features ---------- */
.feature-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-xl) var(--space-lg);
  box-shadow:
    rgb(27, 28, 30) 0px 0px 0px 1px,
    rgb(7, 8, 10) 0px 0px 0px 1px inset;
  text-align: center;
}
.feature-illustration {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
}
.feature-title {
  margin: 0 0 var(--space-sm);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.feature-card p { margin: 0; color: var(--text-secondary); }

/* ---------- steps ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
}
.step {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  text-align: left;
  align-items: flex-start;
}
.step:last-child { margin-bottom: 0; }
.step-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  stroke: var(--accent-blue);
  stroke-width: 2;
  fill: none;
}
.step-content h3 {
  margin: 0 0 var(--space-xs);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.step-content p { margin: 0; color: var(--text-secondary); }

/* ---------- FAQ ---------- */
.qa {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}
.qa:last-child { margin-bottom: 0; }
.qa summary {
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  float: right;
  color: var(--accent-red);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1;
}
.qa[open] summary::after { content: "–"; }
.qa p {
  margin-top: var(--space-sm);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.2px;
  color: var(--text-secondary);
}

/* ---------- podgląd: phone mockup ---------- */
.preview .wrap { text-align: center; max-width: 400px; }
.phone-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  margin: 0 auto;
  border-radius: 32px;
  background: linear-gradient(135deg, #1a1b1d, #0f1011);
  padding: 12px;
  box-shadow:
    rgba(0, 0, 0, 0.5) 0px 0px 0px 2px,
    rgba(255, 255, 255, 0.19) 0px 0px 14px,
    rgba(0, 0, 0, 0.4) 0px 20px 40px;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 24px;
  background: var(--bg-near-black-blue);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.game-card-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-lg);
  width: 100%;
  max-width: 240px;
  text-align: center;
  box-shadow:
    rgb(27, 28, 30) 0px 0px 0px 1px,
    rgb(7, 8, 10) 0px 0px 0px 1px inset;
}
.spice-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-red);
  margin-bottom: var(--space-sm);
}
.game-card-text {
  margin: 0 0 var(--space-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
}
.game-buttons {
  display: flex;
  gap: var(--space-xs);
}
.game-btn {
  flex: 1;
  min-height: 36px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-near-black-blue) 0%, var(--bg-surface) 100%);
}
.cta-title {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.4rem, 5vw, 24px);
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* ---------- Spice Quiz ---------- */
.quiz .wrap { text-align: center; }
.quiz-intro {
  margin: 0 auto var(--space-xl);
  max-width: 460px;
  color: var(--text-secondary);
}
.quiz-last-result {
  margin: 0 auto var(--space-lg);
  font-size: 14px;
  color: var(--text-tertiary);
}
.quiz-container { max-width: 600px; margin: 0 auto; text-align: left; }

.quiz-screen { display: none; }
.quiz-screen.active { display: block; }
#quiz-screen-intro { text-align: center; }

.quiz-progress { margin-bottom: var(--space-xl); }
.quiz-progress-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-xs);
  display: block;
}
.quiz-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-blue));
  width: 20%;
  transition: width 200ms ease;
}

.quiz-question {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow:
    rgb(27, 28, 30) 0px 0px 0px 1px,
    rgb(7, 8, 10) 0px 0px 0px 1px inset;
  text-align: center;
}
.quiz-question-title {
  margin: 0 0 var(--space-xl);
  font-size: clamp(1.3rem, 4vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.quiz-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 64px;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 150ms ease;
}
.quiz-option:hover {
  background: var(--bg-surface);
  border-color: var(--accent-blue);
  transform: translateX(2px);
}
.quiz-option:active { transform: scale(0.98); }
.quiz-option:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

.quiz-result {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow:
    rgb(27, 28, 30) 0px 0px 0px 1px,
    rgb(7, 8, 10) 0px 0px 0px 1px inset;
  text-align: center;
}
.quiz-result-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-red);
  letter-spacing: 0.3px;
  margin-bottom: var(--space-lg);
}
.quiz-result-title {
  margin: 0 0 var(--space-lg);
  font-size: clamp(2rem, 6vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
}
.quiz-result-desc {
  margin: 0 auto var(--space-xl);
  max-width: 460px;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
}
#quiz-retry-btn { margin-top: var(--space-md); }

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
}
.footer p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.2px;
}
.footer-law { margin-top: var(--space-sm) !important; font-size: .82rem; }
.footer a {
  color: var(--accent-blue);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
}
.footer a:hover { opacity: 0.6; }

/* ---------- consent banner (cookie) ---------- */
.consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 0px 2px;
}
.consent-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-top: var(--space-md); padding-bottom: var(--space-md);
}
.consent-text {
  margin: 0;
  flex: 1 1 340px;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.2px;
  color: var(--text-secondary);
}
.consent-actions { display: flex; align-items: center; gap: 10px; }
.consent-link {
  font-size: .9rem;
  white-space: nowrap;
  color: var(--accent-blue);
  text-decoration: none;
}
.consent-link:hover { opacity: 0.6; }

/* ---------- responsywność: baseline 360px ---------- */
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .section { padding: 88px 0; }
}
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}
@media (max-width: 600px) {
  .hero { min-height: auto; padding: var(--space-2xl) var(--space-md) var(--space-xl); }
  .phone-mockup { width: 240px; height: 480px; }
  .orb-1, .orb-2, .orb-3 { opacity: 0.08; }
  .step { flex-direction: column; }
  .step-icon { margin: 0 auto; }
  .quiz-question, .quiz-result {
    padding: var(--space-xl) var(--space-lg);
  }
}
