/* ============================================================================
   Image2Vector — "Vector Lab" homepage design system.
   Standalone: index.html loads ONLY this file (not style.css) so the redesign
   is fully isolated from the other pages until the system is rolled out.
   Old --primary/--text-muted/... variable names are aliased at the bottom of
   :root so any inline styles injected by app.js still resolve.
   ========================================================================== */

:root {
    /* --- Surfaces (warm paper, not slate) --- */
    --paper:   #F1EADD;   /* page background — warm bone */
    --card:    #FBF8F1;   /* raised surfaces */
    --panel:   #E7DDCB;   /* sunken surfaces / artboards */

    /* --- Ink --- */
    --ink:     #17130F;   /* near-black, warm */
    --ink-2:   #3A342B;
    --muted:   #6E6456;

    /* --- Lines --- */
    --line:    rgba(23,19,15,.14);
    --line-2:  rgba(23,19,15,.08);

    /* --- Accent (vermilion) --- */
    --accent:      #FF4A1C;
    --accent-ink:  #C33C13;   /* darker, for accent-colored text on paper */
    --accent-soft: rgba(255,74,28,.10);
    --fox:         #F0602A;

    /* --- Status --- */
    --ok:    #3F7D3B;
    --warn:  #B5730A;
    --err:   #C0392B;

    /* --- Type --- */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

    /* --- Shape --- */
    --r:    4px;
    --r-lg: 8px;
    --shadow:   0 1px 2px rgba(23,19,15,.05), 0 10px 30px rgba(23,19,15,.07);
    --shadow-sm:0 1px 2px rgba(23,19,15,.05), 0 4px 14px rgba(23,19,15,.05);

    /* --- Back-compat aliases (referenced by app.js-injected inline styles) --- */
    --primary:      var(--accent);
    --primary-dark: var(--accent-ink);
    --primary-light:#ff6a42;
    --bg:           var(--paper);
    --bg-card:      var(--card);
    --bg-hover:     var(--panel);
    --text:         var(--ink);
    --text-muted:   var(--muted);
    --border:       var(--line);
    --success:      var(--ok);
    --error:        var(--err);
    --warning:      var(--warn);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    /* faint blueprint dot-grid across the whole page for atmosphere (flat, no gradients) */
    background-image: radial-gradient(var(--line-2) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: -1px -1px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

::selection { background: var(--accent); color: var(--card); }

a { color: inherit; }

/* ============================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: var(--r);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink); background: var(--card); }
.btn-outline { background: transparent; color: var(--accent-ink); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--card); }

/* ============================================================================
   Nav
   ========================================================================== */
nav {
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.2) blur(8px);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
nav .container { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.logo span, .logo b { color: var(--accent); font-weight: 600; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color .15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-primary { color: var(--paper); }
.nav-links a.btn-primary:hover { color: var(--paper); }

.nav-toggle {
    display: none;
    background: none; border: none; color: var(--ink);
    cursor: pointer; padding: 4px; line-height: 0;
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ============================================================================
   Hero
   ========================================================================== */
.hero { padding: 74px 0 40px; overflow: hidden; }
.hero .container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 26px;
}
.eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
    animation: pulse 1.9s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,74,28,.5); }
    70%  { box-shadow: 0 0 0 9px rgba(255,74,28,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,74,28,0); }
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.6rem, 5.2vw, 4.15rem);
    line-height: 0.98;
    letter-spacing: -0.025em;
    color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero-sub {
    font-size: 1.14rem;
    color: var(--muted);
    max-width: 46ch;
    margin: 24px 0 30px;
}

.hero-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-cta .btn-primary { font-size: 1.02rem; padding: 15px 26px; }
.link-ghost {
    font-family: var(--font-mono);
    font-size: 0.82rem; letter-spacing: 0.04em;
    color: var(--muted); text-decoration: none;
    border-bottom: 1px solid var(--line); padding-bottom: 3px;
    transition: color .15s, border-color .15s;
}
.link-ghost:hover { color: var(--ink); border-color: var(--accent); }
.arrow { transition: transform .2s ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }

/* trust chips */
.trust-chips { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 32px; }
.trust-chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.9rem; color: var(--ink-2); font-weight: 500;
}
.trust-chip svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

.hero-stat {
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 0.8rem; letter-spacing: 0.03em; color: var(--muted);
}
.hero-stat strong { color: var(--ink); font-weight: 600; }

/* ============================================================================
   Hero specimen (the live raster -> vector "trace" demo)
   ========================================================================== */
