/* Quilax landing — brand tokens from quilax-frontend/src/constants/theme.ts */

:root {
  --blue: #3B82F6;
  --purple: #8B5CF6;
  --red: #EF4444;
  --red-dark: #DC2626;
  --pink: #EC4899;
  --text: #1C1917;
  --text-secondary: #57534E;
  --bg: #FFFCF8;
  --bg-alt: #F3EEE8;
  --white: #FFFFFF;
  --success: #16A34A;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(28, 25, 23, 0.08);
  /* Brand gradient — blue/purple early, red dominates the right (matches app) */
  --gradient-brand: linear-gradient(135deg, var(--blue) 0%, var(--purple) 28%, var(--red) 55%, var(--red-dark) 100%);
  --gradient-brand-h: linear-gradient(90deg, var(--blue) 0%, var(--purple) 28%, var(--red) 55%, var(--red-dark) 100%);
  --gradient-red: linear-gradient(135deg, var(--purple) 0%, var(--red) 50%, var(--red-dark) 100%);
  --gradient-soft: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 30%, #FEE2E2 65%, #FEF2F2 100%);
  --shadow-lg: 0 16px 48px rgba(239, 68, 68, 0.18), 0 8px 24px rgba(139, 92, 246, 0.12);
  --shadow-brand: 0 6px 24px rgba(239, 68, 68, 0.35), 0 2px 12px rgba(59, 130, 246, 0.2);
  --font: 'Sora', system-ui, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.gradient-bar {
  height: 4px;
  background: var(--gradient-brand-h);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(28, 25, 23, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand-logo { border-radius: 10px; }

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s;
}

.nav a:hover { color: var(--red); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-select {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 1rem 1rem;
  gap: 0.75rem;
}

.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.4), 0 4px 16px rgba(139, 92, 246, 0.25);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
}

.btn-lg {
  font-size: 1rem;
  padding: 0.95rem 1.75rem;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 95% 15%, rgba(239, 68, 68, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 45% at 5% 85%, rgba(59, 130, 246, 0.1), transparent 55%),
    radial-gradient(ellipse 45% 35% at 55% 45%, rgba(139, 92, 246, 0.08), transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red-dark);
  background: var(--gradient-soft);
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1rem;
}

.hero h1 > span:first-child {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text {
  display: block;
  background: linear-gradient(135deg, var(--purple) 15%, var(--red) 55%, var(--red-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 34ch;
  margin: 0 0 1.75rem;
}

.hero-cta { margin-bottom: 1.25rem; }

.cta-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.75rem 0 0;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--white);
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.store-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.store-badge:hover {
  border-color: var(--red);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.12);
}

/* Phone mock */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-mock {
  width: min(100%, 300px);
  background: var(--gradient-brand);
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}

.phone-screen {
  background: var(--bg);
  border-radius: 28px;
  padding: 1.25rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mock-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.mock-dot.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.mock-question {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.mock-timer {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-red);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.mock-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-option {
  padding: 0.65rem 0.85rem;
  background: var(--white);
  border: 2px solid rgba(28, 25, 23, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.mock-option.selected {
  border-color: transparent;
  background: linear-gradient(var(--white), var(--white)) padding-box,
    var(--gradient-brand) border-box;
  border: 2px solid transparent;
  color: var(--red-dark);
}

.mock-rank {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.mock-pot {
  color: var(--success);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--bg-alt) 0%, rgba(254, 226, 226, 0.25) 100%);
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  background: var(--gradient-brand-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(28, 25, 23, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand-h);
  opacity: 0;
  transition: opacity 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.1), var(--shadow);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

.feature-icon.live { background: linear-gradient(135deg, #EFF6FF, #F5F3FF); }
.feature-icon.prizes { background: linear-gradient(135deg, #FEF3C7, #FEE2E2); }
.feature-icon.early { background: linear-gradient(135deg, #F5F3FF, #FEE2E2); }
.feature-icon.seasons { background: linear-gradient(135deg, #ECFDF5, #FEE2E2); }
.feature-icon.create { background: linear-gradient(135deg, #FEE2E2, #FECACA); }
.feature-icon.secure { background: linear-gradient(135deg, #F3F4F6, #FEE2E2); }

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 900px;
  margin-inline: auto;
}

.step {
  display: flex;
  gap: 1rem;
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Wallet banner */
.wallet-banner {
  background: var(--gradient-brand);
  color: white;
}

.wallet-inner {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.wallet-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.wallet-inner h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.wallet-inner p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.95rem;
  max-width: 60ch;
}

/* Final CTA */
.final-cta {
  text-align: center;
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.35) 0%, rgba(239, 246, 255, 0.5) 50%, transparent 100%);
}

.final-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  background: var(--gradient-brand-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.final-inner p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(28, 25, 23, 0.08);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.footer-link {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--gradient-red);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.footer-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle { margin-inline: auto; }

  .hero-visual { order: -1; }

  .phone-mock { transform: none; width: 260px; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  .steps { grid-template-columns: 1fr; }

  .nav, .header-actions .btn { display: none; }

  .header-actions { margin-left: auto; }

  .menu-toggle { display: flex; }

  .mobile-nav[hidden] { display: none; }

  .mobile-nav:not([hidden]) { display: flex; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }

  .store-badges { justify-content: center; }

  .footer-inner { flex-direction: column; text-align: center; }
}
