/* ===== The Orbital Journey (homepage, design doc v2) =====
   Default = static document: five stops stacked, a CSS orb in the hero.
   journey.js adds .is-pinned (motion allowed): the track becomes five
   viewports, the stage pins, the WebGL scene runs behind it and every
   [data-fly] block is placed by script. No filters, no blur anywhere.
   Purple = brand (labels, links, focus, active dot). Orange = CTAs only. */

.journey-body {
    --bg: #0a0e1a;
    --ink: #f0f2f8;
    --ink-2: #8b93b0;
    --brand: #7b5cff;
    --brand-text: #a594ff;       /* brand purple lifted for small text (AA on the dark bg) */
    --accent: #ff6b35;
    --accent-ink: #1a0d06;
    --card: rgba(20, 26, 46, 0.86);
    --line: #1e2742;
    --line-2: #3a4568;
    --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.35);
    --display: 'Space Grotesk', system-ui, sans-serif;
    --body: 'Inter', system-ui, sans-serif;

    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
}

html.journey-snap { scroll-snap-type: y mandatory; }
::selection { background: rgba(123, 92, 255, 0.45); }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 10;
    padding: 0.5rem 1rem; background: var(--accent); color: var(--accent-ink); border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* ---- shell ------------------------------------------------------ */
.jnav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 6; height: 64px;
    display: flex; align-items: center; justify-content: space-between; padding: 0 5vw;
    background: linear-gradient(rgba(10, 14, 26, 0.9), rgba(10, 14, 26, 0));
}
.jnav-brand { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.jnav-links { display: flex; align-items: center; gap: 1.6rem; }
.jnav-links a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.jnav-links a:hover { color: var(--brand-text); }
.jnav-links .btn { color: var(--accent-ink); }
.jnav-links .btn:hover { color: var(--accent-ink); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }

.jfoot {
    position: relative; z-index: 2; scroll-snap-align: start;
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 3rem 5vw 2rem; color: var(--ink-2); font-size: 0.95rem;
}
.jfoot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; max-width: 1100px; }
.jfoot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.jfoot a { color: var(--ink); text-decoration: none; }
.jfoot a:hover { color: var(--brand-text); }
.jfoot p { margin: 0; line-height: 1.6; }
.jfoot-brand { font-family: var(--display); font-weight: 700; color: var(--ink); margin-bottom: 0.5rem !important; }
.jfoot-small { margin-top: 2.5rem !important; font-size: 0.85rem; }

/* dot nav: real buttons, tooltips open to the left */
.onav {
    display: none; position: fixed; right: 1.6vw; top: 50%; transform: translateY(-50%); z-index: 6;
    flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none;
}
.journey-snap .onav { display: flex; }
.onav button {
    position: relative; display: block; width: 22px; height: 22px; padding: 0;
    border: 0; background: none; cursor: pointer;
}
.onav button::before {
    content: ''; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
    background: rgba(139, 147, 176, 0.45);
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.onav button span {
    position: absolute; right: 26px; top: 50%; transform: translateY(-50%);
    font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-2); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.onav button:hover span, .onav button:focus-visible span { opacity: 1; }
.onav button.on::before { background: var(--brand); transform: scale(1.4); box-shadow: 0 0 0 5px rgba(123, 92, 255, 0.2); }
.onav button.on span { color: var(--brand-text); }

/* ---- scene ------------------------------------------------------ */
.journey { position: relative; isolation: isolate; }
.scene { display: none; }
.is-pinned .scene { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* CSS orb for the static page and for browsers without WebGL */
.orb-fallback {
    width: min(52vh, 32vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
    background:
        radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.35), transparent 28%),
        radial-gradient(circle at 60% 65%, #7b5cff 0%, #4a7dff 45%, #1b1f4a 100%);
    box-shadow: 0 0 60px rgba(74, 125, 255, 0.45), 0 0 140px rgba(123, 92, 255, 0.25), inset -30px -24px 70px rgba(6, 8, 24, 0.7);
}
.is-pinned .orb-fallback { display: none; }
.is-pinned.no-webgl .orb-fallback { display: block; position: fixed; left: 50%; top: 50%; width: 44vmin; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; }

/* ---- track & stage ------------------------------------------------ */
.track { position: relative; z-index: 1; }
.snap, .scrim { display: none; }
.is-pinned .track { height: 500vh; }        /* journey.js replaces vh with the real viewport */
.is-pinned .snap { display: block; position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; }
.is-pinned .stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }

/* ---- stops: static document --------------------------------------- */
.stop { position: relative; padding: 6rem 5vw 3rem; }
.stop + .stop { border-top: 1px solid var(--line); }
.stop-1 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2rem; align-items: center; min-height: 80vh; }
.hero-text, .l2, .l3-head, .l4, .l5-text, .l5-form { display: grid; gap: 1rem; align-content: center; }
.l2, .l4, .l5-text { max-width: 640px; }
.l2-grid, .arc { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.arc { margin-top: 1.5rem; }
.l5-form { max-width: 560px; margin-top: 2rem; }
.quotes { display: grid; gap: 1rem; }

/* ---- stops: pinned stage ------------------------------------------- */
.is-pinned .stop { position: absolute; inset: 0; padding: 0; border: 0; display: block; min-height: 0; }
.is-pinned [data-fly] { opacity: 0; will-change: transform, opacity; }

/* L1: text left, orb right, trust bar along the bottom */
.is-pinned .hero-text { position: absolute; left: 5vw; top: 50%; transform: translateY(-50%); width: min(600px, 44vw); }
.is-pinned .trust-bar { position: absolute; left: 5vw; right: 5vw; bottom: 28px; }
.trust-bar { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--ink-2); margin: 0; }
.trust-bar span { display: inline-block; white-space: nowrap; }
.trust-bar span + span::before { content: '·'; margin: 0 0.6em; color: var(--brand-text); }