.spec { display: flex; flex-direction: column; gap: 10px; }
.spec-art {
    position: relative; aspect-ratio: 1/1;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    --wipe: 56;
}
.spec-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 28px 28px; opacity: .5;
}
.spec-corner { position: absolute; width: 13px; height: 13px; border: 2px solid var(--ink); opacity: .4; }
.spec-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.spec-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.spec-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.spec-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.spec-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.spec-raster { clip-path: inset(0 calc((100 - var(--wipe)) * 1%) 0 0); }
.spec-vector { clip-path: inset(0 0 0 calc(var(--wipe) * 1%)); }
.spec-blur { filter: blur(2px) saturate(1.04); }
.spec-pix { mix-blend-mode: multiply; opacity: .5; }
.spec-outline {
    fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round;
    stroke-dasharray: 920; stroke-dashoffset: 920;
    animation: draw 1.9s .4s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.spec-node {
    fill: var(--card); stroke: var(--accent); stroke-width: 2;
    opacity: 0; transform-box: fill-box; transform-origin: center;
    animation: pop .3s ease forwards;
}
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.spec-handle { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.spec-hdot { fill: var(--ink); opacity: .55; }

.spec-cap {
    position: absolute; top: 14px; z-index: 4;
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 4px 8px; border-radius: 2px;
}
.spec-cap.l { left: 30px; background: rgba(23,19,15,.09); color: var(--muted); }
.spec-cap.r { right: 30px; background: var(--accent); color: var(--card); }

.spec-div {
    position: absolute; top: 0; bottom: 0; left: calc(var(--wipe) * 1%);
    width: 2px; background: var(--ink); pointer-events: none; z-index: 5;
}
.spec-knob {
    position: absolute; top: 50%; left: calc(var(--wipe) * 1%);
    transform: translate(-50%, -50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--card); border: 2px solid var(--ink);
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; z-index: 6; box-shadow: 0 2px 10px rgba(23,19,15,.22);
}
.spec-knob svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 2; }
.spec-range {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    opacity: 0; cursor: ew-resize; z-index: 7;
    -webkit-appearance: none; appearance: none; background: transparent;
}
.spec-range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 320px; background: transparent; cursor: ew-resize; }
.spec-range::-moz-range-thumb { width: 48px; height: 320px; background: transparent; border: 0; }

.spec-cap-row {
    display: flex; justify-content: space-between;
    font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted);
}
.spec-cap-row b { color: var(--ink); font-weight: 600; }

/* ============================================================================
   Converter workbench
   ========================================================================== */
.converter-section { padding: 30px 0 60px; }

.workbench-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.workbench-head .k {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--muted);
}
.conversion-counter {
    font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em;
    color: var(--muted);
    display: inline-flex; align-items: center; gap: 8px;
}
.conversion-counter span { color: var(--accent-ink); font-weight: 600; }
.conversion-counter .btn { padding: 5px 14px; font-size: 0.78rem; }

.preset-hint {
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
    color: var(--muted); margin-bottom: 12px;
}
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.preset {
    padding: 9px 18px; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--r);
    cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--muted);
    transition: all .15s ease;
}
.preset:hover { border-color: var(--ink); color: var(--ink); }
.preset.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.converter-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }

.panel-label {
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}
.panel-label::before { content: ""; width: 6px; height: 6px; background: var(--accent); }

/* upload zone */
.upload-zone {
    position: relative;
    background: var(--card);
    border: 1.5px dashed var(--line);
    border-radius: var(--r-lg);
    padding: 40px; min-height: 420px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; cursor: pointer; overflow: hidden;
    transition: border-color .2s ease, background .2s ease;
}
.upload-zone::before {
    /* corner tick, top-left, blueprint style */
    content: ""; position: absolute; top: 14px; left: 14px;
    width: 14px; height: 14px; border-left: 2px solid var(--line); border-top: 2px solid var(--line);
}
.upload-zone:hover { border-color: var(--accent); background: var(--card); }
.upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone.has-image { padding: 16px; border-style: solid; }
.upload-icon {
    width: 52px; height: 52px; margin-bottom: 18px; color: var(--ink);
    stroke-width: 1.5;
}
.upload-zone h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 8px; }
.upload-zone p { color: var(--muted); font-size: 0.88rem; }
#file-input { display: none; }
.preview-image { max-width: 100%; max-height: 380px; border-radius: var(--r); object-fit: contain; }

