/* web000 — Lead Generation showcase: three-step guided walkthrough */

:root {
    --ink:        #14161f;
    --ink-soft:   #3c4152;
    --muted:      #6b7185;
    --line:       #e4e7f0;
    --bg:         #ffffff;
    --bg-alt:     #f5f6fb;
    --panel:      #10121d;
    --panel-2:    #191c2b;
    --panel-line: #2a2e42;
    --accent:     #5b5bd6;
    --accent-2:   #8a5cd1;
    --accent-soft:#eeeefc;
    --ok:         #1f9254;
    --warn:       #b7791f;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--accent-soft);
    color: #3b3bb0;
    padding: 0.1em 0.38em;
    border-radius: 5px;
    overflow-wrap: anywhere;
}

/* ---------- Nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 62px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--ink);
    color: #fff;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
}

.brand-name { font-weight: 600; letter-spacing: -0.01em; }

.nav-back {
    color: var(--ink);
    font-size: 0.93rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.nav-back:hover { color: var(--accent); }

/* ---------- Page head ---------- */

.pagehead {
    padding: 3.25rem 0 2.75rem;
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(91, 91, 214, 0.12), transparent 60%),
        radial-gradient(700px 380px at 88% 0%, rgba(138, 92, 209, 0.11), transparent 62%),
        var(--bg);
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.9rem;
}

