/* ST Studios portfolio — "arcade noir"
   Near-black canvas, drifting candy orbs, Bricolage Grotesque display type. */

:root {
    --ink: #07080d;
    --ink-raise: #0e1019;
    --line: rgba(245, 242, 236, 0.1);
    --text: #f5f2ec;
    --text-dim: rgba(245, 242, 236, 0.62);
    --brand: #eb9b34;
    --popper: #0277bd;
    --candy-pink: #ff6b9d;
    --candy-teal: #4ecdc4;
    --display: "Bricolage Grotesque", sans-serif;
    --body: "Schibsted Grotesk", sans-serif;
    /* One column for every band: nav, hero, sections, footer. */
    --container: 1320px;
    --gutter: clamp(20px, 6vw, 96px);

    /* ---- Design scale (the gaps/radii standard — use a token, not a raw
       number; see docs in Website/wwwroot/css/README-design.md). New + edited
       CSS uses these; existing raw values migrate over time. ---- */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    --r-sm: 8px;   /* small chips / inputs */
    --r-md: 14px;  /* small app icon, compact cards */
    --r-lg: 18px;  /* app icon */
    --r-xl: 22px;  /* grid cards */
    --r-2xl: 28px; /* feature card */
    --r-pill: 999px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body.portfolio {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Sticky footer: short pages (e.g. /support) still pin it to the
       viewport bottom. */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body.portfolio main {
    flex: 1 0 auto;
    /* Flex column so short pages (support) can centre themselves in the
       leftover space with margin-block auto. */
    display: flex;
    flex-direction: column;
}

body.portfolio main > * { width: 100%; }

/* ---- shared layout shell ----
   Gutter lives INSIDE the max-width (border-box), so the content column
   is exactly var(--container) wide in every band. Vertical rhythm for
   full sections comes from .section-pad. */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section-pad { padding-block: clamp(70px, 9vw, 130px); }

/* ---- atmosphere ---- */

.orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    filter: blur(70px);
}

.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.32;
    animation: drift 26s ease-in-out infinite;
}

.orb-1 { width: 44vw; height: 44vw; left: -12vw; top: -14vw; background: radial-gradient(circle at 35% 35%, var(--popper), transparent 65%); }
.orb-2 { width: 34vw; height: 34vw; right: -10vw; top: 18vh; background: radial-gradient(circle at 40% 40%, var(--candy-pink), transparent 65%); animation-delay: -8s; animation-duration: 32s; }
.orb-3 { width: 30vw; height: 30vw; left: 30vw; bottom: -16vw; background: radial-gradient(circle at 45% 40%, var(--brand), transparent 65%); animation-delay: -16s; animation-duration: 38s; }
.orb-4 { width: 22vw; height: 22vw; right: 22vw; bottom: 20vh; background: radial-gradient(circle at 45% 40%, var(--candy-teal), transparent 65%); animation-delay: -4s; animation-duration: 22s; }

@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(10vw, -8vh) scale(1.14); }
    50%  { transform: translate(-7vw, -15vh) scale(0.94); }
    75%  { transform: translate(-13vw, 7vh) scale(1.08); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ---- tile pattern, an exact port of the apps' TilePatternBackground:
   11px rounded squares, half-tile gap, ~50% of cells skipped, random
   opacity per tile. The data-URI is generated in the layout script so
   the PRNG matches the app component. ---- */

/* Scoped to the hero: --tile-zone is set by the layout script to the
   hero's exact bottom edge so the pattern (and the cursor light) stop
   dead at the section divide. Sections below stay neutral. */
.grid-bg,
.grid-spot {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--tile-zone, 100vh);
    z-index: 0;
    pointer-events: none;
    background-image: var(--tile-img, none);
    background-repeat: repeat;
    background-size: var(--tile-block, 528px) var(--tile-block, 528px);
}

.grid-bg {
    mask-image: radial-gradient(130% 100% at 50% 0%, black 25%, transparent 78%);
    -webkit-mask-image: radial-gradient(130% 100% at 50% 0%, black 25%, transparent 78%);
}

/* Brighter copy of the same pattern revealed around the cursor
   (--mx/--my set in the layout script), with a faint warm glow. */
