/* Marketing layer: app mocks, showreel, testimonial, nav and footer additions.
   Tokens (--green, --border, --font-*) come from the layout's :root. */

/* ── Scroll reveal (only when JS is present) ── */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* ── Note under a CTA ── */
.cta-note {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    line-height: 1.4;
    color: #7a7a7a;
    margin-top: 0.75rem;
}
/* the line directly under a hero CTA: brighter and heavier than the other notes */
.cta-note--hero {
    font-size: 0.72rem;
    font-weight: 500;
    color: #fff;
}

/* ── Nav / links / chips ── */
.nav-link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #8a8a8a;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-link:hover {
    color: #fff;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--green);
    text-decoration: none;
}
.link-arrow span {
    transition: transform 0.2s;
}
.link-arrow:hover {
    color: #4ade80;
}
.link-arrow:hover span {
    transform: translateX(3px);
}

.chip-new {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: #9ca3af;
    border: 1px solid #262626;
    border-radius: 3px;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    text-decoration: none;
    transition:
        border-color 0.2s,
        color 0.2s;
}
.chip-new b {
    font-weight: 500;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #000;
    background: var(--green);
    border-radius: 2px;
    padding: 0.14rem 0.42rem;
}
.chip-new:hover {
    border-color: rgba(34, 197, 94, 0.45);
    color: #fff;
}

.tag-chip {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: #8f8f8f;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    padding: 0.2rem 0.55rem;
}

.footer-h {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #858585;
    margin-bottom: 1rem;
}
.footer-link {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.5;
    color: #6f6f6f;
    padding: 0.28rem 0;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover {
    color: #e5e5e5;
}

/* ── Mock stage: fixed design canvas scaled to container width (JS sets --mock-scale) ── */
.mock-frame {
    position: relative;
}
.mock-frame::before {
    content: "";
    position: absolute;
    inset: -48px -64px;
    background: radial-gradient(
        ellipse at 50% 35%,
        rgba(34, 197, 94, 0.07),
        transparent 65%
    );
    pointer-events: none;
}
.mock-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: var(--mock-w) / var(--mock-h);
    /* below this scale the app text is unreadable: JS stops shrinking and the stage pans instead */
    --mock-min: 0.65;
}
.mock-stage.is-pan {
    aspect-ratio: auto;
    height: calc(var(--mock-h) * var(--mock-scale) * 1px);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.mock-stage.is-pan::-webkit-scrollbar {
    display: none;
}
/* fade the right edge while there is more to swipe to */
.mock-stage.is-pan:not(.at-end) {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.mock-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(var(--mock-w) * 1px);
    height: calc(var(--mock-h) * 1px);
    transform-origin: 0 0;
    transform: scale(var(--mock-scale, 1));
}
.mock-fade-bottom {
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
}

/* ── App window ──
   The mocks copy the real webapp (monolith webapp/src): black shell with a w-56 sidebar, a
   rounded #111113 panel with #27272a edges, Tailwind-default sans UI text, mono for script and
   beat text. Colors inside are the app's own tokens; the page around keeps the site palette. */
.app-window {
    background: #000;
    border: 1px solid #232323;
    border-radius: 4px;
    overflow: hidden;
    font-family:
        ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.015),
        0 50px 120px -30px rgba(0, 0, 0, 0.95);
}
.app-window::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(34, 197, 94, 0.55),
        transparent
    );
    pointer-events: none;
}
/* the app uses JetBrains Mono; DM Mono (already on the page) stands in when it is not installed */
.app-mono {
    font-family:
        "JetBrains Mono", "DM Mono", ui-monospace, SFMono-Regular, Menlo,
        Consolas, monospace;
}
.app-panel {
    background: #111113;
    border: 1px solid #27272a;
    border-radius: 16px;
}
.app-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Script editor: the sheet is a dark #18181b page on a #09090b backdrop (soulbleeder) */
.ed-sheet {
    position: relative;
    width: 700px;
    margin: 28px auto 0;
    padding: 46px 47px 40px 79px;
    background: #18181b;
    border-radius: 2px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    line-height: 21px;
    counter-reset: sc;
}
.ed-sheet .fade-in {
    background: rgba(24, 24, 27, 0.5);
    padding: 4px;
    border-left: 2px solid #22c55e;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.ed-sheet .scene-heading {
    position: relative;
    margin-bottom: 16px;
    font-weight: 700;
    text-transform: uppercase;
    counter-increment: sc;
}
.ed-sheet .scene-heading::before {
    content: counter(sc) ".";
    position: absolute;
    left: -56px;
    width: 42px;
    text-align: right;
    font-weight: 400;
    color: #22c55e;
}
.ed-sheet .action {
    margin-bottom: 12px;
    font-weight: 200;
}
.ed-sheet .character {
    margin-bottom: 4px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 400;
}
.ed-sheet .dialogue {
    max-width: 45ch;
    margin: 0 auto 16px;
    font-weight: 200;
}
.ed-sheet .parenthetical {
    max-width: 35ch;
    margin: 0 auto 4px;
    text-align: center;
    color: #a1a1aa;
    font-weight: 200;
}
.ed-sheet .transition {
    margin-bottom: 16px;
    text-align: right;
    text-transform: uppercase;
    color: #d4d4d8;
    font-weight: 200;
}
/* collaboration caret (CollaborationCaret): thin line + name flag in the user's color */
.ed-caret {
    position: relative;
    display: inline;
    margin: 0 -1px;
    border-left: 1px solid var(--c);
    border-right: 1px solid var(--c);
    word-break: normal;
}
.ed-caret::before {
    content: attr(data-name);
    position: absolute;
    top: -1.4em;
    left: -1px;
    padding: 0.1rem 0.3rem;
    border-radius: 3px 3px 3px 0;
    background: var(--c);
    color: #0d0d0d;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: normal;
    white-space: nowrap;
}

