/*
 * LibRAGraph marketing site.
 *
 * Design tokens are shared with the Vault and Console UIs — kept name-for-name and
 * value-for-value with vault/shared/ui-frame/src/main/resources/web/frame/tokens.css
 * so this surface and the product read as one system. Change a value there first;
 * this file follows it.
 */

:root {
    /* Accent: teal/cyan */
    --color-accent:       oklch(0.715 0.143 197.4);
    --color-accent-hover: oklch(0.666 0.147 197.4);

    /* Background surface layers */
    --color-surface-0: oklch(0.059 0 0);    /* neutral-950 — body background */
    --color-surface-1: oklch(0.114 0 0);    /* neutral-900 — bars, cards */
    --color-surface-2: oklch(0.159 0 0);    /* neutral-800 — borders, hover states */

    /* Text */
    --color-text-primary: oklch(0.962 0 0);
    --color-text-muted:   oklch(0.608 0 0);
    --color-text-subtle:  oklch(0.465 0 0);

    /* Typography — Inter is the product UI face; Jura is the wordmark face. */
    --font-sans:    "Inter", "Lato", "Arial", sans-serif;
    --font-display: "Jura", var(--font-sans);

    /* Layout */
    --height-topbar: 3.5rem;
    --width-content: 64rem;
    --width-prose:   44rem;
}

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

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

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-surface-0);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    /* The product UI is 13px-dense because it is a working tool; a marketing page is
       read once, at arm's length, so it sets its own reading scale on the same tokens. */
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection { background-color: oklch(0.715 0.143 197.4 / 0.3); }

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

* { scrollbar-width: thin; scrollbar-color: var(--color-accent) transparent; }

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

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

/* ── Header ───────────────────────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--color-surface-2);
    /* Opaque, and exactly --color-surface-0: the wordmark SVG carries its own
       neutral-950 background, so any tint here outlines it as a visible box. */
    background-color: var(--color-surface-0);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: var(--height-topbar);
    max-width: var(--width-content);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* The wordmark's own background is neutral-950 — the same value as --color-surface-0. */
.topbar__mark { display: flex; height: 1.75rem; }
.topbar__mark img { height: 100%; width: auto; }

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.topbar__nav a { color: var(--color-text-muted); transition: color 0.15s; }
.topbar__nav a:hover { color: var(--color-text-primary); }

/* Four items across a phone: shrink the gutters rather than collapse into a menu —
   the footer carries the same links, so nothing here is the only way to reach a page. */
@media (max-width: 26rem) {
    .topbar__inner { padding: 0 1rem; gap: 0.75rem; }
    .topbar__mark { height: 1.5rem; }
    .topbar__nav { gap: 0.875rem; font-size: 0.8125rem; }
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.main { flex: 1; }

.band { border-top: 1px solid var(--color-surface-2); background-color: var(--color-surface-1); }

.wrap {
    max-width: var(--width-content);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.wrap--prose { max-width: var(--width-prose); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero { padding-top: 5rem; padding-bottom: 4rem; }
.hero__glyph { width: 4rem; height: 4rem; margin-bottom: 2.5rem; }

.hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.25rem, 6vw, 3.75rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.hero__lede {
    max-width: 40rem;
    margin: 2rem 0 0;
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 2.5rem;
}

.hero__note { margin: 0; font-size: 0.875rem; color: var(--color-text-subtle); }

/* ── Button ───────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    background-color: var(--color-accent);
    color: var(--color-surface-0);
    font-weight: 500;
    transition: background-color 0.15s;
}

.btn:hover { background-color: var(--color-accent-hover); color: var(--color-surface-0); }
.btn svg { width: 1rem; height: 1rem; fill: currentColor; }

/* ── Sections ─────────────────────────────────────────────────────────────── */

h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.grid-3 {
    display: grid;
    gap: 2rem;
    margin-top: 2.5rem;
}

@media (min-width: 40rem) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-3 h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.grid-3 p { margin: 0.75rem 0 0; font-size: 0.9375rem; color: var(--color-text-muted); }

.copy {
    max-width: var(--width-prose);
    margin-top: 1.5rem;
    color: var(--color-text-muted);
}

.copy p { margin: 0; }
.copy p + p { margin-top: 1rem; }

/* ── Text pages ───────────────────────────────────────────────────────────── */

.page-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.page-date { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--color-text-subtle); }
.page-intro { margin: 1.5rem 0 0; font-size: 1.125rem; color: var(--color-text-muted); }

.doc { margin-top: 3rem; }
.doc section + section { margin-top: 2.5rem; }
.doc h2 { font-size: 1.25rem; }

/* Reset first, then space siblings — these two have equal specificity, so the
   spacing rule has to come second to survive. */
.doc p, .doc ul { margin: 0; color: var(--color-text-muted); }
.doc section > * + * { margin-top: 1rem; }

.doc ul { list-style: none; padding: 0; }
.doc li { position: relative; padding-left: 1.25rem; }
.doc li + li { margin-top: 0.5rem; }

.doc li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background-color: var(--color-accent);
}

.doc strong { color: var(--color-text-primary); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--color-surface-2); background-color: var(--color-surface-1); }

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: var(--width-content);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

@media (min-width: 40rem) {
    .footer__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.footer__inner p { margin: 0; }

.footer__nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__nav a { color: var(--color-text-muted); transition: color 0.15s; }
.footer__nav a:hover { color: var(--color-text-primary); }
