/* ============================================================================
   ThreatTape Aesthetics — v2 (2026-05-12)
   Concept: Redacted dossier + 2 AM CRT
   Identity: literal threat tape (caution yellow) + phosphor green + bone-ivory
   ============================================================================ */

/* ---- Typography: distinctive fonts, deliberately not Inter/Roboto/Space Grotesk ---- */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=IM+Fell+English+SC&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700;6..72,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Space+Mono:wght@400;700&display=swap');

/* ---- Identity tokens ---- */
:root {
    /* Inks (warm-shifted blacks, no pure #000) */
    --tt-ink-0: #0a0908;        /* oil-black, primary background */
    --tt-ink-1: #15120e;        /* warmer surface */
    --tt-ink-2: #1f1b16;        /* elevated card */
    --tt-ink-3: #2a241d;        /* hover/elevated surface */
    --tt-ink-edge: #3d3528;     /* subtle border */

    /* Bones (warm paper tones — for ivory/redacted-document feel) */
    --tt-bone-0: #f2e9d8;       /* primary on-dark text */
    --tt-bone-1: #c7b89c;       /* secondary on-dark text */
    --tt-bone-2: #8a7c64;       /* muted on-dark text */

    /* Phosphor (vintage CRT green, warmer than pure #0f0) */
    --tt-phosphor: #3ff080;
    --tt-phosphor-dim: #1a8f3f;
    --tt-phosphor-glow: rgba(63, 240, 128, 0.18);

    /* Caution — the THREAT TAPE color, signature accent */
    --tt-caution: #fac638;
    --tt-caution-dim: #b88e1c;
    --tt-caution-tint: rgba(250, 198, 56, 0.12);

    /* Threat (oxblood — for true threat/danger states only) */
    --tt-threat: #d5414e;
    --tt-threat-tint: rgba(213, 65, 78, 0.15);

    /* Typographic family tokens */
    --tt-font-display: 'IM Fell English', Georgia, 'Iowan Old Style', serif;
    --tt-font-display-heavy: 'IM Fell English SC', 'IM Fell English', Georgia, serif;
    --tt-font-body: 'Newsreader', 'Iowan Old Style', Georgia, serif;
    --tt-font-mono: 'Space Mono', ui-monospace, monospace;
    --tt-font-terminal: 'VT323', 'Space Mono', ui-monospace, monospace;

    /* Override the existing site variables so old class-based styling adopts the new palette automatically */
    --primary-color: var(--tt-phosphor);
    --primary-color-rgb: 63, 240, 128;
    --success-color: var(--tt-phosphor);
    --warning-color: var(--tt-caution);
    --danger-color: var(--tt-threat);

    --dark-bg: var(--tt-ink-0);
    --darker-bg: #050403;
    --card-bg: var(--tt-ink-1);
    --card-bg-elevated: var(--tt-ink-2);

    --text-light: var(--tt-bone-0);
    --text-secondary: var(--tt-bone-1);
    --text-muted: var(--tt-bone-2);

    --border-color: var(--tt-ink-edge);
    --border-subtle: rgba(242, 233, 216, 0.08);
}

/* ---- Global typographic reset (overrides Inter/Poppins/etc.) ---- */
html, body {
    background: var(--tt-ink-0);
    color: var(--tt-bone-0);
    font-family: var(--tt-font-body);
    font-feature-settings: 'ss01' on, 'ss02' on, 'kern' on, 'liga' on;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    /* Atmosphere: layered noise + extremely subtle scanlines + warm vignette */
    background-image:
        repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(63, 240, 128, 0.012) 3px, rgba(63, 240, 128, 0.012) 4px),
        radial-gradient(ellipse at 50% 0%, rgba(250, 198, 56, 0.025), transparent 60%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--tt-ink-0), var(--tt-ink-1) 100%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tt-font-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--tt-bone-0);
    line-height: 1.12;
}

h1 { font-family: var(--tt-font-display-heavy); letter-spacing: -0.02em; }
h2 { letter-spacing: -0.015em; }

/* Eyebrow + section labels: monospace, uppercase, tight */
.section-label, .eyebrow, [class*="eyebrow"] {
    font-family: var(--tt-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--tt-caution);
    line-height: 1.5;
}

/* Body copy: Newsreader at editorial size */
p, li, blockquote, .featured-short, .feature-description {
    font-family: var(--tt-font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--tt-bone-0);
}

