/*
 * Landing v3 · steps, final CTA and footer (lane steps-footer).
 * Brief: manychat-rea-analysis/design/landing-v3-motion-brief.md. ManyChat's structure (three step
 * cards with motion videos, a footer with a motion loop on the right), our identity: dot motif on
 * mist / ink / red fields, Wanted Sans titles, one red. Tokens from brand.css, layout vars from
 * landing.css (--wrap, --gutter, --nav-h, --sec). Videos: steps-footer.js (lazy, visible-only).
 */

/* ─── Motion video frame (poster <img> under a <video> that fades in once it plays) ── */
.nb-sfv { position: relative; overflow: hidden; isolation: isolate; }
.nb-sfv--mist { background: var(--nb-mist); --sfv-dot: rgba(17, 17, 19, .08); --sfv-n: var(--nb-ink); }
.nb-sfv--ink { background: var(--nb-ink); --sfv-dot: rgba(255, 255, 255, .09); --sfv-n: #fff; }
.nb-sfv--accent { background: var(--nb-accent); --sfv-dot: rgba(17, 17, 19, .14); --sfv-n: var(--nb-ink); }
.nb-sfv--panel { background: #1a1a1f; --sfv-dot: rgba(255, 255, 255, .07); --sfv-n: #fff; } /* = footer loop field */
.nb-sfv::before {
    /* the dot field the videos are drawn on: visible before the poster arrives and when no video exists */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(circle, var(--sfv-dot) 1.2px, transparent 1.7px) 0 0 / 16px 16px;
}
.nb-sfv__poster, .nb-sfv__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nb-sfv__video { opacity: 0; transition: opacity var(--nb-dur-2) ease; }
.nb-sfv__video.is-on { opacity: 1; }
.nb-sfv[data-n]:not(:has(img))::after {
    /* renders not uploaded yet: the step number on its field, never an empty grey box */
    content: attr(data-n); position: absolute; inset: 0; display: grid; place-items: center;
    font: var(--nb-h-display-w) clamp(64px, 9vw, 120px)/1 var(--nb-display); letter-spacing: var(--nb-h-display-ls); color: var(--sfv-n);
}

/* ─── Steps ──────────────────────────────────────────────── */
.nb-st { padding: var(--sec) 0; }
.nb-st__title { max-width: 16ch; margin: 0 auto; text-align: center; }
.nb-st__list { display: grid; gap: 40px; max-width: 560px; margin: clamp(40px, 4.4vw, 72px) auto 0; }
.nb-st__media { aspect-ratio: 1640 / 1120; border-radius: var(--nb-radius-lg); }
.nb-st__t { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; } /* type: .nb-h3 (landing.css) */
.nb-st__n {
    display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
    margin-top: max(0px, calc((clamp(24px, .55vw + 22px, 34px) * 1.2 - 28px) / 2));
    background: var(--nb-ink); color: #fff; font: 800 14px/1 var(--nb-font); letter-spacing: 0;
}
.nb-st__b { margin-top: 8px; padding-left: 38px; color: var(--nb-ink-2); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.nb-st__actions { display: grid; gap: 10px; max-width: 560px; margin: 48px auto 0; }
@media (min-width: 576px) {
    .nb-st__actions { display: flex; justify-content: center; max-width: none; gap: 12px; }
}
@media (min-width: 1024px) {
    .nb-st {
        display: grid; align-content: center; min-height: 100svh;
        padding: calc(var(--nav-h) + 40px) 0 56px;
    }
    .nb-st__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: none; }
}
/* short laptops: keep the whole stage (title, cards, actions) inside one screen */
@media (min-width: 1024px) and (max-height: 820px) {
    .nb-st__list { margin-top: 36px; }
    .nb-st__actions { margin-top: 32px; }
}

/* ─── Final CTA: full-bleed lime stage ───────────────────── */
.nb-fin {
    position: relative; overflow: hidden; isolation: isolate;
    background: var(--nb-accent); color: var(--nb-ink);
}
.nb-fin::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(circle, rgba(17, 17, 19, .14) 1.5px, transparent 2.1px) 0 0 / 26px 26px;
}
.nb-fin__dots { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.nb-fin__dots i {
    /* a few grid dots light up ink, like unread marks (on the 26px grid, centre at 13px) */
    position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: var(--nb-ink); opacity: 0;
    animation: nb-fin-blink 8s var(--nb-ease-io) infinite;
}
.nb-fin__dots i:nth-child(1) { left: calc(13px + 26px * 3); top: calc(13px + 26px * 4); animation-delay: -1s; }
.nb-fin__dots i:nth-child(2) { left: calc(13px + 26px * 21); top: calc(13px + 26px * 2); animation-delay: -3.4s; }
.nb-fin__dots i:nth-child(3) { left: calc(13px + 26px * 9); top: calc(13px + 26px * 19); animation-delay: -5.6s; }
.nb-fin__dots i:nth-child(4) { right: calc(13px + 26px * 4); top: calc(13px + 26px * 6); animation-delay: -2.2s; }
.nb-fin__dots i:nth-child(5) { right: calc(13px + 26px * 15); bottom: calc(13px + 26px * 3); animation-delay: -6.8s; }
.nb-fin__dots i:nth-child(6) { left: calc(13px + 26px * 30); bottom: calc(13px + 26px * 8); animation-delay: -4.5s; }
@keyframes nb-fin-blink {
    0%, 70%, 100% { opacity: 0; transform: scale(.6); }
    78%, 88% { opacity: .95; transform: scale(1); }
}
.nb-fin__in { display: grid; gap: 48px; padding-top: clamp(80px, 10vw, 140px); padding-bottom: var(--gutter); }
/* The two written lines always stay two: the display size is capped by the copy column (like the hero). */
.nb-fin__copy { container-type: inline-size; }
.nb-fin__title { font-size: min(clamp(44px, 4.4vw + 25px, 104px), 12.4cqi); }
:lang(en) .nb-fin__title { font-size: min(clamp(44px, 4.4vw + 25px, 104px), 9.6cqi); }
.nb-fin__actions { display: grid; justify-items: start; gap: 16px; margin-top: clamp(32px, 3.4vw, 52px); }
.nb-fin__cta { min-height: 64px; padding: 0 40px; font-size: 19px; }
.nb-fin__note { font-size: 15px; font-weight: 600; color: rgba(17, 17, 19, .78); }
.nb-fin__photo { aspect-ratio: 4 / 5; border-radius: calc(var(--r-panel) - 4px); }
.nb-fin__photo img { object-position: 50% 70%; }
@media (max-width: 575.98px) {
    .nb-fin__actions { justify-items: stretch; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
    .nb-fin__photo { width: min(100%, 520px); }
}

/* Closing beat: the hero's story (comment → product DM → order) told once more in three chips that
   rise over the photo, hold, and clear. Base style = the finished state (all three shown), so reduced
   motion, no script, or a still capture reads complete; the loop runs only once the photo is revealed. */
.nb-fin__feed {
    position: absolute; left: 16px; right: 16px; bottom: 36px; z-index: 1;
    display: grid; justify-items: start; gap: 8px; pointer-events: none;
}
.nb-fin__chip {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    min-height: 44px; padding: 0 16px; border-radius: 999px;
    font-size: 15px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
    box-shadow: 0 10px 24px -12px rgba(17, 17, 19, .45);
}
.nb-fin__chip--in { background: #fff; color: var(--nb-ink); }
.nb-fin__chip--in { gap: 0; padding-left: 8px; font-weight: 500; }
.nb-fin__chip--in img { width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; object-fit: cover; }
.nb-fin__chip--in b { margin-right: 6px; font-weight: 700; }
.nb-fin__chip--in .nb-dot { width: 9px; height: 9px; margin: 0 8px 0 6px; }
.nb-fin__chip--dm { background: var(--nb-ink); color: #fff; }
.nb-fin__chip--dm .nb-i { width: 16px; height: 16px; stroke-width: 3; }
.nb-fin__chip--order { justify-self: end; gap: 10px; background: var(--nb-accent); color: var(--nb-on-accent); box-shadow: inset 0 0 0 1.5px var(--nb-ink), 0 10px 24px -12px rgba(17, 17, 19, .45); }
.nb-fin__chip--order span { font-variant-numeric: tabular-nums; font-weight: 600; color: rgba(17, 17, 19, .72); }
@media (prefers-reduced-motion: no-preference) {
    .nb-motion .nb-fin__photo.is-in .nb-fin__chip { animation: nb-fin-chip 7.5s var(--nb-ease) infinite both; }
    .nb-motion .nb-fin__photo.is-in .nb-fin__chip--dm { animation-name: nb-fin-chip-2; }
    .nb-motion .nb-fin__photo.is-in .nb-fin__chip--order { animation-name: nb-fin-chip-3; }
    .nb-motion .nb-fin__photo.is-in .nb-fin__chip--in .nb-dot { animation: nb-fin-read 7.5s var(--nb-ease) infinite both; }
}
/* 0.3s comment · 1.5s DM (the comment's dot is read) · 2.7s order · hold · 6.6s clear · 7.5s loop */
@keyframes nb-fin-chip {
    0%, 4% { opacity: 0; transform: translateY(12px); }
    8%, 86% { opacity: 1; transform: none; }
    92%, 100% { opacity: 0; transform: translateY(-6px); }
}
@keyframes nb-fin-chip-2 {
    0%, 20% { opacity: 0; transform: translateY(12px); }
    24%, 86% { opacity: 1; transform: none; }
    92%, 100% { opacity: 0; transform: translateY(-6px); }
}
@keyframes nb-fin-chip-3 {
    0%, 36% { opacity: 0; transform: translateY(12px) scale(.96); }
    40%, 86% { opacity: 1; transform: none; }
    92%, 100% { opacity: 0; transform: translateY(-6px); }
}
/* The DM answers the comment: its unread dot closes (width too, so the text slides into its place). */
@keyframes nb-fin-read {
    0%, 20% { opacity: 1; width: 9px; margin-left: 6px; margin-right: 8px; }
    24%, 100% { opacity: 0; width: 0; margin-left: 0; margin-right: 0; }
}
@media (min-width: 1024px) {
    .nb-fin__in {
        grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 64px; align-items: center;
        min-height: 100svh; padding-top: calc(var(--nav-h) + 32px); padding-bottom: 32px;
    }
    .nb-fin__photo { aspect-ratio: auto; height: min(680px, calc(100svh - var(--nav-h) - 96px)); }
}
@media (min-width: 1600px) { .nb-fin__in { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); } }
@media (min-width: 1024px) and (max-width: 1279.98px) { .nb-fin__in { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); } }
@media (prefers-reduced-motion: reduce) { .nb-fin__dots { display: none; } }

/* ─── Footer: ink field, wordmark left, motion loop right, link groups under both ─── */
/* The footer is an ink card with rounded top corners laid over the last --ft-r of the closing CTA, so
   the lime field (and its dots) shows behind the curve instead of a white notch; the CTA keeps that much
   extra lime at its foot so nothing of it sits under the card. */
.nb-fin, .nb-ft { --ft-r: 24px; }
.nb-fin { padding-bottom: var(--ft-r); }
.nb-ft {
    position: relative; z-index: 1; margin-top: calc(-1 * var(--ft-r));
    border-radius: var(--ft-r) var(--ft-r) 0 0;
    background: var(--nb-ink); color: #fff; padding: 56px 0 28px; font-size: 16px;
}
.nb-ft__grid { display: grid; gap: 40px; grid-template-areas: "brand" "media" "cols"; }
.nb-ft__brand { grid-area: brand; }
.nb-ft__media { grid-area: media; aspect-ratio: 16 / 9; border-radius: var(--nb-radius-lg); }
/* The film's chips pass through the frame edge: a soft fade on both sides says it is a flow, not a cut. */
.nb-ft__media :is(.nb-sfv__poster, .nb-sfv__video) {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.nb-ft__cols { grid-area: cols; }
.nb-ft__logo { min-height: 0; gap: 10px; font-size: 30px; color: #fff; }
.nb-ft__logo .nb-logo { width: 36px; height: 36px; }
.nb-ft__brand p {
    margin-top: 16px; max-width: 15em;
    font: 700 clamp(22px, .8vw + 18px, 30px)/1.3 var(--nb-display); letter-spacing: -0.025em;
    color: rgba(255, 255, 255, .72); text-wrap: balance;
}
/* Link groups (<details>, footer.blade.php). Phones: one folding row per group under hairlines.
   640px and up: four plain columns, the summary reads as the column label and does not toggle. */
.nb-ft__cols { display: grid; border-top: 1px solid rgba(255, 255, 255, .12); }
.nb-ft__col { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.nb-ft__col > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 56px; cursor: pointer; list-style: none;
    font-size: 16px; font-weight: 700; color: #fff;
}
.nb-ft__col > summary::-webkit-details-marker { display: none; }
.nb-ft__chev { display: grid; place-items: center; width: 32px; height: 32px; color: rgba(255, 255, 255, .6); transition: transform var(--nb-dur-2) var(--nb-ease); }
.nb-ft__col[open] .nb-ft__chev { transform: rotate(180deg); }
.nb-ft__col > nav { display: grid; justify-items: start; padding-bottom: 12px; }
.nb-ft__col > nav a { display: flex; align-items: center; min-height: 44px; font-weight: 600; color: rgba(255, 255, 255, .88); transition: color var(--nb-dur-2) ease; }
.nb-ft__col > nav a[aria-current] { color: #fff; text-decoration: underline; text-decoration-color: var(--nb-accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (hover: hover) { .nb-ft__col > nav a:hover { color: #fff; } }
.nb-ft__col::details-content { block-size: 0; overflow: clip; transition: block-size var(--nb-dur-3) var(--nb-ease), content-visibility var(--nb-dur-3) allow-discrete; }
.nb-ft__col[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) { .nb-ft__col::details-content, .nb-ft__chev { transition: none; } }
.nb-ft :where(a):focus-visible { outline-color: #fff; }
.nb-ft__base {
    display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
    margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px; color: rgba(255, 255, 255, .56);
}
/* Right end of the base row: the Instagram link beside the language menu, the same 40px ghost pill. */
.nb-ft__end { display: flex; align-items: center; gap: 8px; }
.nb-ft__ig {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .82);
    transition: background-color var(--nb-dur-2) ease, color var(--nb-dur-2) ease;
}
@media (hover: hover) { .nb-ft__ig:hover { background: rgba(255, 255, 255, .16); color: #fff; } }
/* Business block (partials/footer-business), above the base row's line: policy links, then the details at 12px
   under hairlines. Each item carries its hairline on the left; the list sits 21px left of a clipping box, so the
   hairline that starts a wrapped line falls outside it and every line starts flush with text. */
.nb-ft__biz { margin-top: 48px; font-size: var(--nb-text-sm); color: rgba(255, 255, 255, .5); }
.nb-ft__legal { display: flex; flex-wrap: wrap; gap: 0 16px; }
.nb-ft__legal a { display: inline-flex; align-items: center; min-height: 40px; color: rgba(255, 255, 255, .72); }
.nb-ft__legal .nb-ft__privacy { font-weight: 700; color: #fff; }
@media (hover: hover) { .nb-ft__legal a:hover, .nb-ft__bizclip a:hover { color: #fff; } }
.nb-ft__bizinfo > summary {
    display: inline-flex; align-items: center; gap: 2px; min-height: 40px; cursor: pointer; list-style: none;
    color: rgba(255, 255, 255, .56);
}
.nb-ft__bizinfo > summary::-webkit-details-marker { display: none; }
.nb-ft__bizinfo .nb-ft__chev { width: 20px; height: 20px; color: inherit; }
.nb-ft__bizinfo .nb-ft__chev .nb-i { width: 14px; height: 14px; }
.nb-ft__bizinfo[open] .nb-ft__chev { transform: rotate(180deg); }
.nb-ft__bizclip { overflow: hidden; padding-bottom: 4px; }
.nb-ft__bizclip ul { display: flex; flex-wrap: wrap; margin: 0 0 0 -21px; padding: 0; list-style: none; font-size: 12px; line-height: 1.75; }
.nb-ft__bizclip li { margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .16); line-height: 1; margin-block: 5px; white-space: nowrap; }
.nb-ft__bizclip a { color: rgba(255, 255, 255, .72); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .28); text-underline-offset: 3px; }
/* addresses outrun a phone's width: they wrap in their item, and keep the row's 22px when on one line */
.nb-ft__bizclip li.nb-ft__bizlong { white-space: normal; line-height: 1.5; margin-block: 2px; }
.nb-ft__bizlabel { color: rgba(255, 255, 255, .72); }
/* the complaint-responsibility notice: its own block under the details, same size and colour */
.nb-ft__resp { margin-top: 12px; }
.nb-ft__resp > p { margin: 0 0 4px; font-size: 12px; line-height: 1.6; }
.nb-ft__bizinfo::details-content { block-size: 0; overflow: clip; transition: block-size var(--nb-dur-3) var(--nb-ease), content-visibility var(--nb-dur-3) allow-discrete; }
.nb-ft__bizinfo[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) { .nb-ft__bizinfo::details-content { transition: none; } }
@media (min-width: 640px) {
    .nb-ft__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; border-top: 0; }
    .nb-ft__col { border-bottom: 0; }
    .nb-ft__col > summary { min-height: 0; margin-bottom: 4px; cursor: default; font-size: 13px; letter-spacing: .02em; color: rgba(255, 255, 255, .5); }
    .nb-ft__chev { display: none; }
    .nb-ft__col > nav { padding-bottom: 0; }
    .nb-ft__col::details-content { transition: none; }
    .nb-ft__legal a { min-height: 32px; }
    .nb-ft__bizinfo > summary { display: none; }
    .nb-ft__bizinfo::details-content { transition: none; }
}
@media (min-width: 1024px) {
    .nb-fin, .nb-ft { --ft-r: 32px; }
    .nb-ft { padding-top: 96px; }
    /* wordmark left, the loop right from the same top line; the four link groups run under both */
    .nb-ft__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
        grid-template-areas: "brand media" "cols cols"; column-gap: 64px; row-gap: 72px;
    }
    .nb-ft__biz { margin-top: 72px; }
}
