/* SpectiveMetrics — theme matched to spectivestudios.co.uk design system */
:root {
    --bg: #0a0a0f;
    --bg-soft: #0e0e15;
    --ink: #f2f2f6;
    --muted: #9b9baa;
    --faint: #5c5c6e;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --green: #39ff14;
    --violet: #8b5cf6;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Manrope', -apple-system, sans-serif;
    --pad: clamp(1.25rem, 4vw, 3rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--sans); font-size: 16px; line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--green); color: #000; }
* { scrollbar-width: thin; scrollbar-color: rgba(139,92,246,0.5) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--green), var(--violet)); border-radius: 4px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }

.display {
    font-family: var(--serif); font-weight: 380;
    font-size: clamp(2.4rem, 6.5vw, 5rem); line-height: 1.04;
    letter-spacing: -0.015em; margin: 0;
}
.display em { font-style: italic; color: var(--green); }
.display .violet { color: var(--violet); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 420; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
.eyebrow {
    font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase; color: var(--green);
    display: block; margin-bottom: 1.1rem;
}
.eyebrow.violet { color: var(--violet); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); line-height: 1.7; max-width: 34em; }
.small { font-size: 0.85rem; color: var(--muted); }
.wrap { width: min(1200px, calc(100% - 2 * var(--pad))); margin: 0 auto; }
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }

.btn {
    display: inline-block; font-family: var(--sans); font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase; padding: 0.95em 2em;
    border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink);
    transition: all 0.25s ease; cursor: pointer; background: transparent; text-align: center;
}
.btn:hover { border-color: var(--green); color: var(--green); }
.btn--solid { background: var(--green); border-color: var(--green); color: #000; }
.btn--solid:hover { background: transparent; color: var(--green); }
.btn--violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn--violet:hover { background: transparent; color: var(--violet); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    background: rgba(10, 10, 15, 0.72); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    width: min(1200px, calc(100% - 2 * var(--pad))); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.brand {
    font-family: var(--sans); font-weight: 800; font-size: 0.95rem;
    letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink);
    display: flex; align-items: center; gap: 0.6em;
}
.brand:hover { color: var(--ink); }
.brand-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--line-strong); }
.nav-links { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.4rem); list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); position: relative; padding: 0.4em 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--green); transition: width 0.25s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-burger { display: none; background: none; border: 0; color: var(--ink); font-size: 1.4rem; cursor: pointer; }

.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 40px; position: relative; overflow: hidden; text-align: center; }
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(60% 50% at 78% 40%, rgba(139, 92, 246, 0.10), transparent 65%),
        radial-gradient(50% 45% at 15% 70%, rgba(57, 255, 20, 0.07), transparent 65%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero .display {
    max-width: 16em; margin: 0 auto;
    background: linear-gradient(135deg, var(--green) 0%, var(--green) 40%, var(--violet) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { margin-top: 2rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.15rem); max-width: 34em; line-height: 1.75; margin-left: auto; margin-right: auto; }
.hero-actions { margin-top: 2.6rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.hero-meta { margin-top: 4.5rem; display: flex; gap: 2.5rem; flex-wrap: wrap; color: var(--faint); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; justify-content: center; }
.hero-meta b { color: var(--green); font-weight: 700; }

.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 1.1rem 0; white-space: nowrap; }
.marquee-track { display: inline-block; animation: scrollX 30s linear infinite; }
.marquee-track span { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--faint); margin-right: 3rem; }
.marquee-track .dot { color: var(--green); margin-right: 3rem; font-style: normal; }
@keyframes scrollX { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.feature-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 1.8rem; transition: border-color 0.25s ease, transform 0.25s ease; }
.feature-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.feature-card .icon { color: var(--green); font-size: 1.6rem; margin-bottom: 0.8rem; }
.feature-card h3 { font-size: 1.15rem; }
.feature-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.feature-card .pro-tag { display: inline-block; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--violet); border: 1px solid rgba(139,92,246,0.35); border-radius: 999px; padding: 0.3em 0.9em; margin-top: 0.6rem; }
.feature-card .free-tag { display: inline-block; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); border: 1px solid rgba(57,255,20,0.35); border-radius: 999px; padding: 0.3em 0.9em; margin-top: 0.6rem; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.price-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 2.4rem 2rem; text-align: center; }
.price-card.featured { border-color: var(--green); box-shadow: 0 0 40px rgba(57,255,20,0.08); }
.price-card .price { font-family: var(--serif); font-size: 3rem; font-weight: 420; margin: 1rem 0 0.4rem; }
.price-card .price small { font-size: 1rem; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.price-card ul { list-style: none; margin: 1.5rem 0 2rem; padding: 0; text-align: left; }
.price-card li { padding: 0.45rem 0; color: var(--muted); font-size: 0.92rem; }
.price-card li::before { content: '✓'; color: var(--green); margin-right: 0.7em; font-weight: 700; }

.field { margin-bottom: 1.4rem; }
.field label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.55em; }
.input, .select, .textarea {
    width: 100%; background: var(--bg-soft); border: 1px solid var(--line-strong);
    border-radius: 8px; color: var(--ink); font-family: var(--sans); font-size: 0.95rem; padding: 0.85em 1.1em;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,255,20,0.12); }
