/* WordBrain website. Colours and shapes follow the app: violet to magenta, glossy tiles, mint accents. */
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/Nunito.ttf') format('truetype');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --violet-900: #1c1046;
  --violet-800: #3a1d7a;
  --violet-600: #6a28b8;
  --magenta: #ad2d93;
  --mint: #3de0a3;
  --mint-edge: #1fa77a;
  --gold: #ffc145;
  --ink: #1b1740;
  --muted: #5a5380;
  --lavender: #f6f1ff;
  --lavender-2: #ebe3ff;
  --line: #ddd3f5;
  --white: #fff;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(58, 29, 122, 0.45);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--violet-600); }
h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 800; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

/* ---------- header ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background 0.25s, box-shadow 0.25s; }
.header.solid { background: rgba(28, 16, 70, 0.92); backdrop-filter: blur(10px); box-shadow: 0 8px 30px -14px rgba(0, 0, 0, 0.6); }
.header .bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-weight: 900; font-size: 22px; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 8px 16px -6px rgba(0, 0, 0, 0.55); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: rgba(255, 255, 255, 0.92); text-decoration: none; font-weight: 700; padding: 10px 14px; border-radius: 12px; }
.nav a:hover { background: rgba(255, 255, 255, 0.14); }
.menu { display: none; background: rgba(255, 255, 255, 0.14); color: var(--white); border: 0; width: 46px; height: 46px; border-radius: 14px; font-size: 24px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 16px; border: 0; font: inherit; font-weight: 900; font-size: 17px; text-decoration: none; cursor: pointer; color: var(--ink); background: var(--mint); box-shadow: 0 5px 0 var(--mint-edge), 0 14px 24px -10px rgba(0, 0, 0, 0.45); transition: transform 0.08s, box-shadow 0.08s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--mint-edge); }
.btn.ghost { background: rgba(255, 255, 255, 0.16); color: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.btn.gold { background: var(--gold); box-shadow: 0 5px 0 #d99a1f, 0 14px 24px -10px rgba(0, 0, 0, 0.45); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px; border-radius: 16px; background: #0d0a24; color: var(--white); text-decoration: none; border: 1.5px solid rgba(255, 255, 255, 0.35); text-align: left; line-height: 1.1; }
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 12px; font-weight: 700; opacity: 0.85; }
.store strong { font-size: 19px; font-weight: 800; }
.store.soon { opacity: 0.88; cursor: default; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--white); background: linear-gradient(180deg, var(--violet-800) 0%, var(--violet-600) 55%, var(--magenta) 100%); padding: 140px 0 110px; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.hero::before { width: 620px; height: 620px; right: -160px; top: -120px; background: radial-gradient(circle, rgba(255, 122, 217, 0.4), transparent 70%); }
.hero::after { width: 700px; height: 700px; left: -260px; bottom: -280px; background: radial-gradient(circle, rgba(108, 123, 255, 0.4), transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); font-weight: 800; font-size: 15px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero .lead { font-size: clamp(18px, 2vw, 21px); max-width: 540px; margin: 22px 0 30px; color: rgba(255, 255, 255, 0.94); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.chip { background: rgba(255, 255, 255, 0.15); border: 1.5px solid rgba(255, 255, 255, 0.35); border-radius: 16px; padding: 10px 18px; font-weight: 700; }
.chip b { display: block; font-size: 26px; font-weight: 900; line-height: 1.1; color: var(--gold); }
.stage { position: relative; height: 640px; }
.stage .phone { position: absolute; }
.stage .p1 { left: 50%; top: 0; width: 290px; transform: translateX(-58%) rotate(-5deg); z-index: 2; }
.stage .p2 { left: 50%; top: 56px; width: 270px; transform: translateX(8%) rotate(6deg); }
.float { position: absolute; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; font-weight: 900; font-size: 26px; color: var(--ink); background: linear-gradient(#fff, #f1ebff); box-shadow: 0 5px 0 #b9ace6, 0 16px 22px -10px rgba(0, 0, 0, 0.5); animation: bob 6s ease-in-out infinite; z-index: 3; }
.float.m { background: linear-gradient(#7ff0c8, var(--mint)); box-shadow: 0 5px 0 var(--mint-edge), 0 16px 22px -10px rgba(0, 0, 0, 0.5); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, -6deg)); } 50% { transform: translateY(-16px) rotate(calc(var(--r, -6deg) * -1)); } }

/* phone frame */
.phone { border-radius: 40px; padding: 9px; background: linear-gradient(#2a2160, #120c34); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), inset 0 0 0 2px rgba(255, 255, 255, 0.12); }
.phone .screen { position: relative; overflow: hidden; border-radius: 32px; background: #1c1046; aspect-ratio: 390 / 844; }
.phone .screen::before { content: ''; position: absolute; top: 10px; left: 50%; width: 76px; height: 20px; transform: translateX(-50%); border-radius: 99px; background: rgba(0, 0, 0, 0.78); z-index: 2; }
.phone img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
section.alt { background: var(--lavender); }
.head { text-align: center; max-width: 680px; margin: 0 auto 54px; }
.head .tag { display: inline-block; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; font-size: 14px; color: var(--violet-600); margin-bottom: 10px; }
.head h2 { font-size: clamp(32px, 4.2vw, 46px); }
.head p { color: var(--muted); font-size: 19px; margin-top: 14px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--white); border-radius: var(--radius); padding: 28px; border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.card .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; margin-bottom: 18px; background: linear-gradient(#f7f3ff, var(--lavender-2)); box-shadow: 0 4px 0 #cfc2f2; }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }

/* how it works */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--mint); color: var(--ink); font-weight: 900; font-size: 22px; box-shadow: 0 4px 0 var(--mint-edge); }
.steps h3 { font-size: 20px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }
.demo { background: linear-gradient(180deg, var(--violet-800), var(--violet-600) 60%, var(--magenta)); border-radius: 30px; padding: 28px; box-shadow: var(--shadow); color: var(--white); text-align: center; }
.board { position: relative; width: 252px; height: 252px; margin: 8px auto 18px; }
.cell { position: absolute; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 22px; font-weight: 900; font-size: 36px; color: var(--ink); background: linear-gradient(#fff, #f1ebff); box-shadow: 0 5px 0 #b9ace6, 0 14px 20px -10px rgba(0, 0, 0, 0.55); transition: transform 0.55s cubic-bezier(0.5, 0, 0.9, 0.6), opacity 0.35s, background 0.25s; }
.cell.on { background: linear-gradient(#7ff0c8, var(--mint)); box-shadow: 0 5px 0 var(--mint-edge), 0 14px 20px -10px rgba(0, 0, 0, 0.55); }
.cell.gone { opacity: 0; transform: scale(0.5); }
.demo .say { min-height: 28px; font-weight: 800; font-size: 19px; }
.slots { display: flex; justify-content: center; gap: 6px; margin-bottom: 6px; min-height: 36px; }
.slots i { width: 28px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, 0.2); border: 1.2px solid rgba(255, 255, 255, 0.55); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 16px; color: var(--ink); }
.slots i.f { background: var(--mint); border-color: var(--mint-edge); }

/* screenshots */
.shots { display: flex; gap: 28px; overflow-x: auto; padding: 14px 20px 34px; scroll-snap-type: x mandatory; margin: 0 -20px; }
.shots figure { margin: 0; flex: 0 0 auto; width: 250px; scroll-snap-align: center; text-align: center; }
.shots figcaption { margin-top: 18px; font-weight: 800; }
.shots figcaption small { display: block; font-weight: 500; color: var(--muted); font-size: 15px; }
.shots .phone { box-shadow: 0 24px 40px -18px rgba(58, 29, 122, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.12); }

/* packs */
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pack { background: var(--white); border-radius: 20px; padding: 22px; border: 1.5px solid var(--line); display: flex; gap: 16px; align-items: center; }
.pack .mini { display: grid; gap: 2px; flex: none; width: 54px; height: 54px; }
.pack .mini i { background: var(--violet-600); border-radius: 4px; }
.pack b { display: block; font-size: 19px; }
.pack span { color: var(--muted); font-size: 15px; }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 880px; margin: 0 auto; }
.plan { background: var(--white); border-radius: 28px; padding: 36px; border: 1.5px solid var(--line); box-shadow: var(--shadow); position: relative; }
.plan.best { background: linear-gradient(180deg, var(--violet-800), var(--violet-600) 70%, var(--magenta)); color: var(--white); border: 0; }
.plan .badge { position: absolute; top: -15px; right: 26px; background: var(--gold); color: var(--ink); font-weight: 900; padding: 6px 16px; border-radius: 99px; box-shadow: 0 3px 0 #d99a1f; }
.plan h3 { font-size: 24px; }
.price { font-size: 56px; font-weight: 900; margin: 10px 0 4px; line-height: 1.1; }
.price small { font-size: 18px; font-weight: 700; opacity: 0.8; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.plan li::before { content: '✓'; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 900; font-size: 14px; }
.plan.free li.no::before { content: '–'; background: var(--lavender-2); color: var(--muted); }
.note { text-align: center; color: var(--muted); margin-top: 26px; font-size: 15px; }

/* faq */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { background: var(--white); border: 1.5px solid var(--line); border-radius: 18px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 26px; line-height: 1; color: var(--violet-600); }
.faq details[open] summary::after { content: '–'; }
.faq p { color: var(--muted); padding-bottom: 12px; }

/* contact */
.contact { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 44px; align-items: start; }
.contact .info h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 14px; }
.contact .info p { color: var(--muted); font-size: 18px; }
.contact .info ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.contact .info li { display: flex; gap: 12px; align-items: center; font-weight: 700; }
.form { background: var(--white); border-radius: 28px; padding: 32px; border: 1.5px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; font-size: 15px; }
.field input, .field textarea { width: 100%; font: inherit; font-weight: 500; color: var(--ink); border: 1.8px solid var(--line); border-radius: 14px; padding: 13px 16px; background: #fcfaff; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet-600); box-shadow: 0 0 0 4px rgba(106, 40, 184, 0.16); }
.field.bad input, .field.bad textarea { border-color: #c0392b; }
.field .err { color: #b3261e; font-size: 14px; margin-top: 5px; font-weight: 700; }
.field .count { text-align: right; font-size: 13px; color: var(--muted); margin-top: 4px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.banner { border-radius: 16px; padding: 14px 18px; font-weight: 700; }
.banner.ok { background: #dff8ee; color: #0b5a40; border: 1.5px solid #9be5c6; }
.banner.fail { background: #fde8e6; color: #8a1c14; border: 1.5px solid #f2b6b0; }
.form .btn { width: 100%; }
.fine { font-size: 14px; color: var(--muted); margin: 0; text-align: center; }

/* footer */
.footer { background: var(--violet-900); color: rgba(255, 255, 255, 0.85); padding: 56px 0 36px; }
.footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer a { color: rgba(255, 255, 255, 0.92); text-decoration: none; font-weight: 700; }
.footer a:hover { text-decoration: underline; }
.footer .links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer small { display: block; margin-top: 34px; opacity: 0.7; font-size: 14px; }

/* legal pages */
.legal-hero { background: linear-gradient(180deg, var(--violet-800), var(--violet-600) 70%, var(--magenta)); color: var(--white); padding: 140px 0 64px; text-align: center; }
.legal-hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 900; }
.legal-hero p { opacity: 0.92; margin: 12px 0 0; }
.legal { display: grid; grid-template-columns: 250px 1fr; gap: 54px; padding: 64px 0 96px; align-items: start; }
.toc { position: sticky; top: 92px; background: var(--lavender); border-radius: 20px; padding: 20px; border: 1.5px solid var(--line); }
.toc b { display: block; margin-bottom: 8px; }
.toc a { display: block; padding: 6px 0; text-decoration: none; font-weight: 700; font-size: 15px; color: var(--muted); }
.toc a:hover { color: var(--violet-600); }
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 42px 0 12px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 22px 0 6px; }
.prose p, .prose li { color: #3a3560; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 1em; display: grid; gap: 6px; }
.prose .callout { background: var(--lavender); border-left: 5px solid var(--violet-600); padding: 16px 20px; border-radius: 0 14px 14px 0; margin: 0 0 1.4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
.prose th { background: var(--lavender); }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .hero .wrap, .how, .contact, .legal { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 120px; }
  .stage { height: 560px; max-width: 520px; margin: 10px auto 0; width: 100%; }
  .stage .p1 { width: 250px; }
  .stage .p2 { width: 230px; }
  .grid3, .packs { grid-template-columns: 1fr 1fr; }
  .toc { position: static; }
}
@media (max-width: 760px) {
  .menu { display: grid; place-items: center; }
  .nav { position: absolute; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; background: rgba(28, 16, 70, 0.98); padding: 12px 20px 22px; display: none; }
  .nav.open { display: flex; }
  .grid3, .packs, .plans, .row2 { grid-template-columns: minmax(0, 1fr); }
  section { padding: 72px 0; }
  .stage { height: 500px; }
  .float { width: 44px; height: 44px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
  .cell { transition: none; }
}
