/* ═══════════════════════════════════════════════════════════════
   MIZAN · landing page (includes/landing.php)

   One dark, art-directed page. Tokens follow assets/css/style.css:
   brand teal, the dark theme's #2DD4BF fill carrying #06251F-family
   text, the same --ease curve and input-border contrast, so the front
   door and the app read as one product.

   Direction is handled with logical properties; the few physical
   values that cannot be logical (gradient positions, transform
   origins) are mirrored through --flip / --origin-start / --gx.

   Nothing here hides content by default. Every hidden starting state
   waits for html.motion, which assets/js/landing.js sets only when
   GSAP is running and reduced motion has not been requested; the
   hero's pre-script states also carry a failsafe reveal.
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
    color-scheme: dark;

    /* Surfaces: brand navy, lifted by lightness rather than borders */
    --ink-0: #04070e;
    --ink-1: #070c18;               /* page */
    --ink-2: #0a1222;               /* raised band */
    --ink-3: #0f192c;               /* surface */
    --ink-4: #15223a;               /* surface, raised */
    --line:   rgb(148 163 184 / .12);
    --line-2: rgb(148 163 184 / .2);
    --line-3: rgb(148 163 184 / .34);

    /* Text, ratios against --ink-1 */
    --fg:   #eaf0f7;                /* 17.0:1 */
    --fg-2: #a9b6c8;                /*  9.5:1; 8.5:1 on --ink-3 */
    --fg-3: #8594aa;                /*  6.3:1; 5.7:1 on --ink-3; captions and meta only */

    /* Brand: the app's dark-theme primary pairing */
    --teal:       #2dd4bf;
    --teal-hover: #5eead4;
    --on-teal:    #04211d;          /* on --teal 9.1:1, on --teal-hover 11.4:1 */
    --teal-text:  #5eead4;
    --teal-rgb:   45 212 191;

    /* Shift data colours (brand identity guide; leave as in the app grid).
       Data encoding only: never used as a decorative accent. */
    --m-rgb: 245 181 68;            /* morning, amber */
    --e-rgb: 45 212 191;            /* evening, teal */
    --n-rgb: 129 140 248;           /* night, indigo */
    --l-rgb: 251 113 133;           /* leave, rose */
    --o-rgb: 100 116 139;           /* day off, slate */

    /* Type (Arabic default; English overrides below) */
    --font: 'Tajawal', system-ui, sans-serif;
    --fw-display: 800;
    --fw-title: 800;
    --fs-display:   clamp(2.3rem, 1.15rem + 4.3vw, 4.5rem);
    --fs-title:     clamp(1.8rem, 1.15rem + 2.5vw, 3.1rem);
    --fs-statement: clamp(1.4rem, .95rem + 2vw, 2.45rem);
    --fs-lede:      clamp(1.08rem, .98rem + .45vw, 1.28rem);
    --fs-body:  1.0625rem;
    --fs-small: .95rem;
    --fs-micro: .8rem;
    --lh-display: 1.3;              /* Arabic marks need the room */
    --lh-title: 1.38;
    --lh-statement: 1.55;
    --lh-body: 1.85;
    --track-display: 0;             /* never track Arabic */
    --track-title: 0;

    /* Space */
    --gutter: clamp(16px, 4.2vw, 44px);
    --container: 77.5rem;
    --section-y: clamp(96px, 12vw, 176px);
    --nav-h: 68px;

    /* Shape: pills are interactive, 20px is a surface, 7px is a data tile */
    --r-pill: 999px;
    --r-surface: 20px;
    --r-tile: 7px;

    /* Motion (CSS transitions only; choreography lives in landing.js) */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-ui: cubic-bezier(.33, 1, .68, 1);
    --dur-ui: .35s;

    /* Direction helpers */
    --flip: 1;
    --origin-start: left;
    --gx: 78%;

    /* Layers */
    --z-grain: 40;
    --z-nav: 50;
    --z-skip: 70;
}

[dir="rtl"] {
    --flip: -1;
    --origin-start: right;
    --gx: 22%;
}

html[lang="en"] {
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --fw-display: 700;
    --fw-title: 700;
    --fs-display:   clamp(2.45rem, 1.2rem + 4.7vw, 4.9rem);
    --fs-title:     clamp(1.9rem, 1.15rem + 2.8vw, 3.3rem);
    --fs-statement: clamp(1.45rem, .95rem + 2.15vw, 2.6rem);
    --fs-lede:      clamp(1.04rem, .96rem + .4vw, 1.22rem);
    --fs-body:  1rem;
    --fs-small: .9rem;
    --lh-display: 1.03;
    --lh-title: 1.1;
    --lh-statement: 1.22;
    --lh-body: 1.65;
    --track-display: -.034em;
    --track-title: -.026em;
}

@media (min-width: 1800px) { html { font-size: 17px; } }
@media (min-width: 2300px) { html { font-size: 18.5px; } }

@media (prefers-contrast: more) {
    :root {
        --fg-2: #d5deea;
        --fg-3: #b7c3d3;
        --line: rgb(148 163 184 / .32);
        --line-2: rgb(148 163 184 / .46);
        --line-3: rgb(148 163 184 / .6);
    }
}

/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

/* clip, not hidden: hidden would make the document a scroll container and
   silently disable position: sticky, which the engine stage depends on. */
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    background: var(--ink-1);
    color: var(--fg);
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Film grain: one fixed, never-scrolling layer, composited once. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: var(--z-grain);
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
em { font-style: normal; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgb(var(--teal-rgb) / .32); color: #fff; }
main:focus { outline: none; }
section[id] { scroll-margin-top: var(--nav-h); }
section[tabindex="-1"]:focus { outline: none; }   /* focused by in-page links, not operable */

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: fixed;
    top: 12px;
    inset-inline-start: 16px;
    z-index: var(--z-skip);
    padding: 10px 18px;
    border-radius: var(--r-pill);
    background: var(--teal);
    color: var(--on-teal);
    font-weight: 700;
    transform: translateY(-180%);
    transition: transform var(--dur-ui) var(--ease-ui);
}
.skip:focus-visible { transform: none; }