.textarea { min-height: 110px; resize: vertical; font-family: var(--sans); }

.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer h5 { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 1.1rem; font-family: var(--sans); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 0.55rem; }
.footer ul a { color: var(--muted); font-size: 0.88rem; }
.footer ul a:hover { color: var(--green); }
.footer-bottom { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.75rem; color: var(--faint); letter-spacing: 0.08em; }

/* ---------- App shell ---------- */
.app-body { display: flex; min-height: 100svh; padding-top: 68px; }
.app-side {
    width: 240px; flex-shrink: 0; background: var(--bg-soft);
    border-right: 1px solid var(--line); padding: 1.2rem 0.8rem;
    position: sticky; top: 68px; height: calc(100svh - 68px); overflow-y: auto;
}
.app-nav-section { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--violet); padding: 1rem 0.8rem 0.4rem; }
.app-nav-btn {
    display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
    color: var(--muted); font-family: var(--sans); font-size: 0.86rem; font-weight: 600;
    padding: 0.55rem 0.8rem; border-radius: 8px; transition: all 0.2s ease;
}
.app-nav-btn:hover { background: rgba(255,255,255,0.04); color: var(--ink); }
.app-nav-btn.active { background: var(--violet); color: #fff; }
.app-nav-btn.locked { color: var(--faint); }
.app-main { flex: 1; padding: clamp(1.2rem, 3vw, 2.5rem); min-width: 0; }
.app-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem; margin-bottom: 1.4rem; }
.app-card h3 { font-size: 1.1rem; margin-bottom: 0.9rem; }
.app-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.app-output {
    background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px;
    padding: 1rem 1.1rem; font-size: 0.88rem; color: var(--ink); line-height: 1.7;
    white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow-y: auto;
    font-family: var(--sans);
}
.app-output.empty { color: var(--faint); }
.app-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.9rem; }
.app-row .grow { flex: 1; min-width: 180px; }
.badge { display: inline-block; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; padding: 0.35em 0.9em; border-radius: 999px; border: 1px solid var(--line-strong); }
.badge--pro { border-color: rgba(57,255,20,0.4); color: var(--green); }
.badge--free { color: var(--faint); }
.badge--admin { border-color: rgba(139,92,246,0.4); color: var(--violet); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 0.5em; }
.status-dot.ok { background: var(--green); box-shadow: 0 0 10px var(--green); }
.status-dot.bad { background: #ff4d5e; }
table.app-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.app-table th { text-align: left; padding: 0.55rem; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; }
.app-table td { padding: 0.55rem; border-bottom: 1px solid var(--line); }
.thumb-preview { max-width: 100%; border-radius: 8px; border: 1px solid var(--line-strong); }
.chat-box { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1rem; }
.chat-msg { max-width: 80%; padding: 0.8rem 1.1rem; border-radius: 12px; font-size: 0.9rem; white-space: pre-wrap; }
.chat-msg.user { align-self: flex-end; background: var(--violet); color: #fff; }
.chat-msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line-strong); }
.rule { height: 1px; background: var(--line); border: 0; margin: 1.5rem 0; }

@media (max-width: 900px) {
    .app-body { flex-direction: column; }
    .app-side { width: 100%; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .app-nav-section { display: inline-block; padding: 0.4rem 0.6rem; }
    .app-nav-btn { display: inline-block; width: auto; }
    .app-grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: rgba(10,10,15,0.97); flex-direction: column; align-items: stretch; padding: 1rem var(--pad) 1.5rem; border-bottom: 1px solid var(--line-strong); }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.9rem 0; font-size: 0.9rem; }
    .nav-burger { display: block; }
}
@media (max-width: 420px) {
    :root { --pad: 0.8rem; }
    .brand { font-size: 0.75rem; letter-spacing: 0.18em; }
    .hero .display { font-size: clamp(1.3rem, 7vw, 1.8rem); }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; font-size: 0.7rem; }
}