/* Tiny text for badges, bullets, tech tags: mono */
.featured-badge, .badge, .badge-status, .badge-tech, .cred-chip,
.tag, .tech-item, .subproject-chip, .skill-tag, .vm-chip strong,
.connector-tag, .pillar-tag {
    font-family: var(--tt-font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Code/inline mono */
code, pre, kbd, samp, tt {
    font-family: var(--tt-font-mono);
}

/* Navigation logo: small caps mono */
.nav-container .logo {
    font-family: var(--tt-font-mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: var(--tt-bone-0);
}

.nav-menu a {
    font-family: var(--tt-font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ============================================================================
   THREAT TAPE — the signature visual element
   ============================================================================ */

.threat-tape-divider,
.threat-tape-rule {
    height: 14px;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--tt-caution) 0,
        var(--tt-caution) 14px,
        var(--tt-ink-0) 14px,
        var(--tt-ink-0) 28px
    );
    border-top: 1px solid var(--tt-caution-dim);
    border-bottom: 1px solid var(--tt-caution-dim);
    margin: 0;
    position: relative;
}

.threat-tape-divider::before,
.threat-tape-rule::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
}

/* Inline threat-tape annotation (small caption-y badge) */
.tt-mark {
    display: inline-block;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--tt-caution) 0, var(--tt-caution) 6px,
        var(--tt-ink-0) 6px, var(--tt-ink-0) 12px
    );
    height: 8px;
    width: 56px;
    border-radius: 2px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* ============================================================================
   REDACTED TEXT — for emphasis bars over phrases
   ============================================================================ */
.redacted {
    background: var(--tt-ink-0);
    color: var(--tt-ink-0);
    padding: 0 0.4em;
    border-radius: 1px;
    user-select: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.redacted:hover {
    color: var(--tt-bone-0);
    background: var(--tt-ink-2);
}

/* ============================================================================
   MOTION — restrained, intentional, page-load focused
   ============================================================================ */

@keyframes tt-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tt-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes tt-scan {
    0%, 100% { transform: translateY(-100vh); }
    50% { transform: translateY(100vh); }
}

/* Hero staggered reveal — auto-applies to product-info / hero-content children */
.product-hero .product-info > *,
.about-hero-content > *,
.hero .hero-content > * {
    animation: tt-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.product-hero .product-info > *:nth-child(1),
.about-hero-content > *:nth-child(1),
.hero .hero-content > *:nth-child(1)  { animation-delay: 60ms; }

.product-hero .product-info > *:nth-child(2),
.about-hero-content > *:nth-child(2),
.hero .hero-content > *:nth-child(2)  { animation-delay: 180ms; }

.product-hero .product-info > *:nth-child(3),
.about-hero-content > *:nth-child(3),
.hero .hero-content > *:nth-child(3)  { animation-delay: 300ms; }

.product-hero .product-info > *:nth-child(4),
.about-hero-content > *:nth-child(4),
.hero .hero-content > *:nth-child(4)  { animation-delay: 420ms; }

.product-hero .product-info > *:nth-child(5),
.hero .hero-content > *:nth-child(5)  { animation-delay: 540ms; }

.product-hero .product-info > *:nth-child(6),
.hero .hero-content > *:nth-child(6)  { animation-delay: 660ms; }

/* Featured / JV / product cards: gentle stagger by index inside their grids */
.jv-grid .featured-card,
.products-grid .featured-card,
.featured-grid .featured-card {
    animation: tt-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.jv-grid .featured-card:nth-child(1)        { animation-delay: 100ms; }
.jv-grid .featured-card:nth-child(2)        { animation-delay: 200ms; }
.jv-grid .featured-card:nth-child(3)        { animation-delay: 300ms; }
.products-grid .featured-card:nth-child(1)  { animation-delay: 80ms; }
.products-grid .featured-card:nth-child(2)  { animation-delay: 160ms; }
.products-grid .featured-card:nth-child(3)  { animation-delay: 240ms; }
.products-grid .featured-card:nth-child(4)  { animation-delay: 320ms; }
.products-grid .featured-card:nth-child(5)  { animation-delay: 400ms; }
.products-grid .featured-card:nth-child(6)  { animation-delay: 480ms; }
.products-grid .featured-card:nth-child(7)  { animation-delay: 560ms; }
.products-grid .featured-card:nth-child(8)  { animation-delay: 640ms; }

/* Slow CRT scanline sweep — extremely subtle, single bar drifts top-to-bottom */
body::before {
    content: '';
    position: fixed;
    inset: -50% 0 -50% 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 47%,
        rgba(63, 240, 128, 0.04) 50%,
        transparent 53%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 9998;
    animation: tt-scan 22s linear infinite;
    mix-blend-mode: screen;
}

/* ============================================================================
   CARD POLISH — distinctive hover state with threat-tape edge reveal
   ============================================================================ */

.featured-card {
    position: relative;
    background: var(--tt-ink-1);
    border: 1px solid var(--tt-ink-edge);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.35s ease,
                box-shadow 0.35s ease;
}

.featured-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--tt-caution) 0, var(--tt-caution) 8px,
        var(--tt-ink-0) 8px, var(--tt-ink-0) 16px
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.featured-card:hover {
    transform: translateY(-4px);
    border-color: var(--tt-caution-dim);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--tt-phosphor-glow);
}

.featured-card:hover::after {
    transform: scaleX(1);
}

/* Featured-card heading uses display face */
.featured-card h3 {
    font-family: var(--tt-font-display-heavy);
    color: var(--tt-bone-0);
    font-size: 1.6rem;
}

/* Badge styling — replace the soft default with a denser, hand-stamped feel */
.featured-badge,
.badge {
    font-size: 0.68rem;
    padding: 0.32rem 0.7rem;
    border-radius: 2px;
    border: 1px solid currentColor;
    background: transparent;
}

.status-pilot, .badge.badge-status[class*="pilot"] {
    color: var(--tt-phosphor);
    border-color: var(--tt-phosphor);
}

.status-dev, .badge.badge-status[class*="development"] {
    color: var(--tt-caution);
    border-color: var(--tt-caution);
}

.status-formation {
    color: #5b86e5;
    border-color: #5b86e5;
}

.status-shipped {
    color: var(--tt-phosphor);
    border-color: var(--tt-phosphor);
}

.status-playable {
    color: var(--tt-caution);
    border-color: var(--tt-caution);
}

.badge-jv {
    color: var(--tt-bone-0);
    border-color: var(--tt-bone-2);
    background: rgba(242, 233, 216, 0.04);
}

/* ============================================================================
   HERO SECTIONS — give them character
   ============================================================================ */

.hero,
.product-hero,
.about-hero {
    position: relative;
    background: linear-gradient(
        180deg,
        var(--tt-ink-0) 0%,
        var(--tt-ink-1) 80%,
        var(--tt-ink-0) 100%
    );
    border-bottom: none;
}

.hero::after,
.product-hero::after,
.about-hero::after {
    content: '';
    display: block;
    height: 14px;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--tt-caution) 0, var(--tt-caution) 14px,
        var(--tt-ink-0) 14px, var(--tt-ink-0) 28px
    );
    border-top: 1px solid var(--tt-caution-dim);
    border-bottom: 1px solid var(--tt-caution-dim);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.hero h1 {
    font-family: var(--tt-font-display-heavy);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.05;
    color: var(--tt-bone-0);
    text-shadow: none; /* kill the lazy neon glow */
}

.hero .tagline {
    font-family: var(--tt-font-body);
    font-style: italic;
    color: var(--tt-caution);
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
}

.product-tagline {
    font-family: var(--tt-font-body);
    font-style: italic;
    color: var(--tt-caution);
}

.product-info h1 {
    font-family: var(--tt-font-display-heavy);
    color: var(--tt-bone-0);
}

/* ============================================================================
   SECTION TITLES + DIVIDERS
   ============================================================================ */

.section-header h2,
.section-title,
.about-section h2.section-title {
    font-family: var(--tt-font-display-heavy);
    color: var(--tt-bone-0);
    position: relative;
    padding-bottom: 0.75rem;
    border-bottom: none;
}

.section-title::after {
    content: '';
    display: block;
    width: 96px;
    height: 6px;
    margin-top: 0.6rem;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--tt-caution) 0, var(--tt-caution) 6px,
        var(--tt-ink-0) 6px, var(--tt-ink-0) 12px
    );
    border-radius: 1px;
}