/* ── Layout & type ──────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.display {
    font-size: var(--fs-display);
    font-weight: var(--fw-display);
    line-height: var(--lh-display);
    letter-spacing: var(--track-display);
    text-wrap: balance;
}

.title {
    max-width: 20ch;
    font-size: var(--fs-title);
    font-weight: var(--fw-title);
    line-height: var(--lh-title);
    letter-spacing: var(--track-title);
    text-wrap: balance;
}

.lede {
    max-width: 34em;
    font-size: var(--fs-lede);
    line-height: var(--lh-body);
    color: var(--fg-2);
    text-wrap: pretty;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .7em;
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--teal-text);
}
.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.accent { color: var(--teal-text); }

.ico {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ico--fill { fill: currentColor; stroke: none; }

/* Forward-pointing glyphs are drawn pointing right and mirrored in RTL. */
.arrow { transform: scaleX(var(--flip)); transition: transform var(--dur-ui) var(--ease-out); }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6em;
    min-height: 50px;
    padding-inline: 1.4em;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dur-ui) var(--ease-ui), color var(--dur-ui) var(--ease-ui),
                border-color var(--dur-ui) var(--ease-ui), box-shadow var(--dur-ui) var(--ease-ui),
                transform .18s var(--ease-ui);
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn:hover .arrow { transform: scaleX(var(--flip)) translateX(3px); }

.btn--primary {
    background: var(--teal);
    color: var(--on-teal);
    box-shadow: 0 12px 32px -14px rgb(var(--teal-rgb) / .7), inset 0 1px 0 rgb(255 255 255 / .35);
}
.btn--primary:hover { background: var(--teal-hover); }

.btn--ghost {
    border-color: var(--line-3);
    background: rgb(255 255 255 / .025);
    color: var(--fg);
}
.btn--ghost:hover { border-color: rgb(var(--teal-rgb) / .6); background: rgb(var(--teal-rgb) / .07); }

.btn--sm { min-height: 40px; padding-inline: 1.05em; font-size: .9rem; }

/* The magnetic pull moves this wrapper, so it never fights :active. */
.magnet { display: inline-flex; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 519px) {
    .actions { display: grid; width: 100%; }
    .actions .magnet, .actions .btn { width: 100%; }
}

@media (forced-colors: active) {
    .btn { border-color: ButtonText; }
}

/* ── Navigation ─────────────────────────────────────────────────── */
/* Solid by default, so content never shows through it without a script.
   With a script it starts transparent and landing.js adds .is-scrolled as
   soon as the top of the page leaves the viewport. */
.nav-sentinel { position: absolute; top: 0; inset-inline-start: 0; width: 1px; height: 24px; pointer-events: none; }

.nav {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: var(--z-nav);
    height: var(--nav-h);
    border-bottom: 1px solid var(--line);
    background: rgb(7 12 24 / .76);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    transition: background-color .45s var(--ease-ui), border-color .45s var(--ease-ui),
                -webkit-backdrop-filter .45s var(--ease-ui), backdrop-filter .45s var(--ease-ui);
}
.js .nav:not(.is-scrolled) {
    border-bottom-color: transparent;
    background: rgb(7 12 24 / 0);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.nav__inner { display: flex; align-items: center; gap: 20px; height: 100%; }

.nav__brand, .foot__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 12px;
}
html[lang="en"] .nav__word { font-size: 1.02rem; letter-spacing: .14em; }

.nav__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 10px;
    background: #0d9488;
    box-shadow: 0 8px 20px -8px rgb(13 148 136 / .8), inset 0 1px 0 rgb(255 255 255 / .22);
}
.mark-glyph {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: 50% 20%;
}

.nav__links { display: none; gap: 2px; margin-inline-start: auto; }
.nav__link {
    position: relative;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--fg-2);
    transition: color var(--dur-ui) var(--ease-ui);
}
.nav__link::after {
    content: "";
    position: absolute;
    bottom: 3px;
    inset-inline: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: var(--origin-start);
    transition: transform .5s var(--ease-out);
}
.nav__link:hover, .nav__link.is-active { color: var(--fg); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.nav__tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

.lang {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .02);
}
.lang__opt {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 30px;
    padding-inline: 9px;
    border-radius: var(--r-pill);
    font-size: .8rem;
    font-weight: 700;
    color: var(--fg-3);
    transition: color var(--dur-ui), background-color var(--dur-ui);
}
.lang__opt[lang="ar"] { font-family: 'Tajawal', system-ui, sans-serif; font-size: .95rem; }
a.lang__opt:hover { color: var(--fg); background: rgb(255 255 255 / .05); }
.lang__opt.is-current { background: rgb(var(--teal-rgb) / .15); color: var(--teal-text); }

@media (min-width: 900px) {
    .nav__links { display: flex; }
    .nav__tools { margin-inline-start: 10px; }
}
@media (max-width: 379px) {
    .nav__word { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding-block: calc(var(--nav-h) + 16px) 88px;   /* sits a little above centre */
    overflow-x: clip;
}

.hero__atmos {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(55% 55% at var(--gx) 56%, rgb(var(--teal-rgb) / .15), transparent 72%),
        radial-gradient(38% 42% at calc(100% - var(--gx)) 12%, rgb(var(--n-rgb) / .1), transparent 72%),
        radial-gradient(70% 45% at 50% 108%, rgb(var(--m-rgb) / .045), transparent 72%);
}

/* The cinematic layer, rendered by tools/media/mizan-hero/: the week field,
   as a still everywhere and as a loop on large fine-pointer screens (landing.js
   decides). It is the back plane: copy in front, the live board between.
   Wrappers, one concern each: media (entrance) > drift (scroll, pointer) >
   frame (the mirror). Mirrored for right-to-left so the light and the flow sit
   behind the board on either side; nothing in the media can be read, which is
   what makes the mirror safe. */
.hero__media,
.hero__drift,
.hero__frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero__media { overflow: hidden; }
.hero__drift { inset: -24px; }      /* bleed, so the pointer drift never shows an edge */
[dir="rtl"] .hero__frame { transform: scaleX(-1); }

.hero__still,
.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 34%;
}
.hero__video { opacity: 0; }

