/* =========================================================
   ARKK DIGITAL — DESIGN SYSTEM
   Core tokens, typography, colors, themes and foundations
   ========================================================= */

/* ---------- 1. Fonts ---------- */

:root {
    --font-body: "DM Sans", sans-serif;
    --font-heading: "Manrope", sans-serif;
}

/* ---------- 2. Core design tokens ---------- */

:root {
    /* Brand colors */
    --color-navy-950: #080e1b;
    --color-navy-900: #0b1224;
    --color-navy-800: #111c34;
    --color-navy-700: #14213b;
    --color-navy-600: #1b2b49;

    --color-blue-400: #8db8ff;
    --color-blue-500: #6ea4ff;
    --color-blue-600: #397fe8;

    --color-cyan-400: #68d7dc;
    --color-cyan-500: #43c3cc;

    /* Neutral colors */
    --color-white: #ffffff;
    --color-gray-50: #f5f7fc;
    --color-gray-100: #e9edf5;
    --color-gray-200: #d6deea;
    --color-gray-300: #b6c2d4;
    --color-gray-400: #8c9bb2;
    --color-gray-500: #66758e;
    --color-gray-600: #4b5b73;
    --color-gray-700: #34445b;
    --color-gray-800: #1d2b40;
    --color-gray-900: #101a2b;

    /* Semantic colors */
    --color-success: #36c98f;
    --color-warning: #f2bb58;
    --color-danger: #f07178;

    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Responsive type roles */
    --type-hero: clamp(3.5rem, 7vw, 5.5rem);
    --type-section: clamp(2.25rem, 4.2vw, 3rem);
    --type-card: clamp(1.375rem, 2vw, 1.625rem);
    --type-lead: clamp(1.125rem, 1.6vw, 1.25rem);
    --type-eyebrow: 0.8125rem;

    --line-height-tight: 1.15;
    --line-height-heading: 1.3;
    --line-height-body: 1.7;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Semantic surface aliases */
    --surface-card: var(--bg-secondary);
    --surface-elevated: var(--bg-elevated);
    --surface-overlay: rgba(8, 14, 27, 0.85);
    --border-subtle: var(--border-color);
    --accent-blue: var(--accent-primary);
    --accent-cyan: var(--accent-secondary);

    /* Layout */
    --container-width: 1200px;
    --container-wide: 1400px;
    --container-padding: 1.5rem;
    --section-space: clamp(5rem, 8vw, 7rem);
    --section-space-compact: clamp(3rem, 5vw, 4.5rem);
    --card-padding: clamp(1.5rem, 3vw, 2rem);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.18);
    --shadow-glow-blue: 0 0 32px rgba(110, 164, 255, 0.15);
    --shadow-glow-cyan: 0 0 32px rgba(104, 215, 220, 0.12);

    /* Borders */
    --border-width: 1px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
}

/* ---------- 3. Dark theme (default) ---------- */

:root,
[data-theme="dark"] {
    color-scheme: dark;

    --bg-primary: var(--color-navy-900);
    --bg-secondary: var(--color-navy-800);
    --bg-tertiary: var(--color-navy-700);
    --bg-elevated: var(--color-navy-600);

    --text-primary: var(--color-gray-50);
    --text-secondary: var(--color-gray-300);
    --text-muted: var(--color-gray-400);

    --accent-primary: var(--color-blue-400);
    --accent-secondary: var(--color-cyan-400);

    --border-color: rgba(214, 222, 234, 0.12);
    --border-strong: rgba(214, 222, 234, 0.22);

    --surface-overlay: rgba(8, 14, 27, 0.85);
}

/* ---------- 4. Light theme ---------- */

[data-theme="light"] {
    color-scheme: light;

    --bg-primary: #f5f7fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9edf5;
    --bg-elevated: #ffffff;

    --text-primary: #101a2b;
    --text-secondary: #34445b;
    --text-muted: #66758e;

    --accent-primary: #397fe8;
    --accent-secondary: #239fa8;

    --border-color: rgba(16, 26, 43, 0.10);
    --border-strong: rgba(16, 26, 43, 0.18);

    --surface-overlay: rgba(245, 247, 252, 0.88);
}

/* ---------- 5. Global foundation ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-body);
    transition:
        background-color var(--transition-normal),
        color var(--transition-normal);
}

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

img {
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-heading);
}

p {
    margin-top: 0;
}

::selection {
    background: var(--accent-primary);
    color: var(--color-navy-950);
}

/* ---------- 6. Accessibility ---------- */

:focus-visible {
    outline: 3px solid var(--accent-secondary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Slightly tighter paragraph rhythm across the page */
p{line-height:1.62;margin-bottom:.8em}
.section-description{line-height:1.62}
.service-card p,.approach-step p{line-height:1.58;margin-bottom:.65em}
.about-lead{line-height:1.42;margin-bottom:1.9rem}
.contact-copy p{margin-bottom:.8em}
@media(max-width:768px){p{line-height:1.58;margin-bottom:.72em}.about-lead{line-height:1.4;margin-bottom:1.4rem}}

/* Paragraph readability and restrained tracking */
p,.section-description,.card-description{letter-spacing:-.01em;line-height:1.6}
@media(max-width:768px){p,.section-description,.card-description{letter-spacing:-.01em;line-height:1.6}}
