/* ── Font Faces ────────────────────────────────────────────────────── */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/dm-sans/dm-sans-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/dm-sans/dm-sans-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/dm-sans/dm-sans-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains-mono/jetbrains-mono-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ── Design Tokens ────────────────────────────────────────────────── */
:root {
    /* Colors */
    --color-primary:       #0891B2;
    --color-primary-mid:   #06B6D4;
    --color-primary-dark:  #0C6478;
    --color-primary-light: #E0F7FA;
    --color-accent:        #E8610A;
    --color-accent-light:  #FEF0E7;
    --color-dark:          #0A1520;
    --color-dark-mid:      #132030;
    --color-surface:       #F4FAFB;
    --color-surface-alt:   #EBF5F7;
    --color-text:          #0F2532;
    --color-text-muted:    #64748B;
    --color-border:        #E2EFF2;
    --color-white:         #FFFFFF;

    /* Typography */
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    --text-xs:  12px;
    --text-sm:  14px;
    --text-base: 16px;
    --text-lg:  18px;
    --text-xl:  24px;
    --text-2xl: 36px;
    --text-3xl: 48px;

    --weight-regular:  400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;

    --leading-tight:   1.15;
    --leading-snug:    1.2;
    --leading-normal:  1.3;
    --leading-relaxed: 1.6;

    /* Layout */
    --container-max:    1200px;
    --container-narrow: 720px;
    --container-form:   600px;

    --section-py:         100px;
    --section-py-tablet:  60px;
    --section-py-mobile:  40px;

    /* Spacing */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-2xl: 40px;
    --space-3xl: 64px;
    --space-4xl: 80px;

    /* Radii */
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-card:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-elevated: 0 10px 30px rgba(0,0,0,0.1);

    /* Transitions */
    --ease:     cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 300ms;
    --duration-fast: 150ms;
}

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

html {
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: var(--weight-regular);
    color: var(--color-text);
    background-color: var(--color-surface);
    line-height: var(--leading-relaxed);
}

img, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

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

input, select, textarea {
    font-family: var(--font-body);
    font-size: var(--text-base);
}

/* ── Typography ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    line-height: var(--leading-snug);
}

h1 {
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
}
h2 {
    font-size: var(--text-2xl);
}
h3 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-normal);
}

p {
    margin-bottom: var(--space-md);
}
p:last-child {
    margin-bottom: 0;
}

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

/* ── Layout ───────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--form {
    max-width: var(--container-form);
}

/* Sections */
.section {
    padding-top: var(--section-py);
    padding-bottom: var(--section-py);
}
.section--white {
    background-color: var(--color-white);
}
.section--surface {
    background-color: var(--color-surface);
}
.section--surface-alt {
    background-color: var(--color-surface-alt);
}
.section--dark {
    background-color: var(--color-dark);
}
.section--dark-mid {
    background-color: var(--color-dark-mid);
}
.section--accent {
    background-color: var(--color-primary);
}

/* Grid */
.grid {
    display: grid;
    gap: var(--space-xl);
}
.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid--5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Flex utilities */
.flex {
    display: flex;
}
.flex--center {
    align-items: center;
    justify-content: center;
}
.flex--between {
    justify-content: space-between;
}
.flex--gap-sm {
    gap: var(--space-sm);
}
.flex--gap-md {
    gap: var(--space-md);
}
.flex--gap-lg {
    gap: var(--space-lg);
}
.flex--gap-xl {
    gap: var(--space-xl);
}

/* Section header (centered heading + subheading) */
.section-header {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-3xl);
}
.section-header h2 {
    margin-bottom: var(--space-md);
}
.section-header p {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .section {
        padding-top: var(--section-py-tablet);
        padding-bottom: var(--section-py-tablet);
    }
    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid--5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 36px; }
    h2 { font-size: 30px; }
    h3 { font-size: 20px; }

    .grid--2,
    .grid--3,
    .grid--5 {
        grid-template-columns: 1fr;
    }

    .section-header {
        margin-bottom: var(--space-2xl);
    }
}

@media (max-width: 480px) {
    .section {
        padding-top: var(--section-py-mobile);
        padding-bottom: var(--section-py-mobile);
    }
    h1 { font-size: 30px; }
    h2 { font-size: 26px; }

    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}

/* ── Accessibility ────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