/* Scrims, inside the mirror so "towards the copy" follows the direction:
   the copy side and under the navigation. */
.hero__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgb(7 12 24 / .72), rgb(7 12 24 / 0) 20%),
        linear-gradient(90deg, rgb(7 12 24 / .88), rgb(7 12 24 / .6) 34%, rgb(7 12 24 / 0) 62%);
}

/* The hand-over into the next section is pinned to the hero, not to the
   drifting media: whatever the field is doing, the hero's last pixels are
   the page colour, so the two sections meet without a seam. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(0deg, var(--ink-1) 3%, rgb(7 12 24 / .76) 18%, rgb(7 12 24 / 0) 48%);
}

@media (max-width: 1023px) {
    .hero__still { object-position: 50% 50%; }
    /* Stacked: the copy sits on the top half, the board below it. */
    .hero__frame::after {
        background: linear-gradient(180deg, rgb(7 12 24 / .8), rgb(7 12 24 / .62) 46%, rgb(7 12 24 / .2) 62%, rgb(7 12 24 / 0) 72%);
    }
    .hero::after { background: linear-gradient(0deg, var(--ink-1) 2%, rgb(7 12 24 / .7) 14%, rgb(7 12 24 / 0) 34%); }
}

.hero__inner { position: relative; z-index: 1; display: grid; gap: 28px; align-items: center; }
.hero__copy { display: grid; justify-items: start; gap: 22px; container-type: inline-size; }

/* Sized to its own column, so each of the two semantic lines stays one line
   at every width (measured: the longest line is ~8.1em in Arabic, ~10em in
   English). */
.hero__title { font-size: clamp(2.1rem, 11.8cqi, 4.7rem); }
html[lang="en"] .hero__title { font-size: clamp(2.1rem, 9.4cqi, 5rem); }

/* Each headline line is its own mask; the padding keeps Arabic marks and
   descenders inside it, the negative margin keeps the rhythm. */
.line { display: block; padding-block: .12em; margin-block: -.12em; overflow: clip; }
.line__in { display: block; }

.hero__visual { position: relative; min-width: 0; }

@media (min-width: 1024px) {
    .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
    .hero__visual { margin-inline-end: calc(-1 * var(--gutter)); }
}
@media (min-width: 1280px) {
    .hero__inner { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); }
}

/* ── The week board (CSS 3D) ────────────────────────────────────── */
.board {
    position: relative;
    margin: 0;
    container-type: inline-size;
}

.board--hero   { --rx: 54deg; --rz: -33deg; --ar: 1.55; --cell: clamp(21px, 6.9cqi, 54px); }
.board--engine { --rx: 24deg; --rz: -4deg;  --ar: 1.32; --cell: clamp(23px, 6.4cqi, 50px); }
[dir="rtl"] .board--hero   { --rz: 33deg; }
[dir="rtl"] .board--engine { --rz: 4deg; }

.board__scene {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: var(--ar);
    perspective: 1600px;
    perspective-origin: 50% 38%;
}

.board__dolly,
.board__camera {
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
}
.board__rig { transform-style: preserve-3d; transform: rotateX(var(--rx)); }
.board__spin {
    position: relative;
    display: grid;
    gap: calc(var(--cell) * .3);
    padding: calc(var(--cell) * .42);
    transform-style: preserve-3d;
    transform: rotateZ(var(--rz));
}

.board__plate {
    position: absolute;
    inset: 0;
    border: 1px solid var(--line-2);
    border-radius: calc(var(--cell) * .5);
    background: linear-gradient(168deg, rgb(255 255 255 / .065), rgb(255 255 255 / .012) 58%), var(--ink-3);
    box-shadow: 0 0 0 1px rgb(0 0 0 / .35),
                0 calc(var(--cell) * 1.3) calc(var(--cell) * 2.4) calc(var(--cell) * -.5) rgb(0 0 0 / .72);
}

.board__head,
.board__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--cell) * .3);
    font-size: calc(var(--cell) * .27);
    line-height: 1.2;
    color: var(--fg-2);
}
.board__title { display: inline-flex; align-items: center; gap: .55em; font-weight: 700; color: var(--fg); }
.board__head-ico, .board__status-ico, .board__publish-ico, .board__prompt-ico {
    width: 1.3em;
    height: 1.3em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.board__status {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    padding: .4em .85em;
    border-radius: var(--r-pill);
    background: rgb(var(--teal-rgb) / .13);
    color: var(--teal-text);
    font-weight: 700;
}

.board__grid {
    position: relative;
    display: grid;
    grid-template-columns: calc(var(--cell) * 1.9) repeat(7, var(--cell));
    gap: calc(var(--cell) * .14);
    align-items: center;
    transform-style: preserve-3d;
}
.board--engine .board__grid { grid-template-columns: calc(var(--cell) * 1.9) repeat(7, var(--cell)) calc(var(--cell) * 1.2); }

.board__day {
    font-size: calc(var(--cell) * .25);
    font-weight: 700;
    text-align: center;
    color: var(--fg-3);
    white-space: nowrap;
}
.board__name {
    display: flex;
    align-items: center;
    gap: calc(var(--cell) * .16);
    min-width: 0;
    font-size: calc(var(--cell) * .28);
    font-weight: 600;
    color: var(--fg-2);
    white-space: nowrap;
}
.board__avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: calc(var(--cell) * .58);
    height: calc(var(--cell) * .58);
    border-radius: 50%;
    background: var(--ink-4);
    box-shadow: inset 0 0 0 1px var(--line-2);
    font-size: calc(var(--cell) * .25);
    font-weight: 800;
    color: var(--fg);
}
.board__person { overflow: hidden; text-overflow: ellipsis; }

