/* ==========================================================================
   marketing.css - the PUBLIC (logged-out) shell.
   ==========================================================================

   Why this file exists
   --------------------
   The portal theme (portal-theme.css) is scoped to `html[data-portal="app"]`,
   which only views/loggedin/header.pug stamps. Public pages never get it, so
   every `--app-*` token is undefined there and a bare `var(--app-...)` is
   invalid at computed-value time. views/login.pug, views/register.pug and
   views/error.pug were left on the pre-portal Bootstrap shell for exactly that
   reason and ended up white-on-blue while the rest of the product went dark.

   index.pug, pricing.pug and docs/api.pug each solved it by inlining the same
   ~60 lines of CSS in a <style> block. This file is that same design language
   extracted once so the auth pages can share it instead of forking it a fourth
   and fifth time. The tokens below are copied verbatim from index.pug so the
   homepage -> login -> register funnel is one continuous surface.

   Deliberately NOT scoped to a data attribute and deliberately does NOT load
   Bootstrap: these pages own their whole surface. Do not add `var(--app-*)`
   here - those tokens do not exist on a public page.

   Loaded on its own (NOT via style.css) so none of the legacy leakage in
   style.css - `.btn { width: 100% }`, `nav { background: white }`,
   `.login-container`, `* { font-family: Roboto }` - can reach these pages.
   -------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
    --bg: #06080f;
    --bg2: #0c1020;
    --accent: #f59e0b;
    --accent2: #3b82f6;
    --accent3: #10b981;
    --danger: #f87171;
    --text: #e2e8f0;
    /* #64748b (the index.pug --muted) is 4.21:1 on --bg and fails the 4.5:1
       WCAG AA floor for body text. #94a3b8 is 7.80:1 in the same hue family.
       Same substitution pricing.pug and docs/api.pug already made. */
    --muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --field: rgba(255, 255, 255, 0.05);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* Font Awesome ships its own .fa font-family rule; the `*` selector above has
   lower specificity than `.fa`, so icons are safe. Do not raise this to
   `body *` or similar - that is the trap documented in HANDOFF.md section 3. */

