/* Pip Talk website: "Toy Box" look (docs/design/ART_DIRECTION.md). Palette from src/ui/theme.ts.
   No outlines: depth comes from inset bands and soft plum-tinted shadows. */

@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("fonts/fredoka-600.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-400.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-700.woff") format("woff"); }

:root {
  --cream: #FFF7EC;
  --cream-deep: #EFE2CF;
  --white: #FFFFFF;
  --white-deep: #E2DCE8;
  --ink: #26232E;
  --mute: #5E5D6B;
  --sky-top: #7CCBFF;
  --sky-bottom: #DDF3FF;
  --grass: #7DD35A;
  --hill: #B4E88F;
  --sun: #FFD02A;
  --sun-deep: #E08E0C;
  --orange: #FF9A3D;
  --orange-deep: #D65F12;
  --pink: #FF86BF;
  --pink-deep: #D94888;
  --blue: #2D9CFF;
  --blue-deep: #1262C4;
  --green: #5ACB6A;
  --green-deep: #278F40;
  --purple: #9B7BFF;
  --purple-deep: #6242D2;
  --teal: #22CDB8;
  --teal-deep: #0B8E80;
  --red: #FF5E6C;
  --red-deep: #CC2A3E;
  --leaf: #2E7D4F;
  --drop: 0 10px 24px rgba(74, 46, 92, 0.12), 0 2px 4px rgba(74, 46, 92, 0.08);
  --radius: 28px;
  --radius-s: 16px;
  --wrap: 1100px;
  --font-kid: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-kid); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 4.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--blue-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.mute { color: var(--mute); }
.small { font-size: 0.9375rem; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 12px; font-weight: 700;
}
.skip:focus { top: 12px; color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 247, 236, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--cream-deep);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.35rem var(--font-kid); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; list-style: none; padding: 0; margin-block: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.975rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--white); box-shadow: inset 0 -3px 0 var(--white-deep); }
@media (max-width: 860px) { .nav .opt { display: none; } }
@media (max-width: 420px) { .nav a { padding: 8px 9px; } .brand span { font-size: 1.2rem; } }

/* ---------- Clay buttons ---------- */
.btn {
  --face: var(--orange); --deep: var(--orange-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 26px 18px;
  border: 0; border-radius: 999px;
  background: var(--face); color: var(--ink);
  font: 600 1.2rem/1.1 var(--font-kid); text-decoration: none; cursor: pointer;
  box-shadow: inset 0 -6px 0 var(--deep), inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(74, 46, 92, 0.18);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s ease;
}
.btn:hover { color: var(--ink); }
/* Clay press: squash down and spread a little, spring back on release. */
.btn:active { transform: translateY(4px) scale(1.03, 0.93); transition-duration: 0.08s; box-shadow: inset 0 -2px 0 var(--deep), inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 3px 8px rgba(74, 46, 92, 0.18); }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn-white { --face: var(--white); --deep: var(--white-deep); }
.btn-sun { --face: var(--sun); --deep: var(--sun-deep); }
.btn-small { min-height: 44px; padding: 9px 18px 12px; font-size: 1rem; }
.btn-small { box-shadow: inset 0 -4px 0 var(--deep), inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 4px 10px rgba(74, 46, 92, 0.15); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 118%, var(--grass) 0 45%, transparent 45.3%),
    radial-gradient(90% 50% at 15% 112%, var(--hill) 0 50%, transparent 50.4%),
    linear-gradient(var(--sky-top), var(--sky-bottom) 80%);
  padding: 48px 0 120px;
}
.hero .wrap { display: grid; gap: 24px; align-items: center; grid-template-columns: 1.1fr 0.9fr; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--white); border-radius: 999px; padding-block: 6px; padding-inline: 6px 16px; margin-bottom: 18px;
  font-weight: 700; box-shadow: inset 0 -3px 0 var(--white-deep), var(--drop);
}
.eyebrow img { width: 36px; height: 36px; border-radius: 10px; }
.hero .lede { font-size: 1.25rem; max-width: 32em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 24px 0 10px; }
.soon { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin: 4px 0 0; }
.soon::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sun-deep); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 0; list-style: none; }
.badges li { background: rgba(255, 255, 255, 0.85); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: 0.95rem; box-shadow: inset 0 -3px 0 var(--white-deep); }
.hero-art { position: relative; justify-self: center; width: min(100%, 400px); }
.cloud { position: absolute; background: var(--white); border-radius: 999px; box-shadow: inset 0 -6px 0 #E6F2FC; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 55%; height: 140%; inset-inline-start: 14%; bottom: 25%; }
.cloud::after { width: 38%; height: 110%; inset-inline-end: 14%; bottom: 30%; }
.cloud.c1 { width: 110px; height: 34px; top: 46px; inset-inline-start: 44%; }
.cloud.c2 { width: 80px; height: 26px; top: 90px; inset-inline-end: 8%; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-1.5deg); } }

