/* ============================================================
   TORZONWATCH — DESIGN SYSTEM
   Aesthetic: Clean Authority
   Primary: Dark Navy (#0A1628)  |  Accent: Steel Blue (#3D7BCC)
   ============================================================ */

/* --- RESET --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- DESIGN TOKENS --- */
:root {
    /* Color Architecture */
    --color-bg: #0A1628;
    --color-bg-deep: #060F1D;
    --color-surface: #0F1F35;
    --color-surface-raised: #142842;
    --color-surface-hover: #1A3250;

    --color-accent: #3D7BCC;
    --color-accent-bright: #5A9AE6;
    --color-accent-muted: #2A5A99;
    --color-accent-glow: rgba(61, 123, 204, 0.12);

    --color-text: #D8DEE9;
    --color-text-strong: #EDF1F7;
    --color-text-muted: #8899AA;
    --color-text-dim: #5C6D7E;

    --color-border: rgba(255, 255, 255, 0.07);
    --color-border-accent: rgba(61, 123, 204, 0.3);
    --color-border-strong: rgba(255, 255, 255, 0.12);

    --color-success: #3EAA7C;
    --color-warning: #D4943A;
    --color-danger: #C94040;

    /* Typography */
    --font-body: 'Exo 2', system-ui, -apple-system, sans-serif;
    --font-heading: 'Cinzel', 'Georgia', serif;
    --font-mono: 'Space Mono', 'Consolas', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    --leading-tight: 1.2;
    --leading-normal: 1.65;
    --leading-relaxed: 1.8;

    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.04em;
    --tracking-wider: 0.08em;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Shadows — layered micro-shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.15);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.2), 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.2);

    /* Borders */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 10px;

    /* Transitions */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;
}

/* --- BASE --- */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle grid background on body */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(61, 123, 204, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 123, 204, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-strong);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 {
    font-size: var(--text-2xl);
    margin-top: var(--space-4xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--color-accent);
}

h3 {
    font-size: var(--text-xl);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    color: var(--color-accent-bright);
}

p {
    margin-bottom: var(--space-lg);
    max-width: 72ch;
}

strong {
    font-weight: 600;
    color: var(--color-text-strong);
}

a {
    color: var(--color-accent-bright);
    text-decoration: none;
    position: relative;
    transition: color var(--duration-fast) ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent-bright);
    transition: width var(--duration-normal) var(--ease-out);
}

a:hover {
    color: #7AB4F5;
}

a:hover::after {
    width: 100%;
}

code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-accent-bright);
    background: rgba(61, 123, 204, 0.1);
    padding: 0.15em 0.45em;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(61, 123, 204, 0.15);
    word-break: break-all;
}

/* --- LAYOUT --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-wide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* --- HEADER / NAV --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 22, 40, 0.92);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    transition: background var(--duration-normal) ease;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--color-text-strong);
    font-weight: 700;
    font-size: var(--text-lg);
    letter-spacing: var(--tracking-tight);
}

.site-logo::after {
    display: none;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: var(--text-sm);
    color: #fff;
    letter-spacing: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.site-nav a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    transition: color var(--duration-fast) ease;
}

.site-nav a::after {
    bottom: -4px;
    height: 2px;
    background: var(--color-accent);
}

.site-nav a:hover {
    color: var(--color-text-strong);
}

.nav-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-success);
    margin-right: var(--space-xs);
    box-shadow: 0 0 6px rgba(62, 170, 124, 0.5);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-sm);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease;
}

/* --- HERO --- */
.hero {
    padding: var(--space-xl) 0 var(--space-2xl);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(ellipse at 30% 20%, rgba(61, 123, 204, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    margin-bottom: var(--space-md);
    position: relative;
}

.hero-intro {
    font-size: var(--text-lg);
    color: var(--color-text);
    line-height: var(--leading-relaxed);
}

/* --- VERIFIED RECORD (Hero address box) --- */
.verified-record {
    margin: var(--space-lg) 0;
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border-accent);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: var(--shadow-md);
}

.verified-record::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(ellipse at center, rgba(61, 123, 204, 0.06) 0%, transparent 70%);
    border-radius: var(--radius-lg);
    z-index: -1;
    pointer-events: none;
}

