/* let's goo! home page. Colours from apps/mobile/lib/core/theme/lite_tokens.dart
   and the festive backdrop of lib/core/widgets/lite_backdrop.dart. No external
   fonts: the platform face, like the app. */

:root {
  --bg: #FFFAF4;
  --surface: #FFFFFF;
  --ink: #241A17;
  --mut: #6E5F58;
  --body: #52433E;
  --accent: #C93B2E;
  --accent-deep: #A8261C;
  --accent-soft: #FFE8DE;
  --line: #F0E0D3;
  --quiet: #FDF3EA;
  --sunny: #FFD257;
  --ice: #FFF1CC;
  --green-soft: #E2F6EC;
  --green: #12704C;
  --lid: #F2A18F;
  --shadow: 0 16px 36px rgba(122, 46, 18, .11);
  --shadow-soft: 0 6px 18px rgba(122, 46, 18, .07);
  --radius: 28px;
  --face: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", "Noto Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--face);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(180deg, #FFE2CC 0, #FFEBE8 900px, #FFF1CC 1900px, var(--bg) 2600px);
  overflow-x: hidden;
}

img, video, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--accent-deep); }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- festive backdrop ---------- */
.backdrop { position: absolute; inset: 0 0 auto 0; height: 2600px; overflow: hidden; pointer-events: none; z-index: 0; }
.blot { position: absolute; opacity: .3; }
.blot-1 { width: 300px; left: -90px; top: -40px; fill: #FF6B57; }
.blot-2 { width: 240px; right: -90px; top: 260px; fill: #FFB81F; }
.blot-3 { width: 220px; left: -110px; top: 900px; fill: #2FBF8F; }
.blot-4 { width: 260px; right: -120px; top: 1250px; fill: #F0558E; }
.blot-5 { width: 250px; left: -100px; top: 1750px; fill: #9B7BFF; }
.blot-6 { width: 280px; right: -110px; top: 2150px; fill: #35AEE8; }
.confetti {
  position: absolute; inset: 0 0 auto 0; height: 420px;
  background-image:
    radial-gradient(circle, rgba(232, 96, 76, .32) 3px, transparent 3.5px),
    radial-gradient(circle, rgba(242, 168, 29, .32) 3.5px, transparent 4px),
    radial-gradient(circle, rgba(232, 92, 138, .3) 2.5px, transparent 3px),
    radial-gradient(circle, rgba(47, 163, 124, .28) 3px, transparent 3.5px),
    linear-gradient(35deg, transparent 46%, rgba(232, 96, 76, .28) 46%, rgba(232, 96, 76, .28) 54%, transparent 54%),
    linear-gradient(-50deg, transparent 46%, rgba(242, 168, 29, .3) 46%, rgba(242, 168, 29, .3) 54%, transparent 54%);
  background-size: 173px 151px, 211px 187px, 149px 223px, 257px 131px, 23px 9px, 21px 8px;
  background-position: 12px 18px, 90px 64px, 40px 110px, 150px 30px, 0 0, 0 0;
  background-repeat: repeat, repeat, repeat, repeat, no-repeat, no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, transparent 100%);
}

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 16px 20px;
}
.brand { text-decoration: none; color: var(--ink); }
.lang { display: inline-flex; margin-inline-start: auto;background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 4px; box-shadow: var(--shadow-soft); }
.lang-btn {
  font: inherit; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
  min-width: 48px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--mut); cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"]:hover { color: #fff; }

/* ---------- the wordmark: "let's g" + eyes + "!" ---------- */
.wordmark {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-weight: 800; letter-spacing: -.045em; color: var(--ink); line-height: 1.1;
}
.wordmark .eyes { height: .66em; width: calc(.66em * 1.92); margin: .18em .07em 0 .05em; overflow: visible; }
.wordmark .bang { color: var(--accent); }
.wordmark-sm { font-size: 1.6rem; }
.wordmark-xl { font-size: clamp(3.1rem, 14vw, 6.4rem); }

/* the live eyes: entrance, a look around and a blink, once; then they follow the pointer */
.eyes-live { cursor: pointer; }
.eyes-live .eye { transform-box: fill-box; transform-origin: center; }
.eyes-live .pupil { transition: transform .18s ease-out; }
.eyes-live .lid { transform-box: fill-box; }
.eyes-live .lid-top { transform: translateY(0); }
.eyes-live .lid-bottom { transform: translateY(0); }

.play .eye-l { animation: pop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.play .eye-r { animation: pop .55s .12s cubic-bezier(.34, 1.56, .64, 1) both; }
.play .pupil { animation: look 1.5s .55s ease-in-out backwards; }
.play .lid-top { animation: blink-top 1.1s 2.05s ease-in-out backwards; }
.play .lid-bottom { animation: blink-bottom 1.1s 2.05s ease-in-out backwards; }
.play + .bang { display: inline-block; animation: drop .8s .25s cubic-bezier(.3, 1.6, .5, 1) both; }

.wink .eye-r .lid-top { animation: blink-top .9s ease-in-out both; }
.wink .eye-r .lid-bottom { animation: blink-bottom .9s ease-in-out both; }

@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes look {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-14px, 0); }
  60% { transform: translate(10px, 2px); }
}
@keyframes blink-top {
  0%, 100% { transform: translateY(0); }
  18%, 32% { transform: translateY(43px); }
  50% { transform: translateY(0); }
  68%, 80% { transform: translateY(43px); }
}
@keyframes blink-bottom {
  0%, 100% { transform: translateY(0); }
  18%, 32% { transform: translateY(-43px); }
  50% { transform: translateY(0); }
  68%, 80% { transform: translateY(-43px); }
}
@keyframes drop { 0% { transform: translateY(-.6em); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

/* ---------- layout ---------- */
main { position: relative; z-index: 1; }
.section { max-width: 1120px; margin: 0 auto; padding: 64px 20px; }
.section-title {
  font-size: clamp(1.9rem, 6vw, 2.9rem); line-height: 1.12; letter-spacing: -.03em;
  font-weight: 800; margin: 0 0 12px; text-align: center; text-wrap: balance;
}
.section-lede { text-align: center; color: var(--body); max-width: 40rem; margin: 0 auto 32px; }
.muted { color: var(--mut); }

/* ---------- hero ---------- */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 24px 20px 56px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center;
}
.sticker {
  display: inline-block; margin: 0 0 10px; padding: 6px 16px;
  background: var(--sunny); color: var(--ink); font-weight: 800; border-radius: 999px;
  transform: rotate(-3deg); box-shadow: var(--shadow-soft);
}
.hero-logo { margin: 0; font-size: 1rem; }
.tagline { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 10px; line-height: 1.2; }
.lede { color: var(--body); font-size: 1.15rem; max-width: 34rem; margin: 0 0 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { color: var(--body); font-size: .95rem; margin: 16px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 22px rgba(201, 59, 46, .28); }
.btn-primary:hover { color: #fff; background: var(--accent-deep); }
.btn-ghost { background: rgba(255, 255, 255, .9); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

.hero-phone { position: relative; display: flex; justify-content: center; padding: 10px 0; }
.bubble {
  position: absolute; padding: 10px 16px; border-radius: 20px; font-weight: 800; font-size: .98rem;
  box-shadow: var(--shadow); white-space: nowrap;
}
.bubble-1 { inset-inline-start: 0; top: 18%; background: var(--ink); color: #fff; border-end-start-radius: 6px; transform: rotate(-4deg); }
.bubble-2 { inset-inline-end: 0; bottom: 16%; background: #fff; color: var(--ink); border-end-end-radius: 6px; transform: rotate(3deg); }

/* ---------- phone frames ---------- */
.phone {
  position: relative; margin: 0; width: 240px; max-width: 100%;
  padding: 28px 10px 12px; border-radius: 38px; background: var(--ink);
  box-shadow: var(--shadow), inset 0 0 0 2px #4a3a35;
}
.phone::before {
  content: ""; position: absolute; top: 9px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: #3a2c28; z-index: 1;
}
.phone img, .phone video { width: 100%; border-radius: 12px 12px 28px 28px; background: var(--bg); aspect-ratio: 600 / 1250; object-fit: cover; }
.phone-lg { width: 280px; }
.tilt-right { transform: rotate(3deg); }
.phone figcaption {
  position: absolute; left: 50%; bottom: -54px; transform: translateX(-50%);
  width: max-content; max-width: 260px; text-align: center; font-weight: 700; color: var(--ink); line-height: 1.3;
}

/* ---------- how ---------- */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step, .feature {
  background: rgba(255, 255, 255, .92); border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow-soft); border: 1px solid var(--line);
}
.step h3, .feature h3 { margin: 14px 0 6px; font-size: 1.3rem; letter-spacing: -.01em; }
.step p, .feature p { margin: 0; color: var(--body); }
.step-icon, .feature-icon {
  display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; font-size: 32px; line-height: 1;
}
.feature-icon { width: 52px; height: 52px; font-size: 28px; border-radius: 17px; }
.tint-red { background: #FFE1D6; }
.tint-green { background: #D9F2E6; }
.tint-blue { background: #DCEBFF; }
.tint-sun { background: #FFEDC2; }
.tint-ice { background: var(--ice); }
.step:nth-child(2) { transform: rotate(-1deg); }
.step:nth-child(3) { transform: rotate(1deg); }

/* ---------- features ---------- */
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------- screenshots ---------- */
.gallery {
  list-style: none; margin: 0 -20px; padding: 12px 20px 80px;
  display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px;
  -webkit-overflow-scrolling: touch;
}
.gallery li { flex: 0 0 auto; scroll-snap-align: start; padding-bottom: 6px; }
.gallery li:nth-child(odd) .phone { transform: rotate(-1.5deg); }
.gallery li:nth-child(even) .phone { transform: rotate(1.5deg); }
.gallery:focus-visible { outline-offset: -3px; }
@media (min-width: 1040px) {
  .gallery { flex-wrap: wrap; justify-content: center; overflow: visible; margin: 0; padding: 12px 0 70px; row-gap: 96px; column-gap: 30px; }
}

/* ---------- video ---------- */
.video-wrap { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; max-width: 900px; margin: 24px auto 0; }
.phone-video { width: 270px; }
.phone-video video { height: auto; aspect-ratio: 540 / 1116; display: block; }
.video-desc { background: rgba(255, 255, 255, .92); border-radius: var(--radius); padding: 24px 26px; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.video-desc h3 { margin: 0 0 4px; font-size: 1.3rem; }
.video-desc ol { margin: 12px 0 0; padding-inline-start: 1.3em; color: var(--body); }
.video-desc li { margin: 6px 0; }

/* ---------- download ---------- */
.get-card {
  position: relative; text-align: center; max-width: 720px; margin: 0 auto;
  background: var(--surface); border-radius: 36px; padding: 44px 28px 34px; box-shadow: var(--shadow);
  border: 3px dashed #F3C9B8;
}
.get-card h2 { font-size: clamp(1.8rem, 5.5vw, 2.6rem); letter-spacing: -.03em; line-height: 1.12; margin: 8px 0 12px; text-wrap: balance; }
.get-card p { color: var(--body); max-width: 34rem; margin: 0 auto 22px; }
.get-eyes { font-size: 54px; display: inline-block; }
.get-hint { font-size: .92rem; color: var(--mut) !important; margin-top: 14px !important; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; text-align: center; padding: 30px 20px 48px; color: var(--body); max-width: 760px; margin: 0 auto; }
.footer p { margin: 6px 0; }
.footer-mark { margin-bottom: 10px !important; }
.privacy { font-size: .95rem; color: var(--body); }

/* ---------- confetti burst (button) ---------- */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.burst i {
  position: absolute; width: 10px; height: 5px; border-radius: 2px; opacity: 0;
  animation: fly 1.2s cubic-bezier(.2, .7, .3, 1) forwards;
}
.burst i:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }
@keyframes fly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}

/* ---------- 404 ---------- */
.lost { position: relative; z-index: 1; min-height: 78vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.lost h1 { font-size: clamp(2rem, 7vw, 3.2rem); letter-spacing: -.03em; line-height: 1.1; margin: 20px 0 8px; }
.lost p { color: var(--body); max-width: 30rem; margin: 6px auto; }
.lost .btn { margin-top: 22px; }
.btn-two { flex-direction: column; gap: 0; line-height: 1.25; padding: 10px 28px; }
.btn-two span { font-weight: 600; font-size: .92rem; }
.sad { width: 180px; height: auto; }
.sad .tear { animation: tear 2.4s 1s ease-in both; }
@keyframes tear { 0% { transform: translateY(-6px) scale(0); opacity: 0; } 30% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(26px) scale(1); opacity: 1; } }
.code404 { font-weight: 800; font-size: 1.5rem; color: var(--accent-deep); letter-spacing: .08em; margin: 8px 0 0 !important; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 8px; }
  .lede { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .steps { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .step:nth-child(n) { transform: none; }
  .video-wrap { grid-template-columns: 1fr; justify-items: center; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .section { padding: 48px 16px; }
  .topbar { padding: 12px 16px; }
  .hero { padding: 8px 16px 40px; }
  .feature-grid { grid-template-columns: 1fr; }
  .phone-lg { width: 230px; }
  .bubble { font-size: .88rem; padding: 8px 12px; }
  .bubble-1 { inset-inline-start: 2px; }
  .bubble-2 { inset-inline-end: 2px; }
  .lang-btn { min-width: 44px; padding: 0 6px; font-size: .88rem; }
  .gallery { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .phone-video { width: min(280px, 100%); }
  .wordmark-sm { font-size: 1.35rem; }
}
@media (max-width: 360px) {
  .btn { padding: 0 18px; width: 100%; }
  .phone-lg { width: 200px; }
  .gallery .phone { width: 210px; }
  .bubble-2 { display: none; }
}

/* ---------- reduced motion: everything still ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover { transform: none; }
  .burst { display: none; }
}

/* the 404 page is short: keep the backdrop to the screen */
html { background: var(--bg); }
.page-404 { min-height: 100vh; position: relative; overflow: hidden; }
.page-404 .backdrop { height: 100%; }

/* ---------- Google Play button (drawn here, no badge image) ---------- */
.play-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding-block: 8px; padding-inline: 18px 24px;
  border-radius: 16px; background: var(--ink); color: #fff; text-decoration: none;
  box-shadow: 0 10px 22px rgba(36, 26, 23, .25); transition: transform .15s ease, background .15s ease;
}
.play-btn:hover { color: #fff; background: #000; transform: translateY(-2px); }
.play-icon { width: 26px; height: 26px; flex: none; fill: var(--sunny); }
.play-text { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.play-small { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.play-big { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.play-btn-lg { min-height: 64px; padding-block: 10px; padding-inline: 22px 30px; }
.play-btn-lg .play-big { font-size: 1.5rem; }
@media (max-width: 360px) { .play-btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .play-btn:hover { transform: none; } }

/* ---------- right to left (Arabic) ---------- */
/* letter spacing breaks the joined letters; the wordmark stays left to right (dir="ltr") */
[dir="rtl"] body { line-height: 1.7; }
[dir="rtl"] :is(.section-title, .tagline, .step h3, .feature h3, .get-card h2, .play-small, .play-big, .lang-btn) { letter-spacing: 0; }

/* ---------- 404: the other languages ---------- */
.lost-langs { list-style: none; padding: 0; margin: 28px auto 0; max-width: 34rem; }
.lost-langs li { padding: 10px 0; border-top: 1px solid var(--line); }
.lost-langs p { margin: 0 auto; }
.lost-langs a { display: inline-block; padding: 4px 0; font-weight: 800; }