.section-header p {
    font-family: var(--tt-font-body);
    color: var(--tt-bone-1);
    font-style: italic;
}

/* ============================================================================
   BUTTONS — flatter, stamped, threat-tape-edged on hover
   ============================================================================ */

.btn,
.cta-btn,
.featured-link {
    font-family: var(--tt-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    position: relative;
}

.btn-primary,
.cta-primary {
    background: var(--tt-phosphor);
    color: var(--tt-ink-0);
    border: 1px solid var(--tt-phosphor);
    box-shadow: 0 2px 0 var(--tt-phosphor-dim);
}

.btn-primary:hover,
.cta-primary:hover {
    background: var(--tt-caution);
    border-color: var(--tt-caution);
    color: var(--tt-ink-0);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 var(--tt-caution-dim);
}

.btn-secondary,
.cta-secondary {
    background: transparent;
    color: var(--tt-bone-0);
    border: 1px solid var(--tt-ink-edge);
}

.btn-secondary:hover,
.cta-secondary:hover {
    background: var(--tt-ink-2);
    border-color: var(--tt-caution);
    color: var(--tt-caution);
}

/* ============================================================================
   CREDENTIALS / SKILL TAGS / CRED CHIPS — stamped, paper feel
   ============================================================================ */

.cred-chip,
.skill-tag,
.tag {
    background: transparent;
    color: var(--tt-bone-0);
    border: 1px solid var(--tt-ink-edge);
    border-radius: 2px;
    padding: 0.4rem 0.9rem;
    font-size: 0.7rem;
}

.cred-chip {
    border-color: var(--tt-caution-dim);
    color: var(--tt-bone-0);
}

.credentials-bar {
    background: var(--tt-ink-0);
    position: relative;
}

.credentials-bar::before {
    content: '';
    display: block;
    height: 14px;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--tt-caution) 0, var(--tt-caution) 14px,
        var(--tt-ink-0) 14px, var(--tt-ink-0) 28px
    );
    border-top: 1px solid var(--tt-caution-dim);
    border-bottom: 1px solid var(--tt-caution-dim);
    margin-bottom: 2rem;
}