/* L2: orb left; the 2x2 grid leans with the orbit */
.is-pinned .l2 { position: absolute; right: 5vw; top: 50%; transform: translateY(-50%); width: min(46vw, 640px); }
.is-pinned .l2-grid { transform: rotate(-8deg); margin-top: 0.4rem; }

/* L3: heading top-left; cards placed by journey.js along the ring's lower curve */
.is-pinned .l3-head { position: absolute; left: 5vw; top: 104px; width: min(420px, 40vw); }
.is-pinned .arc { display: block; margin: 0; }
.is-pinned .arc .work { position: absolute; width: 214px; }

/* L4: quiet column left, orb right */
.is-pinned .l4 { position: absolute; left: 5vw; top: 50%; transform: translateY(-50%); width: min(48vw, 600px); }

/* L5: text left, form cradled by the orb's lower curve */
.is-pinned .l5-text { position: absolute; left: 5vw; top: 50%; transform: translateY(-50%); width: min(27vw, 380px); }
.is-pinned .l5-form { position: absolute; left: 50%; top: 42vh; width: min(520px, 40vw); margin: 0; }

/* ---- type ------------------------------------------------------- */
.stop-label { display: block; font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand-text); }
.stop h1, .stop h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; color: var(--ink); margin: 0; }
.stop h1 { font-size: clamp(2.5rem, 4.5vw, 4rem); }
.stop h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.stop p { color: var(--ink-2); line-height: 1.65; margin: 0; }
.lead { font-size: 1.08rem; max-width: 46ch; }

