/* ==========================================================================
   MockupForge 3D — landing page
   Dark theme only, matching the studio. One accent (purple) for anything
   interactive; blue appears only inside product imagery and the brand mark.
   Radius rule: media and cards 14px, buttons 8px, nothing else.
   ========================================================================== */

:root {
    --ink: #05060A;
    --ink-raised: #0B0D14;
    --ink-card: #101320;

    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    --fg: #F7F8FA;
    --fg-dim: #98A1AE;
    --fg-faint: #626C7B;

    --accent: #A855F7;
    --accent-soft: rgba(168, 85, 247, 0.14);

    --r-card: 14px;
    --r-btn: 8px;

    --maxw: 1240px;
    --pad: clamp(20px, 5vw, 48px);
    --nav-h: 68px;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--ink);
    color: var(--fg);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.08; font-weight: 800; }

::selection { background: var(--accent-soft); color: #FFF; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--ink-card);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-btn);
    color: var(--fg);
    font-size: 0.85rem;
    text-decoration: none;
}

.skip-link:focus { left: 16px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--r-btn);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn-lg { padding: 13px 24px; font-size: 0.95rem; }

.btn-primary {
    background: var(--accent);
    color: #14061F;
    font-weight: 700;
}

.btn-primary:hover { background: #B972F8; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.985); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line-strong);
    color: var(--fg);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost:active { transform: scale(0.985); }

/* --------------------------------------------------------------------------
   Navigation — single line at every width, 68px tall
   -------------------------------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 28px;
    /* Background spans the full width while the contents stay on the same
       1240px grid as every section below. */
    padding-inline: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
    background: rgba(5, 6, 10, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--line);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--fg);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-brand strong {
    background: linear-gradient(135deg, var(--accent), #38BDF8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.nav-links a {
    color: var(--fg-dim);
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s var(--ease);
}

.nav-links a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Hero — asymmetric split. Copy never centred.
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 0.95fr 1.22fr;
    align-items: center;
    gap: clamp(32px, 5vw, 60px);
    max-width: var(--maxw);
    margin: 0 auto;
    /* Sized by its content with capped padding. Centring inside a full-height
       box pushed the headline ~240px down the viewport, which reads as a bug. */
    padding: clamp(36px, 5vw, 80px) var(--pad) clamp(52px, 6vw, 80px);
}

/* Two low-alpha fields rather than a glowing mesh. Sits behind everything. */
.hero::before {
    content: "";
    position: absolute;
    /* Kept inside the box. Negative horizontal insets widened the document and
       produced a scrollbar's worth of horizontal overflow. */
    inset: -20% 0 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(50% 45% at 12% 18%, rgba(168, 85, 247, 0.13), transparent 70%),
        radial-gradient(45% 40% at 88% 72%, rgba(56, 189, 248, 0.10), transparent 70%);
}

.hero-title {
    font-size: clamp(2.1rem, 3.7vw, 3.35rem);
    margin-bottom: 20px;
}

.hero-sub {
    max-width: 44ch;
    color: var(--fg-dim);
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    margin-bottom: 30px;
}

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

.hero-media img {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-card);
    /* Tinted to the page, never pure black */
    box-shadow: 0 34px 90px -28px rgba(12, 6, 32, 0.95);
}

/* --------------------------------------------------------------------------
   Shared section furniture
   -------------------------------------------------------------------------- */
section { max-width: var(--maxw); margin: 0 auto; padding: clamp(52px, 6vw, 92px) var(--pad); }

.section-head { margin-bottom: clamp(24px, 3vw, 38px); max-width: 58ch; }

.section-head h2 { font-size: clamp(1.65rem, 2.6vw, 2.4rem); }

.section-head p { color: var(--fg-dim); margin-top: 14px; }

/* --------------------------------------------------------------------------
   Output rail — horizontal scroll strip, every image a real render
   -------------------------------------------------------------------------- */
.rail {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
}

.rail-item { flex: 0 0 auto; scroll-snap-align: start; }

/* Uniform height, natural width: keeps every render uncropped and gives the
   strip an uneven rhythm instead of identical tiles. */
.rail-item img {
    height: clamp(190px, 26vw, 280px);
    width: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    transition: transform 0.28s var(--ease);
}

.rail-item:hover img { transform: translateY(-4px); }

.rail-item figcaption {
    margin-top: 12px;
    color: var(--fg-faint);
    font-family: var(--mono);
    font-size: 0.72rem;
}

/* --------------------------------------------------------------------------
   Process — asymmetric, verbs as headings, one hairline between items
   -------------------------------------------------------------------------- */
.process {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}

.process-intro h2 { font-size: clamp(1.65rem, 2.6vw, 2.4rem); }
.process-intro p { color: var(--fg-dim); margin-top: 14px; max-width: 34ch; }

.process-steps { list-style: none; }

.process-steps li { padding: 26px 0; }
.process-steps li + li { border-top: 1px solid var(--line); }
.process-steps li:first-child { padding-top: 0; }

.process-steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.process-steps p { color: var(--fg-dim); max-width: 56ch; }

