/**
 * Design tokens, reset and typography.
 *
 * The palette, the fonts and the gradients are lifted from the application
 * itself so the site and the product look like the same thing.
 */

:root {
    /* Neutrals: a violet-tinted near-black. */
    --ink-950: #06050b;
    --ink-900: #0b0a12;
    --ink-850: #100e1b;
    --ink-800: #161422;
    --ink-700: #221f33;
    --ink-600: #322d47;
    --ink-500: #4b4463;
    --ink-400: #6f6788;
    --ink-300: #9a93ad;
    --ink-200: #c6c1d4;
    --ink-100: #e9e6f0;
    --ink-50: #f6f4fb;

    /* Brand violet. */
    --brand-100: #ede9fe;
    --brand-200: #ddd6fe;
    --brand-300: #c4b5fd;
    --brand-400: #a78bfa;
    --brand-500: #8b5cf6;
    --brand-600: #7c3aed;
    --brand-700: #6d28d9;

    /* Accent magenta. */
    --accent-100: #fce7f3;
    --accent-200: #fbcfe8;
    --accent-300: #f9a8d4;
    --accent-400: #f472b6;
    --accent-500: #db2777;
    --accent-600: #be185d;

    --emerald-300: #6ee7b7;
    --emerald-500: #10b981;
    --amber-300: #fcd34d;

    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Segoe UI Mono', Menlo, Consolas, monospace;

    --gradient-brand: linear-gradient(105deg, var(--brand-600), var(--accent-500));
    --gradient-text: linear-gradient(105deg, var(--brand-400), var(--accent-400));
    --gradient-glass: linear-gradient(160deg, rgba(34, 31, 51, 0.72) 0%, rgba(16, 14, 27, 0.78) 100%);

    --line: rgba(154, 147, 173, 0.14);
    --line-strong: rgba(154, 147, 173, 0.22);

    --shadow-card: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    --shadow-glow: 0 0 45px -12px rgba(124, 58, 237, 0.55);
    --shadow-button: 0 10px 30px -14px rgba(124, 58, 237, 0.9);

    --radius-sm: 0.7rem;
    --radius: 0.85rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;

    --shell: 74rem;
    --shell-wide: 82rem;
    --header-height: 4.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    /* Anchors land below the sticky header rather than under it. */
    scroll-padding-top: calc(var(--header-height) + 1.5rem);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background-color: var(--ink-900);
    color: var(--ink-100);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* The three fixed halos the application paints behind its own interface. */
.page-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60rem 40rem at 12% -10%, rgba(124, 58, 237, 0.22), transparent 60%),
        radial-gradient(45rem 35rem at 95% 5%, rgba(219, 39, 119, 0.16), transparent 60%),
        radial-gradient(50rem 40rem at 50% 110%, rgba(109, 40, 217, 0.14), transparent 65%);
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: var(--brand-300);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-200);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink-50);
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 600;
}

p {
    text-wrap: pretty;
}

strong {
    color: var(--ink-50);
    font-weight: 600;
}

em {
    color: var(--ink-100);
    font-style: normal;
    font-weight: 500;
}

code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    padding: 0.1em 0.38em;
    border-radius: 0.4rem;
    background: rgba(6, 5, 11, 0.6);
    border: 1px solid var(--line);
    color: var(--brand-200);
    white-space: nowrap;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

::selection {
    background: rgba(124, 58, 237, 0.4);
    color: var(--ink-50);
}

:focus-visible {
    outline: 2px solid var(--brand-400);
    outline-offset: 3px;
    border-radius: 0.35rem;
}

/* Scrollbar, matching the application. */
* {
    scrollbar-color: var(--ink-600) transparent;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--ink-600);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

/* ---------------------------------------------------------------- layout */

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

@media (min-width: 40rem) {
    .shell {
        padding-inline: 2rem;
    }
}

.section {
    padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--tight {
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section + .section {
    padding-top: 0;
}

/* ------------------------------------------------------------ utilities */

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-300);
}

.eyebrow::before {
    content: '';
    width: 1.6rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-400));
}

.lead {
    font-size: clamp(1.02rem, 1.6vw, 1.15rem);
    color: var(--ink-300);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 100;
    transform: translate(-50%, -150%);
    padding: 0.6rem 1.1rem;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--brand-600);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.18s ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
    color: #fff;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

.logo-mark {
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
}

/* Sections fade in as they arrive, unless the visitor asked for less motion. */
.reveal {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