/* result container */
.preview-container {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px; min-height: 420px;
    display: flex; flex-direction: column;
}
.preview-content {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: var(--panel); border-radius: var(--r); overflow: hidden;
    position: relative;
}
.preview-content > svg { max-width: 100%; max-height: 320px; }
.preview-placeholder { color: var(--muted); text-align: center; padding: 24px; }
.preview-placeholder h3 { font-family: var(--font-display); color: var(--ink); margin-bottom: 8px; }
.action-buttons { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }

/* zoom / pan viewer */
.preview-viewport {
    position: relative; width: 100%; height: 100%; min-height: 340px;
    overflow: hidden; background: var(--panel); border-radius: var(--r);
    cursor: grab; touch-action: none; user-select: none;
    background-image:
        linear-gradient(var(--line-2) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
    background-size: 22px 22px;
    animation: scanreveal .8s ease;
}
@keyframes scanreveal {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}
.preview-stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.preview-stage svg, .preview-stage img { display: block; max-width: none; max-height: none; }

.zoom-controls {
    position: absolute; bottom: 12px; right: 12px; z-index: 5;
    display: flex; gap: 3px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r); padding: 4px; box-shadow: var(--shadow-sm);
}
.zoom-btn {
    background: transparent; border: none; color: var(--ink);
    min-width: 32px; height: 32px; border-radius: 3px; cursor: pointer;
    font-size: 1.02rem; line-height: 1; font-family: var(--font-mono);
    display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.zoom-btn:hover { background: var(--panel); }
.zoom-btn.ba-toggle { width: auto; padding: 0 13px; font-size: 0.78rem; font-weight: 500; }
.zoom-btn.ba-toggle.active { background: var(--accent); color: var(--card); }
.zoom-hint {
    position: absolute; top: 10px; left: 12px; z-index: 5; pointer-events: none;
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--muted);
    background: var(--card); border: 1px solid var(--line);
    border-radius: 3px; padding: 4px 9px; box-shadow: var(--shadow-sm);
}

/* settings */
.settings-panel {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-lg); overflow: hidden;
}
.settings-header {
    padding: 18px 22px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: background .15s;
}
.settings-header:hover { background: var(--panel); }
.settings-header h3 {
    font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.settings-toggle { color: var(--muted); transition: transform .3s; }
.settings-toggle.open { transform: rotate(180deg); }
.settings-content { padding: 0 22px 22px; display: none; }
.settings-content.open { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.setting-group { margin-bottom: 0; }
.setting-group label {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; font-size: 0.85rem; font-weight: 500;
}
.setting-group label span { font-family: var(--font-mono); color: var(--accent-ink); font-size: 0.8rem; }
.setting-group input[type="range"] {
    width: 100%; height: 4px; -webkit-appearance: none; appearance: none;
    background: var(--line); border-radius: 2px; outline: none;
}
.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
    background: var(--accent); border-radius: 2px; cursor: pointer; border: 2px solid var(--card);
    box-shadow: 0 0 0 1px var(--accent);
}
.setting-group input[type="range"]::-moz-range-thumb {
    width: 14px; height: 14px; background: var(--accent); border-radius: 2px; cursor: pointer; border: 0;
}
.radio-group { display: flex; gap: 8px; }
.radio-option {
    flex: 1; padding: 11px 14px; background: var(--paper);
    border: 1px solid var(--line); border-radius: var(--r);
    cursor: pointer; text-align: center; font-size: 0.88rem; transition: all .15s;
}
.radio-option:hover { border-color: var(--ink); }
.radio-option.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* ============================================================================
   Compare strip (the positioning wedge)
   ========================================================================== */
.compare-strip {
    max-width: 900px; margin: 0 auto;
    background: var(--ink); color: var(--paper);
    border-radius: var(--r-lg); padding: 34px 40px;
    font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; line-height: 1.5;
    position: relative; overflow: hidden;
}
.compare-strip::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(241,234,221,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(241,234,221,.05) 1px, transparent 1px);
    background-size: 26px 26px; pointer-events: none;
}
.compare-strip strong { color: var(--accent); font-weight: 600; }
.compare-strip .k {
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: rgba(241,234,221,.55);
    display: block; margin-bottom: 14px; font-weight: 400;
}

/* ============================================================================
   Sections / features
   ========================================================================== */
