/* Emojy landing page. Colors mirror apps/mobile/lib/theme/emojy_palette.dart. */
:root {
  color-scheme: light;
  --bg: #eef7ff;
  --bg-top: #c4e4ff;          /* sky100 */
  --ink: #131a5c;             /* navy900 */
  --ink-soft: #3a4a9e;        /* ink600 */
  --dim: rgba(19, 26, 92, .16);
  --glass: rgba(255, 255, 255, .62);
  --glass-line: rgba(255, 255, 255, .8);
  --card: #8cc8ff;            /* sky300 */
  --bezel: #0b0f3a;           /* ink950 */
  --shadow: 0 30px 60px -20px rgba(31, 42, 128, .35);

  --green-top: #b4f02a; --green-bottom: #3fb51a; --green-edge: #237a0e; --green-stroke: #1a5c0a;
  --blue-top: #2ce6ff;  --blue-bottom: #1172f2;  --blue-edge: #0b48b0;
  --yellow-top: #ffe53a; --yellow-bottom: #ff9c0a; --yellow-edge: #c96a00;
  --pink-top: #f59cff;  --pink-bottom: #b91eeb;  --pink-edge: #7a0fa8;
  --grape-top: #a77bff; --grape-bottom: #7b3ff0; --grape-edge: #4f1fb0;

  --display: "Luckiest Guy", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1243;            /* navy950 */
    --bg-top: #1f2a80;        /* navy700 */
    --ink: #ffffff;
    --ink-soft: #c3cAf5;      /* lavender200 */
    --dim: rgba(255, 255, 255, .16);
    --glass: rgba(19, 26, 92, .6);
    --glass-line: rgba(255, 255, 255, .12);
    --card: #1f2a80;
    --bezel: #05072a;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1243; --bg-top: #1f2a80; --ink: #ffffff; --ink-soft: #c3caf5;
  --dim: rgba(255, 255, 255, .16); --glass: rgba(19, 26, 92, .6); --glass-line: rgba(255, 255, 255, .12);
  --card: #1f2a80; --bezel: #05072a; --shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 820px) var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- Glossy buttons (same recipe as the app's 3D buttons) ---------- */
.btn {
  --top: var(--green-top); --bottom: var(--green-bottom); --edge: var(--green-edge);
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 26px 10px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--top), var(--bottom));
  box-shadow: 0 6px 0 var(--edge), 0 14px 24px -8px rgba(11, 15, 58, .45), inset 0 2px 0 rgba(255, 255, 255, .45);
  color: #fff; text-decoration: none;
  font: 22px/1 var(--display); letter-spacing: .02em; text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
/* The two little shine marks in the top-left corner of every app button. */
.btn::before, .btn::after {
  content: ""; position: absolute; top: 7px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .85);
}
.btn::before { left: 12px; width: 16px; }
.btn::after { left: 32px; width: 6px; }
a.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--edge), 0 18px 28px -8px rgba(11, 15, 58, .5), inset 0 2px 0 rgba(255, 255, 255, .45); }
a.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--edge), 0 6px 12px -6px rgba(11, 15, 58, .5), inset 0 2px 0 rgba(255, 255, 255, .45); }
a.btn:focus-visible { outline: 3px solid var(--blue-top); outline-offset: 4px; }
.btn svg { width: 26px; height: 26px; fill: currentColor; flex: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }
.btn > span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.btn small { font: 700 11px/1 var(--text); letter-spacing: .06em; opacity: .9; text-shadow: none; }
.btn--ink { --top: var(--grape-top); --bottom: var(--grape-bottom); --edge: var(--grape-edge); }
.btn--blue { --top: var(--blue-top); --bottom: var(--blue-bottom); --edge: var(--blue-edge); }
.btn.is-soon { cursor: default; }
.btn--sm { min-height: 42px; padding: 8px 18px; font-size: 17px; border-radius: 14px; box-shadow: 0 4px 0 var(--edge), inset 0 2px 0 rgba(255, 255, 255, .45); }
.btn--sm::before { top: 5px; left: 9px; width: 11px; height: 4px; }
.btn--sm::after { top: 5px; left: 23px; width: 4px; height: 4px; }

