/* Sudoku Frenzy marketing site — shares the app's "executive glass" palette
   (src/theme/theme.ts) so the website reads as the same product as the app. */

:root {
  --primary: #4c56b8;
  --primary-light: #dee1f5;
  --secondary: #b8862e;
  --ink: #1c1c1e;
  --error: #b23b34;
  --success: #4f9d6e;
  --bg: #eae7e1;
  --bg-panel: #f5f3ee;
  --cell-bg: #f5f3f9;
  --well: #d9d6ce;
  --outline: #d2cfc7;
  --text: #2e2b27;
  --text-muted: #6b6864;
  --glow-a: #7a85d8;
  --glow-b: #d9c48e;
  --glass-fill: rgba(245, 243, 238, 0.6);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: rgba(44, 40, 70, 0.16);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --primary: #8b93e8;
  --primary-light: #33355a;
  --secondary: #e3b65a;
  --ink: #f5f5f7;
  --error: #c4726b;
  --success: #6cbf8e;
  --bg: #1c1c1e;
  --bg-panel: #28282a;
  --cell-bg: #212028;
  --well: #101012;
  --outline: #333335;
  --text: #f2f2f2;
  --text-muted: #9a9a9e;
  --glow-a: #5c6bc0;
  --glow-b: #4a5568;
  --glass-fill: rgba(40, 40, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --primary: #8b93e8;
    --primary-light: #33355a;
    --secondary: #e3b65a;
    --ink: #f5f5f7;
    --error: #c4726b;
    --success: #6cbf8e;
    --bg: #1c1c1e;
    --bg-panel: #28282a;
    --cell-bg: #212028;
    --well: #101012;
    --outline: #333335;
    --text: #f2f2f2;
    --text-muted: #9a9a9e;
    --glow-a: #5c6bc0;
    --glow-b: #4a5568;
    --glass-fill: rgba(40, 40, 42, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 90% at 15% 0%, var(--glow-a) 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 15%, var(--glow-b) 0%, transparent 45%), var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Glass primitives ---------- */

.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 60px -20px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.apple-mark {
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), #3a4296);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(76, 86, 184, 0.55);
}

.btn-ghost {
  background: var(--glass-fill);
  border-color: var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(12px);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
  font-size: 17px;
  min-width: 0;
  flex-shrink: 0;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-links a {
  white-space: nowrap;
}

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

.nav-links a.active {
  color: var(--primary);
}

@media (max-width: 720px) {
  .nav-links .nav-only-desktop {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand-name {
    display: none;
  }
  .nav-links {
    gap: 18px;
  }
}

/* ---------- Isometric cube grid (decorative) ---------- */

.iso-field {
  position: relative;
  height: 100%;
  width: 100%;
  perspective: 1400px;
}

.iso-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(52deg) rotateZ(45deg);
}

.iso-cube {
  position: absolute;
  width: 84px;
  height: 84px;
  transform-style: preserve-3d;
  animation: iso-float 7s ease-in-out infinite;
}

.iso-face {
  position: absolute;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 30px;
  border-radius: 10px;
}

.iso-top {
  background: linear-gradient(135deg, #ffffffcc, #f5f3eeb3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--primary);
  transform: translateZ(42px);
}

.iso-side-r {
  width: 42px;
  background: rgba(76, 86, 184, 0.35);
  transform: rotateY(90deg) translateZ(42px);
  border-radius: 0;
}

.iso-side-l {
  height: 42px;
  background: rgba(28, 28, 30, 0.18);
  transform: rotateX(-90deg) translateZ(42px);
  border-radius: 0;
}

@keyframes iso-float {
  0%,
  100% {
    transform: translateZ(0px);
  }
  50% {
    transform: translateZ(26px);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 60px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  background: rgba(184, 134, 46, 0.12);
  border: 1px solid rgba(184, 134, 46, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

h1 .accent {
  color: var(--primary);
}

.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 30px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.fine-print {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-stage {
  position: relative;
  height: 420px;
}

.hero-stage .iso-field {
  height: 100%;
}

.hero-phone {
  position: absolute;
  width: 210px;
  border-radius: 32px;
  overflow: hidden;
  border: 6px solid rgba(28, 28, 30, 0.85);
  box-shadow: 0 40px 80px -20px var(--glass-shadow), 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-phone.p1 {
  top: 6%;
  left: 6%;
  transform: rotate(-9deg) rotateY(8deg);
  z-index: 3;
}

.hero-phone.p2 {
  top: 20%;
  left: 40%;
  width: 230px;
  transform: rotate(4deg) rotateY(-6deg);
  z-index: 2;
}

@media (max-width: 900px) {
  .hero-stage {
    height: 380px;
  }
  .hero-phone.p1 {
    left: 2%;
  }
  .hero-phone.p2 {
    left: 46%;
  }
}

/* Below the hero-grid's own single-column breakpoint (900px) the two-phone
   absolute overlap has no room to breathe and collides with the next
   section, so we drop it for a single centered phone in normal flow instead
   of chasing exact math per breakpoint. */
@media (max-width: 900px) {
  .hero-stage {
    position: static;
    height: auto;
    display: flex;
    justify-content: center;
    padding: 10px 0 30px;
  }
  .hero-stage .iso-field {
    display: none;
  }
  .hero-phone.p1 {
    display: none;
  }
  .hero-phone.p2 {
    position: static;
    width: min(260px, 68vw);
    transform: none;
    margin: 0 auto;
  }
}

/* ---------- Sections ---------- */

section {
  padding: 70px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 46px;
}

.section-head .eyebrow {
  display: inline-flex;
}

h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.6;
}

/* Feature cards */

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

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feature-card {
  padding: 28px 24px;
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: linear-gradient(160deg, rgba(76, 86, 184, 0.18), rgba(76, 86, 184, 0.05));
  border: 1px solid rgba(76, 86, 184, 0.2);
  color: var(--primary);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

/* Screenshot showcase */

.shot-row {
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 30px 0 10px;
}

.shot-frame-dark {
  border-radius: 34px;
  padding: 0;
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.shot-frame {
  width: 220px;
  border-radius: 34px;
  border: 7px solid rgba(28, 28, 30, 0.9);
  overflow: hidden;
  box-shadow: 0 30px 60px -18px var(--glass-shadow);
  transition: transform 0.25s ease;
}

.shot-frame:nth-child(1) {
  transform: rotate(-6deg) translateY(14px);
}

.shot-frame:nth-child(2) {
  transform: rotate(-2deg) translateY(-6px);
}

.shot-frame:nth-child(3) {
  transform: rotate(2deg) translateY(-6px);
}

.shot-frame:nth-child(4) {
  transform: rotate(6deg) translateY(14px);
}

.shot-frame:hover {
  transform: translateY(-10px) rotate(0deg) scale(1.02);
}

@media (max-width: 640px) {
  .shot-row {
    gap: 16px;
  }
  .shot-frame,
  .shot-frame:nth-child(1),
  .shot-frame:nth-child(2),
  .shot-frame:nth-child(3),
  .shot-frame:nth-child(4) {
    width: calc(50% - 8px);
    transform: none;
  }
  .shot-frame:hover {
    transform: scale(1.02);
  }
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

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

.step-card {
  padding: 26px;
  position: relative;
}

.step-num {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--primary), #3a4296);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
  transform: rotate(-6deg);
  box-shadow: 0 10px 20px -8px rgba(76, 86, 184, 0.6);
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Badges strip */

.badge-strip {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Final CTA */

.cta-panel {
  padding: 56px 40px;
  text-align: center;
}

.cta-panel h2 {
  margin-bottom: 12px;
}

.cta-panel p {
  color: var(--text-muted);
  margin: 0 0 26px;
}

.cta-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.cta-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.cta-qr img {
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 10px 24px -10px var(--glass-shadow);
}

/* Footer */

footer {
  padding: 40px 0 60px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 28px;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Legal pages (privacy / support) ---------- */

.legal-hero {
  padding: 56px 0 20px;
  text-align: center;
}

.legal-hero h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.legal-hero .fine-print {
  margin-top: 10px;
}

.legal-panel {
  padding: 8px 44px 44px;
  margin-bottom: 60px;
}

.legal-panel h2 {
  font-size: 21px;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--primary);
}

.legal-panel h2:first-of-type {
  margin-top: 30px;
}

.legal-panel p,
.legal-panel li {
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.7;
}

.legal-panel ul {
  padding-left: 22px;
}

.legal-panel a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.legal-panel a:hover {
  text-decoration: underline;
}

.callout {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(76, 86, 184, 0.08);
  border: 1px solid rgba(76, 86, 184, 0.2);
  font-size: 14.5px;
  margin: 18px 0;
}

/* FAQ */

.faq-item {
  padding: 22px 26px;
  margin-bottom: 16px;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  color: var(--primary);
}

.faq-item p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

.contact-card {
  padding: 34px;
  text-align: center;
  margin-top: 10px;
}

.contact-card h2 {
  margin-top: 0;
}

.contact-email {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