.section { padding: 84px 0; }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head .k {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--accent-ink); margin-bottom: 16px; display: block;
}
.section-head h2 {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.05; letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); font-size: 1.08rem; margin-top: 14px; max-width: 54ch; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.feature {
    padding: 34px 30px 34px 0; border-bottom: 1px solid var(--line);
    position: relative;
}
.feature:not(:last-child) { border-right: 1px solid var(--line); padding-right: 30px; }
.feature { padding-left: 30px; }
.feature-idx {
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent);
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.feature-idx::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.feature h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* how it works */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; padding-top: 26px; border-top: 2px solid var(--ink); }
.step-n {
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted);
    margin-bottom: 12px;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* ============================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; margin-bottom: 10px; }
.faq-item p { color: var(--muted); margin: 0; }

/* ============================================================================
   Trust bar
   ========================================================================== */
.trust-bar {
    display: flex; gap: 16px 40px; justify-content: center; align-items: center; flex-wrap: wrap;
    max-width: 940px; margin: 0 auto; padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.trust-bar-item {
    display: inline-flex; align-items: center; gap: 9px;
    color: var(--muted); font-size: 0.88rem;
    font-family: var(--font-mono); letter-spacing: 0.02em;
}
.trust-bar-item svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }

/* ============================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
    text-align: center; background: var(--ink); color: var(--paper);
    border-radius: 14px; padding: 66px 40px; max-width: 900px; margin: 0 auto;
    position: relative; overflow: hidden;
}
.cta-banner::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        radial-gradient(rgba(241,234,221,.06) 1px, transparent 1px);
    background-size: 24px 24px; pointer-events: none;
}
.cta-banner .k {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 18px; display: block; position: relative;
}
.cta-banner h2 {
    font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 14px; position: relative;
}
.cta-banner p { color: rgba(241,234,221,.72); font-size: 1.08rem; max-width: 520px; margin: 0 auto 30px; position: relative; }
.cta-banner .btn-primary { background: var(--accent); color: var(--card); position: relative; }
.cta-banner .btn-primary:hover { background: var(--paper); color: var(--ink); }
.guarantee {
    display: inline-flex; align-items: center; gap: 8px;
    color: rgba(241,234,221,.6); font-size: 0.82rem; margin-top: 22px; position: relative;
    font-family: var(--font-mono); letter-spacing: 0.02em;
}
.guarantee svg { width: 16px; height: 16px; color: var(--accent); }

/* ============================================================================
   Footer
   ========================================================================== */
footer { border-top: 1px solid var(--line); padding: 60px 0 32px; margin-top: 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 44px; }
.footer-brand { max-width: 300px; }
.footer-brand .logo { font-size: 1.5rem; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 40px; }
.footer-section h4 {
    font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink); margin-bottom: 16px; font-weight: 600;
}
.footer-section a { display: block; color: var(--muted); text-decoration: none; margin-bottom: 10px; font-size: 0.9rem; transition: color .15s; }
.footer-section a:hover { color: var(--accent-ink); }
.footer-bottom {
    text-align: center; color: var(--muted); font-size: 0.82rem;
    padding-top: 26px; border-top: 1px solid var(--line);
    font-family: var(--font-mono); letter-spacing: 0.02em;
}

/* ============================================================================
   Modal / toast / spinner / misc (classes emitted by app.js)
   ========================================================================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(23,19,15,.55);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
    opacity: 0; visibility: hidden; transition: all .25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 30px; max-width: 420px; width: 90%;
    transform: scale(.94); transition: transform .25s; box-shadow: var(--shadow);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 12px; }
.modal input[type="email"] {
    width: 100%; padding: 12px 14px; background: var(--paper);
    border: 1px solid var(--line); border-radius: var(--r); color: var(--ink);
    font-size: 1rem; font-family: var(--font-body); margin-bottom: 8px;
}
.modal input[type="email"]:focus { outline: none; border-color: var(--accent); }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

.loading-spinner {
    width: 38px; height: 38px; border: 3px solid var(--line);
    border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 1001;
    background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
    border-radius: var(--r); padding: 14px 22px;
    display: flex; align-items: center; gap: 12px;
    font-size: 0.92rem; box-shadow: var(--shadow);
    transform: translateY(100px); opacity: 0; transition: all .3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 3px solid var(--ok); }
.toast.error { border-left: 3px solid var(--accent); }

.pro-badge {
    background: var(--accent); color: var(--card);
    font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em;
    padding: 2px 8px; border-radius: 3px; margin-left: 8px;
}

/* ============================================================================
   Scroll-reveal + motion
   ========================================================================== */