@container (max-width: 470px) {
    .board__person { display: none; }
    .board__grid { grid-template-columns: calc(var(--cell) * .75) repeat(7, var(--cell)); }
    .board--engine .board__grid { grid-template-columns: calc(var(--cell) * .75) repeat(7, var(--cell)) calc(var(--cell) * 1.05); }
    .board--engine { --cell: clamp(23px, 7.6cqi, 50px); }
}

/* A cell is the socket; the tile is the block that lands in it. */
.cell {
    position: relative;
    width: var(--cell);
    aspect-ratio: 1;
    border-radius: var(--r-tile);
    background: rgb(255 255 255 / .02);
    box-shadow: inset 0 0 0 1px rgb(148 163 184 / .1);
    transform-style: preserve-3d;
}
.cell__shadow {
    position: absolute;
    inset: 4%;
    border-radius: inherit;
    background: radial-gradient(closest-side, rgb(0 0 0 / .62), transparent);
}
/* The lift lives in `translate`, and the hero's scroll-out drives --lift:
   GSAP owns `transform` for the entrance, so the two never collide. */
.tile {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    translate: 0 0 calc(3px + var(--lift, 0px));
}
.tile__face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: var(--r-tile);
    font-size: calc(var(--cell) * .4);
    font-weight: 800;
    line-height: 1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.tile__face--m { --c: var(--m-rgb); }
.tile__face--e { --c: var(--e-rgb); }
.tile__face--n { --c: var(--n-rgb); }
.tile__face--leave { --c: var(--l-rgb); }
.tile__face--m, .tile__face--e, .tile__face--n {
    color: color-mix(in oklab, rgb(var(--c)) 58%, white);
    background: linear-gradient(165deg, rgb(var(--c) / .38), rgb(var(--c) / .15) 72%);
    box-shadow: inset 0 0 0 1px rgb(var(--c) / .52),
                inset 0 1px 0 rgb(255 255 255 / .18),
                0 calc(var(--cell) * .075) 0 rgb(var(--c) / .22);
}
.tile__face--leave {
    color: rgb(var(--l-rgb));
    background: repeating-linear-gradient(135deg, rgb(var(--l-rgb) / .24) 0 3px, rgb(var(--l-rgb) / .08) 3px 7px);
    box-shadow: inset 0 0 0 1px rgb(var(--l-rgb) / .55), 0 calc(var(--cell) * .075) 0 rgb(var(--l-rgb) / .2);
}
.tile__face--off { box-shadow: inset 0 0 0 1px rgb(var(--o-rgb) / .5); background: rgb(var(--o-rgb) / .06); }
.tile__face--back { transform: rotateX(180deg); }
.tile__ico {
    width: 48%;
    height: 48%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tile__flag {
    position: absolute;
    top: -20%;
    inset-inline-end: -20%;
    display: grid;
    place-items: center;
    width: 50%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ink-1);
    color: rgb(var(--m-rgb));
    box-shadow: inset 0 0 0 1px rgb(var(--m-rgb) / .65);
}
.tile__flag .tile__ico { width: 66%; height: 66%; }

.board__load {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--cell) * .065);
    height: var(--cell);
}
/* Evening and night load per person. --on is 0 or 1; a number, not a class,
   so the fairness step can scrub it both ways. */
.pip {
    position: relative;
    width: calc(var(--cell) * .1);
    height: calc(var(--cell) * .4);
    border-radius: 2px;
    background: rgb(148 163 184 / .16);
}
.pip::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(rgb(var(--n-rgb)), rgb(var(--e-rgb)));
    opacity: var(--on, 0);
}
.pip.is-on { --on: 1; }

