/* ============================================================
   MiniSwift Design System
   Pure CSS — Zero dependencies
   Fonts: Shared self-hosted fonts from ../fonts/
   ============================================================ */

/* ---- @font-face ------------------------------------------ */

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-300.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-500.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-600.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Design Tokens --------------------------------------- */

:root {
    --bg: #0A0B0C;
    --surface: #0F1112;
    --surface-light: #151718;
    --border: #1E2022;
    --amber: #F6A623;
    --amber-dim: #C4841C;
    --amber-subtle: rgba(246, 166, 35, 0.3);

    --text-primary: #E8E8E8;
    --text-secondary: #888888;
    --text-muted: #555555;

    /* Syntax Highlighting */
    --syntax-keyword: #F6A623;
    --syntax-type: #7EC8E3;
    --syntax-string: #98C379;
    --syntax-number: #D19A66;
    --syntax-comment: #555555;
    --syntax-func: #E8E8E8;
    --syntax-property: #ABB2BF;

    --container-width: 1152px;
}

/* ---- Reset & Base ---------------------------------------- */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* ---- Layout Utilities ------------------------------------ */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.grid {
    display: grid;
}

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

@media (min-width: 768px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md-flex-row {
        flex-direction: row;
    }

    .md-text-3xl {
        font-size: 1.875rem;
    }
}

@media (min-width: 1024px) {
    .lg-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .lg-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg-block {
        display: block;
    }
}

.hidden {
    display: none;
}

/* ---- Typography ------------------------------------------ */

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-6xl {
    font-size: 3.75rem;
}

@media (min-width: 768px) {
    .md-text-7xl {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .lg-text-8xl {
        font-size: 6rem;
    }
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

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

.uppercase {
    text-transform: uppercase;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.leading-relaxed {
    line-height: 1.625;
}

/* ---- Color Utilities ------------------------------------- */

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

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

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

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

/* ---- Background Pattern ---------------------------------- */

.grid-pattern {
    background-image:
        linear-gradient(rgba(246, 166, 35, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(246, 166, 35, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ---- Navigation ------------------------------------------ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(10, 11, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 3.5rem;
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* ---- Animations ------------------------------------------ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* ---- Buttons & Badges ------------------------------------ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--amber);
    color: var(--bg);
}

.btn-primary:hover {
    background-color: var(--amber-dim);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background-color: var(--surface);
}

/* ---- Feature Cards --------------------------------------- */

.feature-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    background-color: var(--surface);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--amber-subtle);
    background-color: var(--surface-light);
}

.icon-box {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(246, 166, 35, 0.3);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* ---- Architecture Diagram -------------------------------- */

.arch-node {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    background-color: var(--surface);
    text-align: center;
    transition: border-color 0.2s ease;
}

.arch-node-active {
    border-color: rgba(246, 166, 35, 0.4);
}

.arch-node:hover {
    border-color: var(--amber);
}

/* ---- Code Blocks ----------------------------------------- */

.code-container {
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    overflow: hidden;
    background-color: var(--bg);
}

.code-header {
    padding: 0.75rem 1rem;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-content {
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.625;
    overflow-x: auto;
    color: var(--text-primary);
}

/* ---- Syntax Highlighting --------------------------------- */

.syntax-keyword {
    color: var(--syntax-keyword);
}

.syntax-type {
    color: var(--syntax-type);
}

.syntax-string {
    color: var(--syntax-string);
}

.syntax-number {
    color: var(--syntax-number);
}

.syntax-comment {
    color: var(--syntax-comment);
}

.syntax-func {
    color: var(--syntax-func);
}

.syntax-property {
    color: var(--syntax-property);
}

/* ---- Sections -------------------------------------------- */

.section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    border-top: 1px solid var(--border);
}

.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding-top: 8rem;
    padding-bottom: 6rem;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, transparent, var(--bg));
    pointer-events: none;
}

/* ---- Scrollbar ------------------------------------------- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2A2D30;
}

/* ---- Icons ----------------------------------------------- */

.icon {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm {
    width: 0.75rem;
    height: 0.75rem;
}

.icon-lg {
    width: 1.25rem;
    height: 1.25rem;
}