/* Beatsheet canvas (React Flow): dot grid, act zones, index-card beats */
.bs-pane {
    background-color: #09090b;
    background-image: radial-gradient(#27272a 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}
.bs-green {
    --hue: #22c55e;
}
.bs-sky {
    --hue: #0ea5e9;
}
.bs-violet {
    --hue: #8b5cf6;
}
.bs-zone {
    position: absolute;
    border: 2px solid color-mix(in srgb, var(--hue) 60%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--hue) 6%, transparent);
}
.bs-zone-label {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hue);
}
.bs-card {
    position: absolute;
    width: 320px;
    height: 142px;
    border: 1px solid rgba(63, 63, 70, 0.6);
    border-radius: 8px;
    background: #18181b;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.bs-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 7px 0 0 7px;
    background: var(--hue);
}
.bs-handle {
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    border: 2px solid #09090b;
    background: #52525b;
    opacity: 0.45;
}
.bs-handle.top {
    top: -5px;
}
.bs-handle.bottom {
    bottom: -5px;
}
.bs-pill {
    max-width: 100%;
    padding: 2px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #3f3f46;
    border-radius: 9999px;
    background: #27272a;
    color: #a1a1aa;
}
.bs-pill.done {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}
.bs-edge {
    fill: none;
    stroke: #52525b;
    stroke-width: 1.5;
    stroke-dasharray: 5;
}
@media (prefers-reduced-motion: no-preference) {
    .bs-edge {
        animation: bs-dash 0.5s linear infinite;
    }
}
@keyframes bs-dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* small labels used by the page itself (hero D) */
.m-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7a7a7a;
}
.m-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 500;
    color: #000;
    border: 2px solid #0b0b0b;
}

/* ── Showreel ── */
.showreel {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0b0b0b;
    border: 1px solid #232323;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 50px 120px -40px rgba(0, 0, 0, 0.95),
        0 0 90px rgba(34, 197, 94, 0.05);
}
.showreel video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}
.showreel-poster {
    position: absolute;
    inset: 0;
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    background:
        radial-gradient(
            ellipse at 50% 42%,
            rgba(34, 197, 94, 0.14),
            transparent 62%
        ),
        linear-gradient(#0f0f0f, #090909);
}
.showreel-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        #fff 3px,
        #fff 4px
    );
}
.showreel-play {
    width: 76px;
    height: 76px;
    border-radius: 3px;
    background: var(--green);
    display: grid;
    place-items: center;
    transition:
        box-shadow 0.25s,
        transform 0.15s;
}
.showreel-poster:hover .showreel-play {
    box-shadow: 0 0 48px var(--green-glow);
    transform: scale(1.04);
}
.crop {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 0 solid rgba(255, 255, 255, 0.3);
}
.crop.tl {
    top: 18px;
    left: 18px;
    border-top-width: 1px;
    border-left-width: 1px;
}
.crop.tr {
    top: 18px;
    right: 18px;
    border-top-width: 1px;
    border-right-width: 1px;
}
.crop.bl {
    bottom: 18px;
    left: 18px;
    border-bottom-width: 1px;
    border-left-width: 1px;
}
.crop.br {
    bottom: 18px;
    right: 18px;
    border-bottom-width: 1px;
    border-right-width: 1px;
}

/* ── Hero variants ── */
.pipe-step {
    position: relative;
    transition: background 0.3s;
}
.pipe-step:hover {
    background: #101310;
}
@media (min-width: 1024px) {
    .pipe-step:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 1.55rem;
        right: -5px;
        width: 9px;
        height: 9px;
        background: #0d0d0d;
        border-top: 1px solid var(--green);
        border-right: 1px solid var(--green);
        transform: rotate(45deg);
        z-index: 2;
    }
}

.compare-old {
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 3px;
}
.compare-new {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.06), #0d0d0d 60%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 3px;
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.06);
}
.file-row {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #6b6b6b;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #151515;
    text-decoration: line-through;
    text-decoration-color: #3d3d3d;
    overflow-wrap: anywhere;
}
.file-row:last-child {
    border-bottom: 0;
}
.file-row.current {
    color: #8a8a8a;
    text-decoration: none;
}

/* ── Testimonial ── */
.testimonial {
    display: grid;
    grid-template-columns: 1fr;
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
}
@media (min-width: 768px) {
    .testimonial {
        grid-template-columns: 320px 1fr;
    }
}
.testimonial-photo {
    position: relative;
    min-height: 340px;
    background: #111;
}
.testimonial-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
}
.testimonial-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 13, 13, 0.5), transparent 45%);
}
.testimonial blockquote mark {
    background: none;
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