.grid-spot {
    background-image:
        radial-gradient(240px at var(--mx, -999px) var(--my, -999px), color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%),
        var(--tile-img-bright, none);
    background-size: auto, var(--tile-block, 528px) var(--tile-block, 528px);
    mask-image: radial-gradient(280px at var(--mx, -999px) var(--my, -999px), black, transparent);
    -webkit-mask-image: radial-gradient(280px at var(--mx, -999px) var(--my, -999px), black, transparent);
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .site-nav, .site-footer { position: relative; z-index: 2; }

/* ---- nav ---- */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 18px 0;
    background: rgba(7, 8, 13, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand img { height: 30px; display: block; }

.site-nav nav { display: flex; gap: 28px; }

.site-nav nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.site-nav nav a:hover { color: var(--text); }

/* ---- hero ---- */

.hero {
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
    padding-block: 120px 60px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--brand);
    margin: 0 0 18px;
}

.hero h1 {
    font-family: var(--display);
    font-size: clamp(52px, 8.5vw, 118px);
    font-weight: 750;
    line-height: 0.96;
    letter-spacing: -0.03em;
    margin: 0 0 26px;
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--brand), var(--candy-pink) 55%, var(--popper));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lede {
    font-size: clamp(17px, 1.6vw, 21px);
    color: var(--text-dim);
    max-width: 30em;
    margin: 0 0 36px;
}

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

.btn-primary, .btn-ghost {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
    background: var(--brand);
    color: #160e02;
    box-shadow: 0 8px 28px rgba(235, 155, 52, 0.32);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(235, 155, 52, 0.42); }

.btn-ghost {
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-ghost:hover { background: rgba(245, 242, 236, 0.07); transform: translateY(-2px); }

/* ---- phone mock ---- */

.hero-phone {
    justify-self: center;
    text-align: center;
}

.phone {
    position: relative;
    width: clamp(230px, 24vw, 300px);
    aspect-ratio: 1320 / 2868;
    border-radius: clamp(34px, 3.4vw, 46px);
    border: 3px solid #2a2d3a;
    background: #000;
    overflow: hidden;
    transform: rotate(3deg);
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.6),
        0 0 110px color-mix(in srgb, var(--app-color, #0277bd) 28%, transparent);
    transition: transform 0.4s ease;
}

.hero-phone:hover .phone { transform: rotate(0.5deg) scale(1.02); }

.phone video, .phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 34%;
    height: 22px;
    background: #000;
    border-radius: 999px;
    z-index: 2;
}

.phone-caption {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s ease;
}

.phone-caption:hover { color: var(--text); }

.phone-caption-arrow { transition: transform 0.18s ease; }

.phone-caption:hover .phone-caption-arrow { transform: translateX(3px); }

.phone-caption-icon { width: 26px; height: 26px; border-radius: 7px; }

/* ---- live section: raised band for contrast against the hero ---- */

.live {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(85% 110% at 50% 0%, rgba(245, 242, 236, 0.05), transparent 62%),
        rgba(245, 242, 236, 0.025);
}

.section-title {
    font-family: var(--display);
    font-size: clamp(34px, 4.5vw, 58px);
    font-weight: 720;
    letter-spacing: -0.02em;
    margin: 0 0 44px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--brand), var(--line) 55%);
    opacity: 0.55;
}

.feature-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 4vw, 56px);
    background: linear-gradient(150deg, var(--ink-raise), rgba(14, 16, 25, 0.4));
    border: 1px solid var(--line);
    border-radius: var(--r-2xl);
    padding: clamp(28px, 4vw, 56px);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 80% at 12% 0%, color-mix(in srgb, var(--app-color) 16%, transparent), transparent 70%);
    pointer-events: none;
}

.feature-info { position: relative; }

.app-icon {
    width: 76px;
    height: 76px;
    border-radius: var(--r-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    margin-bottom: 22px;
}

/* Featured card: name + tagline sit on one line, wrapping on narrow screens. */
/* Card header: icon on the left, title + subtitle stacked tightly beside it
   and vertically centred against the icon. */
.feature-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}
.feature-head .app-icon { margin-bottom: 0; flex-shrink: 0; }

.feature-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.feature-title h3,
.feature-title .app-tagline { margin: 0; }

.feature-info h3, .app-card h3 {
    font-family: var(--display);
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 720;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.app-tagline {
    color: var(--app-color, var(--brand));
    font-weight: 600;
    font-size: 17px;
    margin: 0 0 14px;
    filter: brightness(1.5) saturate(0.85);
}

.app-desc { color: var(--text-dim); margin: 0 0 28px; max-width: 36em; }

/* Full App Store description on the featured card (live apps only). */
.app-desc-full { max-width: 36em; margin: -14px 0 28px; }
.app-desc-full p { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; margin: 0 0 13px; }
.app-desc-full p:last-child { margin-bottom: 0; }

.app-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--app-color, var(--brand)) 70%, var(--text));
    border: 1px solid color-mix(in srgb, var(--app-color, var(--brand)) 45%, var(--line));
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 14px;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text);
    color: #0b0c12;
    border-radius: 14px;
    padding: 10px 20px;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-badge:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(245, 242, 236, 0.18); }