.record-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-accent-bright);
    background: rgba(61, 123, 204, 0.1);
    padding: 0.2em 0.7em;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.record-value {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    color: var(--color-text-strong);
    word-break: break-all;
    line-height: 1.5;
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

.record-meta span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.record-meta span:first-child {
    color: var(--color-success);
}

/* --- CONTENT SECTIONS --- */
.content-section {
    padding: var(--space-3xl) 0 var(--space-xl);
    position: relative;
}

.content-section + .content-section {
    border-top: 1px solid var(--color-border);
}

/* Left accent bar for key sections */
.accent-section {
    border-left: 3px solid var(--color-accent);
    padding-left: var(--space-xl);
    margin-left: 0;
}

.accent-section h2 {
    margin-top: 0;
}

.accent-section h2::after {
    display: none;
}

/* --- VERIFICATION TABLE --- */
.verification-database {
    margin: var(--space-2xl) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    margin: var(--space-lg) 0;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

caption {
    text-align: left;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

thead {
    background: var(--color-surface-raised);
}

th {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-text-muted);
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border-strong);
}

td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}

td code {
    font-size: var(--text-xs);
}

tbody tr {
    transition: background var(--duration-fast) ease;
}

tbody tr:hover {
    background: var(--color-surface-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Status indicators in table */
td:nth-child(3) {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-success);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

td:nth-child(5) {
    color: var(--color-success);
    font-size: var(--text-sm);
}

/* --- FAQ --- */
.faq-section h3 {
    font-size: var(--text-lg);
    color: var(--color-text-strong);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-lg);
    border-left: 2px solid var(--color-accent-muted);
}

.faq-section h3:first-of-type {
    margin-top: var(--space-lg);
}

.faq-section p {
    padding-left: var(--space-lg);
    color: var(--color-text);
}

/* --- FOOTER --- */
.site-footer {
    margin-top: var(--space-5xl);
    border-top: 1px solid var(--color-border-strong);
    background: var(--color-bg-deep);
    padding: var(--space-3xl) 0 var(--space-xl);
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.footer-disclaimer {
    font-size: var(--text-sm);
    color: var(--color-text-dim);
    line-height: var(--leading-relaxed);
    max-width: 72ch;
    margin-bottom: var(--space-2xl);
    padding: var(--space-xl);
    border-left: 2px solid var(--color-border);
    background: rgba(255, 255, 255, 0.01);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
}

.footer-nav a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: var(--tracking-wide);
}

.footer-nav a:hover {
    color: var(--color-accent-bright);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copyright {
    font-size: var(--text-xs);
    color: var(--color-text-dim);
    font-family: var(--font-mono);
    letter-spacing: var(--tracking-wide);
}

.footer-brand {
    font-size: var(--text-sm);
    color: var(--color-text-dim);
    font-weight: 600;
}

/* --- PAGE HEADER (for trust pages) --- */
.page-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
}

.page-header .page-subtitle {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* --- ANIMATIONS --- */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s var(--ease-out) forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger > :nth-child(1) { animation-delay: 0s; }
.stagger > :nth-child(2) { animation-delay: 0.08s; }
.stagger > :nth-child(3) { animation-delay: 0.16s; }
.stagger > :nth-child(4) { animation-delay: 0.24s; }

/* Scroll-driven animation for modern browsers */
@supports (animation-timeline: view()) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        animation: scrollFadeIn linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
    }

    @keyframes scrollFadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Fallback for browsers without scroll-timeline */
@supports not (animation-timeline: view()) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- CONTENT IMAGES --- */
.content-img {
    display: block;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-strong);
    box-shadow: var(--shadow-sm);
}

