/* MEZO MANGA — site styles. Colours come from the app icon: ink background, blue burst, paper panels. */

:root {
  --ink: #05080F;
  --night: #0C1220;
  --night-2: #131C30;
  --line: #1F2A40;
  --line-2: #2A3756;
  --burst: #1E9BFF;
  --burst-deep: #0B5ED7;
  --paper: #F2F5FA;
  --muted: #93A0B5;

  --gutter: 14px;
  --border: 3px;
  --slant: 30px;
  --sx: 1; /* hard-shadow direction, flipped for RTL */

  --ease: cubic-bezier(.7, 0, .2, 1);
  --pop: cubic-bezier(.2, 1.5, .4, 1);
  --f-display: "Marhey", "Readex Pro", system-ui, sans-serif;
  --f-body: "Readex Pro", system-ui, "Segoe UI", Tahoma, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
[dir="rtl"] { --sx: -1; }

/* Only the active language is shown */
html[lang="ar"] [data-l="en"],
html[lang="en"] [data-l="ar"],
[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 1.02rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--burst); outline-offset: 3px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50;
  background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em;
  white-space: nowrap;
}
.brand img { width: 44px; height: 44px; margin-inline-start: -6px; }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-radius: 8px; transition: color .2s; }
.nav nav a:hover { color: var(--paper); }
.lang {
  font: inherit; font-size: .9rem; color: var(--paper); cursor: pointer;
  background: transparent; border: 1.5px solid var(--line-2); border-radius: 999px;
  padding: 5px 14px; margin-inline-start: 6px; transition: border-color .2s, background .2s;
}
.lang:hover { border-color: var(--burst); background: rgba(30, 155, 255, .08); }

/* ---------- Shared type ---------- */
.eyebrow { margin: 0 0 14px; color: var(--burst); font-weight: 600; font-size: .9rem; }
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
h1, h2 { font-family: var(--f-display); font-weight: 700; margin: 0; }
h1 { font-size: clamp(2.2rem, 4.3vw, 3.7rem); line-height: 1.3; }
html[lang="en"] h1 { line-height: 1.12; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.35; }
html[lang="en"] h2 { line-height: 1.15; }
em { font-style: normal; color: var(--burst); }

/* ---------- Store button ---------- */
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px; border-radius: 12px; text-decoration: none;
  background: var(--paper); color: var(--ink);
  box-shadow: calc(var(--sx) * 4px) 4px 0 var(--burst);
  transition: translate .2s var(--ease), box-shadow .2s var(--ease);
}
.store svg { width: 26px; height: 26px; fill: var(--burst-deep); flex: none; }
.store small { display: block; font-size: .74rem; line-height: 1.3; color: #3A465C; }
.store b { display: block; font-size: 1.15rem; line-height: 1.2; font-weight: 700; }
.store:not(.is-soon):hover { translate: calc(var(--sx) * -2px) -2px; box-shadow: calc(var(--sx) * 7px) 7px 0 var(--burst); }
.store:not(.is-soon):active { translate: calc(var(--sx) * 2px) 2px; box-shadow: calc(var(--sx) * 1px) 1px 0 var(--burst); }
.store.is-soon { cursor: default; }
.ghost {
  color: var(--paper); text-decoration: none; font-weight: 500;
  border-bottom: 2px solid var(--burst); padding-bottom: 2px; transition: color .2s;
}
.ghost:hover { color: var(--burst); }

/* ---------- Hero: a manga page ---------- */
.hero { padding: 22px 0 80px; }
.page {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, .68fr);
  grid-template-rows: auto 1fr;
  gap: var(--gutter);
}
.cell { position: relative; min-width: 0; animation: wipe-l .9s var(--ease) both; }
[dir="rtl"] .cell { animation-name: wipe-r; }
.c-intro { grid-column: 1; grid-row: 1; animation-delay: .05s; }
.c-burst { grid-column: 1; grid-row: 2; margin-top: calc(var(--slant) * -1); animation-delay: .3s; }
.c-phone { grid-column: 2; grid-row: 1 / span 2; animation-delay: .55s; }

