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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 50%, #0a0a0a 100%);
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== CSS VARIABLES ========== */
:root {
    --bg-black: #0a0a0a;
    --bg-dark: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-hover: #222222;
    
    --accent-red: #e53935; /* increased contrast for accessibility */
    --accent-orange: #f57c00;
    --accent-yellow: #fbc02d;
    --accent-blue: #1e90ff;
    --accent-green: #228b22;
    
    --text-primary: #ffffff;
    --text-secondary: #cfd8dc;
    --text-muted: #808080;
    
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(211, 47, 47, 0.3);
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

h1 {
    font-size: clamp(40px, 7vw, 72px);
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(32px, 5vw, 52px);
    margin-bottom: 30px;
}

h3 {
    font-size: clamp(20px, 3vw, 28px);
    margin-bottom: 15px;
}

p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.lead {
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* ========== CONTAINERS ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo svg,
.logo img.logo-mark {
    width: 48px;
    height: 48px;
    margin-right: 15px;
    color: var(--accent-orange);
}

.logo img.logo-mark {
    border-radius: 10px;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 6px 18px rgba(226, 72, 43, 0.18);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-tag {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ========== NAVIGATION ========== */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-red);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

nav a:hover {
    color: var(--accent-red);
}

nav a:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 9px;
    transition: transform 0.2s ease;
}

.nav-toggle span {
    top: 19px;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    left: 0;
}

.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

.mobile-nav {
    display: none;
    width: 100%;
    padding: 0 20px 12px;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    list-style: none;
}

.nav.nav--compact ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ========== HERO SECTION ========== */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(211, 47, 47, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-red);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-lead {
    font-size: 20px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-secondary);
}

.hero-purpose {
    background: rgba(211, 47, 47, 0.1);
    border: 1px solid rgba(211, 47, 47, 0.3);
    border-radius: 8px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
}

/* ========== SECTIONS ========== */
section {
    padding: 80px 0;
}

.section {
    background: var(--bg-black);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.section-intro {
    max-width: 700px;
    margin: 0 auto;
    font-size: 18px;
    color: var(--text-secondary);
}

/* ========== PURPOSE SECTION ========== */
.purpose-section {
    background: var(--bg-dark);
}

.purpose-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.purpose-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
}

.purpose-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(211, 47, 47, 0.15);
}

.purpose-card--primary {
    grid-column: span 1;
}

/* ========== PILLARS SECTION ========== */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-orange), var(--accent-yellow));
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(211, 47, 47, 0.2);
}

.pillar-icon {
    font-size: 48px;
    font-weight: 900;
    color: var(--accent-red);
    margin-bottom: 20px;
}

/* ========== MEMORIAL SECTION ========== */
.memorial-section {
    background: var(--bg-dark);
}

.memorial-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.memorial-text {
    background: var(--bg-card);
    border: 1px solid rgba(211, 47, 47, 0.25);
    border-radius: 8px;
    padding: 40px;
}

