/* ============================================================================
   CableWay — richer page furniture
   Provider logo wall · full-bleed scene stages · device mockups rebuilt from
   the real app UI · animated motifs for the feature cards
   ========================================================================= */

/* ── Provider logo wall ──────────────────────────────────────────────────── */

/* Provider marks arrive as a ragged mix: some dark-on-transparent, some with a
   white plate already baked in. A light tile is the one treatment that keeps
   every one of them legible against an ink background. */
.plogo {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 158px;
    height: 76px;
    padding: 15px 19px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
                background 0.35s var(--ease);
}

/* Explicit pixel bounds, not percentages. A percentage height on a flex or
   grid item resolves against an indefinite track and silently falls back to
   the image's intrinsic size, which is how a 3000px square mark ends up
   bursting out of a 46px-tall tile. */
.plogo img {
    max-width: 120px;
    max-height: 46px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.plogo:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.85);
}

.wall-note {
    margin-top: 24px;
    text-align: center;
    font-size: 0.84rem;
    color: var(--muted-2);
}

@media (max-width: 560px) {
    .plogo { width: 124px; height: 62px; padding: 11px 14px; }
    .plogo img { max-width: 96px; max-height: 40px; }
}

/* ── Full-bleed scene stage ──────────────────────────────────────────────── */

.stage {
    position: relative;
    width: 100%;
    height: clamp(380px, 54vw, 660px);
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: radial-gradient(120% 92% at 50% 106%, rgba(255, 192, 31, 0.075), transparent 62%);
}

.stage canvas,
.stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage .film-clip {
    opacity: 0;
    transition: opacity 1.2s var(--ease);
}

.stage .film-clip.is-live { opacity: 1; }

.stage-veil {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--ink) 0%, rgba(6, 7, 11, 0) 15%,
                rgba(6, 7, 11, 0) 68%, rgba(6, 7, 11, 0.92) 100%);
}

.stage-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px var(--gut);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
    align-items: baseline;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.73rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.stage-cap b { font-weight: 500; color: var(--amber); }

