/* ===== Design Tokens - Light / Prismatic ===== */
:root {
    /* Paper base */
    --bg-primary: #f7f8fb;
    --bg-surface: #ffffff;
    --bg-soft: #eef1f7;
    --bg-muted: #e5e8f0;

    /* Ink */
    --ink-950: #0a0d14;
    --ink-900: #0f1419;
    --ink-800: #1a1f2b;
    --ink-700: #2a303c;

    /* Text */
    --text-primary: #0f1419;
    --text-secondary: #525c6f;
    --text-muted: #8b95a8;
    --text-dim: #c4c9d4;

    /* Prismatic spectrum */
    --color-peach: #fb923c;
    --color-rose: #ec4899;
    --color-sky: #3b82f6;
    --color-cyan: #06b6d4;
    --color-mint: #10b981;
    --color-amber: #fbbf24;

    --gradient-prismatic: linear-gradient(
        120deg,
        #fb923c 0%,
        #ec4899 28%,
        #3b82f6 58%,
        #06b6d4 80%,
        #10b981 100%
    );

    --gradient-prismatic-soft: linear-gradient(
        120deg,
        #fed7aa 0%,
        #fbcfe8 28%,
        #bae6fd 58%,
        #a5f3fc 80%,
        #bbf7d0 100%
    );

    --gradient-tech: linear-gradient(
        135deg,
        #3b82f6 0%,
        #06b6d4 50%,
        #10b981 100%
    );

    /* Borders */
    --border: rgba(15, 20, 35, 0.08);
    --border-strong: rgba(15, 20, 35, 0.14);
    --border-hairline: rgba(15, 20, 35, 0.05);

    /* Glass (white-on-light) */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-hover: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(255, 255, 255, 0.95);
    --glass-border-outer: rgba(15, 20, 35, 0.06);
    --glass-highlight: rgba(255, 255, 255, 1);
    --glass-blur: 20px;
    --glass-shadow: 0 1px 2px rgba(15, 20, 35, 0.04), 0 8px 24px rgba(15, 20, 35, 0.06);
    --glass-shadow-lg: 0 1px 2px rgba(15, 20, 35, 0.04), 0 20px 48px rgba(15, 20, 35, 0.09);

    /* Fonts */
    --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Menlo', monospace;

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --radius-full: 999px;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 0.5s var(--ease-out);

    /* Layout */
    --container-max: 1200px;
    --nav-height: 72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
}

/* Soft pastel aurora - warm peach + rose + sky + mint, no purple */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 12% 22%, rgba(253, 164, 175, 0.55), transparent 60%),
        radial-gradient(ellipse 45% 50% at 90% 78%, rgba(253, 186, 116, 0.35), transparent 60%),
        radial-gradient(ellipse 60% 35% at 55% 115%, rgba(125, 211, 252, 0.45), transparent 60%),
        radial-gradient(ellipse 40% 30% at 70% 10%, rgba(134, 239, 172, 0.28), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* Subtle tech grid overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 20, 35, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 20, 35, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 70%);
}

a { color: var(--ink-800); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-rose); }

img { max-width: 100%; display: block; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Glass primitives ===== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%) brightness(1.02);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%) brightness(1.02);
    border: 1px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 0.5px var(--glass-border-outer),
        var(--glass-shadow);
    transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.glass-panel:hover {
    background: var(--glass-bg-hover);
    box-shadow:
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 0.5px var(--glass-border-outer),
        var(--glass-shadow-lg);
}

@media (prefers-reduced-transparency: reduce) {
    .glass-panel {
        background: var(--bg-surface);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(247, 248, 251, 0.65);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-bottom: 0.5px solid var(--border);
    transition: background var(--transition);
}

.navbar.scrolled {
    background: rgba(247, 248, 251, 0.88);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.brand-icon {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-prismatic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-suffix {
    color: var(--text-muted);
    font-weight: 500;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-link {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 500;
    transition: color var(--transition), background var(--transition);
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--border);
}

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

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--ink-800);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    font-family: var(--font-main);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.btn-primary {
    background: var(--ink-900);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 20, 35, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-primary:hover {
    background: var(--ink-800);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 20, 35, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:active { transform: translateY(0) scale(0.99); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    border-color: var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border-strong);
}

/* ===== Section common ===== */
.section { padding: 120px 0; position: relative; }

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

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    background: var(--gradient-prismatic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 52ch;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .fade-in { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    :root { --nav-height: 64px; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: rgba(247, 248, 251, 0.95);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        flex-direction: column;
        padding: 90px 28px 28px;
        gap: 4px;
        transition: right 0.4s var(--ease-out);
        border-left: 0.5px solid var(--border);
        align-items: stretch;
    }

    .nav-links.open { right: 0; }
    .nav-link { padding: 12px 14px; }

    .nav-toggle { display: flex; }

    .section { padding: 80px 0; }
    .section-header { margin-bottom: 44px; }
}