/* The verifier's sweep: a line of light that crosses the week once. */
.board__scan {
    position: absolute;
    top: 0;
    inset-inline: calc(var(--cell) * -.2);
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--teal-hover) 20%, var(--teal) 50%, var(--teal-hover) 80%, transparent);
    box-shadow: 0 0 calc(var(--cell) * .4) rgb(var(--teal-rgb) / .8);
    translate: 0 0 calc(var(--cell) * .3);
    opacity: 0;
    pointer-events: none;
}
.board__check {
    position: absolute;
    inset: 0;
    width: calc(var(--cell) * .5);
    height: calc(var(--cell) * .5);
    margin: auto;
    fill: none;
    stroke: var(--teal);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

.board__legend { display: flex; flex-wrap: wrap; gap: .35em 1em; }
.board__key { display: inline-flex; align-items: center; gap: .45em; white-space: nowrap; }
.board__swatch {
    width: .95em;
    height: .95em;
    border-radius: 3px;
    background: rgb(var(--c) / .32);
    box-shadow: inset 0 0 0 1px rgb(var(--c) / .6);
}
.board__swatch--m { --c: var(--m-rgb); }
.board__swatch--e { --c: var(--e-rgb); }
.board__swatch--n { --c: var(--n-rgb); }
.board__swatch--leave { --c: var(--l-rgb); }
.board__swatch--off { --c: var(--o-rgb); background: transparent; }

.board__publish {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    margin-inline-start: auto;
    padding: .5em 1.05em;
    border-radius: var(--r-pill);
    background: var(--teal);
    color: var(--on-teal);
    font-weight: 800;
    white-space: nowrap;
}

@container (max-width: 560px) {
    .board__legend { display: none; }
}

/* Engine overlays: flat UI floating over the scene. Only the motion
   walkthrough shows them; the step list says the same in words. */
.board__prompt,
.board__phone { display: none; }

.board__prompt {
    position: absolute;
    top: 1%;
    inset-inline: 0;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: 94%;
    margin-inline: auto;
    padding-block: 7px;
    padding-inline: 7px 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    background: rgb(15 25 44 / .92);
    box-shadow: 0 20px 44px -18px rgb(0 0 0 / .85);
    font-size: .92rem;
}
.board__prompt-k {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--r-pill);
    background: rgb(var(--teal-rgb) / .13);
    color: var(--teal-text);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.board__prompt-v { font-weight: 600; color: var(--fg); }
/* After the base rules on purpose: a container query adds no specificity. */
@container (max-width: 470px) {
    .board__prompt { top: -2%; gap: 6px; padding-block: 5px; padding-inline: 5px 11px; font-size: .76rem; }
    .board__prompt-k { padding: 3px 8px; font-size: .66rem; }
}

.board__phone {
    position: absolute;
    bottom: 2%;
    inset-inline-end: 1%;
    width: min(44%, 236px);
    perspective: 900px;
}
.phone {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 12px 12px 14px;
    border: 1px solid var(--line-2);
    border-radius: 28px;
    background: linear-gradient(160deg, #1b283f, #0b1323 70%);
    box-shadow: 0 44px 80px -30px rgb(0 0 0 / .95), inset 0 1px 0 rgb(255 255 255 / .08);
}
.phone__island {
    justify-self: center;
    width: 34%;
    height: 12px;
    border-radius: var(--r-pill);
    background: #02050b;
}
.phone__note {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06);
}
.phone__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .68rem; color: var(--fg-3); }
.phone__app { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--fg-2); }
.phone__tg { width: 15px; height: 15px; fill: #2aabee; }
.phone__msg { font-size: .82rem; font-weight: 700; line-height: 1.45; color: var(--fg); }
.phone__who { font-size: .68rem; color: var(--fg-3); }
.phone__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.phone__day { display: grid; gap: 4px; justify-items: center; font-size: .6rem; color: var(--fg-3); }

/* Mini tiles: the same colour code at small sizes. */
.mini {
    display: block;
    width: 100%;
    aspect-ratio: 1.5;
    border-radius: 4px;
    background: rgb(var(--c) / .34);
    box-shadow: inset 0 0 0 1px rgb(var(--c) / .58);
}
.mini--m { --c: var(--m-rgb); }
.mini--e { --c: var(--e-rgb); }
.mini--n { --c: var(--n-rgb); }
.mini--leave { --c: var(--l-rgb); }
.mini--off { --c: var(--o-rgb); background: transparent; }

@media (forced-colors: active) {
    .tile__face, .mini, .cell { border: 1px solid CanvasText; }
}

/* ── Problems ───────────────────────────────────────────────────── */
.problems { position: relative; padding-block: var(--section-y); }
.problems__inner { display: grid; gap: 40px; }

.statements { display: grid; gap: clamp(28px, 5vh, 60px); margin-top: clamp(40px, 7vh, 80px); }
.statement {
    max-width: 22ch;
    font-size: var(--fs-statement);
    font-weight: 700;
    line-height: var(--lh-statement);
    letter-spacing: var(--track-title);
    text-wrap: balance;
}
.turn {
    max-width: 13ch;
    padding-block: .14em;           /* its own mask: room for Arabic marks */
    overflow: clip;
    margin-top: clamp(64px, 11vh, 128px);
    font-size: var(--fs-display);
    font-weight: var(--fw-display);
    line-height: var(--lh-display);
    letter-spacing: var(--track-display);
    color: var(--teal-text);
    text-wrap: balance;
}

.problems__visual { position: relative; }

.scale {
    --tilt: 0deg;
    position: relative;
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
    aspect-ratio: 1.05;
    container-type: inline-size;
}
.scale__halo {
    position: absolute;
    inset: 8% 0 0;
    pointer-events: none;
    background: radial-gradient(50% 45% at 50% 40%, rgb(var(--teal-rgb) / .12), transparent 72%);
}
.scale__post {
    position: absolute;
    top: 20%;
    bottom: 9%;
    left: 50%;
    width: 4px;
    translate: -50% 0;
    border-radius: 4px;
    background: linear-gradient(var(--line-3), rgb(148 163 184 / .1));
}
.scale__foot {
    position: absolute;
    bottom: 9%;
    left: 50%;
    width: 34%;
    height: 4px;
    translate: -50% 0;
    border-radius: 4px;
    background: var(--line-3);
}
.scale__beam {
    position: absolute;
    top: 20%;
    left: 50%;
    width: 80%;
    height: 0;
    translate: -50% 0;
    transform: rotate(var(--tilt));
}
.scale__bar {
    position: absolute;
    top: -2px;
    inset-inline: 0;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgb(var(--teal-rgb) / .45), var(--teal), rgb(var(--teal-rgb) / .45));
}
.scale__pivot {
    position: absolute;
    top: 0;
    left: 50%;
    width: 14px;
    height: 14px;
    translate: -50% -50%;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 6px rgb(var(--teal-rgb) / .14);
}
/* Physical left/right: a balance is a physical object, and the counter-
   rotation keeps each pan hanging straight whatever the beam does. */
.scale__hang {
    position: absolute;
    top: 0;
    width: 38%;
    transform-origin: 50% 0;
    transform: rotate(calc(var(--tilt) * -1));
}
.scale__hang--a { left: 0; translate: -50% 0; }
.scale__hang--b { right: 0; translate: 50% 0; }
.scale__cord {
    display: block;
    width: 1px;
    height: 44cqi;
    margin-inline: auto;
    background: linear-gradient(var(--line-3), rgb(148 163 184 / .2));
}
.scale__pan { position: relative; margin-top: -38cqi; display: grid; justify-items: center; }
.scale__stack {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    min-height: 38cqi;
    padding-bottom: 4px;
}
.scale__tile { width: 13cqi; aspect-ratio: 2.4; border-radius: 5px; }
.scale__tile.is-extra { display: none; }
.scale__dish {
    width: 100%;
    height: 3.2cqi;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(rgb(var(--teal-rgb) / .38), rgb(var(--teal-rgb) / .08));
    box-shadow: inset 0 1px 0 rgb(var(--teal-rgb) / .7);
}

@media (min-width: 1024px) {
    .problems__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: 48px; }
    .problems__visual { position: sticky; top: calc(50vh - 230px + var(--nav-h) / 2); }
}

@media (max-width: 1023px) {
    .problems__visual {
        position: sticky;
        top: var(--nav-h);
        z-index: 1;
        order: -1;
        margin-inline: calc(-1 * var(--gutter));
        padding-inline: var(--gutter);
        background: linear-gradient(var(--ink-1) 78%, rgb(7 12 24 / 0));
    }
    .problems__visual .scale { max-width: 236px; aspect-ratio: 1.5; }
    .problems__visual .scale__post { top: 16%; }
    .problems__visual .scale__beam { top: 16%; }
}

