/* Nonogram Odyssey — marketing homepage
   Self-contained. Brand: purple #6c4ad6  ·  in-app accent teal #16c8a8 */

:root {
  --brand:      #6c4ad6;
  --brand-deep: #4a2fb0;
  --brand-soft: #ede8fb;
  --teal:       #14b8a6;
  --teal-bright:#1ed6b5;
  --ink:        #14122a;
  --text:       #232338;
  --muted:      #5c5e75;
  --line:       #e7e6f0;
  --bg:         #ffffff;
  --bg-soft:    #f7f6fc;
  --radius:     18px;
  --max:        1120px;
  --shadow-sm:  0 2px 10px rgba(28,20,70,.06);
  --shadow-md:  0 14px 40px rgba(28,20,70,.14);
  --shadow-lg:  0 30px 70px rgba(12,8,40,.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}

/* ───────────────────────── Header ───────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.06rem; color: var(--ink); letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.btn-primary) {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: 9px; transition: color .15s, background .15s;
}
.nav a:not(.btn-primary):hover { color: var(--brand); background: var(--brand-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .92rem;
  padding: 11px 20px; border-radius: 999px; cursor: pointer; border: 0;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 8px 22px rgba(108,74,214,.34);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(108,74,214,.45); }
.nav-cta { margin-left: 8px; }

@media (max-width: 840px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  position: relative; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1100px 500px at 12% -10%, rgba(124,92,219,.55), transparent 60%),
    radial-gradient(900px 600px at 100% 10%, rgba(20,184,166,.42), transparent 55%),
    linear-gradient(165deg, #1a1338 0%, #261a52 48%, #15333c 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(70% 60% at 30% 30%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 30% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-top: 78px; padding-bottom: 86px;
}
.hero .eyebrow { color: #c9bbf6; }
.hero h1 {
  margin: 18px 0 18px; font-size: clamp(2.4rem, 5.2vw, 3.7rem);
  line-height: 1.05; letter-spacing: -.03em; font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #c4b3ff 0%, #5fe6cf 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 1.16rem; color: #d7d2ee; max-width: 30em; margin: 0 0 28px; }

.store-badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-badges a { transition: transform .15s, filter .2s; border-radius: 9px; }
.store-badges a:hover { transform: translateY(-2px); filter: brightness(1.08); }
.store-badges img { height: 52px; width: auto; }

.hero-meta {
  display: flex; align-items: center; gap: 18px; margin-top: 26px;
  font-size: .9rem; color: #cfc8ec; flex-wrap: wrap;
}
.hero-meta .stars { color: #ffd35c; letter-spacing: 2px; }
.hero-meta .dot { opacity: .4; }

/* Hero phones */
.hero-art { position: relative; display: flex; justify-content: center; }
.phones { position: relative; width: 100%; max-width: 440px; display: flex; justify-content: center; }
.phones .device { box-shadow: var(--shadow-lg); }
.phones .device.back {
  position: absolute; top: 34px; transform: rotate(-7deg) scale(.86);
  left: 6%; opacity: .92; filter: saturate(1.05);
}
.phones .device.back2 {
  position: absolute; top: 26px; right: 4%; transform: rotate(7deg) scale(.82);
  opacity: .85;
}
.phones .device.front { position: relative; z-index: 3; transform: translateY(-6px); }

/* Device frame */
.device {
  background: #0d0d14; border-radius: 30px; padding: 9px;
  border: 1px solid rgba(255,255,255,.12);
  width: 220px; flex: none;
}
.device .screen {
  position: relative; border-radius: 22px; overflow: hidden; background: #0b1a1c;
  aspect-ratio: 1080 / 2340;
}
.device .screen img { width: 100%; height: 100%; object-fit: cover; }
.device::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); z-index: 4;
}

/* wave divider */
.wave { display: block; width: 100%; height: 60px; }