/* ============================================================================
   NAV — small caps mono, restrained
   ============================================================================ */

header {
    background: rgba(10, 9, 8, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tt-ink-edge);
}

/* ============================================================================
   FOOTER — typewriter feel
   ============================================================================ */

footer {
    background: var(--tt-ink-0);
    border-top: 1px solid var(--tt-ink-edge);
    color: var(--tt-bone-2);
    font-family: var(--tt-font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

footer::before {
    content: '';
    display: block;
    height: 6px;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--tt-caution) 0, var(--tt-caution) 8px,
        var(--tt-ink-0) 8px, var(--tt-ink-0) 16px
    );
}

/* ============================================================================
   ABOUT — bio prose stays Newsreader; quote block gets press-style treatment
   ============================================================================ */

.grimmy-voice,
blockquote {
    font-family: var(--tt-font-body);
    font-size: 1.2rem;
    line-height: 1.55;
    font-style: italic;
    color: var(--tt-bone-0);
    border-left: 4px solid var(--tt-caution);
    background: var(--tt-ink-1);
    padding: 1.5rem 2rem;
    position: relative;
    margin: 2rem 0;
}

.grimmy-voice cite,
blockquote cite {
    display: block;
    margin-top: 0.8rem;
    font-family: var(--tt-font-mono);
    font-size: 0.72rem;
    font-style: normal;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tt-caution);
}

/* Bio sidebar card */
.bio-card {
    background: var(--tt-ink-1);
    border: 1px solid var(--tt-ink-edge);
    border-radius: 2px;
}

.bio-name {
    font-family: var(--tt-font-display-heavy);
    color: var(--tt-bone-0);
}

.bio-stat-label {
    font-family: var(--tt-font-mono);
    color: var(--tt-bone-2);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
}

.bio-stat-value {
    font-family: var(--tt-font-body);
    color: var(--tt-caution);
    font-weight: 500;
}

/* ============================================================================
   VIDEO CARD (Speaking & Press)
   ============================================================================ */

.video-card {
    background: var(--tt-ink-1);
    border: 1px solid var(--tt-ink-edge);
    border-radius: 2px;
}

.video-title {
    font-family: var(--tt-font-display-heavy);
    color: var(--tt-bone-0);
}

.video-venue {
    font-family: var(--tt-font-mono);
    color: var(--tt-caution);
}

/* ============================================================================
   REDUCED MOTION RESPECT
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .product-hero .product-info > *,
    .about-hero-content > *,
    .hero .hero-content > *,
    .jv-grid .featured-card,
    .products-grid .featured-card,
    .featured-grid .featured-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body::before {
        animation: none !important;
        opacity: 0 !important;
    }
}

/* ============================================================================
   MOBILE RESPECT
   ============================================================================ */

@media (max-width: 768px) {
    body::before { display: none; } /* drop the scanline on small screens */
    h1 { font-size: clamp(2rem, 8vw, 3rem); }
}