/* ── Engine ─────────────────────────────────────────────────────── */
.engine { position: relative; padding-block: var(--section-y); }
.engine__inner { display: grid; gap: 40px; align-items: center; }
.engine__copy { display: grid; align-content: start; gap: 28px; }
.steps { display: grid; gap: 28px; }
.step { display: grid; gap: 6px; max-width: 30em; }
.step__title { font-size: clamp(1.18rem, 1rem + .55vw, 1.45rem); font-weight: 700; line-height: 1.35; letter-spacing: var(--track-title); }
.step__body { color: var(--fg-2); }
.engine__visual { position: relative; }

.rail { display: none; gap: 4px; }
.rail__btn { position: relative; width: 44px; height: 28px; border-radius: 8px; }
.rail__btn::before,
.rail__fill {
    position: absolute;
    top: 50%;
    inset-inline: 4px;
    height: 3px;
    border-radius: 3px;
    translate: 0 -50%;
}
.rail__btn::before { content: ""; background: var(--line-2); transition: background-color var(--dur-ui); }
.rail__btn:hover::before { background: var(--line-3); }
.rail__fill { background: var(--teal); transform: scaleX(0); transform-origin: var(--origin-start); }

@media (min-width: 1024px) {
    .engine__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
    .engine__visual { position: sticky; top: calc(var(--nav-h) + 24px); }
}

/* ── After publishing (bento) ───────────────────────────────────── */
.flow {
    padding-block: var(--section-y);
    background: linear-gradient(var(--ink-1), var(--ink-2) 16%, var(--ink-2) 84%, var(--ink-1));
}
.bento { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.feature {
    position: relative;
    display: grid;
    align-content: space-between;
    gap: 28px;
    min-height: 320px;
    padding: clamp(22px, 2.4vw, 32px);
    border: 1px solid var(--line);
    border-radius: var(--r-surface);
    background: linear-gradient(170deg, rgb(255 255 255 / .045), rgb(255 255 255 / .008) 52%), var(--ink-3);
    overflow: clip;
    isolation: isolate;
}
.feature::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(75% 60% at var(--gx) 0%, rgb(var(--glow) / .13), transparent 72%);
}
.feature--market { --glow: var(--e-rgb); }
.feature--leave  { --glow: var(--l-rgb); }
.feature--today  { --glow: var(--m-rgb); }
.feature--export { --glow: var(--n-rgb); }

.feature__title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; line-height: 1.35; }
.feature__ico { color: rgb(var(--glow)); }
.feature__body { max-width: 34em; margin-top: 8px; color: var(--fg-2); }

.avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ink-4);
    box-shadow: inset 0 0 0 1px var(--line-2);
    font-size: .95rem;
    font-weight: 800;
    color: var(--fg);
}
.avatar--sm { width: 28px; height: 28px; font-size: .72rem; box-shadow: 0 0 0 2px var(--ink-3), inset 0 0 0 1px var(--line-2); }

.demo { position: relative; }

.demo-market { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; }
.dm-person { display: grid; justify-items: center; gap: 6px; font-size: var(--fs-micro); color: var(--fg-2); }
.dm-lane { position: relative; display: grid; place-items: center; min-height: 44px; }
.dm-lane::before { content: ""; position: absolute; top: 50%; inset-inline: 0; border-top: 1px dashed var(--line-3); }
.dm-token {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: var(--r-pill);
    background: var(--ink-4);
    box-shadow: inset 0 0 0 1px rgb(var(--e-rgb) / .5), 0 10px 24px -12px rgb(0 0 0 / .8);
    font-size: var(--fs-micro);
    font-weight: 700;
    white-space: nowrap;
}
.dm-token .mini { width: 18px; }
.turn__in { display: block; }

/* On a narrow card the label would fill the lane and the token could not
   travel; the tile alone still reads as "a shift". */
.feature { container-type: inline-size; }
@container (max-width: 400px) {
    .dm-token__label { display: none; }
}
.dm-status { grid-column: 1 / -1; display: grid; justify-self: center; }
.dm-status > span {
    grid-area: 1 / 1;
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: var(--r-pill);
    font-size: var(--fs-micro);
    font-weight: 700;
    white-space: nowrap;
}
.dm-status__wait { background: rgb(var(--m-rgb) / .12); color: rgb(var(--m-rgb)); opacity: 0; }
.dm-status__ok { background: rgb(var(--teal-rgb) / .13); color: var(--teal-text); }

.demo-leave { display: grid; gap: 22px; }
.dl-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--ink-4);
    box-shadow: inset 0 0 0 1px var(--line-2);
}
.dl-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: rgb(var(--l-rgb)); }
.dl-when { font-size: var(--fs-micro); color: var(--fg-2); }
.dl-track { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); }
.dl-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; font-size: .75rem; text-align: center; color: var(--fg-2); }
.dl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--ink-3), inset 0 0 0 2px var(--teal); }
.dl-line { position: absolute; top: 6px; inset-inline: 16.66%; height: 2px; background: var(--line-2); }
.dl-line__fill { position: absolute; inset: 0; background: var(--teal); transform-origin: var(--origin-start); }