@media (max-width: 760px) {
  .hero { padding: 28px 0 100px; text-align: center; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: min(70%, 260px); }
  .cta-row, .badges, .soon { justify-content: center; }
  .hero .lede { margin-inline: auto; }
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }
@media (max-width: 600px) { section { padding: 48px 0; } .section-head { margin-bottom: 24px; } .card { padding: 20px; } .steps li { padding-top: 68px; } .steps li::before { inset-inline-start: 20px; } }
.section-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section-head p { font-size: 1.15rem; color: var(--mute); }
.tint-sky { background: linear-gradient(var(--cream), #EAF6FF 30%, #EAF6FF 70%, var(--cream)); }
.tint-sun { background: linear-gradient(var(--cream), #FFF1CF 30%, #FFF1CF 70%, var(--cream)); }

.card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: inset 0 -6px 0 var(--white-deep), var(--drop);
}
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 360px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* How it works */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 72px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 20px; inset-inline-start: 24px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font: 600 1.3rem var(--font-kid);
  background: var(--dot, var(--sun)); box-shadow: inset 0 -4px 0 var(--dot-deep, var(--sun-deep));
}
.steps li:nth-child(2) { --dot: var(--pink); --dot-deep: var(--pink-deep); }
.steps li:nth-child(3) { --dot: var(--teal); --dot-deep: var(--teal-deep); }
.steps li:nth-child(4) { --dot: var(--purple); --dot-deep: var(--purple-deep); }
.steps p { margin: 0; color: var(--mute); }

/* Games */
.games { list-style: none; padding: 0; margin: 0; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.game { text-align: center; padding: 18px 16px 22px; }
.game img { width: 96px; height: 96px; margin: 0 auto 10px; object-fit: contain; }
.game h3 { margin-bottom: 4px; }
.game p { margin: 0; color: var(--mute); font-size: 0.95rem; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.chip {
  --face: var(--white); --deep: var(--white-deep);
  background: var(--face); border-radius: 999px; padding: 8px 18px 11px; font-weight: 700;
  box-shadow: inset 0 -4px 0 var(--deep), 0 3px 8px rgba(74, 46, 92, 0.1);
}
.chip small { font-weight: 400; color: var(--mute); }
.chip.plus { --face: #FFF1CF; --deep: #F3D98C; }

/* Lists with toy dots */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-inline-start: 36px; margin-bottom: 12px; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%2326232E' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  box-shadow: inset 0 -3px 0 var(--green-deep);
}
.promise h3 { display: flex; align-items: center; gap: 10px; }
.promise .icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; font-size: 1.3rem; }
.promise p { margin: 0; color: var(--mute); }

.split { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.pro-tag { display: inline-block; background: var(--purple); color: var(--ink); border-radius: 999px; padding: 4px 14px 6px; font-weight: 700; box-shadow: inset 0 -3px 0 var(--purple-deep); }
.note { border-radius: var(--radius-s); background: #F3F5FA; padding: 14px 18px; color: var(--mute); font-size: 0.95rem; }

.plus-art { width: 100%; max-width: 560px; margin: 0 auto; }

.lang { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.lang .card { flex: 1 1 260px; max-width: 360px; text-align: center; }
.lang .word { font: 600 2rem/1.4 var(--font-kid); margin: 4px 0 8px; }
.lang .word[lang="ur"] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", serif; font-weight: 400; line-height: 2; }
.status { display: inline-block; border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: 0.9rem; background: #E3F7E5; color: var(--leaf); }
.status.review { background: #FFF1CF; color: #7A4B00; }

/* Screenshots carousel (CSS scroll-snap, no JS) */
.shots {
  display: flex; gap: 20px; list-style: none; margin: 0; padding: 8px 20px 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--cream-deep) transparent;
}
.shots li { flex: 0 0 min(64vw, 250px); scroll-snap-align: center; }
.shots img { width: 100%; height: auto; border-radius: 22px; box-shadow: var(--drop); background: var(--sky-bottom); }
.shots figcaption { text-align: center; font-weight: 700; margin-top: 10px; font-size: 0.95rem; }
@media (min-width: 1200px) { .shots { justify-content: center; } }
.hint { text-align: center; color: var(--mute); font-size: 0.9rem; margin: 0; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { background: var(--white); border-radius: 22px; box-shadow: inset 0 -4px 0 var(--white-deep), 0 4px 12px rgba(74, 46, 92, 0.07); }
.faq summary {
  cursor: pointer; list-style: none; padding-block: 18px; padding-inline: 22px 56px; position: relative;
  font: 600 1.15rem/1.3 var(--font-kid);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; inset-inline-end: 18px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); box-shadow: inset 0 -3px 0 var(--sun-deep); font-size: 1.3rem; line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq .answer { padding: 0 22px 18px; }
.faq .answer > :last-child { margin-bottom: 0; }

/* Footer */
.site-footer { background: var(--ink); color: #E9E4EE; padding: 48px 0 32px; margin-top: 40px; }
.site-footer a { color: var(--white); }
.site-footer .wrap { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer h2 { font-size: 1.1rem; color: var(--white); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid #3A3644; padding-top: 18px; font-size: 0.9rem; color: #BDB7C8; }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* Text pages (privacy, support) */
.page-hero { background: linear-gradient(var(--sky-top), var(--sky-bottom)); padding: 40px 0 36px; }
.page-hero p { font-size: 1.1rem; margin: 0; }
.page-hero .wrap { max-width: 780px; }
.doc { max-width: 780px; margin: 0 auto; padding: 40px 20px 24px; }
.doc h2 { font-size: 1.6rem; margin-top: 1.8em; }
.doc h3 { margin-top: 1.4em; }
.doc ul, .doc ol { padding-inline-start: 1.3em; }
.doc li { margin-bottom: 0.4em; }
.doc code { font-size: 0.9em; background: #F3F5FA; padding: 1px 6px; border-radius: 6px; }
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--radius-s); box-shadow: inset 0 0 0 1px #E2E5EE; }
.doc table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.95rem; background: var(--white); }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid #E2E5EE; }
.doc th { background: #F3F5FA; font-weight: 700; }
.doc tr:last-child td { border-bottom: 0; }
.short { background: var(--white); border-radius: var(--radius); padding: 20px 24px 8px; box-shadow: inset 0 -6px 0 var(--white-deep), var(--drop); }
.todo {
  background: #FFF1CF; border-radius: var(--radius-s); padding: 16px 20px; margin-bottom: 28px;
  box-shadow: inset 0 -4px 0 #F3D98C;
}
.todo strong:first-child { display: block; font-family: var(--font-kid); font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.todo ul { margin: 6px 0 0; }
.placeholder { background: #FFE08A; border-radius: 6px; padding: 0 5px; font-weight: 700; }
.toc { columns: 2 220px; padding-inline-start: 1.3em; }

/* ---------- Header: language switch + sound toggle ---------- */
.lang-switch { display: flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.lang-switch a { padding: 6px 10px; border-radius: 999px; color: var(--ink); text-decoration: none; }
.lang-switch a:hover { background: var(--white); box-shadow: inset 0 -3px 0 var(--white-deep); }
.lang-switch [aria-current] { color: var(--mute); }
.lang-switch .sep { color: #B9AFA2; }
.lang-switch [lang="ur"] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", serif; font-weight: 400; line-height: 1.5; font-size: 1.05rem; }
.lang-switch [lang="en"] { font-family: var(--font-body); }
.snd {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  display: grid; place-items: center; color: var(--ink); background: var(--white);
  box-shadow: inset 0 -4px 0 var(--white-deep), 0 3px 8px rgba(74, 46, 92, 0.12);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.snd:active { transform: translateY(2px) scale(1.05, 0.9); transition-duration: 0.08s; }
.snd svg { width: 24px; height: 24px; display: block; }
.snd .on { display: none; }
.snd[aria-pressed="true"] { background: var(--sun); box-shadow: inset 0 -4px 0 var(--sun-deep), 0 3px 8px rgba(74, 46, 92, 0.12); }
.snd[aria-pressed="true"] .on { display: block; }
.snd[aria-pressed="true"] .off { display: none; }
[dir="rtl"] .snd svg { transform: scaleX(-1); }
@media (max-width: 560px) { .lang-switch [aria-current], .lang-switch .sep { display: none; } .site-header .wrap { gap: 8px; } }
@media (max-width: 420px) { .brand span { display: none; } .nav a { padding-inline: 8px; } }

/* ---------- Hero toys: sun, sparkles, Pip, speech bubble ---------- */
.sun { position: absolute; top: -4%; inset-inline-end: -2%; width: 30%; aspect-ratio: 1; z-index: 0; pointer-events: none; }
.sun::before {
  content: ""; position: absolute; inset: -45%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 236, 140, 0.75) 0 9deg, transparent 9deg 30deg);
  -webkit-mask: radial-gradient(closest-side, #000 50%, transparent 100%); mask: radial-gradient(closest-side, #000 50%, transparent 100%);
  animation: spin 48s linear infinite;
}
.sun::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FFF1A8, var(--sun) 55%, #F5AE14);
  box-shadow: inset 0 -6px 0 rgba(224, 142, 12, 0.35), 0 0 40px rgba(255, 208, 42, 0.5);
}
.pip { position: relative; z-index: 1; width: 100%; aspect-ratio: 1; border-radius: 40%; animation: bob 3.2s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.pip svg { width: 100%; height: 100%; transform-origin: 50% 90%; }
.pip[role="button"] { cursor: pointer; }
.pip .eyes { transform-box: fill-box; transform-origin: 50% 70%; animation: blink 5s ease-in-out 1.2s infinite; }
.pip .wing-l, .pip .wing-r { transform-box: fill-box; transform-origin: 50% 10%; animation: flap 3.2s ease-in-out infinite; }
.pip .wing-r { animation-name: flap-r; }
.spark {
  position: absolute; z-index: 2; width: 22px; height: 22px; background: var(--white); pointer-events: none;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle 2.6s ease-in-out infinite;
}
.spark.s1 { top: 30%; inset-inline-start: 4%; }
.spark.s2 { top: 4%; inset-inline-end: 34%; width: 14px; height: 14px; animation-delay: 0.9s; background: #FFF1A8; }
.spark.s3 { bottom: 24%; inset-inline-end: 2%; width: 18px; height: 18px; animation-delay: 1.7s; }
.bubble {
  position: absolute; z-index: 3; top: 2%; inset-inline-start: 0; margin: 0; max-width: 64%;
  background: var(--white); border-radius: 22px; padding: 8px 16px 11px;
  font: 600 1.15rem/1.25 var(--font-kid); box-shadow: inset 0 -4px 0 var(--white-deep), var(--drop);
  transform-origin: 80% 100%; animation: pop-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}
.bubble::after {
  content: ""; position: absolute; bottom: -11px; inset-inline-end: 24px; width: 22px; height: 14px;
  background: var(--white); clip-path: polygon(0 0, 100% 0, 75% 100%);
}
[dir="rtl"] .bubble { transform-origin: 20% 100%; }
[dir="rtl"] .bubble::after { clip-path: polygon(0 0, 100% 0, 25% 100%); }
.cloud.c1 { animation: drift 26s ease-in-out infinite alternate; }
.cloud.c2 { animation: drift 19s ease-in-out infinite alternate-reverse; }
@media (max-width: 760px) { .bubble { font-size: 1rem; inset-inline-start: -16%; max-width: none; white-space: nowrap; } }

@keyframes bob { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(0.2); } }
@keyframes flap { 50% { transform: rotate(10deg); } }
@keyframes flap-r { 50% { transform: rotate(-10deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(0.3) rotate(0); opacity: 0; } 45% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes pop-in { from { transform: scale(0.2); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(60px); } }
@keyframes wiggle { 25% { transform: rotate(-8deg) scale(1.06); } 50% { transform: rotate(6deg) scale(1.06); } 75% { transform: rotate(-3deg); } }

/* ---------- Hover (real pointers only, so touch never gets a "stuck" hover) ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-3px); }
  .btn:active { transform: translateY(4px) scale(1.03, 0.93); }
  .game { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .game:hover { transform: translateY(-5px); }
  .game:hover img { animation: wiggle 0.6s ease-in-out; }
  .snd:hover { transform: translateY(-2px); }
}

/* ---------- Screenshot carousel: gentle scale toward the centre (scroll-driven, no JS) ---------- */
@supports (animation-timeline: view()) {
  .shots li { animation: shot-focus linear both; animation-timeline: view(inline); }
  @keyframes shot-focus { 0%, 100% { transform: scale(0.9); opacity: 0.8; } 35%, 65% { transform: scale(1); opacity: 1; } }
}

/* ---------- Scroll reveal: site.js adds .rv only to items below the fold, so no-JS shows everything ---------- */
.rv-t { transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0ms); }
.rv { opacity: 0; transform: translateY(28px) scale(0.98); }

/* ---------- Confetti (made by site.js on the main button) ---------- */
.confetti { position: fixed; z-index: 90; top: 0; left: 0; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; }

/* ---------- Urdu pages (ur/, dir="rtl"): self-hosted Nastaliq subset, only ever requested by Urdu pages.
   Nastaliq needs room above and below each line. ---------- */
@font-face {
  font-family: "Pip Nastaliq"; font-weight: 400; font-display: swap;
  src: url("fonts/noto-nastaliq-urdu-400.woff") format("woff");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC;
}
html[lang="ur"] body { font-family: "Pip Nastaliq", var(--font-body); line-height: 2.2; font-size: 1.125rem; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3, html[lang="ur"] .brand, html[lang="ur"] .btn, html[lang="ur"] .faq summary, html[lang="ur"] .bubble,
html[lang="ur"] .lang .word, html[lang="ur"] .lang-switch [lang="ur"], html[lang="ur"] .todo strong:first-child {
  font-family: "Pip Nastaliq", var(--font-kid); font-weight: 400;
}
html[lang="ur"] h1 { line-height: 1.9; font-size: clamp(1.9rem, 5.6vw, 3rem); }
html[lang="ur"] h2 { line-height: 1.9; font-size: clamp(1.6rem, 4.2vw, 2.2rem); }
html[lang="ur"] h3 { line-height: 1.9; font-size: 1.2rem; }
html[lang="ur"] .brand { font-size: 1.25rem; line-height: 1.8; }
html[lang="ur"] .btn { line-height: 1.9; padding: 6px 26px 12px; font-size: 1.15rem; }
html[lang="ur"] .btn-small { padding: 4px 18px 9px; font-size: 1rem; }
html[lang="ur"] .nav a { line-height: 1.9; padding-block: 4px 6px; }
html[lang="ur"] .faq summary { line-height: 1.9; padding-block: 12px 14px; }
html[lang="ur"] .bubble { line-height: 1.9; padding: 4px 16px 10px; font-size: 1.1rem; }
html[lang="ur"] .chip, html[lang="ur"] .badges li, html[lang="ur"] .status, html[lang="ur"] .pro-tag, html[lang="ur"] .eyebrow { line-height: 2; }
html[lang="ur"] .lang .word { line-height: 2.2; }
html[lang="ur"] .doc h2 { font-size: 1.45rem; }
html[lang="ur"] .lede { font-size: 1.15rem; }
html[lang="ur"] .section-head p { font-size: 1.08rem; }
html[lang="ur"] .skip { line-height: 2; }
@media (max-width: 420px) { html[lang="ur"] .eyebrow { font-size: 0.9rem; } }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Reduced motion: everything static and fully visible ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .skip, .sun, .spark, .bubble { display: none; }
  .rv { opacity: 1; transform: none; }
  body { background: #fff; }
}