.memorial-photo {
    width: 100%;
    max-width: 520px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.memorial-photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.memorial-caption {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

.memorial-dates {
    font-size: 24px;
    color: var(--accent-red);
    font-weight: 600;
    margin-bottom: 20px;
}

blockquote {
    border-left: 4px solid var(--accent-red);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.memorial-aside {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 30px;
}

.memorial-aside ul {
    list-style: none;
    margin-top: 15px;
}

.memorial-aside li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.memorial-aside li:last-child {
    border-bottom: none;
}

/* ========== MISSION SECTION ========== */
.mission-section {
    background: var(--bg-black);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.mission-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
}

.mission-item:hover {
    border-color: var(--accent-orange);
    transform: translateY(-3px);
}

/* ========== GOVERNANCE SECTION ========== */
.governance-section {
    background: var(--bg-dark);
}

.governance-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.governance-block {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 30px;
}

.check-list {
    list-style: none;
    margin-top: 15px;
}

.check-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

.governance-note {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 40px;
    font-size: 18px;
}

/* ========== CTA SECTION ========== */
.cta-section {
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-orange) 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
}

.cta-inner {
    max-width: 700px;
    margin: 0 auto;
}

.cta-contact {
    margin-top: 20px;
    font-size: 18px;
}

.cta-contact a {
    color: white;
    text-decoration: underline;
}

.cta-contact a:hover {
    text-decoration: none;
}

/* ========== FOOTER ========== */
footer {
    background: var(--bg-black);
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.footer-brand strong {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.footer-legal {
    text-align: right;
}

.footer-purpose {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 980px) {
    .nav.nav--desktop {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .mobile-nav:not([hidden]) {
        display: block;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    nav.nav--desktop ul {
        display: none;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .purpose-grid {
        grid-template-columns: 1fr;
    }

    .memorial-layout {
        grid-template-columns: 1fr;
    }

    .governance-content {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-legal {
        text-align: center;
    }
}

/* ========== UTILITY ========== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-red);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}
/* Ensure anchored headings are visible under sticky header */
.section, .section-header, h2, h3 { scroll-margin-top: 110px; }

/* Focus styles for keyboard users */
:focus {
    outline: 3px solid rgba(245,124,0,0.18);
    outline-offset: 2px;
}

:focus-visible {
    outline: 3px solid rgba(255,179,71,0.22);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Type rhythm adjustments */
h1 { margin-bottom: var(--space-md); }
h2 { margin-bottom: var(--space-md); }
p { margin-bottom: var(--space-sm); }

/* ========== EXTENDED SECTIONS (Sovereign Substrate content) ========== */
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: center;
    margin: 18px 0 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-orange);
}

.hero-tags span.sep {
    color: rgba(255,255,255,0.2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(90deg, #cb3216, #f57c00);
    color: #fff;
    box-shadow: 0 10px 30px rgba(229, 57, 53, 0.18);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-subtle);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.split-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: start;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 28px;
}

.feature-item {
    border-left: 2px solid var(--accent-orange);
    padding-left: 14px;
}

.feature-item h4 {
    font-size: 14px;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.feature-item p {
    font-size: 14px;
    margin-bottom: 0;
    color: var(--text-muted);
}

.feature-item:nth-child(2) { border-color: var(--accent-yellow); }
.feature-item:nth-child(3) { border-color: #e2482b; }
.feature-item:nth-child(4) { border-color: rgba(255,255,255,0.25); }

.spec-panel {
    background: rgba(10,10,10,0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.spec-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.spec-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.spec-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.spec-dots i:nth-child(1) { background: rgba(239,68,68,0.6); }
.spec-dots i:nth-child(2) { background: rgba(245,158,11,0.6); }
.spec-dots i:nth-child(3) { background: rgba(34,197,94,0.6); }

.spec-seal {
    font-size: 10px;
    color: #34d399;
    border: 1px solid rgba(52,211,153,0.25);
    background: rgba(6,78,59,0.25);
    padding: 4px 8px;
    border-radius: 4px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
}

.spec-row:last-child { border-bottom: none; }
.spec-row span:first-child { color: var(--text-muted); }
.spec-row .accent-orange { color: var(--accent-orange); }
.spec-row .accent-yellow { color: var(--accent-yellow); }
.spec-row .accent-green { color: #34d399; }
.spec-row .accent-red { color: #f87171; }

.honesty-note {
    margin-top: 18px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.ring-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ring-card:hover {
    border-color: rgba(245, 124, 0, 0.35);
    transform: translateY(-2px);
}

.ring-num {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 10px;
}

.ring-tech {
    font-size: 13px;
    color: var(--accent-yellow);
    margin-bottom: 12px;
}

.blade-card .cli {
    margin-top: 14px;
    background: #000;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 12px;
    color: #e5e7eb;
    overflow-x: auto;
}

.blade-card .cli::before {
    content: "$ ";
    color: #e2482b;
}

.blade-specs {
    list-style: none;
    margin-top: 14px;
}

.blade-specs li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.blade-specs li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #34d399;
    font-weight: 700;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.price-card.featured {
    border-color: rgba(229, 57, 53, 0.55);
    box-shadow: 0 18px 50px rgba(229, 57, 53, 0.12);
}

.price-badge {
    position: absolute;
    top: -10px;
    right: 18px;
    background: linear-gradient(90deg, #cb3216, #f57c00);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 4px;
}

.price-tier {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 8px;
}

.price-amount {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin: 18px 0 4px;
}

.price-amount span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.price-list {
    list-style: none;
    margin: 22px 0 28px;
    flex: 1;
}

.price-list li {
    padding: 8px 0 8px 22px;
    position: relative;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.price-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #34d399;
}

.price-list li.muted {
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-list li.muted::before {
    content: "–";
    color: var(--text-muted);
}

.stewardship-note {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
}

.dedication-plaque {
    margin: 40px auto 0;
    max-width: 680px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 36px 28px;
    background: linear-gradient(180deg, #121212, #080808);
}

.dedication-plaque .in-mem {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.dedication-plaque blockquote {
    font-style: italic;
    color: rgba(254, 202, 202, 0.75);
    border: none;
    margin: 16px 0 0;
    padding: 0;
}

.support-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 28px;
}

.support-box h3 {
    margin-bottom: 10px;
}

.diagram-frame {
    margin: 0 0 40px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    background: #050505;
}

.diagram-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.diagram-frame figcaption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
}

.price-visual {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--border-subtle);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.usecase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.usecase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 22px 20px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.usecase-card:hover {
    border-color: rgba(245, 124, 0, 0.35);
    transform: translateY(-2px);
}

.usecase-num {
    display: block;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--accent-orange);
    margin-bottom: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.usecase-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.usecase-card p {
    margin-bottom: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 980px) {
    .split-grid,
    .pricing-grid,
    .feature-list,
    .usecase-grid {
        grid-template-columns: 1fr;
    }
}