.stage-tag {
    position: absolute;
    top: 22px;
    left: var(--gut);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: rgba(6, 7, 11, 0.6);
    backdrop-filter: blur(10px);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Device mockups — the real app UI, rebuilt with demo data ────────────── */

.phone {
    position: relative;
    width: 100%;
    max-width: 268px;
    aspect-ratio: 9 / 19.2;
    border-radius: 34px;
    padding: 9px;
    background: linear-gradient(160deg, #2A2F3C, #0D0F16 62%);
    box-shadow: 0 40px 84px -34px #000,
                0 0 0 1px rgba(255, 255, 255, 0.09),
                0 0 0 7px rgba(0, 0, 0, 0.55);
    transform: perspective(1200px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.7s var(--ease);
}

.phone-r { transform: perspective(1200px) rotateY(15deg) rotateX(5deg); }
.phone-flat { transform: none; }

.phone:hover,
.app:hover .phone {
    transform: perspective(1200px) rotateY(-5deg) rotateX(2deg) translateZ(20px);
}

.scr {
    position: relative;
    height: 100%;
    border-radius: 26px;
    overflow: hidden;
    background: #F4F6FA;
    display: flex;
    flex-direction: column;
    font-size: 10px;
    line-height: 1.35;
    color: #1B2130;
}

.scr-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px 3px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8.5px;
    font-weight: 600;
    color: #fff;
    background: #2563EB;
}

/* The app's blue-to-violet header */
.scr-head {
    padding: 4px 14px 15px;
    background: linear-gradient(112deg, #2563EB, #7C3AED);
    color: #fff;
}

.scr-head-t {
    font-family: 'Archivo', sans-serif;
    font-variation-settings: 'wdth' 104, 'wght' 720;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.scr-head-s { font-size: 9px; opacity: 0.82; margin-top: 1px; }

.scr-body {
    flex: 1;
    padding: 11px;
    display: grid;
    gap: 8px;
    align-content: start;
    overflow: hidden;
}

.scr-card {
    background: #fff;
    border-radius: 11px;
    padding: 10px 11px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

.scr-lbl {
    font-size: 8px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #7A869A;
    font-family: 'IBM Plex Mono', monospace;
}

.scr-amt {
    font-family: 'Archivo', sans-serif;
    font-variation-settings: 'wdth' 110, 'wght' 780;
    font-size: 22px;
    letter-spacing: -0.03em;
    color: #0F1626;
    margin-top: 3px;
}

.scr-amt small { font-size: 0.5em; color: #16A34A; margin-left: 4px; }

.scr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid #EDF0F5;
}

.scr-row:first-child { border-top: 0; }

.scr-name { font-weight: 600; font-size: 10px; }
.scr-sub { font-size: 8.5px; color: #7A869A; font-family: 'IBM Plex Mono', monospace; }

.scr-pill {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
    font-family: 'IBM Plex Mono', monospace;
    white-space: nowrap;
}

.scr-pill-due  { background: #FEF0C7; color: #92600A; }
.scr-pill-paid { background: #DCFCE7; color: #15803D; }
.scr-pill-on   { background: #CCFBF1; color: #0F766E; }

.scr-btn {
    margin-top: 2px;
    padding: 9px;
    border-radius: 10px;
    background: #16A34A;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 10.5px;
    box-shadow: 0 6px 14px -6px rgba(22, 163, 74, 0.8);
}

.scr-btn-blue { background: #2563EB; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.8); }

/* Five tabs, Collect raised in the middle — as the app has it */
.scr-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 7px 6px 9px;
    background: #fff;
    border-top: 1px solid #EDF0F5;
    text-align: center;
}

.scr-nav i {
    display: block;
    width: 13px;
    height: 13px;
    margin: 0 auto 3px;
    border-radius: 3px;
    background: #C3CAD6;
}

.scr-nav span {
    font-size: 7.5px;
    color: #8A93A3;
    font-weight: 600;
}

.scr-nav .on i { background: #16A34A; }
.scr-nav .on span { color: #16A34A; }

.scr-nav .fab {
    width: 30px;
    height: 30px;
    margin: -12px auto 2px;
    border-radius: 50%;
    background: #16A34A;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 7px 16px -6px rgba(22, 163, 74, 0.9);
}

/* A collected row slides in on cue — the screen is alive, not a still */
.scr-live { animation: row-in 0.6s var(--ease) both; }

@keyframes row-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* ── Thermal receipt ─────────────────────────────────────────────────────── */

.receipt {
    width: 100%;
    max-width: 194px;
    padding: 16px 17px 26px;
    background: #FBFAF7;
    color: #14181F;
    border-radius: 4px 4px 0 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    line-height: 1.62;
    box-shadow: 0 32px 62px -28px #000;
    transform: perspective(1000px) rotateY(13deg) rotateX(4deg) rotate(-2deg);
    -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
}

.receipt hr {
    border: 0;
    border-top: 1px dashed #B9BFC9;
    margin: 7px 0;
}

.receipt .r-t {
    text-align: center;
    font-family: 'Archivo', sans-serif;
    font-variation-settings: 'wdth' 108, 'wght' 760;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.receipt .r-r { display: flex; justify-content: space-between; gap: 10px; }
.receipt .r-b { font-weight: 600; }

/* ── Staging ─────────────────────────────────────────────────────────────── */

.rig {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(10px, 3vw, 32px);
    padding-block: 12px;
}

@media (max-width: 620px) {
    .rig .receipt { display: none; }
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
    gap: clamp(30px, 5vw, 72px);
    align-items: center;
}

.split-rev { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr); }

@media (max-width: 900px) {
    .split, .split-rev { grid-template-columns: minmax(0, 1fr); }
    .split-rev > *:first-child { order: 2; }
}

/* ── Animated motifs on the feature cards ────────────────────────────────── */

.motif {
    position: relative;
    height: 96px;
    margin: -6px -6px 20px;
    border-radius: 12px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
    border: 1px solid var(--line);
}

.motif svg { width: 100%; height: 100%; display: block; }

/* A pulse running along a path */
.m-run {
    stroke-dasharray: 26 300;
    animation: m-run 3.6s linear infinite;
}

@keyframes m-run {
    from { stroke-dashoffset: 326; }
    to   { stroke-dashoffset: 0; }
}

/* Bars that breathe, for the reports motif */
.m-bar { transform-origin: center 78px; animation: m-bar 2.8s var(--ease-in-out) infinite; }
.m-bar:nth-child(2) { animation-delay: 0.18s; }
.m-bar:nth-child(3) { animation-delay: 0.36s; }
.m-bar:nth-child(4) { animation-delay: 0.54s; }
.m-bar:nth-child(5) { animation-delay: 0.72s; }

@keyframes m-bar {
    0%, 100% { transform: scaleY(0.42); }
    50%      { transform: scaleY(1); }
}

/* SVG needs an explicit box before transform-origin means anything. */
.motif .m-orbit,
.motif .m-bar,
.motif .m-lift,
.motif .m-scan,
.motif .m-sweep,
.motif .m-slide,
.motif .m-wave,
.motif .m-blip { transform-box: view-box; }

/* A dot orbiting, for the automation motif */
.m-orbit { animation: m-orbit 5.5s linear infinite; transform-origin: 60px 46px; }

@keyframes m-orbit {
    to { transform: rotate(360deg); }
}

/* A soft blip */
.m-blip { animation: m-blip 2.4s var(--ease-in-out) infinite; transform-origin: center; }
.m-blip-2 { animation-delay: 0.5s; }
.m-blip-3 { animation-delay: 1s; }

@keyframes m-blip {
    0%, 100% { opacity: 0.25; r: 2.4; }
    50%      { opacity: 1;    r: 4; }
}

/* A rupee note lifting */
.m-lift { animation: m-lift 3.2s var(--ease-in-out) infinite; }

@keyframes m-lift {
    0%, 100% { transform: translateY(4px); opacity: 0.55; }
    50%      { transform: translateY(-6px); opacity: 1; }
}

/* A scan line crossing the motif */
.m-scan { animation: m-scan 3.4s var(--ease-in-out) infinite; }

@keyframes m-scan {
    0%   { transform: translateX(-14px); opacity: 0; }
    18%  { opacity: 1; }
    82%  { opacity: 1; }
    100% { transform: translateX(134px); opacity: 0; }
}

/* A marker sweeping the full width of a wide motif */
.m-sweep { animation: m-sweep 4.2s var(--ease-in-out) infinite; }

@keyframes m-sweep {
    0%   { transform: translateX(0);     opacity: 0; }
    10%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { transform: translateX(268px); opacity: 0; }
}

/* Expanding arcs, for the messaging motif */
.m-wave { animation: m-wave 2.6s var(--ease-in-out) infinite; transform-origin: 92px 46px; }
.m-wave-2 { animation-delay: 0.42s; }
.m-wave-3 { animation-delay: 0.84s; }

@keyframes m-wave {
    0%   { opacity: 0;   transform: scale(0.5); }
    35%  { opacity: 0.9; }
    100% { opacity: 0;   transform: scale(1.7); }
}

/* A coin sliding along the rail */
.m-slide { animation: m-slide 3.8s var(--ease-in-out) infinite; }

@keyframes m-slide {
    0%   { transform: translateX(0) translateY(0);   opacity: 0; }
    12%  { opacity: 1; }
    80%  { opacity: 1; transform: translateX(188px) translateY(0); }
    100% { transform: translateX(206px) translateY(-8px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .m-run, .m-bar, .m-orbit, .m-blip, .m-lift, .m-scan,
    .m-sweep, .m-wave, .m-slide { animation: none; }
    .m-bar { transform: scaleY(0.8); }
}

/* ── Step ribbon ─────────────────────────────────────────────────────────── */

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    counter-reset: step;
}

@media (max-width: 820px) {
    .steps { grid-template-columns: minmax(0, 1fr); }
}

.step {
    position: relative;
    padding: 26px 24px 24px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: linear-gradient(168deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
    overflow: hidden;
}

.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 16px;
    right: 18px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1;
    color: rgba(255, 255, 255, 0.055);
}

.step h3 { margin-bottom: 9px; }
.step p { color: var(--muted); font-size: 0.94rem; }

.step-rule {
    position: absolute;
    left: 0;
    top: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, var(--amber), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.9s var(--ease);
}

.step.is-in .step-rule { transform: scaleX(1); }

/* ── Marquee spacing ─────────────────────────────────────────────────────── */

/* `gap` leaves the final tile of each half without a trailing space, so a
   -50% translate misses the seam by one gap. Carrying the space on the tile
   itself makes each half exactly half the track. */
.marquee-track { gap: 0; }
.marquee-track > * { margin-right: 12px; }

/* ── Photo slots ─────────────────────────────────────────────────────────── */

/* A real photograph, dropped into assets/img/, replaces the drawn scene. It is
   graded on the way in so any photo — a phone snap from an operator's round,
   a licensed stock frame — lands in the same palette as the rest of the page
   instead of sitting on top of it. */
.stage .film-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.4s var(--ease), transform 14s linear;
    filter: saturate(0.82) contrast(1.1) brightness(0.78);
}

.stage .film-photo.is-live {
    opacity: 1;
    transform: scale(1.06);   /* a slow Ken Burns drift, so a still is not static */
}

/* Duotone pass: pushes shadows to ink and highlights to amber. */
.stage-grade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s var(--ease);
    mix-blend-mode: soft-light;
    background: linear-gradient(118deg,
        rgba(72, 230, 210, 0.5) 0%,
        rgba(6, 7, 11, 0.2) 46%,
        rgba(255, 192, 31, 0.62) 100%);
}

.stage.has-photo .stage-grade { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .stage .film-photo.is-live { transform: none; }
}