.demo-today { display: grid; gap: 10px; }
.dt-clock { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dt-now { font-size: var(--fs-micro); color: var(--fg-3); }
.dt-time { font-size: 1.7rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.dt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; font-size: var(--fs-small); }
.dt-k { display: inline-flex; align-items: center; gap: 9px; color: var(--fg-2); }
.dt-k .mini { width: 16px; }
.dt-people { display: flex; }
.dt-people .avatar + .avatar { margin-inline-start: -8px; }
.dt-n { min-width: 1.2em; font-weight: 800; text-align: end; font-variant-numeric: tabular-nums; }

.demo-export { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.dx-sheet {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 12px;
    background: var(--ink-4);
    box-shadow: inset 0 0 0 1px var(--line-2);
}
.dx-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.dx-files { display: grid; gap: 8px; }
.dx-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--ink-1);
    box-shadow: inset 0 0 0 1px var(--line-2);
    font-size: .78rem;
    font-weight: 600;
    color: var(--fg-2);
    white-space: nowrap;
}
.dx-file--xlsx .ico { color: #34d399; }
.dx-file--pdf .ico { color: rgb(var(--l-rgb)); }

@media (min-width: 900px) {
    .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .feature--market, .feature--export { grid-column: span 2; }
}
@media (max-width: 420px) {
    .demo-export { grid-template-columns: 1fr; }
    .dx-files { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dx-file { min-width: 0; }
    .dx-file bdi { overflow: hidden; text-overflow: ellipsis; }
}

/* ── Fit (industries) ───────────────────────────────────────────── */
.fit { padding-block: var(--section-y); }
.industries { margin-top: clamp(40px, 6vw, 72px); }
.industry { display: grid; gap: 14px; padding-block: clamp(20px, 2.6vw, 32px); }
.industry + .industry { border-top: 1px solid var(--line); }
.industry__name {
    font-size: clamp(1.3rem, 1rem + 1.3vw, 2.05rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: var(--track-title);
    transition: color .45s var(--ease-ui);
}
.industry:hover .industry__name { color: var(--teal-text); }
.strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: min(100%, 340px); perspective: 700px; }
.strip__tile { aspect-ratio: 1.3; border-radius: 6px; }

@media (min-width: 768px) {
    .industry { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; }
    .strip { width: 330px; }
}

/* ── Pricing ────────────────────────────────────────────────────── */
.pricing { padding-block: var(--section-y); }
.pricing__head { display: grid; gap: 16px; }
.plans { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 64px); perspective: 1400px; }
.plan {
    position: relative;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: clamp(24px, 2.6vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--r-surface);
    background: var(--ink-2);
    transition: border-color .45s var(--ease-ui), background-color .45s var(--ease-ui);
}
.plan:hover { border-color: var(--line-3); }
.plan--popular {
    border-color: rgb(var(--teal-rgb) / .45);
    background: linear-gradient(170deg, rgb(var(--teal-rgb) / .1), rgb(var(--teal-rgb) / .015) 55%), var(--ink-3);
    box-shadow: 0 44px 90px -44px rgb(var(--teal-rgb) / .38);
}
.plan--popular:hover { border-color: rgb(var(--teal-rgb) / .7); }
.plan__badge {
    position: absolute;
    top: 22px;
    inset-inline-end: 22px;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    background: rgb(var(--teal-rgb) / .15);
    color: var(--teal-text);
    font-size: var(--fs-micro);
    font-weight: 700;
}
.plan__name { font-size: 1.1rem; font-weight: 700; color: var(--fg-2); }
.plan--popular .plan__name { color: var(--teal-text); }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.plan__amount {
    font-size: clamp(2.8rem, 2rem + 2vw, 3.7rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}
.plan__cur { align-self: flex-start; margin-top: .3em; font-size: 1.4rem; font-weight: 700; color: var(--fg-2); }
.plan__per { margin-inline-start: 8px; font-size: var(--fs-small); color: var(--fg-3); }
.plan__limit { padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: var(--fs-small); color: var(--fg-2); }
.plan__list { display: grid; gap: 12px; }
.plan__list li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-small); line-height: 1.55; }
.plan__check { margin-top: .2em; color: var(--teal); }
.plan__cta { width: 100%; margin-top: 10px; }
.pricing__note { margin-top: 28px; font-size: var(--fs-small); color: var(--fg-3); }

@media (min-width: 900px) {
    .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; }
    .plan--popular { padding-block: calc(clamp(24px, 2.6vw, 36px) + 18px); }
}

/* ── Close (#contact) ───────────────────────────────────────────── */
.close { position: relative; padding-block: var(--section-y); overflow-x: clip; }
.close__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(48% 58% at var(--gx) 52%, rgb(var(--teal-rgb) / .14), transparent 72%);
}
.close__inner { position: relative; display: grid; gap: 48px; align-items: center; }
.close__copy { display: grid; justify-items: start; gap: 22px; }
.close__title { max-width: 14ch; }
.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.contact__item { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--fg-2); }
.contact__ico { color: var(--teal); }
.contact__k { color: var(--fg-3); }
a.contact__v {
    font-weight: 700;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    text-decoration: underline;
    text-decoration-color: rgb(var(--teal-rgb) / .5);
    text-underline-offset: 4px;
    transition: text-decoration-color var(--dur-ui);
}
a.contact__v:hover { text-decoration-color: var(--teal); }