/* ───────────────────────── Stats strip ───────────────────────── */
.stats { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.stats .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding: 34px 24px; text-align: center;
}
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat .num span { background: linear-gradient(120deg, var(--brand), var(--teal)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .label { font-size: .82rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px){ .stats .wrap { grid-template-columns: repeat(2,1fr); gap: 26px; } }

/* ───────────────────────── Sections ───────────────────────── */
section { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: -.025em; font-weight: 800;
  color: var(--ink); margin: 14px 0 12px; line-height: 1.12;
}
.section-head p { font-size: 1.06rem; color: var(--muted); margin: 0; }

/* Features */
.features { background: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d9d3f3; }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--brand-soft), #e3fbf4);
}
.card h3 { margin: 0 0 8px; font-size: 1.16rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 900px){ .feature-grid { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 600px){ .feature-grid { grid-template-columns: 1fr;} }

/* Showcase (screenshots) */
.showcase { background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); }
.shots {
  display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 22px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: #d8d3ee; border-radius: 4px; }
.shots .device { width: 232px; scroll-snap-align: center; box-shadow: var(--shadow-md); }
.shot-cap { text-align: center; font-size: .86rem; color: var(--muted); margin-top: 12px; font-weight: 500; }
.shot-item { flex: none; }

/* Banner / feature graphic */
.banner { padding: 0; }
.banner .wrap { padding-top: 0; padding-bottom: 0; }
.banner-card {
  position: relative; border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.banner-card img { width: 100%; height: auto; }

/* Explainer (What is a nonogram?) */
.explain { background: #fff; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p { color: var(--muted); font-size: 1.08rem; margin: 0 0 1.2rem; }
.prose strong { color: var(--text); font-weight: 600; }

/* FAQ */
.faq { background: var(--bg-soft); }
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 30px 18px 0; position: relative;
  font-weight: 600; font-size: 1.05rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--brand); transition: transform .2s; line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 18px; color: var(--muted); font-size: .98rem; }

/* Steps */
.steps { background: #fff; }
.step-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.step { text-align: center; padding: 8px; }
.step .n {
  width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 8px 20px rgba(108,74,214,.32);
}
.step h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--ink); }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 700px){ .step-grid { grid-template-columns: 1fr; gap: 30px; } }

/* CTA */
.cta { padding: 0 0 90px; }
.cta-card {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  border-radius: 28px; padding: 64px 32px;
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(30,214,181,.45), transparent 60%),
    linear-gradient(135deg, #2a1c5e 0%, #4a2fb0 55%, #15333c 120%);
  box-shadow: var(--shadow-md);
}
.cta-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 14px; letter-spacing: -.025em; font-weight: 800; }
.cta-card p { color: #d9d3f3; font-size: 1.08rem; margin: 0 auto 30px; max-width: 34em; }
.cta-card .store-badges { justify-content: center; }
.cta-card .app-ico { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 22px; box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.download-cards { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.dl-card { background: #fff; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 16px; box-shadow: 0 12px 28px rgba(0,0,0,.28); }
.dl-badge { display: block; transition: transform .15s, filter .2s; }
.dl-badge:hover { transform: translateY(-2px); filter: brightness(1.06); }
.dl-badge img { height: 50px; width: auto; display: block; }
.dl-qr { width: 150px; height: 150px; display: block; image-rendering: pixelated; }
@media (max-width: 640px) {
  .dl-card { background: transparent; box-shadow: none; padding: 0; }
  .dl-qr { display: none; }
  .download-cards { gap: 14px; }
}

/* ───────────────────────── Footer ───────────────────────── */
.site-footer { background: var(--ink); color: #b9b6cf; padding: 60px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 800; font-size: 1.1rem; }
.footer-brand img { width: 36px; height: 36px; border-radius: 10px; }
.footer-about { margin: 16px 0 18px; font-size: .92rem; color: #948fb3; max-width: 30em; }
.footer-col h3 { color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 4px 0 16px; }
.footer-col a { display: block; color: #b9b6cf; font-size: .94rem; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--teal-bright); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding-top: 24px;
  font-size: .85rem; color: #817ca0;
}
.footer-bottom .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--teal-bright); }
@media (max-width: 820px){ .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 480px){ .footer-top { grid-template-columns: 1fr; } }

/* Hero responsive */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 60px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .store-badges, .hero-meta { justify-content: center; }
  .hero-art { order: 2; }
  .phones { max-width: 380px; }
}
@media (max-width: 420px){
  .device { width: 188px; }
  .phones .device.back, .phones .device.back2 { display: none; }
}