.content-img-caption {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-dim);
    letter-spacing: var(--tracking-wide);
    margin-top: var(--space-sm);
    padding-left: var(--space-xs);
}

/* Full-width image — spans container */
.figure-full {
    margin: var(--space-2xl) 0;
    clear: both;
}

.figure-full .content-img {
    width: 100%;
    height: auto;
    border-bottom: 3px solid var(--color-accent-muted);
}

/* Left-aligned float — 58% width, text wraps right */
.figure-left {
    float: left;
    width: 58%;
    margin: var(--space-sm) var(--space-xl) var(--space-lg) 0;
}

.figure-left .content-img {
    width: 100%;
    height: auto;
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Right-aligned float — 52% width, text wraps left */
.figure-right {
    float: right;
    width: 52%;
    margin: var(--space-sm) 0 var(--space-lg) var(--space-xl);
}

.figure-right .content-img {
    width: 100%;
    height: auto;
    border-top: 2px solid var(--color-accent-muted);
    border-bottom: 2px solid var(--color-accent-muted);
}

/* Clearfix for floated images */
.has-float::after {
    content: '';
    display: table;
    clear: both;
}

@media (max-width: 700px) {
    .figure-left,
    .figure-right {
        float: none;
        width: 100%;
        margin: var(--space-lg) 0;
    }
}

/* --- BREADCRUMB --- */
.breadcrumb-nav {
    padding: var(--space-md) 0 0;
}

.breadcrumb-nav ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

.breadcrumb-nav li + li::before {
    content: '/';
    padding: 0 0.5em;
    color: var(--color-text-dim);
    opacity: 0.5;
}

.breadcrumb-nav a {
    color: var(--color-text-dim);
    transition: color var(--duration-fast) ease;
}

.breadcrumb-nav a:hover {
    color: var(--color-accent-bright);
}

.breadcrumb-nav a::after {
    display: none;
}

.breadcrumb-nav [aria-current="page"] {
    color: var(--color-text-muted);
}

/* --- DIVIDERS --- */
.section-rule {
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent-muted), var(--color-border), transparent);
    margin: var(--space-3xl) 0;
    border: none;
}

/* --- UTILITIES --- */
.text-mono {
    font-family: var(--font-mono);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-dim {
    color: var(--color-text-dim);
}

.text-accent {
    color: var(--color-accent-bright);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

.mt-0 { margin-top: 0; }

/* --- RESPONSIVE --- */
@media (max-width: 860px) {
    :root {
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    .container,
    .container-narrow,
    .container-wide {
        padding: 0 var(--space-lg);
    }

    .header-inner {
        padding: 0 var(--space-lg);
    }

    .hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }

    .record-value {
        font-size: var(--text-sm);
    }

    .record-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }

    /* Table scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: var(--space-lg) calc(-1 * var(--space-lg));
        padding: 0 var(--space-lg);
    }

    table {
        min-width: 620px;
    }
}

@media (max-width: 600px) {
    :root {
        --text-4xl: 1.625rem;
        --text-3xl: 1.35rem;
        --text-2xl: 1.15rem;
        --text-lg: 1rem;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg-deep);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-lg);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        padding: var(--space-xl) 0 var(--space-lg);
    }

    .content-section {
        padding: var(--space-xl) 0 var(--space-md);
    }

    .verified-record {
        padding: var(--space-lg);
    }

    .footer-nav {
        flex-direction: column;
        gap: var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    h2 {
        margin-top: var(--space-2xl);
    }

    .accent-section {
        padding-left: var(--space-lg);
    }

    .faq-section h3 {
        padding-left: var(--space-md);
    }

    .faq-section p {
        padding-left: var(--space-md);
    }
}

/* --- CSS CONTAINMENT (CWV performance) --- */
.cwv-offscreen {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .fade-up,
    .scroll-reveal {
        animation: none;
        opacity: 1;
        transform: none;
    }

    a::after {
        transition: none;
    }

    tbody tr {
        transition: none;
    }
}