[data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* nav gains a hairline shadow once you scroll off the top */
nav.scrolled { box-shadow: var(--shadow-sm); }

/* hero animates in on load (above the fold — not scroll-triggered) */
.hero-copy > * { animation: rise .7s ease both; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .13s; }
.hero-copy > *:nth-child(3) { animation-delay: .21s; }
.hero-copy > *:nth-child(4) { animation-delay: .29s; }
.hero-copy > *:nth-child(5) { animation-delay: .37s; }
.hero-copy > *:nth-child(6) { animation-delay: .45s; }
.spec { animation: rise .85s .2s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
    .spec-outline { stroke-dashoffset: 0; }
    .spec-node { opacity: 1; }
}

/* ============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; gap: 36px; }
    .spec { max-width: 460px; }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .container { padding: 0 20px; }
    .hero { padding: 48px 0 30px; }
    .converter-wrapper { grid-template-columns: 1fr; }
    .settings-content.open { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .feature:not(:last-child) { border-right: none; }
    .nav-toggle { display: inline-flex; }
    nav .container { position: relative; }
    .nav-links {
        display: none; position: absolute; top: calc(100% + 14px); left: 0; right: 0;
        background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
        flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px;
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 0; }
    .nav-links .btn { margin-top: 8px; }
    .compare-strip { font-size: 1.1rem; padding: 28px 26px; }
}
/* ============================================================================
   Vector Lab — additional components for the NON-homepage pages
   (tool pages, pricing, api-docs, dashboard, legal). Appended after the core
   system so these styles win where they overlap. Reuses the same tokens.
   ========================================================================== */

/* --- Hero variants: base hero is single-column centered (tool/landing pages);
       the homepage upgrades to two columns only when .hero-copy is present.
       Degrades gracefully where :has() is unsupported (everything stacks). --- */
.hero .container { display: block; text-align: center; }
.hero:not(:has(.hero-copy)) h1 { max-width: 16ch; margin: 0 auto; }
.hero:not(:has(.hero-copy)) > .container > p,
.hero:not(:has(.hero-copy)) .hero-sub { max-width: 56ch; margin-left: auto; margin-right: auto; }
.hero:not(:has(.hero-copy)) .trust-chips { justify-content: center; }
.hero:has(.hero-copy) .container {
    display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
    align-items: center; text-align: left;
}
.hero h1 span { color: var(--accent); }

/* eyebrow pill used on tool/pricing/api pages */
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--accent-ink); background: var(--accent-soft);
    border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; margin-bottom: 22px;
}
.hero-eyebrow svg { width: 14px; height: 14px; flex-shrink: 0; }

/* page header (pricing / api / dashboard) */
.page-header { padding: 66px 0 18px; text-align: center; }
.page-header h1 {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -0.02em; line-height: 1.03; margin-bottom: 14px;
}
.page-header p { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin: 0 auto; }
.page-header .trust-chips { justify-content: center; margin-top: 26px; }

/* the old converter panel label (tool pages use .preview-label) */
.preview-label {
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.preview-label::before { content: ""; width: 6px; height: 6px; background: var(--accent); }

/* long-form prose sections (tool pages, pricing FAQ) */
.content-section { padding: 16px 0 48px; }
.content-section .container { max-width: 820px; }
.content-section h2 {
    font-family: var(--font-display); font-weight: 600; font-size: 1.7rem;
    letter-spacing: -0.01em; margin: 42px 0 14px;
}
.content-section > .container > h2:first-child { margin-top: 8px; }
.content-section p { color: var(--muted); margin-bottom: 16px; }
.content-section ul { list-style: none; margin: 0 0 20px; padding: 0; }
.content-section ul li { color: var(--muted); padding: 7px 0 7px 26px; position: relative; }
.content-section ul li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent); }

/* old numbered steps list (ol.steps on tool pages) */
.steps { counter-reset: step; list-style: none; margin: 4px 0 22px; padding: 0; }
.steps li { position: relative; padding: 9px 0 9px 42px; color: var(--muted); margin-bottom: 6px; min-height: 26px; }
.steps li::before {
    counter-increment: step; content: counter(step, decimal-leading-zero);
    position: absolute; left: 0; top: 9px;
    color: var(--accent); font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem;
}

/* ============================================================================
   Pricing
   ========================================================================== */