.store-badge small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
    line-height: 1.1;
}

.store-badge span { font-weight: 700; font-size: 18px; line-height: 1.15; }

.feature-shots {
    position: relative;
    display: flex;
    /* Screenshots are exported as a continuous strip whose artwork flows across
       frames; the gap must stay 2.5% of frame width to keep that alignment
       (SCREENSHOT_STRIP_GAP_FRACTION in the Screenshots project). */
    --shot-width: clamp(150px, 14vw, 195px);
    gap: calc(var(--shot-width) * 0.025);
    align-items: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
    /* Drag-to-scroll strip: no visible scrollbar, edges fade where there's
       more to see (--fade-l/--fade-r set from JS on scroll). */
    scrollbar-width: none;
    cursor: grab;
    mask-image: linear-gradient(90deg,
        transparent 0, #000 var(--fade-l, 0px),
        #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg,
        transparent 0, #000 var(--fade-l, 0px),
        #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
}

.feature-shots::-webkit-scrollbar { display: none; }

.feature-shots.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.feature-shots img,
.feature-shots video {
    width: var(--shot-width);
    border-radius: 8px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* ---- promise section: the clean-apps manifesto ---- */

.promise-lede {
    color: var(--text-dim);
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.6;
    max-width: 44em;
    margin: -16px 0 56px;
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(22px, 3vw, 40px);
}

.promise-item {
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.promise-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ink-raise);
    border: 1px solid var(--line);
    color: var(--brand);
    font-size: 17px;
    margin-bottom: 18px;
}

.promise-item h3 {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    color: var(--brand);
    filter: brightness(1.15);
}

.promise-item p {
    color: var(--text-dim);
    margin: 0;
    line-height: 1.55;
}

/* ---- app grid (for future launches) ---- */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 22px;
}

.app-card {
    background: var(--ink-raise);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.app-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(70% 60% at 20% 0%, color-mix(in srgb, var(--app-color) 14%, transparent), transparent 70%);
    pointer-events: none;
}

.app-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--app-color) 45%, var(--line)); }

.app-card .app-icon { width: 58px; height: 58px; border-radius: var(--r-md); margin-bottom: 16px; }

.app-card h3 { font-size: 26px; }

.app-card .app-desc { margin-bottom: 18px; }

.card-links { display: flex; gap: 16px; }

.card-links a {
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-bottom: 1px solid var(--brand);
    padding-bottom: 2px;
}

.empty-note { color: var(--text-dim); }

/* ---- coming soon ---- */

.coming { position: relative; }

/* Coming-soon cards read as "previews", not live products: no store links,
   a status pill instead, and a touch more restraint than the live grid. */
.app-card.is-coming { cursor: default; }
.app-card.is-coming:hover { transform: none; }

.coming-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--app-color, var(--brand)) 78%, var(--text));
    background: color-mix(in srgb, var(--app-color, var(--brand)) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--app-color, var(--brand)) 40%, var(--line));
    border-radius: 999px;
    padding: 7px 14px;
}

.coming-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--app-color, var(--brand));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-color, var(--brand)) 22%, transparent);
}

/* ---- browser-playable demo (/play/{app}) ---- */

.play-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xl);
}

.play-stage .feature-head { justify-content: center; }