.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }

/* ---------- Floating pill nav ---------- */
.nav {
  position: fixed; z-index: 50; top: 12px; left: 50%;
  width: min(1080px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: 0 10px 30px -12px rgba(31, 42, 128, .35);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  transform: translate(-50%, -160%); opacity: 0;
  transition: transform .55s cubic-bezier(.2, .9, .25, 1.15), opacity .3s ease;
}
.nav.is-shown { transform: translate(-50%, 0); opacity: 1; }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 22px/1 var(--display); letter-spacing: .03em; padding-top: 2px; }
.nav__brand img { width: 36px; height: 36px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 96px 16px 64px;
  text-align: center;
}
.hero__eyebrow { margin: 0 0 18px; font: 800 18px/1.2 var(--text); color: var(--ink-soft); letter-spacing: .01em; }
.hero__title {
  margin: 0 0 40px;
  font: 400 clamp(38px, 7.6vw, 104px)/1.08 var(--display);
  text-transform: uppercase; letter-spacing: .005em;
}
.hero__title .line { display: block; white-space: nowrap; }

/* Inline emoji tiles, styled like the app's letter tiles. */
.tile {
  --top: var(--yellow-top); --bottom: var(--yellow-bottom); --edge: var(--yellow-edge);
  position: relative; display: inline-grid; place-items: center;
  /* font-size sets the emoji; the tile is ~1em of the headline around it. */
  font: normal .62em/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  width: 1.58em; height: 1.58em; margin: 0 .06em; vertical-align: .02em;
  border-radius: .38em;
  background: linear-gradient(180deg, var(--top), var(--bottom));
  box-shadow: 0 .11em 0 var(--edge), 0 .26em .36em -.13em rgba(11, 15, 58, .35), inset 0 .05em 0 rgba(255, 255, 255, .5);
}
.tile::before { content: ""; position: absolute; top: .13em; left: .16em; width: .29em; height: .1em; border-radius: 1em; background: rgba(255, 255, 255, .85); }
.tile--blue { --top: var(--blue-top); --bottom: var(--blue-bottom); --edge: var(--blue-edge); }
.tile--pink { --top: var(--pink-top); --bottom: var(--pink-bottom); --edge: var(--pink-edge); }

