/* ===========================================
   HashiCorp-Inspired Dark Design System
   基础设施级企业营销设计系统
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

:root {
    /* Brand & Accent */
    --primary: #2b89ff;
    --primary-bright: #5aa3ff;
    --primary-deep: #101a59;
    --primary-soft: rgba(43, 137, 255, 0.12);
    --accent-blue: #2b89ff;
    --inverse-canvas: #ffffff;
    --inverse-ink: #000000;

    /* Surface – dark canvas lift system */
    --canvas: #000000;
    --cloud: #15181e;
    --surface-1: #15181e;
    --surface-2: #1f232b;
    --surface-3: #3b3d45;
    --fog: rgba(178, 182, 189, 0.1);
    --hairline: #3b3d45;
    --hairline-soft: #252830;
    --steel: #656a76;
    --ink: #ffffff;
    --ink-soft: #b2b6bd;
    --charcoal: #b2b6bd;
    --graphite: #656a76;
    --ink-muted: #b2b6bd;
    --ink-subtle: #656a76;

    /* Product identity accents (module sections) */
    --product-terraform: #7b42bc;
    --product-vault: #ffcf25;
    --product-consul: #e62b1e;
    --product-waypoint: #14c6cb;
    --product-vagrant: #1868f2;
    --product-nomad: #00ca8e;
    --product-boundary: #f24c53;

    /* Semantic */
    --error: #e62b1e;
    --success: #00ca8e;
    --warning: #ffcf25;
    --visited: #a737ff;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;

    /* Spacing (8px base) */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 48px;
    --space-4xl: 64px;
    --space-5xl: 80px;
    --space-6xl: 96px;

    /* Border Radius */
    --radius-none: 0px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-xxl: 24px;
    --radius-pill: 9999px;

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

    /* Layout */
    --max-w: 1280px;
    --max-w-narrow: 800px;
    --nav-h: 64px;
}

/* ---------- RESET ---------- */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background-color: var(--canvas);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 500;
}

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

ul, ol {
    list-style: none;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: var(--visited);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

/* ---------- TYPOGRAPHY ---------- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 5rem); font-weight: 700; line-height: 1.17; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.19; }
h3 { font-size: clamp(1.15rem, 2vw, 1.75rem); line-height: 1.21; }
h4 { font-size: clamp(1rem, 1.5vw, 1.375rem); line-height: 1.18; }

p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink-muted);
    font-weight: 500;
}

/* ---------- CONTAINERS ---------- */

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--max-w-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

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

.section-cloud {
    background: var(--surface-1);
}

.section-ink {
    background: var(--canvas);
    color: var(--ink);
    border-top: 1px solid var(--hairline-soft);
    border-bottom: 1px solid var(--hairline-soft);
}

.section-head {
    text-align: left;
    margin-bottom: var(--space-4xl);
    max-width: 720px;
}

.section-head h2 {
    margin-bottom: var(--space-sm);
}

.section-head .subtitle {
    font-size: 1.125rem;
    color: var(--ink-muted);
    font-weight: 500;
    max-width: 560px;
    margin: 0;
    line-height: 1.69;
}

.section-label,
.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: var(--space-md);
}

/* ---------- BUTTONS ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1.29;
    text-decoration: none;
    min-height: 40px;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--inverse-canvas);
    color: var(--inverse-ink);
    border: 1px solid var(--inverse-canvas);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
}

.btn-outline {
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--hairline);
}

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

.btn-ink {
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--hairline);
}

.btn-ink:hover {
    background: var(--surface-3);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--hairline);
}

.btn-ghost:hover {
    background: var(--surface-1);
    border-color: var(--hairline);
}

.btn-link {
    background: transparent;
    color: var(--accent-blue);
    padding: 4px 0;
    border: none;
    min-height: auto;
    font-weight: 600;
}

.btn-link:hover {
    color: var(--primary-bright);
    text-decoration: underline;
}

.btn-product-purple {
    background: var(--product-terraform);
    color: var(--ink);
    border: 1px solid var(--product-terraform);
}

.btn-product-cyan {
    background: var(--product-waypoint);
    color: var(--inverse-ink);
    border: 1px solid var(--product-waypoint);
}

.btn-product-green {
    background: var(--product-nomad);
    color: var(--inverse-ink);
    border: 1px solid var(--product-nomad);
}

/* ---------- TAGS / BADGES ---------- */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    border-radius: var(--radius-pill);
    border: 1px solid var(--hairline);
    color: var(--ink-muted);
    background: var(--surface-1);
}

.tag-blue {
    border-color: rgba(43, 137, 255, 0.3);
    color: var(--accent-blue);
    background: rgba(43, 137, 255, 0.08);
}

.tag-dark {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--hairline);
}

.product-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-pill);
    background: var(--surface-1);
    color: var(--ink-muted);
    border: 1px solid var(--hairline);
}

/* ---------- CARDS (shared tokens) ---------- */

.feature-card,
.surface-card {
    background: var(--surface-1);
    border: 1px solid rgba(178, 182, 189, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

/* ---------- UTILITY ---------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

::selection {
    background: var(--accent-blue);
    color: var(--inverse-ink);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
    .container,
    .container-narrow {
        padding: 0 var(--space-md);
    }

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

    .section-head {
        margin-bottom: var(--space-3xl);
    }
}