.pagehead h1 {
    font-size: clamp(2rem, 4.6vw, 2.9rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.lede {
    max-width: 62ch;
    font-size: 1.06rem;
    color: var(--ink-soft);
}

/* Setup badges, compact: the two declared settings for this case. */

.setup-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.6rem;
}

.setup-chips li {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 0.4rem 0.95rem;
    font-size: 0.84rem;
    color: var(--muted);
}

.setup-key {
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.setup-value {
    font-family: var(--mono);
    font-size: 0.88rem;
    font-weight: 700;
    color: #3b3bb0;
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
}

.setup-note { color: var(--muted); }

.head-meta {
    margin-top: 1.1rem;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: #9aa0b5;
    overflow-wrap: anywhere;
}

/* ---------- Steps ---------- */

.step {
    padding: 3.25rem 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 62px;
}

.step:nth-of-type(even) { background: var(--bg-alt); }

.step-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.5rem 1.1rem;
    margin-bottom: 1.6rem;
}

.step-num {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    flex: none;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.step-title h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.step-sub {
    max-width: 64ch;
    margin-top: 0.4rem;
    font-size: 0.98rem;
    color: var(--ink-soft);
}

.step-state {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    background: #fff;
    white-space: nowrap;
}

/* Progressive emphasis only — nothing is hidden, every step stays usable and linkable. */
.step[data-state="active"] .step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.step[data-state="done"] .step-num {
    background: rgba(31, 146, 84, 0.12);
    border-color: rgba(31, 146, 84, 0.4);
    color: var(--ok);
}

.step[data-state="done"] .step-state {
    color: var(--ok);
    border-color: rgba(31, 146, 84, 0.4);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 6px 18px rgba(91, 91, 214, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(91, 91, 214, 0.34);
}

.btn-ghost {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-block { width: 100%; }

.btn-start { font-size: 1.02rem; padding: 0.95rem 2rem; }

.btn[disabled] {
    cursor: default;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}

.step-hint {
    margin-top: 0.9rem;
    font-size: 0.92rem;
    color: var(--muted);
    max-width: 60ch;
}

/* ---------- Step 2: promised payload + form ---------- */

.step-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.payload {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.code {
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.8;
    padding: 1.15rem;
    overflow-x: auto;
    color: var(--ink-soft);
    white-space: pre;
}

/* the block sample must not inherit the inline-<code> pill styling */
.code code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    white-space: inherit;
}

.code .c { color: #9aa0b5; }

.payload-note {
    padding: 0 1.15rem 1.15rem;
    font-size: 0.88rem;
    color: var(--muted);
    max-width: 62ch;
}

.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 14px 40px rgba(20, 22, 31, 0.06);
}

.field { margin-bottom: 1.1rem; }

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.35rem;
}

.field input {
    width: 100%;
    padding: 0.78rem 0.9rem;
    font-family: inherit;
    font-size: 0.97rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder { color: #a8adc0; }

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.14);
}

.field input.invalid { border-color: #d9534f; }

.form-error {
    color: #c9302c;
    font-size: 0.87rem;
    margin-bottom: 0.9rem;
}

.disclaimer {
    margin-top: 1.1rem;
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--muted);
    background: var(--bg-alt);
    border-left: 3px solid var(--warn);
    padding: 0.75rem 0.9rem;
    border-radius: 0 8px 8px 0;
}

.disclaimer strong { color: var(--ink-soft); }

.form-success { text-align: center; }

.success-mark {
    width: 3.1rem;
    height: 3.1rem;
    margin: 0.4rem auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(31, 146, 84, 0.12);
    color: var(--ok);
    font-size: 1.5rem;
    font-weight: 700;
}

.form-success h3 {
    font-family: var(--mono);
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.form-success p {
    font-size: 0.93rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}

.form-success code { white-space: normal; }

/* ---------- Step 3: dark, live panels ---------- */

.step-dark {
    background: var(--panel);
    color: #dfe2ee;
    border-bottom: none;
}

.step:nth-of-type(even).step-dark { background: var(--panel); }

.step-dark h2 { color: #fff; }
.step-dark .step-sub { color: #a9afc6; }
.step-dark code { background: rgba(255, 255, 255, 0.09); color: #c3c6ff; }

.step-dark .step-num {
    background: var(--panel-2);
    border-color: var(--panel-line);
    color: #a9afc6;
}

.step-dark .step-state {
    background: var(--panel-2);
    border-color: var(--panel-line);
    color: #a9afc6;
}

.step-dark[data-state="active"] .step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.step-dark[data-state="done"] .step-num {
    background: rgba(142, 240, 180, 0.14);
    border-color: rgba(142, 240, 180, 0.4);
    color: #8ef0b4;
}

.step-dark[data-state="done"] .step-state {
    color: #8ef0b4;
    border-color: rgba(142, 240, 180, 0.4);
}

/* "What you're looking at" strip at the top of a live panel. */
.panel-explainer {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--panel-line);
    background: rgba(91, 91, 214, 0.1);
    font-size: 0.84rem;
    line-height: 1.55;
    color: #a9afc6;
}

.panel-explainer strong { color: #dfe2ee; font-weight: 600; }

.stream-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.console {
    border: 1px solid var(--panel-line);
    border-radius: 14px;
    background: var(--panel-2);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.console-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid var(--panel-line);
    background: rgba(255, 255, 255, 0.02);
}

.console-status {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 0.82rem;
    color: #a9afc6;
}

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 0 rgba(31, 146, 84, 0.6);
    animation: ping 2s infinite;
    flex: none;
}

@keyframes ping {
    0%   { box-shadow: 0 0 0 0 rgba(31, 146, 84, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(31, 146, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 146, 84, 0); }
}

.console-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.82rem;
    color: #8c93ad;
}

.counter strong { color: #fff; font-family: var(--mono); }

.toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
}

.toggle input { accent-color: var(--accent); cursor: pointer; }

.console-btn {
    font-family: inherit;
    font-size: 0.8rem;
    color: #a9afc6;
    background: transparent;
    border: 1px solid var(--panel-line);
    border-radius: 7px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.console-btn:hover { color: #fff; border-color: #4a5070; }

.console-body {
    height: 380px;
    overflow-y: auto;
    padding: 0.5rem 0;
    font-family: var(--mono);
    font-size: 0.82rem;
    scrollbar-width: thin;
}

.console-empty {
    padding: 2.5rem 1.1rem;
    text-align: center;
    color: #6b7185;
    font-size: 0.85rem;
}

.log-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    animation: slidein 0.35s ease;
}

.log-row:hover { background: rgba(255, 255, 255, 0.035); }

@keyframes slidein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.log-head {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.log-time { color: #656b83; flex: none; }

.log-name {
    font-weight: 700;
    color: #dfe2ee;
}

.log-row.key .log-name { color: #8ef0b4; }
.log-row.internal .log-name { color: #7b8199; font-weight: 500; }

.log-badge {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.08rem 0.4rem;
    border-radius: 4px;
    border: 1px solid;
    flex: none;
}

.log-row.key .log-badge { color: #8ef0b4; border-color: rgba(142, 240, 180, 0.35); }
.log-row.internal .log-badge { color: #6b7185; border-color: #343953; }
.log-row.other .log-badge { color: #c3c6ff; border-color: rgba(195, 198, 255, 0.3); }

.log-summary {
    color: #7b8199;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 46%;
}

.log-payload {
    display: none;
    margin-top: 0.5rem;
    padding: 0.7rem 0.85rem;
    background: rgba(0, 0, 0, 0.35);
    border-left: 2px solid var(--accent);
    border-radius: 0 6px 6px 0;
    color: #b9bed6;
    font-size: 0.78rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.log-row.open .log-payload { display: block; }

body.hide-internals .log-row.internal { display: none; }

.console-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.65rem 1.1rem;
    border-top: 1px solid var(--panel-line);
    font-size: 0.78rem;
    color: #6b7185;
    background: rgba(255, 255, 255, 0.02);
}

.console-legend { display: flex; align-items: center; gap: 0.45rem; }

.lg {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}

.lg-key { background: #8ef0b4; }
.lg-int { background: #4a5070; margin-left: 0.6rem; }

/* ---------- Cookie panel (right of the stream) ---------- */

.cookies {
    border: 1px solid var(--panel-line);
    border-radius: 14px;
    background: var(--panel-2);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.cookies-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid var(--panel-line);
    background: rgba(255, 255, 255, 0.02);
}

.cookies-bar h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #dfe2ee;
}

.cookies-count {
    font-size: 0.8rem;
    color: #8c93ad;
    white-space: nowrap;
}

.cookies-count strong {
    color: #fff;
    font-family: var(--mono);
}

.cookie-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    max-height: 264px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.cookie-row {
    padding: 0.55rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    font-family: var(--mono);
    font-size: 0.79rem;
}

.cookie-row:last-child { border-bottom: none; }

.cookie-head {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}

.cookie-name {
    color: #dfe2ee;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cookie-badge {
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.06rem 0.38rem;
    border-radius: 4px;
    border: 1px solid;
    flex: none;
    margin-left: auto;
}

/* i1 is written lowercase — the uppercasing of the other badges would misspell it. */
.badge-i1    { color: #8ef0b4; border-color: rgba(142, 240, 180, 0.35); text-transform: none; }
.badge-ga4   { color: #f0c98e; border-color: rgba(240, 201, 142, 0.35); }
.badge-other { color: #8c93ad; border-color: #343953; }

.cookie-value {
    display: block;
    margin-top: 0.2rem;
    color: #7b8199;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cookie-value.cookie-hidden {
    color: #656b83;
    font-style: italic;
    white-space: normal;
}

.cookie-row-static {
    background: rgba(142, 240, 180, 0.05);
    border-left: 2px solid rgba(142, 240, 180, 0.35);
}

.cookie-row.is-new { animation: cookieflash 1.6s ease-out; }

@keyframes cookieflash {
    0%   { background: rgba(91, 91, 214, 0.34); }
    100% { background: transparent; }
}

.cookie-empty {
    padding: 0.9rem 1.1rem;
    color: #6b7185;
    font-size: 0.82rem;
    line-height: 1.55;
}

.cookies-note {
    border-top: 1px solid var(--panel-line);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.85rem 1.1rem;
    font-size: 0.79rem;
    line-height: 1.6;
    color: #8c93ad;
}

.cookies-note strong { color: #b9bed6; font-weight: 600; }

/* ---------- Recap (after generate_lead) ---------- */

.recap {
    margin-top: 1.5rem;
    border: 1px solid var(--panel-line);
    border-left: 3px solid #8ef0b4;
    border-radius: 0 14px 14px 0;
    background: var(--panel-2);
    padding: 1.25rem 1.4rem;
    animation: slidein 0.4s ease;
}

.recap h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.7rem;
}

.recap-flow {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: #6b7185;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: baseline;
    margin-bottom: 0.9rem;
}

.recap-flow span { color: #a9afc6; }
.recap-flow .on { color: #8ef0b4; }

.recap-list {
    list-style: none;
    counter-reset: n;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 74ch;
}

.recap-list li {
    counter-increment: n;
    position: relative;
    padding-left: 1.9rem;
    font-size: 0.9rem;
    color: #a9afc6;
}

.recap-list li::before {
    content: counter(n);
    position: absolute;
    left: 0;
    top: 0.15rem;
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(142, 240, 180, 0.12);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: #8ef0b4;
}

/* ---------- Footer ---------- */

.footer {
    background: var(--panel);
    border-top: 1px solid var(--panel-line);
    color: #8c93ad;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #c3c6ff;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover { text-decoration: underline; }

.footer-meta {
    font-family: var(--mono);
    font-size: 0.76rem;
    color: #5d637a;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .step-split { grid-template-columns: 1fr; }
    .stream-split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .nav-inner { height: auto; min-height: 56px; padding-block: 0.5rem; }
    .brand-name { font-size: 0.9rem; white-space: nowrap; }
    .pagehead { padding: 2.5rem 0 2.25rem; }
    .step { padding: 2.5rem 0; }
    .step-head {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.4rem 0.8rem;
    }
    .step-state { grid-column: 2; justify-self: start; }
    .step-title { grid-column: 2; }
    .btn-start { width: 100%; text-align: center; }
    .form-card { padding: 1.4rem; }
    .console-body { height: 320px; }
    .cookie-list { max-height: 220px; }
    .log-summary { display: none; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
