/* Shared by every page: tokens, reset, typography, buttons and pills, nav, footer. */

:root {
    --bg: #0b0b12;
    --purple: #7c5cff;
    --cyan: #00c8ff;
    --green: #3ddc97;
    --text: #ffffff;
    --text-soft: #b5b5c3;
    --muted: #a0a0b4;
    --faint: #7c7c96;
    --border: #23233a;
    --border-strong: #2a2a40;
    --rule: #1c1c2a;
    --purple-border: #3a2f7a;
    --purple-tint: rgba(124, 92, 255, 0.14);
    --purple-ink: #c9c0ff;
    --gradient: linear-gradient(90deg, var(--purple), var(--cyan));

    --radius-card: 18px;
    --radius-tile: 20px;
    --container: 1120px;
    --gutter: 36px;
    --nav-height: 64px;
    --ease: 160ms ease;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body,
h1, h2, h3, h4,
p, figure, ul, ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: rgba(124, 92, 255, 0.45);
    color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

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

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-weight: 700;
    font-size: 14px;
}

.skip-link:focus {
    top: 12px;
}

/* The skip link focuses <main> from JS; the whole region doesn't need a focus ring. */
main[tabindex="-1"]:focus {
    outline: none;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint);
}

/* Buttons and pills */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease);
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(124, 92, 255, 0.35);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid var(--purple-border);
    border-radius: 999px;
    color: var(--purple-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

.pill:hover {
    background: var(--purple-tint);
    border-color: var(--purple);
    color: var(--text);
}

/* Nav */
.site-nav {
    position: relative;
    z-index: 50;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: var(--nav-height);
}

.brand {
    margin-right: auto;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-bang {
    color: var(--purple);
}

#nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

#nav-toggle .nav-toggle-close,
#nav-toggle[aria-expanded="true"] .nav-toggle-open {
    display: none;
}

#nav-toggle[aria-expanded="true"] .nav-toggle-close {
    display: block;
}

#nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

#nav-links a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: color var(--ease);
}

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

.nav-contact {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-contact::before {
    content: "";
    width: 1px;
    height: 16px;
    margin-right: 10px;
    background: var(--border-strong);
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #c9c9d6;
    transition: color var(--ease), background-color var(--ease);
}

.icon-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.pill-email {
    margin-left: 6px;
    padding: 7px 14px;
    background: var(--purple-tint);
    color: #e2dcff;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--rule);
    color: var(--faint);
    font-size: 13px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 24px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.footer-links a {
    color: var(--muted);
    transition: color var(--ease);
}

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

.footer-email {
    color: var(--muted);
    user-select: all;
}

.footer-email:empty,
.footer-links:has(.footer-email:empty) .footer-sep--email {
    display: none;
}

/* Phones */
@media (max-width: 720px) {
    :root {
        --gutter: 16px;
        --nav-height: 60px;
    }

    .nav-inner {
        position: relative;
        gap: 8px;
    }

    #nav-toggle {
        display: inline-flex;
        order: 3;
    }

    .nav-contact {
        order: 2;
        gap: 2px;
    }

    .nav-contact::before {
        display: none;
    }

    #nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 16px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    }

    #nav-links.is-open {
        display: flex;
    }

    #nav-links a {
        padding: 12px 0;
        font-size: 16px;
        border-bottom: 1px solid var(--rule);
    }

    #nav-links a:last-child {
        border-bottom: 0;
    }

    .pill-email {
        margin-left: 4px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    .pill-email {
        padding: 6px 11px;
        font-size: 16px;
    }

    /* Visually hidden but still read by screen readers. */
    .pill-email-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }
}