.panel { height: 100%; padding: var(--border); background: var(--paper); }
.panel-in { height: 100%; position: relative; overflow: hidden; background: var(--night); }
.c-intro .panel, .c-intro .panel-in { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - var(--slant))); }
.c-burst .panel, .c-burst .panel-in { clip-path: polygon(0 0, 100% var(--slant), 100% 100%, 0 100%); }

.c-intro .panel-in {
  padding: clamp(28px, 4vw, 52px);
  padding-bottom: calc(var(--slant) + clamp(28px, 3.4vw, 44px));
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(30, 155, 255, .12), transparent 60%),
    var(--night);
}
.c-intro h1 { max-width: 15ch; }
.lede { margin: 18px 0 0; max-width: 46ch; color: #C3CCDA; font-size: 1.08rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 28px; }

/* word-by-word entrance for the headline (words wrapped by site.js) */
.w { display: inline-block; animation: rise .8s var(--ease) both; animation-delay: calc(.35s + var(--i) * .07s); }
.c-intro .eyebrow { animation: fade-up .6s .25s var(--ease) both; }
.lede { animation: fade-up .7s .8s var(--ease) both; }
.cta-row { animation: fade-up .7s .95s var(--ease) both; }

/* burst panel */
.c-burst .panel { animation: shake .45s 1.12s both; }
.c-burst .panel-in {
  min-height: 250px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 56%, #123A72 0%, #0A1A36 38%, var(--night) 70%);
}
.speed {
  position: absolute; inset: -70%;
  background:
    repeating-conic-gradient(from 0deg, transparent 0deg 2.6deg, rgba(242, 245, 250, .55) 2.6deg 3deg, transparent 3deg 5.3deg, rgba(242, 245, 250, .22) 5.3deg 5.6deg, transparent 5.6deg 8deg);
  -webkit-mask: radial-gradient(circle, transparent 14%, #000 34%);
  mask: radial-gradient(circle, transparent 14%, #000 34%);
  animation: spin 140s linear infinite, lines-in 1s .5s var(--ease) both;
}
.tone {
  position: absolute; inset: 0;
  background: radial-gradient(circle, var(--burst) 1.1px, transparent 1.7px) 0 0 / 7px 7px;
  -webkit-mask: linear-gradient(to top, #000, transparent 60%);
  mask: linear-gradient(to top, #000, transparent 60%);
  opacity: .5;
}
.burst-logo {
  /* vw, not %: a percentage here is sized from the image's natural 432px while the grid measures rows */
  position: relative; width: clamp(150px, 17vw, 240px); height: auto;
  filter: drop-shadow(0 12px 34px rgba(30, 155, 255, .4));
  animation: slam .8s .7s var(--pop) both, breathe 5s 2s ease-in-out infinite;
}
.flash { position: absolute; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; animation: flash .7s 1.08s ease-out both; }
.caption {
  position: absolute; bottom: 16px; inset-inline-end: 16px; margin: 0;
  background: var(--paper); color: var(--ink); font-weight: 600; font-size: .82rem; line-height: 1.5;
  padding: 4px 12px; border: 2px solid var(--ink);
  box-shadow: calc(var(--sx) * 3px) 3px 0 var(--burst);
  animation: fade-up .5s 1.4s var(--ease) both;
}

/* phone panel */
.c-phone .panel-in {
  display: grid; place-items: center; padding: 36px 22px;
  background:
    radial-gradient(circle, rgba(30, 155, 255, .16) 1px, transparent 1.6px) 0 0 / 9px 9px,
    linear-gradient(180deg, var(--night), #0A1630);
}
.phone {
  position: relative; width: min(268px, 100%); aspect-ratio: 9 / 19;
  padding: 9px; border-radius: 38px;
  background: #0B0F18; border: 2px solid #2A3550;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 0 0 2px var(--ink);
  animation: float 7s 1.6s ease-in-out infinite;
}
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 30px;
  display: flex; flex-direction: column; background: #090D16;
  font-size: .72rem; line-height: 1.4;
}
.appbar { display: flex; justify-content: space-between; align-items: center; padding: 22px 14px 8px; font-weight: 600; font-size: .95rem; }
.ico-search { width: 15px; height: 15px; border: 2px solid var(--muted); border-radius: 50%; position: relative; }
.ico-search::after { content: ""; position: absolute; width: 6px; height: 2px; background: var(--muted); bottom: -3px; inset-inline-end: -5px; rotate: 45deg; }
[dir="rtl"] .ico-search::after { rotate: -45deg; }
.tabs { display: flex; gap: 14px; padding: 2px 14px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.tabs > * { padding-bottom: 7px; }
.tabs b { color: var(--burst); font-weight: 600; box-shadow: inset 0 -2px 0 var(--burst); }
.shelf { flex: 1; overflow: hidden; padding: 8px 8px 0; }
.shelf-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; animation: shelf 32s linear infinite; }
.cv { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; color: rgba(242, 245, 250, .9); }
.cv::after {
  content: ""; position: absolute; inset-inline: 5px; bottom: 6px; height: 10px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 82% 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 7px / 52% 3px no-repeat;
}
[dir="rtl"] .cv::after { background-position: 100% 0, 100% 7px; }
.cv b {
  position: absolute; top: 4px; inset-inline-start: 4px; z-index: 1;
  background: var(--burst); color: #fff; font-size: .58rem; font-weight: 600;
  padding: 0 5px; border-radius: 4px; line-height: 1.6;
}
.cv:nth-child(6n+1) { background: radial-gradient(circle at 32% 34%, #9AD4FF 0 17%, transparent 18%), linear-gradient(160deg, #1E9BFF, #0B3E8F); }
.cv:nth-child(6n+2) { background: radial-gradient(circle at 70% 30%, var(--burst) 0 9%, transparent 10%), repeating-linear-gradient(115deg, #0B1222 0 6px, #1A2640 6px 8px); }
.cv:nth-child(6n+3) { color: rgba(5, 8, 15, .85); background: radial-gradient(circle, #05080F 1px, transparent 1.5px) 0 0 / 5px 5px, linear-gradient(#E8EEF7, #AFC0D8); }
.cv:nth-child(6n+4) { background: repeating-conic-gradient(from 10deg at 50% 38%, #0B5ED7 0 8deg, #082A63 8deg 16deg); }
.cv:nth-child(6n+5) { background: linear-gradient(200deg, transparent 52%, #1E9BFF 52% 58%, transparent 58%), linear-gradient(#162038, #05080F); }
.cv:nth-child(6n) { background: radial-gradient(circle at 68% 70%, #F2F5FA 0 21%, transparent 22%), linear-gradient(140deg, #26375E, #0D1426); }
.toast {
  position: absolute; top: 12px; inset-inline: 10px; z-index: 2;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #18233B; border: 1px solid #2A3756; border-radius: 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .5);
  translate: 0 -150%;
  animation: toast 8s 2.8s var(--ease) infinite;
}
.toast img { width: 24px; height: 24px; flex: none; }
.toast b { display: block; font-size: .7rem; }
.toast span { color: var(--muted); font-size: .64rem; }
.bnav { display: flex; justify-content: space-around; align-items: center; padding: 9px 6px 14px; border-top: 1px solid var(--line); background: #0C1220; }
.bnav i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid #4A5874; }
.bnav i:first-child { width: 34px; height: 18px; border: 0; border-radius: 9px; background: rgba(30, 155, 255, .25); box-shadow: inset 0 0 0 5px rgba(30, 155, 255, .25), inset 0 0 0 7px var(--burst); }

/* ---------- Sections ---------- */
.sec { padding: 104px 0; }
.sec-head { max-width: 680px; margin-bottom: 44px; }
.sec-head p:not(.eyebrow) { margin: 16px 0 0; color: var(--muted); }

/* scroll reveal: wipe in from the side reading starts on (site.js adds .js-reveal).
   The clip goes on the children: IntersectionObserver never fires for a fully clipped target. */
.reveal > * { clip-path: inset(-48px); transition: clip-path 1s var(--ease); }
.reveal > :nth-child(2) { transition-delay: .1s; }
.reveal > :nth-child(3) { transition-delay: .2s; }
.reveal > :nth-child(4) { transition-delay: .3s; }
.js-reveal .reveal:not(.in) > * { clip-path: inset(0 100% 0 0); }
.js-reveal[dir="rtl"] .reveal:not(.in) > * { clip-path: inset(0 0 0 100%); }
.js-reveal .reveal:not(.in) * { animation-play-state: paused !important; }

/* ---------- Features ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.feat { position: relative; }
.feat.wide { grid-column: span 2; }
.feat-shadow {
  position: absolute; inset: 0;
  background: radial-gradient(circle, var(--burst) 1.2px, transparent 1.8px) 0 0 / 7px 7px;
}
.feat-card {
  position: relative; height: 100%;
  display: flex; flex-direction: column; gap: 22px; padding: 22px;
  background: var(--night); border: var(--border) solid var(--paper);
}
.feat.reveal > * { transition: translate .35s var(--ease), clip-path 1s var(--ease); transition-delay: 0s, 0s; }
.grid .reveal:nth-child(3n+2) > * { transition-delay: 0s, .12s; }
.grid .reveal:nth-child(3n) > * { transition-delay: 0s, .24s; }
.feat:hover .feat-card { translate: calc(var(--sx) * -5px) -5px; }
.feat:hover .feat-shadow { translate: calc(var(--sx) * 7px) 7px; }
.feat.wide .feat-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 30px; }
.feat h3 { margin: 0; font-size: 1.22rem; font-weight: 600; line-height: 1.45; }
.feat p { margin: 8px 0 0; color: var(--muted); }

.demo {
  position: relative; height: 178px; overflow: hidden;
  border: 1.5px solid var(--line); border-radius: 4px;
  background: var(--ink);
  font-size: .8rem; line-height: 1.4;
}
.feat.wide .demo { height: 210px; }

/* demo: add a site by its link */
.demo-add { display: grid; align-content: center; gap: 11px; padding: 18px; }
.url {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--night-2); border: 1.5px solid var(--line-2); border-radius: 10px;
  font: 500 .85rem/1 var(--f-mono);
}
.url-ico { width: 10px; height: 12px; border: 2px solid var(--muted); border-radius: 3px 3px 2px 2px; flex: none; }
.url-text { display: inline-block; overflow: hidden; white-space: nowrap; width: 21ch; animation: type 8s steps(21, end) infinite; }
.caret { width: 2px; height: 1.05em; background: var(--burst); animation: blink 1s steps(1) infinite; }
.src {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--night); border: 1.5px solid var(--line-2); border-radius: 10px;
  animation: pop-in 8s infinite;
}
.src-ico { width: 28px; height: 28px; border-radius: 8px; flex: none; background: conic-gradient(from 45deg, var(--burst), #8ACDFF, var(--burst-deep), var(--burst)); }
.src-name { font-weight: 600; direction: ltr; }
.src-ok { margin-inline-start: auto; color: var(--burst); font-weight: 600; font-size: .75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips i {
  font-style: normal; font-size: .74rem; padding: 2px 11px; border-radius: 999px;
  border: 1.5px solid var(--line-2); color: #C3CCDA;
  animation: chip 8s infinite;
}
.chips i:nth-child(2) { animation-delay: .12s; }
.chips i:nth-child(3) { animation-delay: .24s; }
.chips i:nth-child(4) { animation-delay: .36s; }

/* demo: Drive backup */
.demo-backup { display: grid; align-content: center; gap: 22px; padding: 20px; }
.bk-row { display: flex; align-items: center; gap: 10px; }
.bk-item { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: .7rem; position: relative; }
.bk-doc { width: 34px; height: 42px; border-radius: 4px; background: linear-gradient(225deg, transparent 9px, var(--paper) 9px); position: relative; animation: bob 2.4s ease-in-out infinite; }
.bk-doc::after { content: ""; position: absolute; inset: 16px 7px auto; height: 14px; background: repeating-linear-gradient(var(--line-2) 0 2px, transparent 2px 5px); }
.bk-dir { width: 46px; height: 34px; border-radius: 3px 5px 5px 5px; background: var(--burst); position: relative; margin-top: 6px; }
.bk-dir::before { content: ""; position: absolute; top: -6px; inset-inline-start: 0; width: 18px; height: 8px; border-radius: 3px 3px 0 0; background: var(--burst-deep); }
.bk-ok {
  position: absolute; top: -6px; inset-inline-end: 4px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); color: var(--burst-deep);
  font-style: normal; font-weight: 700; font-size: .7rem;
  animation: ok 5s infinite;
}
.bk-path { flex: 1; height: 2px; position: relative; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 11px); }
.bk-path::after {
  content: ""; position: absolute; top: -4px; inset-inline-start: calc(100% - 10px);
  width: 10px; height: 10px; border-radius: 50%; background: var(--burst);
  box-shadow: 0 0 12px var(--burst);
  animation: travel 5s infinite;
}
.bk-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bk-bar i { display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--burst); animation: fill 5s infinite; }

/* demo: reading directions */
.demo-modes { display: flex; justify-content: center; align-items: center; gap: clamp(14px, 3vw, 26px); padding: 16px; }
.mode { margin: 0; display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: .74rem; }
.mini { width: 54px; height: 82px; overflow: hidden; border-radius: 4px; border: 2px solid var(--line-2); background: var(--paper); direction: ltr; }
.strip { display: flex; width: 400%; height: 100%; }
.strip i, .vstrip i {
  flex: 1; position: relative;
  background:
    linear-gradient(var(--ink), var(--ink)) 6px 6px / calc(100% - 12px) 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 6px 50% / calc(100% - 12px) 2px no-repeat;
  border-inline-end: 1px solid #C9D2E0;
}
.strip i::after, .vstrip i::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--burst); }
.strip i:nth-child(1)::after, .strip i:nth-child(4)::after { top: 14px; left: 10px; }
.strip i:nth-child(2)::after { top: 52px; left: 28px; }
.strip i:nth-child(3)::after { top: 14px; left: 30px; width: 16px; border-radius: 3px; }
.m-ltr .strip { animation: page-ltr 4.8s var(--ease) infinite; }
.m-rtl .strip { flex-direction: row-reverse; translate: -75% 0; animation: page-rtl 4.8s var(--ease) infinite; }
.vstrip { display: flex; flex-direction: column; height: 400%; animation: scroll-v 6s linear infinite; }
.vstrip i { border-inline-end: 0; border-bottom: 1px dashed #C9D2E0; }
.vstrip i:nth-child(odd)::after { top: 34px; left: 12px; }
.vstrip i:nth-child(even)::after { top: 14px; left: 28px; width: 14px; border-radius: 3px; }
.mode .arrow { font-size: 1rem; line-height: 1; color: var(--burst); }

/* demo: reading stats */
.demo-stats { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 18px; }
.act-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; gap: 3px; }
.act-grid i { border-radius: 2px; background: var(--line); }
.act-grid i.l1 { background: rgba(30, 155, 255, .32); }
.act-grid i.l2 { background: rgba(30, 155, 255, .58); }
.act-grid i.l3 { background: rgba(30, 155, 255, .82); }
.act-grid i.l4 { background: var(--burst); }
.act-grid i { animation: cell .5s var(--pop) both; animation-delay: calc(.3s + var(--c) * 45ms); }
.streak { display: grid; justify-items: center; text-align: center; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.streak b { font-family: var(--f-display); font-size: 3rem; line-height: 1.1; color: var(--paper); font-variant-numeric: tabular-nums; }

/* demo: offline chapters */
.demo-offline { margin: 0; padding: 12px 16px; list-style: none; display: grid; align-content: center; gap: 6px; }
.demo-offline li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; background: var(--night); border: 1px solid var(--line); }
.demo-offline li span { color: #C3CCDA; }
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
.dl {
  --p: 100%;
  position: relative; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--burst) var(--p), var(--line-2) 0);
  -webkit-mask: radial-gradient(circle, transparent 7px, #000 7.5px);
  mask: radial-gradient(circle, transparent 7px, #000 7.5px);
  animation: ring 6s infinite;
}
.dl-wrap { position: relative; width: 22px; height: 22px; flex: none; }
.dl-wrap::before, .dl-wrap::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: var(--burst); }
.dl-wrap::before { content: "↓"; opacity: 0; animation: arrow-out 6s infinite; }
.dl-wrap::after { content: "✓"; animation: check-in 6s infinite; }
.demo-offline li:nth-child(2) .dl, .demo-offline li:nth-child(2) .dl-wrap::before, .demo-offline li:nth-child(2) .dl-wrap::after { animation-delay: .7s; }
.demo-offline li:nth-child(3) .dl, .demo-offline li:nth-child(3) .dl-wrap::before, .demo-offline li:nth-child(3) .dl-wrap::after { animation-delay: 1.4s; }
.demo-offline li:nth-child(4) .dl, .demo-offline li:nth-child(4) .dl-wrap::before, .demo-offline li:nth-child(4) .dl-wrap::after { animation-delay: 2.1s; }

/* demo: notifications */
.demo-alerts { padding: 14px; }
.nt {
  position: absolute; inset-inline: 14px; top: 14px;
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  background: #18233B; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .45);
  animation: stack 9s infinite both;
}
.nt img { width: 26px; height: 26px; flex: none; }
.nt p { margin: 0; line-height: 1.35; }
.nt b { display: block; font-size: .76rem; }
.nt span { color: var(--muted); font-size: .7rem; }
.nt.n2 { translate: 0 118%; animation-delay: -3s; }
.nt.n3 { translate: 0 236%; animation-delay: -6s; }

/* ---------- Screenshots ---------- */
.shots { padding-top: 24px; }
.shot-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 34px); align-items: start;
}
.shot { margin: 0; display: grid; justify-items: center; gap: 18px; text-align: center; }
.shot:nth-child(odd) { margin-top: 56px; }
.shot-frame {
  width: min(250px, 100%); padding: 8px; border-radius: 34px;
  background: #0B0F18; border: 2px solid #2A3550;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
  transition: translate .35s var(--ease);
}
.shot-frame img { width: 100%; height: auto; border-radius: 26px; }
.shot:hover .shot-frame { translate: 0 -8px; }
.shot:nth-child(even) .shot-frame { animation: float 7s ease-in-out infinite; }
.shot:nth-child(4) .shot-frame { animation-delay: -3.5s; }
.shot figcaption { max-width: 24ch; color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* ---------- Promise (speech balloon) ---------- */
.promise { padding-top: 40px; }
.promise-row { display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); max-width: 980px; }
.speaker { width: clamp(110px, 16vw, 170px); flex: none; animation: breathe 5s ease-in-out infinite; }
.balloon {
  position: relative; flex: 1;
  background: var(--paper); color: var(--ink);
  border-radius: 46px; padding: clamp(26px, 4vw, 44px) clamp(28px, 5vw, 56px);
  transition: scale .7s var(--pop), opacity .35s ease;
}
.balloon::before {
  content: ""; position: absolute; inset-inline-start: -30px; top: 50%; translate: 0 -50%;
  width: 46px; height: 34px; background: var(--paper);
  clip-path: polygon(100% 0, 0 62%, 100% 100%);
}
[dir="rtl"] .balloon::before { clip-path: polygon(0 0, 100% 62%, 0 100%); }
.balloon-big { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.4; }
.balloon p:not(.balloon-big) { margin: 10px 0 18px; color: #364257; }
.balloon a { color: var(--burst-deep); font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; }
.balloon a:hover { color: var(--ink); }
.js-reveal .reveal-pop:not(.in) { scale: .55; opacity: 0; }

/* ---------- Get it ---------- */
.get { position: relative; overflow: hidden; text-align: center; }
.get::before {
  content: ""; position: absolute; inset: -40% -10%; z-index: -1;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 3deg, rgba(30, 155, 255, .2) 3deg 3.4deg, transparent 3.4deg 7deg);
  -webkit-mask: radial-gradient(closest-side, transparent 28%, #000 60%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 28%, #000 60%, transparent 100%);
  animation: spin 200s linear infinite reverse;
}
.get h2 { max-width: 22ch; margin-inline: auto; }
.get p { margin: 14px 0 30px; color: var(--muted); }
.store-lg { padding: 13px 26px; }
.store-lg svg { width: 32px; height: 32px; }
.store-lg b { font-size: 1.35rem; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 34px 0 46px; color: var(--muted); font-size: .9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.foot .brand { color: var(--paper); font-size: 1rem; }
.foot .brand img { width: 36px; height: 36px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { text-decoration: none; transition: color .2s; }
.foot nav a:hover { color: var(--paper); }
.fine { flex-basis: 100%; margin: 0; font-size: .8rem; color: #6E7B92; }

/* ---------- Privacy page ---------- */
.legal { padding: 56px 0 96px; max-width: 820px; }
.legal-head { margin-bottom: 36px; }
.legal-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); animation: fade-up .7s .1s var(--ease) both; }
.legal-head .date { margin: 12px 0 0; color: var(--muted); animation: fade-up .7s .25s var(--ease) both; }
.tldr {
  position: relative; margin-bottom: 28px; padding: 26px 30px;
  background: var(--paper); color: var(--ink); border-radius: 28px;
}
.tldr h2 { font-size: 1.25rem; margin-bottom: 8px; color: var(--burst-deep); }
.tldr ul { margin: 0; padding-inline-start: 20px; }
.tldr li { margin-bottom: 4px; }
.clause { margin-bottom: 14px; padding: 26px 30px; background: var(--night); border: 1px solid var(--line); border-radius: 6px; }
.clause h2 { font-size: 1.3rem; color: var(--burst); margin-bottom: 10px; line-height: 1.5; }
.clause p, .clause li { color: #D4DBE6; }
.clause p { margin: 0 0 10px; }
.clause ul { margin: 8px 0 0; padding-inline-start: 22px; }
.clause li { margin-bottom: 8px; }
.clause li::marker { color: var(--burst); }
.clause a { color: var(--burst); }
.clause code { font-family: var(--f-mono); font-size: .88em; background: var(--night-2); padding: 1px 6px; border-radius: 4px; }
.clause .note { color: var(--muted); font-size: .9rem; }
.path { font-weight: 600; color: var(--paper); }

/* ---------- Keyframes ---------- */
@keyframes wipe-l { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wipe-r { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; translate: 0 .55em; } }
@keyframes fade-up { from { opacity: 0; translate: 0 14px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes lines-in { from { opacity: 0; scale: 1.7; } }
@keyframes slam {
  0% { opacity: 0; scale: 2.6; rotate: -14deg; }
  55% { opacity: 1; }
  70% { scale: .9; rotate: 2deg; }
  100% { scale: 1; rotate: 0deg; }
}
@keyframes breathe { 50% { scale: 1.035; } }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: .55; } 100% { opacity: 0; } }
@keyframes shake {
  0%, 100% { translate: 0 0; }
  20% { translate: -6px 3px; }
  40% { translate: 5px -4px; }
  60% { translate: -3px 2px; }
  80% { translate: 2px -1px; }
}
@keyframes float { 50% { translate: 0 -10px; } }
@keyframes shelf { to { translate: 0 calc(-50% - 3px); } }
@keyframes toast {
  0%, 6% { translate: 0 -150%; }
  13%, 52% { translate: 0 0; }
  60%, 100% { translate: 0 -150%; }
}
@keyframes type { 0%, 4% { width: 0; } 34%, 88% { width: 21ch; } 94%, 100% { width: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pop-in { 0%, 37% { opacity: 0; scale: .85; } 43%, 88% { opacity: 1; scale: 1; } 94%, 100% { opacity: 0; scale: .96; } }
@keyframes chip { 0%, 45% { opacity: 0; translate: 0 8px; } 51%, 88% { opacity: 1; translate: 0 0; } 94%, 100% { opacity: 0; translate: 0 0; } }
@keyframes bob { 50% { translate: 0 -4px; } }
@keyframes travel {
  0%, 8% { inset-inline-start: 0; opacity: 0; }
  14% { opacity: 1; }
  58% { inset-inline-start: calc(100% - 10px); opacity: 1; }
  66%, 100% { inset-inline-start: calc(100% - 10px); opacity: 0; }
}
@keyframes fill { 0%, 10% { width: 0; } 60%, 92% { width: 100%; } 100% { width: 100%; opacity: 0; } }
@keyframes ok { 0%, 58% { opacity: 0; scale: .3; } 66%, 92% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1; } }
@keyframes page-ltr {
  0%, 22% { translate: 0 0; }
  30%, 52% { translate: -25% 0; }
  60%, 82% { translate: -50% 0; }
  90%, 100% { translate: -75% 0; }
}
@keyframes page-rtl {
  0%, 22% { translate: -75% 0; }
  30%, 52% { translate: -50% 0; }
  60%, 82% { translate: -25% 0; }
  90%, 100% { translate: 0 0; }
}
@keyframes scroll-v { to { translate: 0 -50%; } }
@keyframes cell { from { scale: 0; } }
@keyframes ring { 0%, 5% { --p: 0%; } 35%, 100% { --p: 100%; } }
@keyframes arrow-out { 0%, 30% { opacity: 1; } 36%, 100% { opacity: 0; } }
@keyframes check-in { 0%, 34% { opacity: 0; scale: .4; } 40%, 100% { opacity: 1; scale: 1; } }
@keyframes stack {
  0% { translate: 0 -130%; opacity: 0; }
  8%, 33% { translate: 0 0; opacity: 1; }
  41%, 66% { translate: 0 118%; opacity: 1; }
  74%, 90% { translate: 0 236%; opacity: .55; }
  100% { translate: 0 300%; opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .page { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .c-intro, .c-burst, .c-phone { grid-column: 1; grid-row: auto; }
  .c-phone .panel-in { padding: 32px 16px; }
  .phone { width: min(250px, 100%); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat.wide { grid-column: 1 / -1; }
  .feat.f-offline { grid-column: auto; }
  .feat.f-offline .feat-card { display: flex; }
  .feat.f-offline .demo { height: 178px; }
  .shot-row { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 580px; margin-inline: auto; }
}
@media (max-width: 640px) {
  :root { --slant: 20px; --gutter: 10px; }
  .sec { padding: 76px 0; }
  .hero { padding-bottom: 56px; }
  .nav .hide-sm { display: none; }
  .brand { font-size: 1rem; }
  .brand img { width: 38px; height: 38px; }
  .nav nav a { padding: 8px; }
  .lang { padding: 4px 11px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .feat.wide .feat-card { display: flex; }
  .feat.wide .demo { height: 190px; }
  .shot-row {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 70%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 16px;
  }
  .shot { scroll-snap-align: center; }
  .shot:nth-child(odd) { margin-top: 0; }
  .demo-stats { flex-direction: column; gap: 12px; }
  .streak { display: flex; align-items: baseline; gap: 8px; }
  .streak b { font-size: 2.2rem; }
  .promise-row { flex-direction: column; align-items: stretch; }
  .speaker { align-self: center; width: 110px; }
  .balloon::before {
    inset-inline-start: 50%; top: -26px; translate: -50% 0;
    width: 40px; height: 30px; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }
  [dir="rtl"] .balloon::before { translate: 50% 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
  .tldr, .clause { padding: 22px 20px; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
