/* Hezzo Sub website. Colours follow the app (navy ground, orange accent).
   Motion rules at the end follow the web-motion-playbook: hidden "before" states exist only
   under prefers-reduced-motion: no-preference, so with reduced motion or without scripts every
   word is simply there. */

:root {
  --bg: #F2F4F8;
  --bg-2: #E8ECF3;
  --card: #FFFFFF;
  --ink: #141A2E;
  --muted: #5B6378;
  --line: #DDE2EA;
  --accent: #F0642A;
  --accent-ink: #9A3A10;
  --accent-soft: #FFE9DF;
  --navy: #141A2E;
  --shadow: 0 1px 2px rgb(20 26 46 / .06), 0 12px 32px rgb(20 26 46 / .08);
  --radius: 18px;
  --wrap: 1180px;

  --ease-out-sine: cubic-bezier(.39, .575, .565, 1);
  --ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
  --ease-out-quart: cubic-bezier(.165, .84, .44, 1);
  --ease-out-quint: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1220;
    --bg-2: #121829;
    --card: #161B2C;
    --ink: #EEF1F7;
    --muted: #A3ABBE;
    --line: #283048;
    --accent: #FF7A45;
    --accent-ink: #FFC2A8;
    --accent-soft: #3A2318;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 16px 40px rgb(0 0 0 / .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
}
[dir=rtl] body { line-height: 1.85; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
[dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3 { letter-spacing: 0; line-height: 1.45; }
p { margin: 0; }
.i { width: 1.25em; height: 1.25em; flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- header: sticks, turns solid once the page leaves the top, tucks away while scrolling down */
.top { position: sticky; top: 0; z-index: 20; transition: transform .45s var(--ease-out-quart), background .3s, box-shadow .3s; }
.top[data-solid] { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.top[data-hidden] { transform: translateY(-100%); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 19px; }
.brand img { border-radius: 9px; }
.anchors { display: none; gap: 4px; margin-inline-start: auto; }
.anchors a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 15px; transition: color .2s, background .2s; }
.anchors a:hover { color: var(--ink); background: var(--bg-2); }
@media (min-width: 860px) { .anchors { display: flex; } }

/* language menu: a native <details>, so it works without scripts */
.lang { position: relative; margin-inline-start: auto; }
.anchors + .lang { margin-inline-start: 4px; }
@media (max-width: 859px) { .anchors + .lang { margin-inline-start: auto; } }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 190px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.lang li a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.lang li a:hover { background: var(--bg-2); }
.lang li a[aria-current=true] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 650; }

/* ---- hero */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 28px 20px 72px; display: grid; gap: 44px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: 1fr 1.05fr; padding-top: 56px; min-height: min(calc(100svh - 70px), 760px); } }
.eyebrow { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 650; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.3rem); font-weight: 800; margin: 18px 0 18px; text-wrap: balance; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 34em; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 11px 20px 11px 16px; min-width: 190px; border-radius: 14px; background: var(--navy); color: #fff; text-decoration: none; transition: transform .3s var(--ease-out-quart), box-shadow .3s; }
[dir=rtl] .store { padding: 11px 16px 11px 20px; }
.store .i { width: 26px; height: 26px; }
.store-text { display: grid; line-height: 1.15; }
.store small { font-size: 12px; opacity: .75; }
.store b { font-size: 18px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .store { background: #fff; color: var(--navy); } }
.store[data-soon] { cursor: default; }
.store[data-soon] small { color: var(--accent); opacity: 1; font-weight: 650; }
@media (hover: hover) and (pointer: fine) {
  .store:not([data-soon]):hover { transform: translateY(-2px); box-shadow: var(--shadow); }
}

/* the movie screen: always dark, whatever the page's theme */
.screen { margin: 0; perspective: 900px; }
.screen-in { position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: #070A14; box-shadow: 0 30px 60px -20px rgb(7 10 20 / .55), 0 0 0 1px rgb(255 255 255 / .06) inset; transform-style: preserve-3d; }
.scene { position: absolute; inset: 0; background:
  radial-gradient(120% 90% at 70% 10%, #2A3566 0%, #141B36 45%, #070A14 100%); }
.scene i { position: absolute; display: block; }
.moon { width: 13%; aspect-ratio: 1; top: 13%; right: 18%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFF6E0, #F3D9A8 60%, #C8A774); box-shadow: 0 0 60px 18px rgb(243 217 168 / .22); }
.hill { left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.h1 { bottom: -30%; height: 62%; background: linear-gradient(#1A2244, #0B1022); transform: rotate(-4deg); }
.h2 { bottom: -38%; height: 58%; left: 30%; background: linear-gradient(#141B36, #070A14); transform: rotate(5deg); }
.rain { inset: 0; opacity: .22; background: repeating-linear-gradient(105deg, transparent 0 18px, rgb(255 255 255 / .35) 18px 19px, transparent 19px 46px); mask-image: linear-gradient(transparent, #000 30%, #000 60%, transparent); }
.chip { position: absolute; top: 14px; font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: rgb(255 255 255 / .82); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .14); padding: 7px 10px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.time { left: 14px; }
.pair { right: 14px; font-family: inherit; }
.pair-to { color: #FFB38F; }
@media (max-width: 520px) { .time { display: none; } }

.sub { position: absolute; left: 4%; right: 4%; bottom: 8%; display: grid; justify-items: center; gap: 6px; text-align: center; color: #fff; text-shadow: 0 2px 8px rgb(0 0 0 / .85), 0 0 2px rgb(0 0 0 / .9); }
.sub-or { font-size: clamp(.78rem, 1.35vw, 1rem); color: rgb(255 255 255 / .72); }
.sub-trs { display: grid; }
.sub-tr { grid-area: 1 / 1; align-self: end; font-size: clamp(.95rem, 1.75vw, 1.4rem); font-weight: 700; line-height: 1.45; text-wrap: balance; }
.sub-tr > span { position: relative; display: inline-block; }
/* without the cycle running, only the first translation shows */
.sub-trs:not([data-on]) .sub-tr:not(:first-child) { display: none; }

/* ---- sections */
.band { max-width: var(--wrap); margin: 0 auto; padding: 72px 20px; }
.band h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 800; max-width: 20em; margin-bottom: 36px; text-wrap: balance; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 620px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.cards .card .i { width: 30px; height: 30px; padding: 8px; box-sizing: content-box; color: var(--accent); background: var(--accent-soft); border-radius: 12px; }
.cards h3 { font-size: 1.2rem; margin: 18px 0 8px; }
.cards p, .steps p { color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.steps li { position: relative; padding: 26px 24px 24px; border-radius: var(--radius); background: var(--bg-2); }
.steps .num { position: absolute; top: 18px; inset-inline-end: 22px; font: 800 2.6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--line); }
.steps .i { width: 28px; height: 28px; color: var(--ink); }
.steps h3 { font-size: 1.15rem; margin: 16px 0 6px; }

.langs { padding-bottom: 40px; }
.langs .mo-marquee { --gap: 2.2rem; --push: -18vw; font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 750; color: var(--muted); padding: 6px 0; }
.langs .mo-marquee span:nth-child(odd) { color: var(--ink); }
.langs .mo-marquee span:first-child { color: var(--accent); }

.cta { text-align: center; padding-bottom: 96px; }
.cta-in { background: var(--navy); color: #fff; border-radius: 28px; padding: 56px 24px; display: grid; justify-items: center; gap: 14px; }
.cta-in img { border-radius: 18px; box-shadow: 0 0 0 6px rgb(255 255 255 / .06); }
.cta h2 { margin: 10px auto 0; max-width: 16em; }
.cta p { color: rgb(255 255 255 / .7); }
.cta .stores { justify-content: center; margin-top: 18px; }
.cta .store { background: #fff; color: var(--navy); }

/* ---- footer */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 28px 20px 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; color: var(--muted); font-size: 15px; }
.foot nav { display: flex; gap: 18px; margin-inline-start: auto; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 600px) { .foot nav { margin-inline-start: 0; width: 100%; } }

/* ---- legal pages */
.legal { max-width: 800px; margin: 0 auto; padding: 24px 20px 64px; }
.legal .card { padding: 32px 28px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.legal .intro { font-size: 1.12rem; }
.legal h2 { font-size: 1.2rem; margin: 30px 0 6px; }

/* ================= motion ================= */
.mo-root { overflow-x: clip; }
.mo-word { display: inline-block; }
.mo-line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.mo-marquee { display: flex; flex-wrap: wrap; gap: var(--gap, 2em); }
.mo-marquee[data-on] { display: block; overflow: hidden; }
.mo-marquee-track { display: flex; width: max-content; margin-left: calc(-1 * var(--w, 0px)); translate: calc((var(--p, .5) - .5) * var(--push, -20vw)) 0; animation: mo-marquee var(--time, 30s) linear infinite; }
.mo-marquee-set { display: flex; flex: none; gap: var(--gap, 2em); padding-right: var(--gap, 2em); white-space: nowrap; }
.mo-marquee[data-paused] .mo-marquee-track { animation-play-state: paused; }
@keyframes mo-marquee { to { transform: translateX(calc(-1 * var(--w, 0px))); } }

@media (prefers-reduced-motion: no-preference) {
  /* hero pieces arrive in order once the page is ready (data-ready on <html>) */
  .mo-rise-in { opacity: 0; transform: translateY(40px); }
  [data-ready] .mo-rise-in { opacity: 1; transform: none; transition: opacity 1s var(--ease-out-quint) calc(var(--i, 0) * .1s), transform 1s var(--ease-out-quint) calc(var(--i, 0) * .1s); }
  /* the screen tips up into place, hinged low, like a laptop lid settling */
  .screen.mo-tilt-in { opacity: 0; transform: translateY(60px) rotateX(16deg); transform-origin: 50% 100%; }
  [data-ready] .screen.mo-tilt-in { opacity: 1; transform: none; transition: opacity 1.2s var(--ease-out-quint) .25s, transform 1.4s var(--ease-out-quint) .25s; }

  /* highlight wipe (playbook §33): an orange bar sweeps across, then leaves the words behind */
  .mo-wipe { --wipe: var(--accent); }
  .mo-wipe .mo-line { position: relative; width: fit-content; clip-path: inset(0 100% 0 0); }
  .mo-wipe.mo-centre .mo-line { margin-inline: auto; }
  .mo-wipe .mo-line::after { content: ''; position: absolute; inset: 0; background: var(--wipe); transform-origin: 100% 50%; }
  .mo-wipe.mo-reverse .mo-line { clip-path: inset(0 0 0 100%); }
  .mo-wipe.mo-reverse .mo-line::after { transform-origin: 0 50%; }
  .mo-wipe[data-shown] .mo-line:nth-child(n) { clip-path: inset(0 0 0 0); transition: clip-path .6s var(--ease-out-cubic) calc(var(--line) * 150ms + var(--wait, 0ms)); }
  .mo-wipe[data-shown] .mo-line::after { transform: scaleX(0); transition: transform .57s var(--ease-in-out-cubic) calc(var(--line) * 150ms + 370ms + var(--wait, 0ms)); }

  /* cards hinge up from their top edge (playbook §7), steps rise (§8) */
  .mo-flap { opacity: 0; transform-origin: 50% 0; transform: perspective(1000px) translateY(80px) rotateX(-35deg); }
  .mo-flap[data-shown] { opacity: 1; transform: perspective(1000px) translateY(0) rotateX(0deg); transition: opacity 1.3s var(--ease-out-quint) var(--wait, 0ms), transform 1.3s var(--ease-out-quint) var(--wait, 0ms); }
  .mo-rise { opacity: 0; transform: translateY(50px) scale(.95); }
  .mo-rise[data-shown] { opacity: 1; transform: none; transition: opacity 1s var(--ease-out-cubic) var(--wait, 0ms), transform 1s var(--ease-out-cubic) var(--wait, 0ms); }

  /* the subtitle: each translation wipes in under the same orange bar, the last one fades out */
  .sub-trs[data-on] .sub-tr { opacity: 0; transition: opacity .3s var(--ease-out-sine); }
  .sub-trs[data-on] .sub-tr > span { clip-path: inset(0 100% 0 0); transition: clip-path 0s .3s; }
  .sub-trs[data-on] .sub-tr[dir=rtl] > span { clip-path: inset(0 0 0 100%); }
  .sub-trs[data-on] .sub-tr > span::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: 100% 50%; transition: transform 0s .3s; }
  .sub-trs[data-on] .sub-tr[dir=rtl] > span::after { transform-origin: 0 50%; }
  .sub-trs[data-on] .sub-tr[data-active] { opacity: 1; transition: none; }
  .sub-trs[data-on] .sub-tr[data-active] > span { clip-path: inset(0 0 0 0); transition: clip-path .6s var(--ease-out-cubic); }
  .sub-trs[data-on] .sub-tr[data-active] > span::after { transform: scaleX(0); transition: transform .57s var(--ease-in-out-cubic) .37s; }
  .pair-to { display: inline-block; transition: opacity .25s, transform .4s var(--ease-out-quart); }
  .pair-to[data-swap] { opacity: 0; transform: translateY(6px); }
}

/* the card under a mouse leans towards it (playbook §9); scroll never moves these */
.mo-tilt { perspective: 600px; }
.mo-tilt > * { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1)); transition: transform .45s var(--ease-out-cubic); }
@media (prefers-reduced-motion: reduce) { .mo-tilt > * { transform: none; } }