.mark { --tilt: 0deg; width: min(100%, 460px); margin-inline: auto; overflow: visible; }
.mark__stroke { stroke: rgb(148 163 184 / .5); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mark__stroke--brand { stroke: var(--teal); }
.mark__pivot { fill: var(--teal); }
.mark__beam,
.mark__hang--a,
.mark__hang--b { transform-box: view-box; }
.mark__beam { transform-origin: 120px 44px; transform: rotate(var(--tilt)); }
.mark__hang--a { transform-origin: 28px 44px; transform: rotate(calc(var(--tilt) * -1)); }
.mark__hang--b { transform-origin: 212px 44px; transform: rotate(calc(var(--tilt) * -1)); }

@media (min-width: 1024px) {
    .close__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* ── Footer ─────────────────────────────────────────────────────── */
.foot {
    position: relative;
    padding-top: 56px;
    border-top: 1px solid var(--line);
    background: var(--ink-0);
    overflow: clip;
}
.foot__inner { display: grid; gap: 24px; align-items: center; }
.foot__links { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: var(--fs-small); }
.foot__links a, .foot__login { color: var(--fg-2); border-radius: 6px; transition: color var(--dur-ui); }
.foot__links a:hover, .foot__login:hover { color: var(--fg); }
.foot__rights { font-size: var(--fs-micro); color: var(--fg-3); }
.foot__word {
    margin-top: clamp(32px, 6vw, 64px);
    margin-bottom: -.22em;
    font-size: clamp(5.5rem, 25vw, 23rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: var(--track-display);
    text-align: center;
    user-select: none;
    pointer-events: none;
}
.foot__word-in {
    display: block;
    color: transparent;
    background: linear-gradient(rgb(var(--teal-rgb) / .2), rgb(var(--teal-rgb) / .02) 78%);
    -webkit-background-clip: text;
    background-clip: text;
}

@media (min-width: 900px) {
    .foot__inner { grid-template-columns: auto 1fr auto; }
    .foot__links { justify-content: center; }
}

/* ── Client login dialog ────────────────────────────────────────── */
.login {
    width: min(100% - 32px, 420px);
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent;
    color: var(--fg);
    overflow: visible;
}
.login::backdrop {
    background: rgb(3 6 13 / .68);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
@media (prefers-reduced-motion: no-preference) {
    .login::backdrop { transition: opacity .3s var(--ease-ui); }
    @starting-style { .login[open]::backdrop { opacity: 0; } }
}
.login__card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 30px 26px 26px;
    border: 1px solid var(--line-2);
    border-radius: 24px;
    background: linear-gradient(170deg, rgb(255 255 255 / .065), rgb(255 255 255 / .012) 52%), var(--ink-3);
    box-shadow: 0 60px 120px -30px rgb(0 0 0 / .92);
}
.login__close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--fg-2);
    transition: background-color var(--dur-ui), color var(--dur-ui);
}
.login__close:hover { background: rgb(255 255 255 / .07); color: var(--fg); }
.login__mark { margin-bottom: 8px; }
.login__title { font-size: 1.45rem; font-weight: var(--fw-title); line-height: 1.3; letter-spacing: var(--track-title); }
.login__desc { margin-bottom: 10px; font-size: var(--fs-small); color: var(--fg-2); }
.login__label { font-size: var(--fs-small); font-weight: 700; }
.login__input {
    width: 100%;
    height: 58px;
    padding-inline: calc(16px + .4em) 16px;
    border: 1px solid #6e7f94;       /* style.css dark --border-input; 4.8:1 here */
    border-radius: 14px;
    background: var(--ink-1);
    color: var(--fg);
    font: inherit;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: .4em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: border-color var(--dur-ui), box-shadow var(--dur-ui);
}
.login__input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgb(var(--teal-rgb) / .22); }
.login__input[aria-invalid="true"] { border-color: rgb(var(--l-rgb)); }
.login__hint { font-size: var(--fs-micro); color: var(--fg-3); }
.login__error {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgb(var(--l-rgb) / .1);
    color: #fda4af;
    font-size: var(--fs-small);
    font-weight: 600;
}
.login__submit { width: 100%; margin-top: 8px; }
.login__submit[aria-busy="true"] { cursor: progress; opacity: .8; }

/* ════════════════════════════════════════════════════════════════
   Motion states. Only html.motion hides anything, and only because
   landing.js is about to reveal it.
   ════════════════════════════════════════════════════════════════ */

/* Hero: visible from first paint unless a script will animate it. The
   failsafe shows everything at 1.8s if GSAP never arrives. */
@media (prefers-reduced-motion: no-preference) {
    .js [data-hero-line] { transform: translateY(112%); animation: mz-failsafe-rise .01s 1.8s forwards; }
    .js [data-hero-reveal],
    .js .board--hero .tile,
    .js .board--hero .cell__shadow,
    .js .board--hero .board__status { opacity: 0; animation: mz-failsafe-fade .01s 1.8s forwards; }

    .motion [data-hero-line],
    .motion [data-hero-reveal],
    .motion .board--hero .tile,
    .motion .board--hero .cell__shadow,
    .motion .board--hero .board__status { animation: none; }

    /* The still eases in with the first paint. CSS only, deliberately: it is the
       page's largest paint, and gating it on a script would hold the LCP back
       until GSAP and landing.js had loaded. */
    .hero__still { animation: mz-still-in .8s var(--ease-out) both; }
}
@keyframes mz-still-in { from { opacity: 0; } }
@keyframes mz-failsafe-rise { to { transform: none; } }
@keyframes mz-failsafe-fade { to { opacity: 1; } }

.motion .scale__tile.is-extra { display: block; }

/* SplitText line masks: room for Arabic marks above and below the line box. */
.split-line-mask { padding-block: .14em; margin-block: -.14em; }

/* Engine walkthrough: a tall section whose stage sticks while the master
   timeline is scrubbed. Native sticky: no pin spacer, no mobile jumps. */
.motion .engine {
    --steps: 5;
    --step-len: 86vh;
    height: calc(100vh + var(--steps) * var(--step-len));
    padding-block: 0;
}
@supports (height: 1svh) {
    .motion .engine { --step-len: 86svh; height: calc(100svh + var(--steps) * var(--step-len)); }
}
.motion .engine__stage {
    position: sticky;
    top: 0;
    display: grid;
    align-items: center;
    height: 100vh;
    height: 100svh;
    padding-top: var(--nav-h);
    overflow-x: clip;
}
.motion .engine__visual { position: relative; top: auto; }
.motion .steps { display: grid; }
.motion .step { grid-area: 1 / 1; }
.motion .rail { display: flex; }
.motion .board__prompt { display: flex; }
.motion .board__phone { display: block; }
.motion .board--engine .board__status { opacity: 0; }

@media (max-width: 1023px) {
    .motion .engine { --step-len: 66vh; }
    @supports (height: 1svh) { .motion .engine { --step-len: 66svh; } }
    .motion .engine__inner { grid-template-rows: auto auto; gap: 8px; align-content: center; }
    .motion .engine__visual { order: -1; width: min(100%, 560px); justify-self: center; }
    .motion .engine__copy { gap: 14px; }
    .motion .engine__title { font-size: clamp(1.25rem, 1rem + 1.4vw, 1.9rem); }
    .motion .step__title { font-size: 1.1rem; }
    .motion .step__body { font-size: var(--fs-small); line-height: 1.7; }
}
@media (max-width: 1023px) and (max-height: 700px) {
    .motion .engine__title { display: none; }
}