.play-frame {
    position: relative;
    /* Size by viewport HEIGHT first so the whole phone always fits on screen
       ("fit in the device window") — width derives from the portrait aspect
       ratio, capped at 92vw for narrow screens. */
    height: min(72vh, 720px);
    max-width: 92vw;
    aspect-ratio: 1320 / 2868;
    border-radius: clamp(24px, 3vw, 36px);
    border: 3px solid #2a2d3a;
    background: #000;
    overflow: hidden;
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.6),
        0 0 110px color-mix(in srgb, var(--app-color, #0277bd) 28%, transparent);
}

.play-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Play-now poster: covers the device frame until tapped, then fades out to
   reveal the loaded game (see the inline script in Play/Index.cshtml). */
.play-poster {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at 50% 42%,
            color-mix(in srgb, var(--app-color, #0277bd) 30%, transparent),
            transparent 62%),
        #08080c;
    transition: opacity 0.35s ease;
}

.play-poster .app-icon {
    width: clamp(72px, 22%, 108px);
    height: auto;
    border-radius: 22%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.play-poster-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.7em 1.5em;
    border-radius: 999px;
    font-weight: 600;
    font-size: clamp(0.95rem, 2.4vw, 1.05rem);
    color: #fff;
    background: color-mix(in srgb, var(--app-color, #0277bd) 82%, #000);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--app-color, #0277bd) 40%, transparent);
}

.play-frame.playing .play-poster {
    opacity: 0;
    pointer-events: none;
}

.play-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    max-width: 34em;
}

.play-cta p { color: var(--text-dim); margin: 0; }

/* ---- footer ---- */

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(7, 8, 13, 0.7);
    padding: clamp(40px, 5vw, 70px) 0 28px;
}

.footer-inner {
    margin-bottom: 48px;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand img { height: 28px; margin-bottom: 14px; }

.footer-brand p { color: var(--text-dim); font-size: 15px; margin: 0; }

.footer-links { display: flex; gap: clamp(40px, 6vw, 90px); }

.footer-links h6 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0 0 14px;
}

.footer-links a {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 10px;
    opacity: 0.85;
}

.footer-links a:hover { opacity: 1; }

.footer-base {
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 13.5px;
}

.footer-login { color: var(--text-dim); text-decoration: none; }
.footer-login:hover { color: var(--text); }

/* ---- policy pages ---- */

.policy-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 150px clamp(20px, 5vw, 40px) 90px;
}

.policy-page .eyebrow { margin-bottom: 12px; }

/* Support has little content: centre it in the space between nav and
   footer instead of hugging the top. */
.support-page {
    margin-block: auto;
    padding-block: 130px 70px;
}

.policy-page h1 {
    font-family: var(--display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 740;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin: 0 0 10px;
}

.policy-updated { color: var(--text-dim); font-size: 14.5px; margin-bottom: 40px; }

.policy-page h2 {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 680;
    margin: 44px 0 12px;
}

.policy-page p, .policy-page li { color: var(--text-dim); }

.policy-page strong { color: var(--text); }

.policy-page a {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent);
    transition: text-decoration-color 0.15s ease;
}

.policy-page a:hover { text-decoration-color: var(--brand); }

/* ---- reveal + pop ---- */

/* Reveal-on-scroll only engages once JS tags the body, so content
   stays visible without JavaScript. */
.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in { opacity: 1; transform: none; }

/* The hero phone follows the copy cascade in on page load. */
.js .hero-phone.reveal { transition-delay: 0.3s; }

/* Stagger variant: the container is observed, its children cascade in
   (--stagger-i set per child from JS). */
.js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: calc(var(--stagger-i, 0) * 90ms);
}

.js .reveal-stagger.in > * { opacity: 1; transform: none; }

/* The amber rule beside section titles draws across once revealed. */
.section-title::after {
    transform-origin: left;
    transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s;
}

.js .section-title:not(.in)::after { transform: scaleX(0); }

/* Snap reveals back to hidden without a fade-out — used when a bfcache
   restore replays the entrance (see pageshow handler). */
.js .no-anim,
.js .no-anim::after,
.js .no-anim > * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
    .orb { animation: none; }
    .reveal, .js .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
    .js .section-title:not(.in)::after { transform: none; }
    .section-title::after { transition: none; }
    .grid-spot { display: none; }
}

/* Touchscreens: no hover means the spotlight just trails taps and
   scroll-drags, so drop it entirely (the layout script skips the
   pointer tracking too). */
@media (hover: none), (pointer: coarse) {
    .grid-spot { display: none; }
}

/* ---- responsive ---- */

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 110px;
        gap: 48px;
    }

    .hero-copy { order: 1; }
    .hero-phone { order: 2; }
    .lede { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }

    /* Stacked hero: the phone reveals on SCROLL (it sits below the
       fold), so the load-cascade delay would just read as lag. */
    .js .hero-phone.reveal { transition-delay: 0s; }

    .feature-card { grid-template-columns: 1fr; }

    /* Featured app on mobile: .feature-head (icon left + stacked title) already
       gives a consistent store-listing header at every width — just shrink the
       icon; description + badge stack full-width below it. */
    .feature-head { margin-bottom: 18px; }
    .feature-head .app-icon { width: 62px; height: 62px; }

    .feature-info .app-desc { margin: 0 0 18px; }
    .feature-info .app-desc-full { margin: 0 0 24px; }

    .footer-inner { flex-direction: column; }

    /* Single-column promise list: the icon shares a row with the
       heading instead of floating alone above it — four stacked
       items read as a tidy list, not a tall column of orphan icons. */
    .promise-item {
        display: grid;
        grid-template-columns: 44px 1fr;
        column-gap: 16px;
        align-items: center;
    }

    .promise-icon { margin-bottom: 0; }

    .promise-item h3 { margin: 0; }

    .promise-item p { grid-column: 2; margin-top: 6px; }
}