/* Bootstrap is not loaded here. These are the only utilities the markup uses. */
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.ms-2 { margin-left: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.text-center { text-align: center; }

/* ── NAV (identical to index.pug) ─────────────────────────────────────────── */
.hp-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(6, 8, 15, 0.8);
    border-bottom: 1px solid var(--glass-border);
}
.hp-nav .logo { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.hp-nav .logo span { color: var(--accent); }
.hp-nav-links { display: flex; gap: 2rem; align-items: center; }
.hp-nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.hp-nav-links a:hover, .hp-nav-links a.current { color: #fff; }
.hp-nav-links .btn-cta {
    background: var(--accent);
    color: #000;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}
.hp-nav-links .btn-cta:hover { background: #fbbf24; color: #000; }

/* ── PAGE SHELL ───────────────────────────────────────────────────────────── */
.auth-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}
.auth-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 110% at 50% -10%, rgba(245, 158, 11, 0.10), transparent 60%),
        radial-gradient(50% 100% at 85% 0%, rgba(59, 130, 246, 0.08), transparent 60%);
    pointer-events: none;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.auth-card.wide { max-width: 520px; }

.auth-eyebrow {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1.1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.auth-title {
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.auth-title .gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 55%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.75rem; }

/* ── ALERTS ───────────────────────────────────────────────────────────────── */
.auth-alert {
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    border: 1px solid;
    text-align: left;
}
/* #93c5fd on the composited alert background is 8.9:1; #fca5a5 is 7.3:1.
   Both clear AA for body text. */
.auth-alert.info { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); color: #93c5fd; }
.auth-alert.error { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.8rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    margin-bottom: 0.85rem;
}
.btn-auth-primary { background: var(--accent); color: #000; }
.btn-auth-primary:hover { background: #fbbf24; transform: translateY(-1px); box-shadow: 0 8px 26px rgba(245, 158, 11, 0.28); }
.btn-auth-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.btn-auth-ghost:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
.btn-auth-google { background: #fff; color: #1f2937; }
.btn-auth-google:hover { background: #f1f5f9; transform: translateY(-1px); }
.btn-auth img.google-logo { width: 18px; height: 18px; }

.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.btn-row .btn-auth { width: auto; flex: 1 1 170px; margin-bottom: 0; }

/* ── FORM ─────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.1rem; text-align: left; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--field);
    color: var(--text);
    font-family: inherit;
    font-size: 0.93rem;
}
/* Was #64748b, which is 3.51:1 on the composited field background (rgba(255,255,255,.05)
   over the .auth-card glass over --bg) and only 2.92:1 where the amber glow peaks -
   placeholder text is text, so it needs the same 4.5:1 floor. var(--muted) #94a3b8
   measures 6.51:1 / 5.42:1 on those two surfaces. */
.field input::placeholder { color: var(--muted); }
.field input:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.field .hint { font-size: 0.76rem; color: var(--muted); margin-top: 0.3rem; }

.check { display: flex; align-items: flex-start; gap: 0.55rem; margin-bottom: 1.25rem; text-align: left; }
.check input { margin-top: 0.28rem; accent-color: var(--accent); width: 15px; height: 15px; }
.check label { font-size: 0.84rem; color: var(--muted); }
.check label a { color: var(--accent); }
.check label a:hover { text-decoration: underline; }

.divider { display: flex; align-items: center; gap: 0.9rem; margin: 1.4rem 0 1.1rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }
.divider span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.auth-foot { font-size: 0.86rem; color: var(--muted); margin-top: 1.25rem; }
.auth-foot a { color: var(--accent); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* ── STATUS PAGES (error / access denied) ─────────────────────────────────── */
.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin: 0 auto 1.25rem;
}
.status-icon.warn { background: rgba(245, 158, 11, 0.15); color: var(--accent); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-icon.deny { background: rgba(239, 68, 68, 0.12); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* ── FOOTER (identical to index.pug) ──────────────────────────────────────── */
.hp-footer { border-top: 1px solid var(--glass-border); padding: 2.5rem 2rem; }
.hp-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.hp-footer a { color: var(--muted); font-size: 0.85rem; }
.hp-footer a:hover { color: #fff; }
.hp-footer .copy { color: var(--muted); font-size: 0.8rem; }
.hp-footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

@media (max-width: 768px) {
    .hp-nav { padding: 0.85rem 1.1rem; }
    .hp-nav-links { gap: 1rem; }
    .hp-nav-links a:not(.btn-cta) { display: none; }
    .auth-shell { padding: 7rem 1rem 3rem; }
    .auth-card { padding: 2rem 1.35rem; }
    .hp-footer-inner { justify-content: center; text-align: center; }
}

/* ── CONTENT PAGES (/data-sources, #183) ──────────────────────────────────────
   index.pug, pricing.pug and docs/api.pug each inline their own copy of the
   hero/section rules. This is that same design language, added here once, so
   /data-sources needs no <style> block of its own - which also keeps it clear
   of the inline-style/inline-script surface #158 has to shrink before CSP can
   be enforced. Tokens are the ones declared at the top of this file. */
.page-hero { padding: 9rem 2rem 3rem; text-align: center; position: relative; overflow: hidden; }
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 120% at 50% -10%, rgba(245, 158, 11, 0.10), transparent 60%),
        radial-gradient(50% 100% at 80% 0%, rgba(59, 130, 246, 0.08), transparent 60%);
    pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.hero-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}
.hero-title .gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto; line-height: 1.6; }
.section { padding: 3rem 2rem 4rem; max-width: 1000px; margin: 0 auto; }
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.section-desc { color: var(--muted); font-size: 1rem; max-width: 640px; line-height: 1.7; }
.section-desc a { color: var(--accent); text-decoration: underline; }

/* ── SOURCE CARDS ─────────────────────────────────────────────────────────────
   The logos inside these are a LICENCE REQUIREMENT, not decoration - RouteViews
   and the RIPE NCC both require their logo on the product/website. Anything that
   hides .src-logo (a display:none, an ad-blocker-bait class name, a "declutter"
   pass) breaks the licence. Sized generously and never hidden at any breakpoint
   for that reason. */
.src-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}
.src-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.src-logo {
    /* A white panel behind the mark: both logos are drawn for light backgrounds
       and several of their glyphs are white, which is invisible on --bg. */
    background: #fff;
    border-radius: 10px;
    padding: 0.5rem;
    width: 96px;
    height: 96px;
    object-fit: contain;
    flex: none;
}
.src-logo-wide { width: 240px; height: 72px; }
.src-name { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 0.3rem; letter-spacing: -0.01em; }
.src-lic { font-size: 0.85rem; color: var(--muted); }
.src-lic a { color: var(--accent); }
.src-lic a:hover { text-decoration: underline; }

/* Verbatim licence text. Visually distinct on purpose: it is quoted material
   that must not be edited, and it should look like it. */
.src-quote {
    border-left: 3px solid var(--accent);
    padding: 0.7rem 0 0.7rem 1rem;
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.65;
}
.src-quote a { color: var(--accent); text-decoration: underline; }
.src-boiler { color: var(--muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.75rem; }
.src-boiler-list { color: var(--muted); font-size: 0.9rem; line-height: 1.7; margin: 0 0 1rem 1.25rem; }
.src-boiler-list li { margin-bottom: 0.35rem; }
.src-use { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }
.src-use strong { color: var(--text); }
.src-cc { display: block; margin-top: 1rem; }
.ms-1 { margin-left: 0.25rem; }

@media (max-width: 560px) {
    .src-logo-wide { width: 180px; height: 54px; }
    .src-card { padding: 1.25rem; }
}
