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

/* Reset */

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

:root {
    --bg: #050505;
    --bg-secondary: #0E0E0E;
    --bg-card: #161616;
    --bg-navbar: rgba(5, 5, 5, 0.85);
    --bg-navbar-mobile: rgba(5, 5, 5, 0.95);
    --primary: #DC4F45;
    --secondary: #F08A2E;
    --secondary-light: #ffb347;
    --text: #E0E0E0;
    --text-soft: #B8B8B8;
    --text-white: #FAFAFA;
    --text-muted: #888;
    --text-dim: #555;
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.18);
    --border-hover: rgba(255, 255, 255, 0.14);
    --primary-glow: rgba(220, 79, 69, 0.4);
    --primary-border: rgba(220, 79, 69, 0.3);
    --primary-border-light: rgba(220, 79, 69, 0.25);
    --primary-border-dim: rgba(220, 79, 69, 0.15);
    --primary-bg: rgba(220, 79, 69, 0.15);
    --primary-bg-light: rgba(220, 79, 69, 0.12);
    --primary-bg-dim: rgba(220, 79, 69, 0.08);
    --secondary-border: rgba(240, 138, 46, 0.25);
    --secondary-bg: rgba(240, 138, 46, 0.15);
    --secondary-bg-light: rgba(240, 138, 46, 0.12);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-dim: rgba(255, 255, 255, 0.02);
    --radius: 6px;
    --radius-sm: 4px;
    --font-body: 'Inter', 'Roboto', sans-serif;
    --font-display: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --ease: 0.25s ease-out;
    --ease-slow: 0.4s ease-out;
    --section-pad: 8rem 2rem;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--ease);
}

a:hover {
    color: var(--secondary);
}

/* Navigation */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar .logo img {
    height: 36px;
}

.navbar .logo span {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: -0.005em;
    transition: color var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-white);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-white);
    transition: 0.3s;
}

/* Hero Section */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 9rem 2rem 5rem;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.hero-logo {
    width: 96px;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 40px var(--primary-glow));
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.hero .tagline {
    font-size: 1.5rem;
    color: var(--text-soft);
    max-width: 620px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: -0.005em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-white);
}

.btn-primary:hover {
    color: var(--text-white);
    box-shadow: 0 0 0 1px var(--primary-border), 0 6px 24px var(--primary-bg);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border-color: var(--border-light);
}

.btn-outline:hover {
    color: var(--text-white);
    border-color: var(--primary);
}

.btn-sm {
    font-size: 0.85rem;
    padding: 0.5rem 1.1rem;
}

.btn-nav {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Sections */

section {
    padding: var(--section-pad);
    position: relative;
}

/* Subpage compatibility — slopes retained as plain hairline rules */

.slope-bottom {
    border-bottom: 1px solid var(--border);
}

.slope-top {
    border-top: 1px solid var(--border);
}

.section-title {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.03em;
}

.section-anchor {
    color: inherit;
    text-decoration: none;
}

.section-anchor::after {
    content: '#';
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.6rem;
    opacity: 0;
    font-size: 0.55em;
    vertical-align: 0.4em;
    transition: opacity var(--ease), color var(--ease);
}

.section-anchor:hover::after {
    opacity: 1;
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-soft);
    max-width: 580px;
    margin: 0 auto 4rem;
    font-size: 1.05rem;
}

/* Mission */

.mission {
    background: var(--bg-secondary);
    position: relative;
    border-bottom: 1px solid var(--border);
}

.mission-inner {
    max-width: 1140px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.mission-header {
    text-align: center;
    margin-bottom: 4.5rem;
}

.mission-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
}

.mission-header p {
    color: var(--text-soft);
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Mission Grid */

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.mission-card {
    position: relative;
    padding: 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--ease), background var(--ease);
}

.mission-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-secondary);
}

.mission-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.mission-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.mission-card p {
    font-size: 0.92rem;
    color: var(--text-soft);
    line-height: 1.7;
}

/* Projects Section */

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

.projects {
    max-width: 760px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.project-card .project-info h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.project-card .project-info .project-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1rem;
    color: var(--primary);
}

.project-card .project-info .project-tag.trie-tag {
    color: var(--secondary);
}

.project-card .project-info p {
    color: var(--text-soft);
    margin-bottom: 0;
    font-size: 1.05rem;
    line-height: 1.75;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.93rem;
    color: var(--text-soft);
    line-height: 1.6;
}

.feature-list li::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-top: 0.65rem;
    border-radius: 1px;
    background: var(--primary);
    flex-shrink: 0;
}

.feature-list.secondary li::before {
    background: var(--secondary);
}

.project-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Join Us */

.join-us {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.join-grid {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.join-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.join-card:hover {
    border-color: var(--primary-border);
    background: var(--bg);
    color: var(--text);
    transform: translateY(-2px);
}

.join-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--primary);
}

.join-value {
    font-size: 1rem;
    color: var(--text-white);
    word-break: break-all;
    letter-spacing: -0.005em;
}

.join-arrow {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    color: var(--text-muted);
    font-size: 1rem;
    transition: color var(--ease), transform var(--ease);
}

.join-card:hover .join-arrow {
    color: var(--primary);
    transform: translate(2px, -2px);
}

/* Footer */

