:root {
  --bg: #fbfaff;
  --bg2: #f2f0fb;
  --card: #ffffff;
  --text: #15132b;
  --muted: #6b6889;
  --line: #e6e3f5;
  --accent: #6d5efc;
  --accent2: #9b5cff;
  --warm: #ffb547;
  --teal: #2ec4b6;
  --pink: #ff6b8b;
  --shadow: 0 1px 2px rgb(21 19 43 / 0.04), 0 12px 40px -12px rgb(60 40 160 / 0.18);
  --radius: 22px;
  --font: 'Manrope', 'Noto Sans Georgian', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0c1a; --bg2: #15132a; --card: #1a1832; --text: #f1efff; --muted: #a29fc2; --line: #2b2850;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 50px -18px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:lang(ka) { --font: 'Noto Sans Georgian', 'Manrope', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
:lang(ka) h1, :lang(ka) h2 { letter-spacing: 0; }
h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: 19px; margin-top: 14px; max-width: 640px; }
.section { padding: 96px 0; }
.section > .wrap > h2, .section > .wrap > .sub { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 13px 22px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s; font-size: 16px; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .tg { width: 20px; height: 20px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 10px 30px -10px rgb(109 94 252 / 0.7); }
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgb(109 94 252 / 0.85); }
.btn-ghost { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-light { background: #fff; color: #2b1f8f; }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-sm .tg { width: 17px; height: 17px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; font-size: 18px; }
.logo-mark svg { width: 26px; height: 26px; }
.logo.small { font-size: 15px; }
.logo.small .logo-mark svg { width: 20px; height: 20px; }
.links { display: flex; gap: 26px; }
.links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.langs { display: inline-flex; gap: 2px; background: var(--bg2); padding: 3px; border-radius: 999px; }
.nav .langs a { text-decoration: none; font-size: 13px; font-weight: 700; padding: 5px 9px; border-radius: 999px; color: var(--muted); }
.nav .langs a.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.lang-hint { text-align: center; font-size: 14px; padding: 8px; background: var(--bg2); color: var(--muted); }
.lang-hint a { font-weight: 700; color: var(--accent); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; }
.g1 { width: 520px; height: 520px; background: radial-gradient(circle, #8b7bff 0%, transparent 70%); top: -160px; right: -80px; }
.g2 { width: 460px; height: 460px; background: radial-gradient(circle, #ffc46b 0%, transparent 70%); bottom: -200px; left: -140px; opacity: .35; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%); opacity: .55; pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); padding: 7px 14px; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 25%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--teal) 0%, transparent); } }
h1 { font-size: clamp(40px, 6.2vw, 72px); font-weight: 800; margin: 22px 0 0; }
:lang(ka) h1 { font-size: clamp(34px, 5vw, 58px); }
.grad { background: linear-gradient(100deg, var(--accent) 10%, var(--accent2) 45%, var(--pink) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 20px; color: var(--muted); margin-top: 22px; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; font-weight: 600; }

.hero-art { position: relative; display: grid; place-items: center; min-height: 560px; }
.phone { width: 290px; aspect-ratio: 9 / 19; border-radius: 46px; background: #0f0d1f; padding: 12px; box-shadow: 0 40px 90px -30px rgb(40 20 120 / .55), inset 0 0 0 2px #2a2650; transform: rotate(-4deg); position: relative; }
.phone-notch { position: absolute; top: 18px; left: 50%; width: 90px; height: 24px; transform: translateX(-50%); background: #0f0d1f; border-radius: 99px; z-index: 2; }
.phone-screen { height: 100%; border-radius: 36px; background: var(--card); padding: 56px 14px 14px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.app-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.app-head b { color: var(--text); }
.pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; margin-top: auto; }
.pad span { background: var(--bg2); border-radius: 7px; text-align: center; font-weight: 700; color: var(--accent); font-size: 14px; padding: 7px 0; }
.float { position: absolute; background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); font-weight: 700; font-size: 15px; white-space: nowrap; border: 1px solid var(--line); animation: bob 6s ease-in-out infinite; }
.f-streak { top: 46%; left: -12px; }
.f-solved { bottom: 110px; right: -6px; color: var(--teal); animation-delay: -2s; }
.f-mini { bottom: 22px; left: 10px; padding: 8px; animation-delay: -4s; }
.f-mini svg { width: 96px; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- puzzle svg palette ---------- */
.pz { width: 100%; height: auto; font-family: var(--font); user-select: none; -webkit-user-select: none; }
.pz-bg { fill: var(--card); }
.pz-thin { stroke: var(--line); stroke-width: 1.2; }
.pz-thick { stroke: var(--text); stroke-width: 2.4; opacity: .85; }
.pz-frame { fill: none; stroke: var(--text); stroke-width: 2.6; opacity: .85; }
.pz-peer { fill: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.pz-sel { fill: color-mix(in srgb, var(--accent) 28%, var(--card)); }
.pz-given, .pz-typed, .pz-num { text-anchor: middle; font-weight: 700; font-size: 22px; fill: var(--text); }
.pz-typed { fill: var(--accent); font-weight: 600; }
.pz-kakuro .pz-typed { font-size: 26px; }
.pz-block { fill: color-mix(in srgb, var(--text) 14%, var(--card)); }
.pz-diag { stroke: var(--muted); stroke-width: 1.2; }
.pz-kclue { font-size: 14px; font-weight: 700; fill: var(--text); }
.pz-clue { font-size: 13px; font-weight: 700; fill: var(--muted); text-anchor: middle; }
.pz-clue.big { font-size: 22px; fill: var(--text); transition: fill .2s, opacity .2s; }
.pz-clue.big.ok { fill: var(--muted); opacity: .45; }
.pz-fill { fill: var(--text); }
.pz-dot { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 6; }
.pz-num { font-size: 26px; }
.pz-piece { stroke-width: 2.5; }
.pz-c0 { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); }
.pz-c1 { fill: color-mix(in srgb, var(--warm) 28%, transparent); stroke: var(--warm); }
.pz-c2 { fill: color-mix(in srgb, var(--teal) 24%, transparent); stroke: var(--teal); }
.pz-c3 { fill: color-mix(in srgb, var(--pink) 22%, transparent); stroke: var(--pink); }
.pz-c4 { fill: color-mix(in srgb, var(--accent2) 22%, transparent); stroke: var(--accent2); }
.pz-c5 { fill: color-mix(in srgb, #4aa8ff 22%, transparent); stroke: #4aa8ff; }

/* ---------- types ---------- */
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 52px; }
.type-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.type-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.type-art { aspect-ratio: 1; padding: 22px; background: var(--bg2); display: grid; place-items: center; }
.type-art svg { max-height: 100%; }
.type-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.type-body p { color: var(--muted); font-size: 15px; flex: 1; }
.pill { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--teal) 16%, var(--card)); color: color-mix(in srgb, var(--teal) 70%, var(--text)); }

/* ---------- try widget ---------- */
.try { background: linear-gradient(180deg, transparent, var(--bg2) 20%, var(--bg2) 80%, transparent); }
.try-in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.try-in h2, .try-in .sub { text-align: left; margin-left: 0; }
.widget { background: var(--card); border-radius: 28px; padding: 26px; box-shadow: var(--shadow); border: 1px solid var(--line); max-width: 460px; width: 100%; justify-self: center; position: relative; }
.widget-board .pz-play { touch-action: none; cursor: pointer; }
.pz-cell { fill: transparent; transition: fill .12s; }
.pz-cell.on { fill: var(--accent); }
.pz-x { text-anchor: middle; font-size: 26px; fill: var(--muted); pointer-events: none; }
.widget-tools { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.tool { font: inherit; font-weight: 700; font-size: 14px; border: 0; border-radius: 12px; padding: 10px 16px; background: var(--bg2); color: var(--text); cursor: pointer; }
.tool.on { background: var(--accent); color: #fff; }
.widget-done { display: none; text-align: center; margin-top: 18px; }
.widget-done p { font-weight: 800; font-size: 19px; margin-bottom: 12px; }
.is-solved .widget-done { display: block; animation: rise .4s ease; }
.is-solved .widget-tools { display: none; }
.is-solved .pz-cell.on { fill: var(--text); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 52px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; }
.steps p { color: var(--muted); font-size: 15px; }
.n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.steps li:nth-child(2) .n { background: linear-gradient(135deg, var(--warm), var(--pink)); }
.steps li:nth-child(3) .n { background: linear-gradient(135deg, var(--teal), #4aa8ff); }

/* ---------- printables ---------- */
.print-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.print-in h2, .print-in .sub { text-align: left; margin-left: 0; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 34px; position: relative; font-weight: 600; }
.checks li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--teal); }
.paper-stack { position: relative; height: 460px; }
.paper { position: absolute; width: 300px; aspect-ratio: 1 / 1.414; background: #fff; border-radius: 8px; box-shadow: var(--shadow); left: 50%; top: 50%; }
.p1 { transform: translate(-50%, -50%) rotate(-3deg); padding: 26px 22px; color-scheme: light; --card: #fff; --text: #15132b; --muted: #6b6889; --line: #e3e0f0; }
.p2 { transform: translate(-46%, -52%) rotate(4deg); background: #f6f4ff; }
.p3 { transform: translate(-54%, -48%) rotate(-9deg); background: #fff6e6; }
.paper-head { height: 10px; width: 55%; border-radius: 9px; background: #e8e5f7; margin-bottom: 22px; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 52px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: grid; gap: 8px; }
.feature p { color: var(--muted); font-size: 15px; }
.ficon { font-size: 26px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--bg2); }

/* ---------- faq ---------- */
.faq { margin-top: 40px; display: grid; gap: 12px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 22px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--accent); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding-bottom: 18px; }

/* ---------- final cta ---------- */
.final-in { text-align: center; border-radius: 34px; padding: 72px 24px; color: #fff; background: radial-gradient(circle at 20% 0%, #8f7dff, transparent 55%), radial-gradient(circle at 90% 100%, #ff7aa2, transparent 50%), linear-gradient(135deg, #5b48f5, #8a4cf7); box-shadow: 0 40px 80px -40px rgb(91 72 245 / .8); }
.final-in .sub { color: rgb(255 255 255 / .85); margin: 14px auto 30px; }

/* ---------- footer ---------- */
.footer { padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
.footer .langs { background: none; gap: 6px; }
.footer .langs a { text-decoration: none; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .links { display: none; }
  .hero-in, .try-in, .print-in { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-art { min-height: 520px; }
  .types { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .try-in h2, .try-in .sub, .print-in h2, .print-in .sub { text-align: center; margin-left: auto; margin-right: auto; }
  .print-in .cta-row, .try-in .cta-row { justify-content: center; }
  .checks { justify-content: center; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .nav-right .btn span { display: none; }
  .nav-right .btn { padding: 9px 11px; }
  .types, .features, .steps { grid-template-columns: 1fr; }
  .phone { width: 250px; }
  .hero-art { min-height: 480px; }
  .f-streak { left: -4px; top: 44%; }
  .f-solved { right: -4px; }
  .cta-row .btn { flex: 1; justify-content: center; }
  .paper { width: 240px; }
  .f-mini { display: none; }
  .type-art { aspect-ratio: auto; padding: 22px 16px; }
  .type-art svg { max-width: 250px; margin: 0 auto; }
  .logo { font-size: 16px; }
  .paper-stack { height: 380px; }
  .lead, .sub { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 440px) { .nav-right .btn { display: none; } }
