/* Daily Sudoku — marketing & lifecycle pages */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0a0e14;
  --bg-elevated: #0f1419;
  --surface: #151c28;
  --surface-glass: rgba(21, 28, 40, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2f8;
  --text-muted: #8b9cb3;
  --text-dim: #5c6d85;
  --accent: #4a9eff;
  --accent-soft: rgba(74, 158, 255, 0.15);
  --accent-glow: rgba(74, 158, 255, 0.35);
  --gold: #f0b429;
  --gold-soft: rgba(240, 180, 41, 0.12);
  --success: #5dd39e;
  --success-soft: rgba(93, 211, 158, 0.12);
  --warm: #ff8a65;
  --warm-soft: rgba(255, 138, 101, 0.12);
  --radius: 14px;
  --radius-lg: 22px;
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.25);
  --max: 1120px;
  --nav-h: 72px;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body.site {
  overflow-x: hidden;
}

/* Ambient background */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(74, 158, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(240, 180, 41, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(93, 211, 158, 0.05), transparent 45%),
    var(--bg);
}

.site-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  background-image:
    linear-gradient(var(--border-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-strong) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.site-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.site-nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #3a7fd4 100%);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-glass);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
  border-radius: 12px;
}

/* Layout */
.site-main {
  width: 100%;
}

.site-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px;
}

.site-section-tight {
  padding-top: 48px;
  padding-bottom: 48px;
}

/* Hero */
.hero {
  padding-top: 48px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid rgba(240, 180, 41, 0.25);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, #7ec4ff 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat strong {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.hero-stat span {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Hero visual — mini sudoku board */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-board-wrap {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-board-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.4), transparent 40%, rgba(240, 180, 41, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.hero-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.65rem, 2.2vw, 0.95rem);
  font-weight: 600;
  background: rgba(36, 48, 68, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  animation: cellFade 0.6s ease backwards;
}

.hero-cell.given {
  color: var(--text);
}

.hero-cell.highlight {
  background: var(--accent-soft);
  color: var(--accent);
}

.hero-cell.border-r {
  border-right-width: 2px;
  border-right-color: rgba(255, 255, 255, 0.15);
}

.hero-cell.border-b {
  border-bottom-width: 2px;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

@keyframes cellFade {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
}

.hero-float {
  position: absolute;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface-glass);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
  box-shadow: var(--shadow-soft);
  animation: float 4s ease-in-out infinite;
}

.hero-float.streak {
  top: -12px;
  right: -8px;
  color: var(--gold);
  animation-delay: 0.5s;
}

.hero-float.date {
  bottom: 24px;
  left: -16px;
  color: var(--success);
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Features */
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 0 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.feature-icon.blue { background: var(--accent-soft); }
.feature-icon.gold { background: var(--gold-soft); }
.feature-icon.green { background: var(--success-soft); }

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: 32px 24px 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(21, 28, 40, 0.4) 100%);
  border: 1px solid var(--border);
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* CTA band */
.cta-band {
  margin: 0 24px 80px;
  max-width: calc(var(--max) - 48px);
  margin-left: auto;
  margin-right: auto;
  padding: 56px 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(74, 158, 255, 0.12) 0%, rgba(21, 28, 40, 0.9) 50%, rgba(240, 180, 41, 0.08) 100%),
    var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.cta-band p {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  background: var(--bg-elevated);
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.site-footer-links {
  display: flex;
  gap: 20px;
}

.site-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.site-footer-links a:hover {
  color: var(--accent);
}

/* Lifecycle pages (thank you, uninstall, legal) */
.lifecycle-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 80px;
}

.lifecycle-card {
  width: 100%;
  max-width: 520px;
  padding: 48px 40px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  text-align: center;
}

.lifecycle-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.lifecycle-icon.success {
  background: var(--success-soft);
  border: 1px solid rgba(93, 211, 158, 0.3);
}

.lifecycle-icon.warm {
  background: var(--warm-soft);
  border: 1px solid rgba(255, 138, 101, 0.3);
}

.lifecycle-icon.neutral {
  background: var(--accent-soft);
  border: 1px solid rgba(74, 158, 255, 0.3);
}

.lifecycle-card h1 {
  margin: 0 0 12px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lifecycle-card .lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.lifecycle-list {
  text-align: left;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.lifecycle-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.lifecycle-list li:last-child {
  border-bottom: none;
}

.lifecycle-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.lifecycle-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lifecycle-actions .btn {
  width: 100%;
}

.lifecycle-note {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.lifecycle-note a {
  color: var(--accent);
  text-decoration: none;
}

.lifecycle-note a:hover {
  text-decoration: underline;
}

/* Legal prose */
.legal-body {
  text-align: left;
  margin-bottom: 28px;
}

.legal-body h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--text);
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 64px;
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .features-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .site-nav-links a:not(.btn) {
    display: none;
  }
}

@media (max-width: 480px) {
  .lifecycle-card {
    padding: 36px 24px;
  }

  .cta-band {
    padding: 40px 24px;
    margin-bottom: 48px;
  }

  .site-section {
    padding: 56px 20px;
  }
}