/* Laurel badges under the hero buttons. */
.laurels { list-style: none; margin: 44px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
.laurels li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 34px; color: var(--ink-soft); opacity: .75; }
.laurels small { font: 700 12px/1.3 var(--text); }
.laurels b { font: 400 20px/1.15 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.laurel {
  position: absolute; left: 0; top: 50%; width: 24px; height: 48px; transform: translateY(-50%);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 48'%3E%3Cpath d='M19 46C8 38 4 24 11 3' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3Cg fill='%23000'%3E%3Cellipse cx='8' cy='38' rx='5' ry='2.2' transform='rotate(-35 8 38)'/%3E%3Cellipse cx='5' cy='29' rx='5' ry='2.2' transform='rotate(-60 5 29)'/%3E%3Cellipse cx='5' cy='20' rx='5' ry='2.2' transform='rotate(-80 5 20)'/%3E%3Cellipse cx='7' cy='11' rx='4.5' ry='2' transform='rotate(-100 7 11)'/%3E%3Cellipse cx='15' cy='34' rx='4.5' ry='2' transform='rotate(25 15 34)'/%3E%3Cellipse cx='13' cy='24' rx='4.5' ry='2' transform='rotate(5 13 24)'/%3E%3Cellipse cx='14' cy='14' rx='4' ry='1.8' transform='rotate(-15 14 14)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 48'%3E%3Cpath d='M19 46C8 38 4 24 11 3' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3Cg fill='%23000'%3E%3Cellipse cx='8' cy='38' rx='5' ry='2.2' transform='rotate(-35 8 38)'/%3E%3Cellipse cx='5' cy='29' rx='5' ry='2.2' transform='rotate(-60 5 29)'/%3E%3Cellipse cx='5' cy='20' rx='5' ry='2.2' transform='rotate(-80 5 20)'/%3E%3Cellipse cx='7' cy='11' rx='4.5' ry='2' transform='rotate(-100 7 11)'/%3E%3Cellipse cx='15' cy='34' rx='4.5' ry='2' transform='rotate(25 15 34)'/%3E%3Cellipse cx='13' cy='24' rx='4.5' ry='2' transform='rotate(5 13 24)'/%3E%3Cellipse cx='14' cy='14' rx='4' ry='1.8' transform='rotate(-15 14 14)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.laurel--r { left: auto; right: 0; transform: translateY(-50%) scaleX(-1); }

/* ---------- Entrance animation ---------- */
[data-rise] { opacity: 0; transform: translateY(28px); filter: blur(6px); }
[data-rise].is-in {
  opacity: 1; transform: none; filter: none;
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .9, .25, 1), filter .8s ease;
  transition-delay: var(--delay, 0s);
}
.hero .tile { transform: scale(0) rotate(-20deg); }
.hero .is-in .tile { animation: tile-pop .7s cubic-bezier(.3, 1.6, .5, 1) forwards, tile-bob 4s ease-in-out infinite; animation-delay: calc(var(--delay, 0s) + .35s), calc(var(--delay, 0s) + 1.1s); }
@keyframes tile-pop { to { transform: scale(1) rotate(0); } }
@keyframes tile-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-.06em) rotate(4deg); } }

/* ---------- Phone mockup ---------- */
.phone {
  width: min(340px, 68vw);
  padding: 10px;
  border-radius: 54px;
  background: var(--bezel);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .08) inset, 0 40px 80px -30px rgba(11, 15, 58, .7);
}
.phone img { width: 100%; border-radius: 44px; }
.phone--sm { width: 100%; padding: 6px; border-radius: 32px; }
.phone--sm img { border-radius: 26px; }