.footer {
    border-top: 1px solid var(--border);
    padding: 3.5rem 2rem;
    text-align: center;
    background: var(--bg);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 1.75rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    transition: color var(--ease);
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer p {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

/* Subpage styles */

.subpage-hero {
    position: relative;
    padding: 10rem 2rem 4rem;
    text-align: center;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.subpage-hero .hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.subpage-hero-content {
    position: relative;
    z-index: 1;
}

.subpage-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.subpage-hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

.subpage-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.subpage-band-alt {
    background-color: var(--bg-secondary);
    width: 100%;
}

/* Subpage sections */

.sp-section {
    margin-bottom: 4rem;
}

/* Numbered section eyebrow */

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.9rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--primary-border-dim);
    background: var(--primary-bg-dim);
    border-radius: var(--radius-sm);
}

/* Colored top accent on bands */

.sp-band.slope-top {
    border-top: none;
    background-image: linear-gradient(to right, var(--primary) 0, var(--primary) 90px, var(--border) 90px, var(--border) 100%);
    background-repeat: no-repeat;
    background-size: 100% 1px;
    background-position: top;
}

.sp-band.slope-bottom {
    border-bottom: none;
    background-image: linear-gradient(to right, var(--primary) 0, var(--primary) 90px, var(--border) 90px, var(--border) 100%);
    background-repeat: no-repeat;
    background-size: 100% 1px;
    background-position: bottom;
}

.sp-band.slope-top.slope-bottom {
    background-image:
        linear-gradient(to right, var(--primary) 0, var(--primary) 90px, var(--border) 90px, var(--border) 100%),
        linear-gradient(to right, var(--primary) 0, var(--primary) 90px, var(--border) 90px, var(--border) 100%);
    background-repeat: no-repeat, no-repeat;
    background-size: 100% 1px, 100% 1px;
    background-position: top, bottom;
}

.sp-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.sp-section h2 .dot {
    color: var(--primary);
}

.sp-section>p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    max-width: 700px;
}

.sp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.sp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.sp-card:hover {
    border-color: var(--primary-border-light);
}

.sp-card.accent-secondary:hover {
    border-color: var(--secondary-border);
}

.sp-card h3 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.sp-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.sp-card .sp-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    background: var(--primary-bg-light);
    color: var(--primary);
}

.sp-card .sp-tag.tag-secondary {
    background: var(--secondary-bg-light);
    color: var(--secondary);
}

.sp-card-links {
    display: flex;
    gap: 1.25rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

.sp-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color var(--ease);
}

.sp-card-link:hover {
    color: var(--primary-light);
}

.sp-card-link-arrow {
    display: inline-block;
    transition: transform var(--ease);
}

.sp-card-link:hover .sp-card-link-arrow {
    transform: translate(2px, -2px);
}

.sp-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.7;
}

.sp-code .kw {
    color: var(--primary);
}

.sp-code .str {
    color: var(--secondary);
}

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

.sp-doc-link {
    margin-top: 2rem;
}

/* Full-width band sections */

.sp-band {
    padding: 4rem 2rem;
    position: relative;
}

.sp-band-alt {
    background-color: var(--bg-secondary);
}

.sp-band-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.sp-band-inner h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.sp-band-inner h2 .dot {
    color: var(--primary);
}

.sp-band-sub {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    max-width: 700px;
}

/* Architecture Timeline */

.arch-timeline {
    position: relative;
    max-width: 800px;
    padding-left: 2.5rem;
}

.arch-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0.3;
    border-radius: 1px;
}

.arch-item {
    position: relative;
    padding-bottom: 2rem;
}

.arch-item:last-child {
    padding-bottom: 0;
}

.arch-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.3rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--primary);
    z-index: 1;
}

.arch-item:hover .arch-marker {
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.arch-content h3 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.arch-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.sp-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: start;
}

.sp-overview-text p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.sp-overview-meta {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.sp-overview-meta dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
}

.sp-overview-meta dt {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.sp-overview-meta dd {
    color: var(--text-white);
    font-size: 0.9rem;
}

/* Roadmap timeline */

.roadmap-timeline {
    display: grid;
    gap: 1.25rem;
    counter-reset: roadmap;
}

.roadmap-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: start;
    padding: 1.75rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--ease);
}

.roadmap-item:hover {
    border-color: var(--primary-border);
}

.roadmap-index {
    counter-increment: roadmap;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 0.08em;
    padding-top: 0.25rem;
    min-width: 2rem;
}

.roadmap-index::before {
    content: counter(roadmap, decimal-leading-zero);
}

.roadmap-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.roadmap-body p {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

.roadmap-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .roadmap-item {
        grid-template-columns: auto 1fr;
        padding: 1.5rem;
    }

    .roadmap-status {
        grid-column: 2;
        justify-self: start;
        margin-top: 0.5rem;
    }
}

/* Responsive */

@media (max-width: 768px) {
    section {
        padding: 5rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-navbar-mobile);
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        overflow-wrap: break-word;
    }

    .hero h1 .gradient-text {
        white-space: normal;
    }

    .hero .tagline {
        font-size: 1.2rem;
    }

    .hero-logo {
        width: 72px;
        margin-bottom: 2rem;
    }

    .project-card {
        padding: 2.5rem 0;
    }

    .project-card .project-info h3 {
        font-size: 1.85rem;
    }

    .project-card .project-info p {
        font-size: 1rem;
    }

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

    .section-title {
        font-size: 1.85rem;
    }

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

    .subpage-hero h1 {
        font-size: 2rem;
    }

    .sp-overview {
        grid-template-columns: 1fr;
    }

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

    .arch-timeline {
        padding-left: 2rem;
    }

    .arch-marker {
        left: -2rem;
        width: 12px;
        height: 12px;
    }

    .arch-timeline::before {
        left: 5px;
    }

    .subpage-content {
        padding: 3rem 1.25rem;
    }

    .sp-section {
        min-width: 0;
    }

}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}