/* --------------------------------------------------------------------------
   Bento — 5 items, 5 cells, no row of identical thirds
   -------------------------------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.bento-cell {
    background: var(--ink-card);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 26px;
    grid-column: span 3;
}

.bento-cell h3 { font-size: 1.08rem; margin-bottom: 10px; }
.bento-cell p { color: var(--fg-dim); font-size: 0.92rem; }

.bento-cell kbd {
    font-family: var(--mono);
    font-size: 0.76rem;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
}

/* Row 1: wide feature with a real render, plus a narrow cell */
.bento-wide {
    grid-column: span 4;
    grid-row: span 1;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 24px;
    align-items: center;
    padding-right: 0;
    overflow: hidden;
}

.bento-wide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--r-card) 0 0 var(--r-card);
    border-left: 1px solid var(--line);
}

.bento-grid > .bento-cell:nth-of-type(2) { grid-column: span 2; }

/* Row 3: full-width closer cell breaks the rhythm */
.bento-grid > .bento-cell:last-of-type { grid-column: span 6; }

.swatch-row { display: flex; gap: 8px; margin-top: 18px; }

.swatch-row span {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
}

.swatch-alpha {
    background-image:
        linear-gradient(45deg, #2A3242 25%, transparent 25%, transparent 75%, #2A3242 75%),
        linear-gradient(45deg, #2A3242 25%, transparent 25%, transparent 75%, #2A3242 75%);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
    background-color: #171C28;
}

/* --------------------------------------------------------------------------
   Statement — offset left, no card, just type
   -------------------------------------------------------------------------- */
.statement {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.statement h2 {
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    max-width: 24ch;
    /* Asymmetric indent rather than a centred block */
    margin-left: clamp(0px, 8vw, 140px);
}

.statement p {
    margin-top: 22px;
    margin-left: clamp(0px, 8vw, 140px);
    max-width: 62ch;
    color: var(--fg-dim);
}

/* --------------------------------------------------------------------------
   Pricing — two honest columns
   -------------------------------------------------------------------------- */
.pricing {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    align-items: start;
}

.plan {
    background: var(--ink-card);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: clamp(26px, 3vw, 38px);
}

.plan-quiet { background: transparent; border-style: dashed; }

.plan h2 { font-size: 1.4rem; }

.plan-lede { color: var(--fg-dim); margin-top: 8px; font-size: 0.95rem; }

.plan ul { list-style: none; margin: 24px 0 28px; }

.plan li {
    position: relative;
    padding-left: 22px;
    padding-block: 7px;
    color: var(--fg);
    font-size: 0.92rem;
}

.plan li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    width: 10px;
    height: 1px;
    background: var(--accent);
}

.plan-quiet li::before { background: var(--fg-faint); }

.plan-note { margin-top: 14px; color: var(--fg-faint); font-size: 0.8rem; }

/* --------------------------------------------------------------------------
   Closer + footer
   -------------------------------------------------------------------------- */
.closer {
    text-align: center;
    border-top: 1px solid var(--line);
    padding-block: clamp(64px, 9vw, 120px);
}

.closer h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); margin-bottom: 28px; }

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 28px var(--pad) 40px;
    border-top: 1px solid var(--line);
    color: var(--fg-faint);
    font-size: 0.82rem;
}

.footer a { color: var(--fg-dim); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.footer a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Motion — entry on load for the hero, scroll reveal for the rest.
   Gated behind .js-reveal so the page is fully readable without JavaScript.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    /* Mirrored in home.js as REVEAL_TARGETS. Hiding happens here, before first
       paint, so nothing flashes in and back out.
       :where() keeps this at zero specificity. Written plainly, a selector like
       `.statement h2` (0,2,1) outranks `.is-in` (0,2,0) and those elements stay
       hidden forever even after the observer fires. */
    .js-reveal :where(
        .section-head,
        .rail,
        .process-intro,
        .process-steps li,
        .bento-cell,
        .statement h2,
        .statement p,
        .plan,
        .closer h2,
        .closer .btn
    ) {
        opacity: 0;
        transform: translateY(16px);
    }

    .js-reveal .is-in {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    }

    .hero-copy > * {
        animation: rise 0.7s var(--ease) backwards;
    }

    .hero-title { animation-delay: 0.04s; }
    .hero-sub { animation-delay: 0.12s; }
    .hero-actions { animation-delay: 0.2s; }
    .hero-media { animation: rise 0.8s var(--ease) 0.16s backwards; }

    @keyframes rise {
        from { opacity: 0; transform: translateY(18px); }
        to { opacity: 1; transform: none; }
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 40px;
    }

    .hero-sub { max-width: 52ch; }

    .process { grid-template-columns: 1fr; }
    .process-intro p { max-width: 52ch; }

    .bento-wide { grid-column: span 6; grid-template-columns: 1fr; padding-right: 26px; }
    .bento-wide img { border-radius: var(--r-card); border-left: none; height: auto; }
    .bento-grid > .bento-cell:nth-of-type(2) { grid-column: span 3; }

    .pricing { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .nav-links { display: none; }
    .nav-brand { margin-right: auto; }

    .bento-cell,
    .bento-grid > .bento-cell:nth-of-type(2) { grid-column: span 6; }

    .statement h2,
    .statement p { margin-left: 0; }

    .footer { flex-direction: column; }
}