/* ---------- Stage: rounded card, phone rises while you scroll ---------- */
.stage { padding: 0 16px; }
.stage__card {
  --p: 0; --enter: 0;
  position: relative; overflow: hidden; isolation: isolate;
  max-width: 1120px; height: min(92svh, 880px); margin: 0 auto;
  border-radius: clamp(28px, 4vw, 48px);
  background: var(--card);
  box-shadow: var(--shadow);
  transform: scale(calc(.92 + .08 * var(--enter)));
  will-change: transform;
}
.stage__bg { position: absolute; inset: 0; width: 100%; height: 120%; object-fit: cover; z-index: -1; transform: translateY(calc(var(--p) * -12%)); }
.stage__card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(196, 228, 255, .0) 40%, rgba(13, 18, 67, .25)); }
.stage .phone {
  position: absolute; left: 50%; top: 8%;
  transform: translate(-50%, calc((.55 - var(--p)) * 55%));
  will-change: transform;
}
.float {
  --s: 0;
  position: absolute; z-index: 0;
  display: grid; place-items: center;
  width: clamp(56px, 8vw, 88px); height: clamp(56px, 8vw, 88px);
  border-radius: 26%;
  font-size: clamp(30px, 4.4vw, 48px); line-height: 1;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 16px 30px -14px rgba(11, 15, 58, .5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transform: translateY(calc(var(--p) * var(--s) * 420px)) rotate(var(--r, 0deg));
  will-change: transform;
}
.f1 { left: 10%; top: 18%; --r: -10deg; }
.f2 { left: 20%; top: 58%; --r: 8deg; }
.f3 { right: 12%; top: 22%; --r: 12deg; }
.f4 { right: 19%; top: 62%; --r: -8deg; }
.f5 { left: 4%; top: 86%; --r: 6deg; }
.f6 { right: 5%; top: 90%; --r: -12deg; }

/* ---------- Statements: words fill in as you scroll ---------- */
.statement { padding: clamp(96px, 18vh, 200px) 16px; }
.statement p {
  max-width: 1040px; margin: 0 auto;
  font: 400 clamp(30px, 5.2vw, 66px)/1.12 var(--display);
  text-transform: uppercase; text-align: center; letter-spacing: .005em;
  text-wrap: balance;
}
.statement .w { color: var(--dim); transition: color .35s ease; }
.statement .w.is-on { color: var(--ink); }

/* ---------- Three-screen fan ---------- */
.trio {
  --t: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); justify-content: center; align-items: center;
  gap: clamp(12px, 3vw, 40px);
  padding: 24px 16px 0;
}
.trio__item { margin: 0; text-align: center; will-change: transform; }
.trio__item figcaption { margin-top: 18px; font: 400 clamp(15px, 2vw, 22px)/1.1 var(--display); text-transform: uppercase; color: var(--ink-soft); opacity: calc(var(--t) * 1.4 - .3); }
.trio__item--l { transform: translateX(calc((1 - var(--t)) * 70%)) rotate(calc((1 - var(--t)) * -10deg)) scale(.9); }
.trio__item--c { transform: translateY(calc((1 - var(--t)) * 60px)) scale(calc(.94 + .1 * var(--t))); position: relative; z-index: 1; }
.trio__item--r { transform: translateX(calc((1 - var(--t)) * -70%)) rotate(calc((1 - var(--t)) * 10deg)) scale(.9); }

/* ---------- Closing CTA + footer ---------- */
.closing { padding: 40px 16px clamp(120px, 20vh, 200px); text-align: center; }
.closing h2 { margin: 0 auto 40px; max-width: 900px; font: 400 clamp(34px, 6vw, 76px)/1.08 var(--display); text-transform: uppercase; text-wrap: balance; }
.footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 16px 56px; color: var(--ink-soft); font-size: 14px; text-align: center; }
.footer img { width: 40px; height: 40px; border-radius: 11px; opacity: .85; }
.footer nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-weight: 600; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer p { margin: 0; opacity: .7; font-size: 13px; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .hero { padding-top: 80px; }
  .hero__title { font-size: clamp(30px, 9.4vw, 60px); }
  .btn { min-height: 54px; font-size: 19px; padding: 9px 20px 9px 16px; }
  .stores { gap: 14px; }
  .stores .btn { min-width: 236px; }
  .stage .phone { width: 58vw; }
  .float { width: 52px; height: 52px; font-size: 28px; }
  .laurels { gap: 12px 8px; }
  .laurels li { padding: 0 28px; }
  .laurels b { font-size: 16px; }
  .stage__card { height: min(84svh, 720px); }
  .stage .phone { top: 10%; }
  .f1 { left: 4%; top: 10%; } .f3 { right: 4%; top: 14%; }
  .f2 { left: 3%; top: 52%; } .f4 { right: 3%; top: 58%; }
  .f5, .f6 { display: none; }
  .trio { gap: 8px; }
  .phone--sm { padding: 4px; border-radius: 18px; }
  .phone--sm img { border-radius: 15px; }
}

/* ---------- Reduced motion: everything visible, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-rise] { opacity: 1; transform: none; filter: none; }
  .hero .tile { transform: none; animation: none !important; }
  .nav { transition: opacity .2s ease; }
  .stage__card, .stage__bg, .float, .trio__item { transform: none !important; }
  .stage .phone { transform: translate(-50%, 0) !important; }
  .trio__item figcaption { opacity: 1; }
  .statement .w { color: var(--ink); transition: none; }
}