.pricing-section { padding: 26px 0 70px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 960px; margin: 0 auto; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 28px 24px; position: relative; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
}
.pricing-card.pro { border-color: var(--accent); border-width: 1.5px; }
.pricing-card.pro::before {
    content: "BEST VALUE"; position: absolute; top: -10px; left: 22px;
    background: var(--accent); color: var(--card);
    font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.1em;
    padding: 3px 10px; border-radius: 3px;
}
.pricing-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 6px; }
.pricing-card .price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 20px; }
.pricing-card .price span { font-family: var(--font-body); font-size: 0.92rem; font-weight: 400; color: var(--muted); }
.pricing-features { list-style: none; margin-bottom: 24px; flex: 1; }
.pricing-features li { padding: 7px 0; display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 0.92rem; }
.pricing-features li::before { content: "\2192"; color: var(--accent); flex-shrink: 0; }
.pricing-features li strong { color: var(--ink); }

/* ============================================================================
   API docs
   ========================================================================== */
.api-section { padding: 26px 0 70px; }
.api-section .container { max-width: 900px; }
.api-section h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 14px; }
.tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; background: var(--panel); padding: 4px; border-radius: var(--r); }
.tab {
    padding: 9px 18px; background: transparent; border: none; color: var(--muted); cursor: pointer;
    border-radius: 3px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; transition: all .15s;
}
.tab.active { background: var(--ink); color: var(--paper); }
.tab:hover:not(.active) { color: var(--ink); }
.code-block { background: var(--ink); border-radius: var(--r-lg); padding: 22px; overflow-x: auto; margin: 14px 0; position: relative; }
.code-block pre { font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.7; color: #E9E0CF; }
.code-block .keyword { color: #FF8A5C; }
.code-block .string { color: #C7D89A; }
.copy-btn {
    position: absolute; top: 12px; right: 12px;
    background: rgba(241,234,221,.12); border: none; color: var(--paper);
    padding: 6px 12px; border-radius: 3px; cursor: pointer; font-family: var(--font-mono); font-size: 0.7rem;
    transition: background .15s;
}
.copy-btn:hover { background: var(--accent); }

/* ============================================================================
   Dashboard
   ========================================================================== */
.dashboard-section { padding: 20px 0 70px; }
.dashboard-section .container { max-width: 900px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.dash-card.dash-upgrade { border-color: var(--accent); }
.dash-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.dash-plan { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.dash-muted { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.dash-muted code { font-family: var(--font-mono); color: var(--accent-ink); font-size: 0.85em; }
.metric-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.metric-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.metric-value { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--ink); line-height: 1; }
.api-key-row { display: flex; gap: 10px; flex-wrap: wrap; }
.api-key-row input {
    flex: 1; min-width: 240px; padding: 12px 14px; background: var(--paper);
    border: 1px solid var(--line); border-radius: var(--r); color: var(--ink);
    font-family: var(--font-mono); font-size: 0.9rem;
}
.api-key-row input:focus { outline: none; border-color: var(--accent); }

/* ============================================================================
   Old footer grid + Pro lock overlay
   ========================================================================== */
.footer-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
@media (max-width: 720px) { .footer-content { grid-template-columns: 1fr 1fr; } }

.locked-overlay {
    position: absolute; inset: 0; background: rgba(251,248,241,.9);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: var(--r-lg); z-index: 10; text-align: center; padding: 24px;
}
.locked-overlay svg { width: 46px; height: 46px; color: var(--muted); margin-bottom: 14px; }
.pro-required { position: relative; }

/* base: display face on any heading unless a component sets its own font */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }

/* comparison table (alternative / vs pages) */
.cmp-wrap { max-width: 900px; margin: 0 auto; overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cmp-table th, .cmp-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.cmp-table thead th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--panel); font-weight: 600; }
.cmp-table thead th.us { color: var(--accent-ink); }
.cmp-table td:first-child { color: var(--ink); font-weight: 500; }
.cmp-table td { color: var(--muted); }
.cmp-table td.col-us { background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.cmp-table .yes { color: var(--ok); font-weight: 600; }
.cmp-table .no { color: var(--err); }
.cmp-table tr:last-child td { border-bottom: none; }

/* ===================== Logo mark (before the wordmark, site-wide) ===================== */
.logo { gap: 0; }
.logo::before {
    content: "";
    display: inline-block;
    width: 1.18em; height: 1.18em;
    margin-right: 0.44em;
    background: url('/favicon.svg?v=2') center / contain no-repeat;
    flex-shrink: 0;
}

/* ===================== Format download menu ===================== */
.action-buttons { flex-wrap: wrap; align-items: center; }
.fmt-btn { padding: 10px 15px; font-size: 0.88rem; }
.pro-tag {
    font-family: var(--font-mono); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.08em;
    background: var(--accent); color: var(--card); padding: 1px 5px; border-radius: 3px;
    margin-left: 6px; vertical-align: middle;
}
