/* eMeterVN : landing page
   Tokens follow the app's "Sương Mai" theme (lib/core/ui/app_theme.dart).
   One motif: the mascot's own drop silhouette (#drop-clip), used at every scale. */

@font-face { font-family: "Lexend"; src: url("fonts/Lexend-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  /* app ground and surfaces */
  --ground: #ECEFF3;
  --surface: #FFFFFF;
  --surface-alt: #F4F6F9;
  --field: #F1F3F6;
  --line: #E1E5EB;
  --ink: #111418;
  --ink-soft: #2A3038;
  --muted: #626A75;
  --muted-soft: #737B86;
  /* the drop (mascot body, flat) */
  --drop: #45A6FE;
  --drop-deep: #2A84FE;
  --ocean: #0F3E7C;      /* deep water: the calm blue of the panels */
  /* app accent dots */
  --yellow: #FFD84D;
  --cyan: #43C2E8;
  --green: #34B87A;
  --coral: #FF7C69;
  --ok-bg: #DCF4E8; --ok-fg: #0B6B3A;
  --warn-bg: #FFF2C7; --warn-fg: #7A4B00;
  --edit-bg: #FFE6E1; --edit-fg: #9A2F1F;
  --meter-red: #C62828; --meter-black: #0F1114; --crop-bg: #15191E; --detect: #6CF0A8;

  --radius: 28px;
  --m: clamp(32px, 5.2vw, 84px);
  --gap-section: clamp(120px, 14vw, 200px);

  /* five type steps */
  --t-display: clamp(46px, 6vw, 100px);
  --t-h2: clamp(36px, 4.2vw, 68px);
  --t-lead: clamp(20px, 1.55vw, 24px);
  --t-body: 18px;
  --t-small: 15px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Lexend", system-ui, sans-serif;
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.5;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--drop); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-ink :focus-visible { outline-color: var(--yellow); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display { font-size: var(--t-display); font-weight: 500; line-height: .98; letter-spacing: -.035em; }
.h2 { font-size: var(--t-h2); font-weight: 500; line-height: 1.02; letter-spacing: -.03em; }
.lead { font-size: var(--t-lead); line-height: 1.4; letter-spacing: -.01em; }
.small { font-size: var(--t-small); line-height: 1.45; }
.measure { max-width: 40ch; }

/* ---------- buttons: one shape, the app's stadium ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 24px 0 18px;
  border-radius: 999px; border: 0;
  background: var(--ink); color: #fff;
  font-size: var(--t-body); font-weight: 500; text-decoration: none; line-height: 1.1;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--ink-soft); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--light { background: var(--surface); color: var(--ink); }
.btn--light:hover { background: var(--yellow); }
.btn--drop { background: var(--drop); color: var(--ink); }
.btn--drop:hover { background: var(--yellow); }
.btn small { display: block; font-size: var(--t-small); font-weight: 400; opacity: .8; }
.btn .store { width: 26px; height: 26px; flex: none; }
.btn .store-txt { display: flex; flex-direction: column; text-align: left; }
.btn--sm { min-height: 44px; padding: 0 20px; white-space: nowrap; font-size: var(--t-small); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- navigation ---------- */
.nav {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px var(--m) 0;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: var(--t-lead); font-weight: 600; letter-spacing: -.04em; }
.wordmark .mascot { width: 44px; height: 44px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: var(--t-small); }
.nav-links a:not(.btn) { text-decoration: none; position: relative; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 3px;
  background: var(--drop); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }

/* ---------- motif ---------- */
.drop { clip-path: url(#drop-clip); }
.drop-shape { aspect-ratio: .8204; }

/* ---------- mascot ---------- */
.mascot { display: block; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mascot svg { width: 100%; height: 100%; overflow: visible; }
.mascot .m-all { transform-box: fill-box; transform-origin: 50% 100%; animation: m-bob 3.6s ease-in-out infinite; }
.mascot .m-face { transition: transform .35s var(--ease); }
.mascot .m-eye { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .09s ease-out; }
.mascot.is-blink .m-eye { transform: scaleY(.1); }
.mascot .m-happy { opacity: 0; transition: opacity .15s; }
.mascot .m-mouth { transform-box: fill-box; transform-origin: 50% 0; transition: transform .3s var(--ease-spring); }
.mascot .m-o { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(.2); transition: opacity .15s, transform .3s var(--ease-spring); }
.mascot.is-happy .m-eye { opacity: 0; }
.mascot.is-happy .m-happy { opacity: 1; }
.mascot.is-happy .m-mouth { transform: scale(1.25, 1.35); }
.mascot.is-wow .m-mouth { opacity: 0; }
.mascot.is-wow .m-o { opacity: 1; transform: scale(1); }
.mascot.is-jump .m-all { animation: m-jump .9s var(--ease) 1; }
.mascot .m-sp { transform-box: fill-box; transform-origin: 0% 100%; animation: m-splash 2.4s var(--ease) infinite; }
.mascot .m-sp1 { animation-delay: .18s; }
.mascot .m-sp2 { animation-delay: .36s; }
.mascot.is-jump .m-sp { animation: m-burst .9s var(--ease) 1; }
.mascot.is-wave .m-all { animation: m-wave 1.4s ease-in-out infinite; }

@keyframes m-bob {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-10px) scale(.985, 1.02); }
}
@keyframes m-jump {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(0) scale(1.12, .84); }
  45% { transform: translateY(-90px) scale(.92, 1.1) rotate(-6deg); }
  70% { transform: translateY(0) scale(1.1, .9); }
  85% { transform: translateY(-14px) scale(.98, 1.03); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes m-splash {
  0%, 55%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  70% { transform: translate(14px, -10px) scale(1.12); opacity: .85; }
  85% { transform: translate(-2px, 2px) scale(.94); opacity: 1; }
}
@keyframes m-burst {
  0% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(60px, -60px) scale(1.4) rotate(20deg); opacity: .4; }
  41% { transform: translate(-20px, 20px) scale(.2); opacity: 0; }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes m-wave {
  0%, 100% { transform: rotate(0) translateY(0); }
  25% { transform: rotate(-7deg) translateY(-6px); }
  75% { transform: rotate(7deg) translateY(-6px); }
}

/* ---------- entrance ---------- */
.js [data-rise] > * { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-rise].in > * { opacity: 1; transform: none; }

/* =========================================================
   Layout rule for this page: every object is shown whole.
   Phones are scaled, never cropped; every drop is a complete drop.
   ========================================================= */

/* ---------- iPhone: titanium edge, Dynamic Island, home indicator ---------- */
.phone {
  --bz: calc(11px * var(--s, 1));
  position: relative; box-sizing: content-box;
  width: calc(390px * var(--s, 1)); height: calc(844px * var(--s, 1));
  padding: var(--bz); border-radius: calc(58px * var(--s, 1));
  background: #0B0D10;
  box-shadow: 0 0 0 calc(2.5px * var(--s, 1)) #3A414B, 0 calc(50px * var(--s, 1)) calc(90px * var(--s, 1)) calc(-34px * var(--s, 1)) rgba(17, 20, 24, .5); /* taste-skill-ignore: the phone body is part of the product fragment (marked data-ui in the page) */
}
.phone > .screens, .phone > .a-screen { position: absolute; left: var(--bz) !important; top: var(--bz) !important; transform: scale(var(--s, 1)); transform-origin: 0 0; }
.phone .a-screen { border-radius: 47px; }
.phone::before, .phone::after { content: ""; position: absolute; width: calc(4px * var(--s, 1)); background: #2A2F36; }
.phone::before { left: calc(-5px * var(--s, 1)); top: calc(190px * var(--s, 1)); height: calc(62px * var(--s, 1)); border-radius: 3px 0 0 3px; box-shadow: 0 calc(82px * var(--s, 1)) 0 #2A2F36; } /* taste-skill-ignore: side buttons of the phone body */
.phone::after { right: calc(-5px * var(--s, 1)); top: calc(250px * var(--s, 1)); height: calc(100px * var(--s, 1)); border-radius: 0 3px 3px 0; }
.island {
  position: absolute; z-index: 8; top: calc(var(--bz) + 11px * var(--s, 1)); left: 50%; translate: -50% 0;
  height: calc(35px * var(--s, 1)); width: calc(122px * var(--s, 1)); padding: 0 calc(12px * var(--s, 1));
  display: flex; align-items: center; gap: calc(8px * var(--s, 1));
  border-radius: 99px; background: #000; overflow: hidden;
  transition: width .6s var(--ease-spring);
}
.island .isl-dot { flex: none; width: calc(14px * var(--s, 1)); height: calc(14px * var(--s, 1)); border-radius: 50%; opacity: 0; transition: opacity .25s .15s; }
.island .isl-t { font-style: normal; font-weight: 600; font-size: calc(13px * var(--s, 1)); line-height: 1; color: #fff; white-space: nowrap; opacity: 0; transition: opacity .25s .2s; }
.island[data-state="cam"] { width: calc(140px * var(--s, 1)); }
.island[data-state="cam"] .isl-dot { opacity: 1; margin-left: auto; width: calc(8px * var(--s, 1)); height: calc(8px * var(--s, 1)); background: #34C759; }
.island[data-state="ai"], .island[data-state="done"] { width: calc(172px * var(--s, 1)); }
.island[data-state="ai"] .isl-dot { opacity: 1; border: calc(2.5px * var(--s, 1)) solid var(--detect); border-right-color: transparent; animation: spin .8s linear infinite; }
.island[data-state="done"] .isl-dot { opacity: 1; background: var(--green); }
.island[data-state="ai"] .isl-t, .island[data-state="done"] .isl-t { opacity: 1; }
.home-ind { position: absolute; z-index: 8; bottom: calc(var(--bz) + 8px * var(--s, 1)); left: 50%; translate: -50% 0; width: calc(134px * var(--s, 1)); height: calc(5px * var(--s, 1)); border-radius: 99px; background: var(--ink); transition: background-color .4s; }
.phone[data-dark] .home-ind { background: #fff; }

/* ---------- masked line reveal for headings ---------- */
[data-lines] .ln { display: block; overflow: hidden; padding: .2em .06em .14em 0; margin: -.2em -.06em -.14em 0; }
[data-lines] .ln > span { display: block; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; }
.hero-body {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px;
  min-height: max(calc(100svh - 92px), 800px);
  padding: 8px var(--m) 48px;
}
.hero-copy { position: relative; z-index: 3; }
.hero-copy h1 { max-width: 9.5em; }
.hero-copy p { margin-top: 28px; max-width: 34ch; font-size: var(--t-lead); line-height: 1.45; }
.hero-copy .stores { margin-top: 36px; }
.hero-art { position: relative; width: 600px; height: 780px; }
.hero-drop { position: absolute; left: 20px; top: 0; width: 560px; background: var(--drop); }
.hero-phone { --s: .76; position: absolute; z-index: 2; left: 160px; top: 104px; }
.hero-mascot { position: absolute; z-index: 4; width: 170px; height: 170px; left: -30px; top: 548px; }

/* stacked app screens that crossfade */
.screens { position: relative; width: 390px; height: 844px; }
.screens > .a-screen { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.6s ease, visibility 0s linear 1.6s; }
.screens > .a-screen.is-on { opacity: 1; visibility: visible; transition: opacity 1.6s ease, visibility 0s; }
.no-js .screens > .a-screen:first-child { opacity: 1; visibility: visible; }

/* =========================================================
   SHOWCASE: photo, result, shutter, side by side, on the page ground
   ========================================================= */
/* panels: inset fields with the page's one radius, alternating with the ground */
.panel { position: relative; margin: var(--gap-section) var(--m) 0; padding: 64px; border-radius: var(--radius); }
.panel--ocean { background: var(--ocean); color: #fff; }
.panel--ink { background: var(--ink); color: var(--ground); }
.panel--drop { background: var(--drop); color: var(--ink); }
.panel--ocean :focus-visible, .panel--ink :focus-visible { outline-color: var(--yellow); }

.shutter-sec { overflow: hidden; }
.shutter-sec .copy { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.shutter-sec .copy p { justify-self: end; max-width: 42ch; font-size: var(--t-lead); line-height: 1.45; color: #DCE8F7; }
.swap-word { display: inline-block; }
.swap-word.is-swapping { animation: word-swap .5s var(--ease); }
@keyframes word-swap { 0% { opacity: 1; transform: none; } 45% { opacity: 0; transform: translateY(-14px); } 55% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: none; } }

.shutter-stage { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 48px; margin-top: 48px; }
.shutter-photo { position: relative; margin: 0; font-size: 15px; width: 27.5em; height: 33.5em; overflow: hidden; background: var(--ink); }
.shutter-photo img { position: absolute; max-width: none; width: 81.56em; height: auto; left: -50.19em; top: -19.75em; transition: transform 1.2s var(--ease); }
.shutter-sec.is-done .shutter-photo img { transform: scale(1.04); }
.shutter-photo .a-guide.sg { left: 4.69em; top: 15.63em; width: 18.13em; height: 6.25em; transform: none; }
.shutter-photo .a-guide.sg i { transition: border-color .4s; }
.shutter-sec.is-done .sg i { border-color: var(--detect); }
.shutter-sec.is-done .sg .scan { display: none; }
.photo-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.photo-flash.go { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }

.shutter-result { position: relative; z-index: 3; justify-self: center; width: min(372px, 100%); min-height: 340px; display: flex; flex-direction: column; justify-content: center; }
.shutter-result [hidden] { display: none; }
.shutter-mascot { position: absolute; z-index: 4; width: 116px; height: 116px; right: 6px; top: -78px; opacity: 0; transform: translateY(30px) scale(.6); transition: opacity .4s var(--ease), transform .6s var(--ease-spring); pointer-events: none; }
.shutter-sec.is-done .shutter-mascot { opacity: 1; transform: none; pointer-events: auto; }

/* =========================================================
   HOW IT WORKS: a scroll story along a water pipe
   ========================================================= */
.how { padding: var(--gap-section) var(--m) 0; }
.how-head { max-width: 780px; }
.how-head p { margin-top: 20px; font-size: var(--t-lead); line-height: 1.45; max-width: 40ch; }
.how-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; margin-top: 88px; }
.how-steps { position: relative; padding-left: 96px; }
.how-steps ol { list-style: none; margin: 0; padding: 0; }
.how-step { position: relative; min-height: 74vh; padding-bottom: 48px; }
.how-step:last-child { min-height: 50vh; }
.how-step > p { margin-top: 20px; font-size: var(--t-lead); line-height: 1.45; max-width: 34ch; }
.how-step > h3, .how-step > p { transition: opacity .5s var(--ease), transform .6s var(--ease); }
.js .how-step:not(.is-on) > h3, .js .how-step:not(.is-on) > p { opacity: .28; }
.js .how-step.is-on > h3 { transform: translateX(6px); }
.node {
  position: absolute; z-index: 2; left: -96px; top: 6px; width: 60px; height: 60px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: #DDE3EA; color: var(--muted); cursor: pointer;
  transition: background-color .4s ease, color .4s ease, transform .5s var(--ease);
}
.node .ic { width: 26px; height: 26px; }
.how-step.is-past .node { background: var(--drop); color: #fff; }
.how-step.is-on .node { background: var(--ink); color: #fff; transform: scale(1.12); }
.node::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--drop); opacity: 0; pointer-events: none; }
.how-step.is-on .node::after { animation: ripple 2.4s var(--ease) infinite; }
@media (hover: hover) and (pointer: fine) { .node:hover { transform: scale(1.08); } }

.pipe { position: absolute; left: 24px; width: 12px; top: var(--pipe-top, 36px); height: var(--pipe-h, 0px); border-radius: 12px; background: #DDE3EA; }
.pipe-fill { position: absolute; left: 0; top: 0; width: 100%; height: var(--fill, 0px); border-radius: 12px; background: var(--drop); overflow: hidden; }
.pipe-water { position: absolute; left: -1px; top: -64px; height: calc(100% + 64px); animation: water-flow 1.4s linear infinite; }
@keyframes water-flow { to { transform: translateY(64px); } }
.pipe-rider { position: absolute; z-index: 3; left: 50%; top: var(--fill, 0px); width: 72px; height: 72px; translate: -50% -100%; pointer-events: none; transform-origin: 50% 100%; }

.how-stage { position: relative; }
.how-sticky { position: sticky; top: calc(50vh - 330px); height: 660px; display: grid; place-items: center; }
.how-drop { position: absolute; left: 50%; top: 50%; width: 470px; translate: -50% -50%; background: #CFE6FF; transition: rotate .9s var(--ease), scale .9s var(--ease); }
.how-sticky[data-step="1"] .how-drop { rotate: 7deg; scale: 1.03; }
.how-sticky[data-step="2"] .how-drop { rotate: -6deg; scale: .98; }
.how-sticky[data-step="3"] .how-drop { rotate: 3deg; scale: 1.05; }
.how-frags { --s: .68; z-index: 2; }
.how-frags > .a-screen { opacity: 0; visibility: hidden; transform: translateY(26px) scale(var(--s)); transition: opacity .45s ease, transform .7s var(--ease), visibility 0s linear .45s; }
.how-frags > .a-screen.is-on { opacity: 1; visibility: visible; transform: scale(var(--s)); transition: opacity .45s ease, transform .7s var(--ease), visibility 0s; }
.no-js .how-frags > .a-screen:first-child { opacity: 1; visibility: visible; }
.how-mphone { display: none; }

/* =========================================================
   BAND: the register, while water runs
   ========================================================= */
.band { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 80px; padding: 72px 64px; }
.band-video { position: relative; width: 440px; margin: 0; }
.band-video { overflow: hidden; }
.band-video video { position: absolute; left: 50%; top: 50%; width: 320%; height: auto; max-width: none; transform: translate(-50%, -50%); }
.band-copy { position: relative; z-index: 2; }
.band-copy p { margin-top: 24px; max-width: 38ch; color: var(--ground); }
.band-meter { margin-top: 40px; display: inline-flex; padding: 20px 24px; border-radius: var(--radius); background: var(--surface); }
.band-caption { margin-top: 12px; font-size: var(--t-small); color: #C8D0DA; }

/* =========================================================
   FEATURES: a board of whole, readable app parts
   ========================================================= */
.features { padding: var(--gap-section) var(--m) 0; }
.board {
  display: grid; gap: 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 100px;
  grid-template-areas:
    "hd hd hd hd hd hd gp gp gp od od od"
    "hd hd hd hd hd hd gp gp gp od od od"
    "of of of of of of vo vo vo xl xl xl"
    "of of of of of of vo vo vo xl xl xl"
    "of of of of of of vo vo vo xl xl xl"
    "wk wk wk wk wk wk st st st st st st"
    "wk wk wk wk wk wk st st st st st st"
    "wk wk wk wk wk wk st st st st st st"
    "wk wk wk wk wk wk st st st st st st";
}
.tile { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: var(--radius); background: var(--surface); transition: translate .35s var(--ease); }
@media (hover: hover) and (pointer: fine) { .tile:hover { translate: 0 -4px; } }
.tile .el { margin-block: auto; align-self: center; }
.tile .cap h3 { font-size: var(--t-body); font-weight: 500; line-height: 1.3; }
.tile .cap p { font-size: var(--t-small); line-height: 1.4; margin-top: 2px; }
.t-hd { grid-area: hd; background: var(--ink); color: var(--ground); justify-content: space-between; }
.t-hd .cap-lead { max-width: 36ch; font-size: var(--t-body); }
.t-gp { grid-area: gp; background: var(--cyan); }
.t-od { grid-area: od; background: var(--surface); }
.t-of { grid-area: of; background: var(--yellow); }
.t-vo { grid-area: vo; background: var(--coral); }
.t-xl { grid-area: xl; background: var(--green); }
.t-wk { grid-area: wk; background: var(--surface); }
.t-st { grid-area: st; background: var(--drop); }

/* =========================================================
   ABOUT: two users
   ========================================================= */
.about {
  margin: var(--gap-section) var(--m) 0; padding: 64px; border-radius: var(--radius);
  background: var(--ink); color: var(--ground);
  display: grid; grid-template-columns: minmax(0, 1fr) 460px; grid-template-rows: auto 1fr;
  grid-template-areas: "head photo" "side photo"; gap: 48px 64px;
}
.about-main { display: contents; }
.about-main > div { grid-area: head; }
.about h2 { max-width: 7.5em; }
.about-photo { grid-area: photo; align-self: center; margin: 0; width: 100%; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-side { grid-area: side; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; align-content: start; }
.about-side h3 { font-size: var(--t-lead); font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.about-side p { margin-top: 12px; font-size: var(--t-body); color: var(--ground); }
.about-side .btn { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }

/* =========================================================
   FAQ: the mascot looks into your questions
   ========================================================= */
.faq { overflow-x: clip; padding: var(--gap-section) var(--m) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; }
.faq-head { grid-column: 1 / span 4; position: sticky; top: 64px; align-self: start; }
.faq-mascot { width: min(100%, 340px); aspect-ratio: 1; margin-top: 32px; }
.faq-list { grid-column: 5 / span 8; display: flex; flex-direction: column; gap: 8px; }
.faq-list details { border-radius: var(--radius); background: var(--surface); transition: background-color .3s var(--ease); }
.faq-list summary { list-style: none; cursor: pointer; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 28px; font-size: var(--t-lead); font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list .pm { position: relative; flex: none; width: 18px; height: 18px; }
.faq-list .pm::before, .faq-list .pm::after { content: ""; position: absolute; left: 0; top: 7.5px; width: 18px; height: 3px; border-radius: 3px; background: currentColor; transition: transform .35s var(--ease); }
.faq-list .pm::after { transform: rotate(90deg); }
.faq-list details[open] { background: var(--drop); }
.faq-list details[open] .pm::after { transform: rotate(0); }
.faq-list details:not([open]) summary:hover { background: var(--surface-alt); border-radius: var(--radius); }
.faq-list .ans { padding: 0 28px 28px; max-width: 60ch; font-size: var(--t-body); }
.faq-list details[open] .ans { animation: ans-in .45s var(--ease); }
@keyframes ans-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* the magnifying glass the FAQ mascot holds (added by main.js) */
.mascot .m-lupe { transform-box: view-box; transform-origin: 563px 498px; animation: lupe-search 4.8s ease-in-out infinite; }
@keyframes lupe-search {
  0%, 100% { transform: rotate(0deg) translate(0, 0); }
  25% { transform: rotate(-5deg) translate(-6px, 4px); }
  50% { transform: rotate(2deg) translate(4px, -6px); }
  75% { transform: rotate(-2deg) translate(-2px, 2px); }
}
.mascot .m-lens-shine { animation: lens-shine 4.8s ease-in-out infinite; }
@keyframes lens-shine { 0%, 100% { opacity: .9; } 50% { opacity: .5; } }

/* =========================================================
   CTA: the first screen, already open
   ========================================================= */
.cta { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; align-items: center; padding: 72px 64px; }
.cta-copy { grid-column: 1 / span 6; }
.cta-copy h2 { font-size: var(--t-display); line-height: .92; letter-spacing: -.04em; font-weight: 500; }
.cta-copy p { margin-top: 24px; max-width: 34ch; font-size: var(--t-body); }
.cta-copy .stores { margin-top: 32px; }
.cta-frag { grid-column: 7 / span 6; justify-self: center; }
.cta-phone { --s: .78; }

/* =========================================================
   FOOTER: the mark, built from blocks
   ========================================================= */
.foot { padding: var(--gap-section) var(--m) 32px; position: relative; }
.blocks { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 34svh; min-height: 220px; }
.blocks span {
  flex: 1 1 0; display: flex; align-items: flex-end; justify-content: center;
  border-radius: 6px; color: var(--ground);
  font-size: clamp(64px, 15vw, 230px); font-weight: 600; line-height: .8; letter-spacing: -.05em;
  padding-bottom: .06em; overflow: hidden;
  transform-origin: 50% 100%;
}
.blocks .b1 { height: 74%; background: var(--drop); }
.blocks .b2 { height: 100%; background: var(--ink); }
.blocks .b3 { height: 64%; background: var(--yellow); color: var(--ink); }
.blocks .b4 { height: 86%; background: var(--cyan); color: var(--ink); }
.blocks .b5 { height: 60%; background: var(--coral); color: var(--ink); }
.blocks .b6 { height: 80%; background: var(--green); color: var(--ink); }
.blocks .b7 { height: 96%; background: var(--drop-deep); }
.blocks .b8 { height: 70%; background: var(--ink); }
.foot-mascot { position: absolute; width: clamp(90px, 9vw, 150px); aspect-ratio: 1; left: calc(4.5 * ((100% - 28px) / 8 + 4px) - 2px); bottom: calc(60% - 4px); z-index: 2; transform: translateX(-50%); }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 24px; margin-top: 56px; font-size: var(--t-small); }
.foot-grid h3 { font-size: var(--t-small); font-weight: 500; margin-bottom: 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot-col { grid-column: span 2; }
.foot-credits { grid-column: 7 / span 6; color: var(--ink-soft); }
.foot-credits li { line-height: 1.45; }
.foot-last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; font-size: var(--t-small); }

/* app snackbar (same as showAppMessage) */
.snack { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 48px)); visibility: hidden; max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: transform .4s var(--ease); } /* taste-skill-ignore: snackbar floats above the page */
.snack.show { transform: translate(-50%, 0); visibility: visible; }

/* =========================================================
   MOTION: choreographed per section, once, after the static page is whole
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  /* hero, on load */
  .js .hero-drop { animation: drop-in 1.25s var(--ease) both .05s; }
  .js .hero-phone { animation: phone-in 1.3s var(--ease) both .25s; }
  .js .hero-mascot { animation: mascot-land 1.15s var(--ease) both 1s; }
  .js .intro-2 { animation: rise-in .9s var(--ease) both .55s; }
  .js .intro-3 { animation: rise-in .9s var(--ease) both .7s; }

  /* headings rise line by line out of a mask */
  .js [data-lines] .ln > span { opacity: 0; transform: translateY(118%); transition: transform 1.05s var(--ease), opacity .7s var(--ease); transition-delay: calc(var(--i, 0) * 120ms); }
  .js [data-lines].is-in .ln > span { opacity: 1; transform: none; }

  /* one supporting line */
  .js [data-rise-one] { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease) .25s, transform .9s var(--ease) .25s; }
  .js [data-rise-one].is-in { opacity: 1; transform: none; }

  /* pictures in the drop settle from a turn */
  .js [data-reveal="drop"] { opacity: 0; scale: .8; rotate: -9deg; transition: opacity .9s var(--ease), scale 1.3s var(--ease), rotate 1.3s var(--ease); }
  .js [data-reveal="drop"].is-in { opacity: 1; scale: 1; rotate: 0deg; }

  /* showcase: result slides in, the shutter grows */
  .js .shutter-stage .shutter-result { opacity: 0; translate: 0 40px; transition: opacity .9s var(--ease) .15s, translate 1s var(--ease) .15s; }
  .js .shutter-stage .cam-bar { opacity: 0; translate: 60px 0; transition: opacity .9s var(--ease) .3s, translate 1.1s var(--ease) .3s; }
  .js .shutter-stage.is-in .shutter-result { opacity: 1; translate: 0 0; }
  .js .shutter-stage.is-in .cam-bar { opacity: 1; translate: 0 0; }

  /* how: the phone arrives from the side once */
  .js .how-sticky .how-frags { opacity: 0; translate: 80px 0; rotate: 6deg; transition: opacity .9s var(--ease), translate 1.2s var(--ease), rotate 1.2s var(--ease); }
  .js .how-sticky.is-in .how-frags { opacity: 1; translate: 0 0; rotate: 0deg; }
  .js .how-sticky .how-drop { opacity: 0; transition: opacity 1s var(--ease), rotate .9s var(--ease), scale .9s var(--ease); }
  .js .how-sticky.is-in .how-drop { opacity: 1; }

  /* board: tiles arrive one after another, then their parts move */
  .js .board .tile { opacity: 0; transform: translateY(48px) scale(.95); transition: opacity .8s var(--ease), transform 1s var(--ease), translate .35s var(--ease); transition-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms), 0s; }
  .js .board.in .tile { opacity: 1; transform: none; }

  /* FAQ questions come in row by row from the side */
  .js [data-rise="side"] > * { transform: translateX(56px); }

  /* CTA: the login screen tilts up flat */
  .js [data-reveal="tilt"] { opacity: 0; transform: perspective(1400px) rotateX(26deg) translateY(90px) scale(.94); transform-origin: 50% 100%; transition: opacity .9s var(--ease), transform 1.4s var(--ease); }
  .js [data-reveal="tilt"].is-in { opacity: 1; transform: none; }

  /* footer: blocks grow, then the mascot drops onto its block */
  .js .blocks span { transform: scaleY(.12); transition: transform 1s var(--ease-spring); transition-delay: calc(var(--i) * 70ms); }
  .js .blocks.in span { transform: none; }
  .js .blocks .foot-mascot { opacity: 0; }
  .js .blocks.in .foot-mascot { animation: foot-land 1.3s var(--ease) .75s both; }
}
@keyframes drop-in { from { opacity: 0; transform: scale(.55) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes phone-in { from { opacity: 0; transform: translateY(150px) rotate(7deg); } to { opacity: 1; transform: none; } }
@keyframes mascot-land {
  0% { opacity: 0; transform: translateY(-340px); }
  52% { opacity: 1; transform: translateY(0); }
  64% { transform: translateY(0) scale(1.18, .82); }
  80% { transform: translateY(-20px) scale(.96, 1.05); }
  100% { opacity: 1; transform: none; }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes foot-land {
  0% { opacity: 0; translate: 0 -280px; }
  50% { opacity: 1; translate: 0 0; scale: 1 1; }
  62% { scale: 1.16 .84; }
  80% { translate: 0 -16px; scale: .96 1.05; }
  100% { opacity: 1; translate: 0 0; scale: 1 1; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px) {
  .hero-art { zoom: .84; }
  .shutter-photo { font-size: 13px; }
  .panel { padding: 56px 48px; }
  .about { grid-template-columns: minmax(0, 1fr) 380px; }
  .about-side { grid-template-columns: 1fr; }
  .t-od .odo { --h: 28px !important; }
  .how-body { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
  .how-frags { --s: .62; }
  .how-drop { width: 420px; }
}
@media (max-width: 1100px) {
  .hero-art { zoom: .72; }
  .shutter-stage { gap: 28px; }
  .shutter-photo { font-size: 11px; }
  .cta-phone { --s: .66; }
}

@media (max-width: 860px) {
  :root { --m: 16px; --t-display: 11vw; --t-h2: 9vw; --t-lead: 19px; --t-body: 17px; --t-small: 15px; }
  body { font-size: var(--t-body); }
  .nav-links a:not(.btn) { display: none; }

  .hero-body { grid-template-columns: 1fr; gap: 32px; min-height: 0; padding: 40px var(--m) 48px; }
  .hero-copy p { margin-top: 20px; }
  .hero-copy .stores { margin-top: 28px; }
  .hero-art { zoom: 1; width: 100%; max-width: 420px; height: 560px; margin: 0 auto; }
  .hero-drop { left: 6%; width: 84%; }
  .hero-phone { --s: .58; left: 50%; top: 52px; translate: -50% 0; }
  .hero-mascot { width: 100px; height: 100px; left: -4px; top: 410px; }

  .panel { margin-top: 120px; padding: 40px 20px; }
  .shutter-sec { padding-bottom: 48px; }
  .shutter-sec .copy { grid-template-columns: 1fr; }
  .shutter-sec .copy p { justify-self: start; }
  .shutter-stage { grid-template-columns: 1fr; justify-items: center; gap: 32px; margin-top: 40px; }
  .shutter-photo { font-size: 11px; }
  .cam-bar { order: 2; }
  .shutter-result { order: 3; width: 100%; min-height: 0; }
  .shutter-mascot { width: 88px; height: 88px; right: 4px; top: -64px; }
  .shutter-result { margin-top: 40px; }

  .how { padding-top: 120px; }
  .how-body { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 48px; }
  .how-stage { display: none; }
  .how-steps { padding-left: 64px; }
  .node { left: -64px; width: 44px; height: 44px; }
  .node .ic { width: 20px; height: 20px; }
  .pipe { left: 16px; }
  .pipe-rider { width: 54px; height: 54px; }
  .how-step, .how-step:last-child { min-height: 0; padding-bottom: 72px; }
  .js .how-step:not(.is-on) > h3, .js .how-step:not(.is-on) > p { opacity: 1; }
  .js .how-step.is-on > h3 { transform: none; }
  .how-mphone { display: block; margin-top: 28px; }
  .how-mphone .phone { --s: .56; }

  .band { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px; }
  .band-video { width: min(78vw, 360px); justify-self: center; }

  .features { padding: 120px var(--m) 0; }
  .board { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; grid-template-areas: "hd" "gp" "od" "of" "vo" "xl" "wk" "st"; gap: 10px; }
  .tile { padding: 24px 20px; min-height: 200px; }
  .t-od .odo { --h: 30px !important; }

  .about { margin: 120px var(--m) 0; padding: 40px 20px; grid-template-columns: 1fr; grid-template-areas: "head" "side" "photo"; gap: 36px; }
  .about-side { grid-template-columns: 1fr; }
  .about-photo { width: min(78vw, 340px); justify-self: center; }

  .faq { display: block; padding-top: 120px; }
  .faq-head { position: static; }
  .faq-mascot { width: 220px; margin: 16px 0 24px; }
  .faq-list summary { min-height: 64px; padding: 16px 20px; }
  .faq-list .ans { padding: 0 20px 20px; }

  .cta { display: block; padding: 48px 20px; }
  .cta-frag { margin-top: 40px; display: flex; justify-content: center; }
  .cta-phone { --s: .7; }

  .foot { padding-top: 120px; }
  .blocks { height: 22svh; min-height: 150px; }
  .blocks span { font-size: 13vw; }
  .foot-mascot { width: 72px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-col { grid-column: span 1; }
  .foot-credits { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-rise] > * { opacity: 1; transform: none; }
}
