/* Website v3 prototypes: what the three directions share. Tokens (Plein jour, pushed), fonts, the device frames
   that hold the real screenshots, the reveal and the intro's skip. Each direction adds its own page CSS. */
@font-face { font-family: "Brico Display"; src: url(fonts/brico-display.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Brico"; src: url(fonts/brico-text.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/plex-arabic-400.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/plex-arabic-700.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Stamp Mono"; src: url(fonts/plex-mono-stamp.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --s0: #FFFFFF; --s1: #F4F5FF; --s2: #E8EAFF;
  --t1: #0E1033; --t2: #474B73; --t3: #5E6288;
  --maj: #2D3BD8; --maj-deep: #1F2AB0; --saf: #FFC21A; --saf-soft: #FFE7A3;
  --night: #0B0D2B; --night2: #14173D; --night3: #1E2250; --nt1: #F3F4FF; --nt2: #B9BCE6; --nacc: #8E98FF;
  --shop: #0B5A43;
  --out: cubic-bezier(.16, 1, .3, 1);   /* every entrance */
  --io: cubic-bezier(.7, 0, .2, 1);     /* every move from one place to another */
  --display: "Brico Display", "Brico", system-ui, sans-serif;
  --text: "Brico", system-ui, sans-serif;
  --ar: "Plex Arabic", "Brico", system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 56px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; font: 400 17px/1.45 var(--text); color: var(--t1); background: var(--s0); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
[dir="rtl"], :lang(ar) { font-family: var(--ar); }
.wrap { width: min(1240px, 100% - 2 * var(--gut)); margin-inline: auto; }

/* Headlines: Bricolage 800, tight, lower-case-led. The saffron stroke marks one word only. */
.d { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: .94; margin: 0; }
:lang(ar) .d, .d:lang(ar) { font-family: var(--ar); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.mark { background: linear-gradient(transparent 62%, var(--saf) 62%, var(--saf) 92%, transparent 92%); padding-inline: .04em; }
.label { font: 600 15px/1.2 var(--text); letter-spacing: -.005em; }

/* Buttons: one primary per screen. */
.btn { display: inline-flex; align-items: center; gap: .5em; min-height: 52px; padding: 0 26px; border-radius: 999px; font: 700 17px/1 var(--text); text-decoration: none; transition: transform .16s var(--out), background-color .16s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--saf); color: var(--t1); }
.btn.primary:hover { background: #FFD04D; }
.btn.blue { background: var(--maj); color: #fff; }
.btn.ghost { color: inherit; box-shadow: inset 0 0 0 2px currentColor; }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; gap: 20px; padding: 14px var(--gut); }
.nav .brand { white-space: nowrap; display: flex; align-items: center; gap: 9px; font: 800 21px/1 var(--display); letter-spacing: -.035em; text-decoration: none; margin-inline-end: auto; }
.nav .brand svg { width: 30px; height: 30px; }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
.nav .show-s { display: none; }
@media (max-width: 760px) { .nav { gap: 6px; padding-block: 10px; } .nav .hide-s { display: none; } .nav .show-s { display: inline; } .nav .brand { font-size: 19px; } }
.nav .lang { font: 700 16px/1 var(--ar); text-decoration: none; padding: 10px; }

/* Device frames hold the real screenshots. The phone is a size container: bezel and island scale with it. */
.phone { --w: 300px; width: var(--w); container-type: inline-size; flex: none; }
.phone .bz { position: relative; padding: 3.3cqw; border-radius: 16.5cqw; background: linear-gradient(150deg, #2B2D38, #0E0F14 40%, #1A1B22); box-shadow: inset 0 0 0 .55cqw #474A58, inset 0 0 0 1.1cqw #101116, 0 2cqw 6cqw -1cqw rgb(14 16 51 / .35), 0 12cqw 22cqw -6cqw rgb(14 16 51 / .45); }
.phone .bz::before, .phone .bz::after { content: ""; position: absolute; width: 1cqw; border-radius: 1cqw; background: #2B2D38; }
.phone .bz::before { inset-inline-start: -.8cqw; top: 22%; height: 9%; }
.phone .bz::after { inset-inline-end: -.8cqw; top: 28%; height: 14%; }
.phone .scr { position: relative; overflow: hidden; border-radius: 13cqw; aspect-ratio: 1206 / 2622; background: #05060f; isolation: isolate; }
.phone .scr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .isl { position: absolute; top: 5.4cqw; left: 50%; width: 29cqw; height: 8.6cqw; translate: -50% 0; border-radius: 99px; background: #000; z-index: 3; }
/* A web page in the phone: the page starts under the status bar, on the page's own top colour. */
.phone.web .scr { background: var(--top, var(--shop)); }
.phone.web .scr img { top: 12.5cqw; height: auto; bottom: auto; }
/* Android: smaller radius, a punch-hole camera. */
.phone.and .bz { border-radius: 10cqw; padding: 2.8cqw; }
.phone.and .scr { border-radius: 7.6cqw; aspect-ratio: 1080 / 2400; }
.phone.and .isl { width: 4.4cqw; height: 4.4cqw; top: 4.4cqw; }
/* Frames of one real flow, stacked: the scene shows one at a time. */
.phone .scr img.f { opacity: 0; transition: opacity .22s linear; }
.phone .scr img.f.on { opacity: 1; }

/* Reveal on entering the screen (makkook's grammar: fade-up 24 px, 0.8 s, expo-out, staggered). */
[data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .8s var(--out), translate .9s var(--out), scale .9s var(--out); transition-delay: calc(var(--i, 0) * 70ms); }
[data-reveal="scale"] { translate: none; scale: .94; }
[data-reveal].in { opacity: 1; translate: 0 0; scale: 1; }

/* Intro: a full-screen layer; the page under it is ready. Skippable (button, Esc); absent under reduced motion. */
.intro { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.intro .skip { position: absolute; inset-inline-end: 20px; bottom: 20px; pointer-events: auto; font: 600 14px/1 var(--text); color: inherit; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .3); padding: 10px 16px; border-radius: 99px; backdrop-filter: blur(10px); cursor: pointer; opacity: 0; animation: fade-in .3s .4s forwards; }
html.intro-done .intro { display: none; }
@keyframes fade-in { to { opacity: 1; } }

/* Scroll scenes: a tall section with a sticky stage; the script writes --p (0 → 1) on the section. */
.scene { position: relative; }
.scene > .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; }

.foot { padding: 40px var(--gut) 48px; font-size: 15px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot .sp { margin-inline-end: auto; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { translate: none; scale: 1; transition: opacity .4s linear; }
  .intro { display: none; }
}