.btn {
    position: relative; display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1rem;
    padding: 0.9rem 1.8rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
    text-decoration: none; white-space: nowrap;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #ff8352; color: var(--accent-ink); transform: translateY(-2px); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); background: rgba(20, 26, 46, 0.6); }
.btn-ghost:hover { color: var(--ink); border-color: var(--brand-text); background: rgba(123, 92, 255, 0.08); transform: translateY(-2px); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

/* heartbeat on the two conversion buttons */
.btn-pulse::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 6px rgba(255, 107, 53, 0.22), 0 0 28px rgba(255, 107, 53, 0.45);
    opacity: 0; animation: heartbeat 2.5s ease-in-out infinite;
}
@keyframes heartbeat { 50% { opacity: 1; } }

/* ---- cards ------------------------------------------------------ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.card h3 { font-family: var(--display); font-size: 1.05rem; font-weight: 600; margin: 0 0 0.35rem; color: var(--ink); }
.card p { font-size: 0.92rem; }
.card .more { display: inline-block; margin-top: 0.6rem; color: var(--brand-text); font-size: 0.88rem; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
.card-cta { border-color: rgba(123, 92, 255, 0.55); background: linear-gradient(135deg, rgba(123, 92, 255, 0.18), rgba(123, 92, 255, 0.04)), var(--card); }
.card-cta .btn { margin-top: 0.9rem; }

.work { display: block; overflow: hidden; padding: 0; color: inherit; text-decoration: none; transition: border-color 0.3s; }
a.work:hover { border-color: var(--brand-text); color: inherit; }
.work img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.work-body { padding: 0.75rem 1rem 0.9rem; }
.work-body h3 { font-size: 0.98rem; margin-bottom: 0.15rem; }
.work-body p { font-size: 0.82rem; line-height: 1.45; }
.work-body .more { margin-top: 0.3rem; }

.quote { margin: 0; padding: 1.3rem 1.4rem; }
.quote-logo { display: block; width: auto; height: 42px; margin: 0 0 0.9rem; object-fit: contain; }
.quote blockquote { margin: 0 0 0.8rem; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.quote cite { display: block; font-style: normal; font-size: 0.85rem; color: var(--ink-2); }
.quote cite strong { color: var(--ink); font-weight: 600; }

/* ---- L5 ---------------------------------------------------------- */
.price { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.price strong { color: var(--brand-text); }
.alt { font-size: 0.95rem; }
.alt a { color: var(--ink); }

.qform { display: grid; gap: 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem; box-shadow: var(--shadow); }
.qform label { display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--ink-2); }
.qform input, .qform select, .qform textarea {
    width: 100%; box-sizing: border-box; font: inherit; font-size: 0.95rem; color: var(--ink); background: #0a0e1a;
    border: 1px solid var(--line-2); border-radius: 8px; padding: 0.6rem 0.8rem;
}
.qform input::placeholder, .qform textarea::placeholder { color: #6b7390; }
.qform input:focus, .qform select:focus, .qform textarea:focus { outline: 2px solid var(--brand-text); outline-offset: 0; border-color: var(--brand-text); }
.qform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.qform .btn { width: 100%; }
.qform .hp { position: absolute; left: -9999px; }
#tsInline:empty { display: none; }
#tsInline iframe { display: block; }
.form-error { color: #ff8a8a; font-size: 0.85rem; }
.form-error:empty { display: none; }

/* ---- short desktop viewports ------------------------------------ */
@media (max-height: 800px) and (min-width: 1024px) {
    .card { padding: 1rem 1.1rem; }
    .is-pinned .arc .work { width: 190px; }
    .is-pinned .l5-form { top: 36vh; }
    .qform { gap: 0.55rem; padding: 1rem; }
}

/* ---- mobile: orb up top behind a scrim, content beneath ------------ */
@media (max-width: 1023px) {
    .jnav { padding: 0 1rem; }
    .jnav-links { gap: 1rem; }
    .jnav-links a:not(.btn) { display: none; }
    .jfoot-grid { grid-template-columns: 1fr; }
    .journey-snap .onav { display: none; }

    .stop { padding: 5rem 1rem 2rem; }
    .stop-1 { grid-template-columns: 1fr; min-height: 0; }
    .stop-1 .orb-fallback { width: 56vw; margin-top: 1rem; }
    .l2-grid, .arc { grid-template-columns: 1fr 1fr; gap: 0.7rem; }

    .is-pinned .scrim {
        display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none;
        background: linear-gradient(to bottom, transparent 24%, rgba(10, 14, 26, 0.92) 46%);
    }
    .is-pinned .stop { display: flex; flex-direction: column; justify-content: flex-end; gap: 0.7rem; padding: 40vh 1rem 1.2rem; z-index: 1; overflow-y: auto; }
    .is-pinned .hero-text, .is-pinned .l2, .is-pinned .l3-head, .is-pinned .l4, .is-pinned .l5-text, .is-pinned .l5-form, .is-pinned .trust-bar {
        position: static; transform: none; width: 100%; max-width: none; gap: 0.7rem;
    }
    .is-pinned .l2-grid { transform: none; }
    .is-pinned .arc { display: flex; gap: 0.7rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.4rem; margin: 0 -1rem; padding-left: 1rem; }
    .is-pinned .arc .work { position: static; flex: 0 0 72%; scroll-snap-align: start; }
    .is-pinned .l5-form { margin: 0; }
    .is-pinned .stop-5 { padding-top: 28vh; }
    .stop-5 h2 { font-size: 1.45rem; }
    .price { font-size: 0.95rem; }
    .trust-bar { font-size: 0.72rem; line-height: 1.8; }

    .stop h1 { font-size: clamp(1.9rem, 7.8vw, 2.4rem); }
    .stop h2 { font-size: clamp(1.5rem, 6.5vw, 1.9rem); }
    .lead { font-size: 1rem; }
    .card { padding: 0.85rem 0.9rem; border-radius: 12px; }
    .card h3 { font-size: 0.9rem; }
    .card p { font-size: 0.78rem; line-height: 1.45; }
    .l2-grid .card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .card .more { font-size: 0.78rem; margin-top: 0.35rem; }
    .card-cta .btn { margin-top: 0.5rem; padding: 0.55rem 0.9rem; font-size: 0.82rem; white-space: normal; }
    .work-body { padding: 0.6rem 0.75rem 0.7rem; }
    .quote { padding: 1rem; }
    .quote blockquote { font-size: 0.88rem; line-height: 1.5; }
    .is-pinned .stop-5 .lead, .is-pinned .stop-5 .alt { display: none; }
    .qform { padding: 1rem; gap: 0.5rem; }
    .qform input, .qform select, .qform textarea { padding: 0.5rem 0.7rem; }
    .qform textarea { min-height: 60px; }
}

@media (max-width: 1023px) and (max-height: 700px) {
    .is-pinned .stop { padding-top: 36vh; }
    .stop h1 { font-size: 1.75rem; }
    .lead { font-size: 0.92rem; line-height: 1.5; }
    .cta-row { margin-top: 0; }
    .is-pinned .stop-1 .trust-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .work, .onav button::before, .jnav-links a { transition: none; }
    .btn-pulse::after { animation: none; }
}
