/* Deckiy AI website. Colours, type and components follow the Android app (ui/theme/Theme.kt). */
@font-face { font-family: Fredoka; src: url(fonts/fredoka_600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Fredoka; src: url(fonts/fredoka_700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/nunito_600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/nunito_700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/nunito_800.woff2) format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --navy: #15162B; --navy-deep: #0F1022; --card: #1E2041; --card-high: #272A52; --stroke: #34386B;
  --blue: #3B82F6; --blue-bright: #60A5FA; --blue-deep: #1D4ED8; --belly: #93C5FD;
  --yellow: #FFD84D; --yellow-deep: #D9A91F; --purple: #8B5CF6; --purple-deep: #6537D6;
  --coral: #FF6B6B; --coral-deep: #D94747; --mint: #5DE2B0; --mint-deep: #2FB384; --flame: #FF9F43;
  --cream: #FFF7E8; --muted: #ABB0D6; --faint: #6F74A3;
  --radius: 24px;
  --wrap: 1160px;
  --head: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--navy); color: var(--cream);
  font: 600 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 800; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

/* ---------- buttons: the app's chunky, pressable buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--blue); color: #fff; text-decoration: none; white-space: nowrap;
  font: 700 17px/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 5px 0 var(--blue-deep); transform: translateY(0);
  transition: transform .08s ease, box-shadow .08s ease, filter .2s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--blue-deep); }
.btn-ghost { background: var(--card-high); box-shadow: 0 5px 0 #191b38; color: var(--cream); }
.btn-ghost:active { box-shadow: 0 1px 0 #191b38; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 14px; border-radius: 14px; box-shadow: 0 4px 0 var(--blue-deep); }
.btn-play { background: var(--mint); color: #0d3326; box-shadow: 0 5px 0 var(--mint-deep); }
.btn-play svg { width: 22px; height: 22px; fill: currentColor; }
.link { color: var(--blue-bright); font-weight: 800; text-decoration: none; border-bottom: 2px solid rgba(96, 165, 250, .35); }
.link:hover { border-color: var(--blue-bright); }

/* ---------- nav ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(21, 22, 43, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-color: rgba(52, 56, 107, .7); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 24px/1 var(--head); }
.brand img { border-radius: 11px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 800; font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--cream); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 56px 0 96px; }
.hero::before { content: ''; position: absolute; inset: -200px 0 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
  background: radial-gradient(600px 380px at 78% 30%, rgba(59, 130, 246, .28), transparent 70%), radial-gradient(520px 360px at 8% 66%, rgba(139, 92, 246, .16), transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--stroke); color: var(--belly); font-weight: 800; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(93, 226, 176, .18); }
.hero h1 { margin-top: 22px; font-size: clamp(42px, 6vw, 72px); }
.hl { color: var(--yellow); }
.lede { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.hero-tags li { padding: 6px 12px; border-radius: 10px; background: rgba(39, 42, 82, .7); color: var(--muted); font-weight: 800; font-size: 13px; letter-spacing: .03em; }

.hero-art { position: relative; height: 620px; }
.glow { position: absolute; inset: 8% 6% 6% 14%; border-radius: 50%; background: radial-gradient(circle, rgba(96, 165, 250, .35), transparent 65%); filter: blur(20px); }
.phone { position: relative; aspect-ratio: 540 / 1212; padding: 9px; border-radius: 42px; background: #0A0B18;
  box-shadow: 0 0 0 2px #2B2E5A, 0 40px 80px -30px rgba(0, 0, 0, .75), 0 0 60px -10px rgba(59, 130, 246, .25); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 33px; }
.phone-hero { position: absolute; right: 4%; top: 0; width: 280px; transform: rotate(4deg); }
.hero-deckiy { position: absolute; left: -2%; bottom: -10px; width: 330px; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .45)); }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font: 700 16px/1 var(--head);
  background: var(--card-high); border: 1px solid var(--stroke); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .6); animation: bob 5s ease-in-out infinite; }
.chip-xp { left: 16%; top: 14%; color: var(--yellow); }
.chip-mastery { right: 0; bottom: 18%; color: var(--cream); animation-delay: -2.5s; }
.chip-mastery b { color: var(--mint); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section-deep { background: var(--navy-deep); }
.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.kicker { color: var(--blue-bright); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.section-head h2 { margin-top: 12px; font-size: clamp(32px, 4.4vw, 48px); }
.section-sub { margin-top: 16px; color: var(--muted); font-size: 18px; }

.step { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 24px 0; }
.step + .step { margin-top: 48px; }
.step-flip .step-copy { order: 2; }
.step-num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--blue); box-shadow: 0 4px 0 var(--blue-deep); font: 700 22px/1 var(--head); }
.step h3 { margin-top: 20px; font-size: clamp(28px, 3.2vw, 36px); }
.step p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 30em; }
.step-art { display: grid; place-items: center; position: relative; }
.step-art::before { content: ''; position: absolute; width: min(380px, 100%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, .2), transparent 70%); }
.step-art .phone { width: 270px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 34px; font-weight: 700; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d3326' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--stroke); box-shadow: 0 6px 0 #161833; transition: transform .2s ease; }
.card:hover { transform: translateY(-4px); }
.card h3 { margin-top: 18px; font-size: 22px; }
.card p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; }
.icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-blue { background: rgba(59, 130, 246, .18); color: var(--blue-bright); }
.icon-mint { background: rgba(93, 226, 176, .16); color: var(--mint); }
.icon-purple { background: rgba(139, 92, 246, .2); color: #B79CFF; }
.icon-yellow { background: rgba(255, 216, 77, .16); color: var(--yellow); }
.icon-coral { background: rgba(255, 107, 107, .16); color: var(--coral); }
.icon-flame { background: rgba(255, 159, 67, .16); color: var(--flame); }

.exams { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; }
.exam { padding: 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--stroke); }
.exam h3 { display: flex; align-items: center; gap: 12px; font-size: 24px; }
.exam p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.badge { display: inline-grid; place-items: center; min-width: 52px; height: 34px; padding: 0 10px; border-radius: 10px; font: 700 15px/1 var(--head); letter-spacing: .04em; }
.badge-blue { background: var(--blue); box-shadow: 0 3px 0 var(--blue-deep); }
.badge-purple { background: var(--purple); box-shadow: 0 3px 0 var(--purple-deep); }
.badge-mint { background: var(--mint); color: #0d3326; box-shadow: 0 3px 0 var(--mint-deep); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.pills li { padding: 6px 12px; border-radius: 999px; background: var(--card-high); color: var(--cream); font-size: 14px; font-weight: 700; }

.moods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mood { margin: 0; padding: 20px 20px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--stroke); text-align: center; overflow: hidden; }
.mood img { width: 100%; aspect-ratio: 1; object-fit: contain; transform: scale(1.12); transform-origin: 50% 58%; background: radial-gradient(circle at 50% 58%, rgba(147, 197, 253, .22), transparent 62%); }
.mood figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; }
.mood b { display: block; color: var(--cream); font: 700 20px/1.3 var(--head); margin-bottom: 4px; }

.privacy { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; padding: 48px; border-radius: 32px; background: linear-gradient(135deg, var(--card) 0%, #1a2a5e 100%); border: 1px solid var(--stroke); }
.privacy h2 { margin-top: 12px; font-size: clamp(30px, 3.6vw, 42px); }
.privacy .link { display: inline-block; margin-top: 24px; }
.privacy-art { display: grid; place-items: center; }
.phone-small { width: 230px; transform: rotate(-3deg); }

.faq-wrap { max-width: 820px; }
.faq { display: grid; gap: 14px; }
.faq details { border-radius: 20px; background: var(--card); border: 1px solid var(--stroke); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 60px 22px 24px; position: relative; font: 600 20px/1.3 var(--head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; margin-top: -9px; border-right: 3px solid var(--blue-bright); border-bottom: 3px solid var(--blue-bright); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -3px; }
.faq details p { padding: 0 24px 22px; color: var(--muted); }

.cta { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding: 48px 56px; border-radius: 32px; position: relative; overflow: hidden;
  background: radial-gradient(500px 300px at 85% 0%, rgba(96, 165, 250, .35), transparent 70%), linear-gradient(135deg, #2457d6 0%, #3B82F6 55%, #5b6cf0 100%); box-shadow: 0 10px 0 var(--blue-deep); }
.cta-deckiy { width: 300px; filter: drop-shadow(0 20px 26px rgba(10, 20, 60, .45)); }
.cta h2 { font-size: clamp(32px, 4vw, 46px); }
.cta-copy > p { margin-top: 12px; color: #E3ECFF; font-size: 18px; max-width: 30em; }
.signup { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; max-width: 560px; }
.signup input { flex: 1 1 240px; min-height: 56px; padding: 0 18px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .35); background: rgba(11, 16, 48, .35); color: #fff; font: 700 17px var(--body); }
.signup input::placeholder { color: rgba(227, 236, 255, .7); }
.signup input:focus { outline: none; border-color: var(--yellow); }
.signup .btn { background: var(--yellow); color: #3a2b00; box-shadow: 0 5px 0 var(--yellow-deep); }
.signup .btn:active { box-shadow: 0 1px 0 var(--yellow-deep); }
.signup .btn[disabled] { opacity: .7; cursor: wait; }
.form-note { flex-basis: 100%; min-height: 1.5em; font-weight: 800; color: #fff; }
.form-note.ok { color: #C8FFE9; }
.form-note.err { color: #FFE1E1; }
.cta .btn-play { margin-top: 26px; }

.footer { padding: 40px 0 48px; border-top: 1px solid var(--stroke); }
.footer-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-note { color: var(--faint); font-size: 15px; margin-right: auto; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 800; font-size: 15px; }
.footer-links a:hover { color: var(--cream); }

/* ---------- text pages (privacy, 404) ---------- */
.doc { max-width: 760px; padding: 64px 0 96px; }
.doc h1 { margin-top: 12px; font-size: clamp(36px, 5vw, 52px); }
.doc-lede { margin-top: 18px; color: var(--muted); font-size: 19px; }
.doc-date { margin-top: 12px; color: var(--faint); font-size: 15px; }
.doc section { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--stroke); }
.doc h2 { font-size: 26px; margin-bottom: 14px; }
.doc section > p { color: var(--muted); }
.doc section > p + p { margin-top: 12px; }
.doc .ticks li { font-weight: 600; color: var(--muted); }
.doc .ticks b { color: var(--cream); }
.doc .ticks li + li { margin-top: 6px; }
.lost { display: grid; place-items: center; text-align: center; min-height: calc(100vh - 72px - 130px); padding: 48px 0; }
.lost img { width: 240px; margin: 0 auto; }
.lost h1 { margin-top: 12px; font-size: clamp(34px, 5vw, 48px); }
.lost p { margin: 12px auto 28px; color: var(--muted); max-width: 26em; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .chip { animation: none; }
  .card:hover { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .hero-actions, .hero-tags { justify-content: center; }
  .hero-art { height: 560px; max-width: 520px; width: 100%; margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .exams { grid-template-columns: 1fr; }
  .moods { grid-template-columns: repeat(2, 1fr); }
  .privacy { grid-template-columns: 1fr; text-align: center; }
  .privacy .ticks { justify-items: center; }
  .privacy .ticks li { text-align: left; }
  .cta { grid-template-columns: 1fr; text-align: center; padding: 40px 28px; }
  .cta-deckiy { margin: -10px auto 0; width: 220px; }
  .cta-copy > p, .signup { margin-inline: auto; }
  .signup { justify-content: center; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero { padding: 32px 0 64px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 44px; }
  .step, .step-flip { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .step-flip .step-copy { order: 0; }
  .step p { margin-inline: auto; }
  .step .ticks { justify-items: center; }
  .step .ticks li { text-align: left; }
  .step-art .phone { width: 240px; }
  .step-art::before { width: min(300px, 100%); }
  .cards { grid-template-columns: 1fr; }
  .privacy { padding: 32px 22px; }
  .hero-art { height: 470px; }
  .phone-hero { width: 220px; right: 2%; }
  .hero-deckiy { width: 250px; left: -4%; }
  .chip { font-size: 14px; padding: 8px 12px; }
  .chip-xp { left: 4%; top: 8%; }
}
@media (max-width: 420px) {
  .btn { padding: 0 20px; font-size: 15px; }
  .btn-small { padding: 0 14px; font-size: 13px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .moods { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mood { padding: 12px 12px 16px; }
  .mood b { font-size: 17px; }
  .mood figcaption { font-size: 13px; }
  .hero-art { height: 420px; }
  .phone-hero { width: 190px; }
  .hero-deckiy { width: 215px; }
}
