/* Eldric 2026 — design system
 * Refined editorial minimalism on pure white.
 * Authored by DOCS lane, 2026-05-15.
 * No mermaid, no rasters in this stylesheet — SVG-only project rule.
 */

/* -------------------------------------------------------- */
/*  Type — system serif stack only.                         */
/*  Earlier wave tried to embed Source Serif 4 from         */
/*  fonts.gstatic.com; that hashed URL is volatile and was  */
/*  404-ing for the Lighthouse audit. System serifs cover   */
/*  every target platform with zero network cost.           */
/* -------------------------------------------------------- */

:root {
    /* Surfaces & ink */
    --bg:               #ffffff;
    --bg-tint:          #fafbfc;
    --bg-deep:          #f5f6f8;
    --ink:              #0a2540;          /* deep navy — primary text */
    --ink-soft:         #2b3a52;
    --ink-mute:         #4e5b73;          /* darkened from #56657d for AA contrast on white */
    --ink-faint:        #5e6b7a;          /* darkened from #8896a8 for AA contrast on white */
    --hair:             rgba(10, 37, 64, 0.08);
    --hair-strong:      rgba(10, 37, 64, 0.16);

    /* Accent — Vienna terracotta */
    --accent:           #c8541c;
    --accent-deep:      #a8430f;
    --accent-tint:      rgba(200, 84, 28, 0.07);
    --accent-tint-hair: rgba(200, 84, 28, 0.22);

    /* Glass system (icons / pill panes) */
    --glass-bg-top:     rgba(255, 255, 255, 0.94);
    --glass-bg-bot:     rgba(245, 247, 250, 0.78);
    --glass-stroke:     rgba(10, 37, 64, 0.10);
    --glass-inner:      rgba(255, 255, 255, 0.65);
    --glass-shadow:     0 1px 2px rgba(10, 37, 64, 0.04),
                        0 8px 24px rgba(10, 37, 64, 0.06);

    /* Type families */
    --serif:            'Source Serif 4', 'Source Serif Pro', Charter, 'Iowan Old Style', 'Apple Garamond', 'Hoefler Text', 'Liberation Serif', Georgia, serif;
    --sans:             -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
    --mono:             ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

    /* Rhythm */
    --measure:          70ch;
    --gutter:           clamp(1.25rem, 3vw, 2.5rem);

    /* Radii */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-full: 999px;

    /* Easing */
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    font-feature-settings: 'ss01', 'ss02', 'cv01', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--ink);
    text-decoration-color: var(--hair-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.18s var(--ease), color 0.18s var(--ease);
}
a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent-tint-hair);
}

p { margin: 0 0 1rem; max-width: var(--measure); }

/* -------------------------------------------------------- */
/*  Display type — sparingly                                */
/* -------------------------------------------------------- */
.display, h1, h2, h3 {
    font-family: var(--serif);
    font-feature-settings: 'liga', 'kern';
    font-variation-settings: 'opsz' 32;
    letter-spacing: -0.012em;
    line-height: 1.08;
    color: var(--ink);
    margin: 0 0 0.6em;
}

h1 {
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    font-weight: 380;
    letter-spacing: -0.02em;
    font-variation-settings: 'opsz' 60;
}

h2 {
    font-size: clamp(1.75rem, 3.3vw, 2.6rem);
    font-weight: 420;
    margin-top: 1.6em;
}

h3 {
    font-size: 1.2rem;
    font-weight: 500;
    font-variation-settings: 'opsz' 14;
    line-height: 1.25;
    margin: 0 0 0.4em;
}

h4 {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin: 0 0 0.6em;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin: 0 0 1rem;
}
.eyebrow::before {
    content: '';
    width: 14px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.lead {
    font-family: var(--serif);
    font-variation-settings: 'opsz' 16;
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 56ch;
    font-weight: 380;
}

/* -------------------------------------------------------- */
/*  Layout                                                  */
/* -------------------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container-narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.rule {
    height: 1px;
    background: var(--hair);
    border: none;
    margin: 0;
}

.spacer-lg { height: clamp(3rem, 8vw, 6rem); }

/* -------------------------------------------------------- */
/*  Nav                                                     */
/* -------------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--hair);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.85rem 0;
}
.nav-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    font-family: var(--serif);
    font-variation-settings: 'opsz' 28;
    font-size: 1.25rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.nav-brand::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
    transform: translateY(-2px);
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.nav-list a {
    display: inline-block;
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
    color: var(--ink-soft);
    text-decoration: none;
    border-radius: var(--r-sm);
}
.nav-list a:hover { color: var(--ink); background: var(--bg-deep); }
.nav-list a.is-current { color: var(--ink); }
.lang-switch {
    margin-left: 0.4rem;
    padding-left: 0.8rem;
    border-left: 1px solid var(--hair);
    font-size: 0.78rem;
    color: var(--ink-faint);
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.lang-switch span[aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang-switch a {
    padding: 0.1rem 0.2rem;
    color: var(--ink-mute);
    text-decoration: none;
}
.lang-switch a:hover { color: var(--accent); }

/* -------------------------------------------------------- */
/*  Hero                                                    */
/* -------------------------------------------------------- */
.hero {
    padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(ellipse 80% 60% at 75% 10%, var(--accent-tint), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.32rem 0.85rem;
    border-radius: var(--r-full);
    background: var(--glass-bg-top);
    border: 1px solid var(--glass-stroke);
    box-shadow: var(--glass-shadow);
    font-size: 0.78rem;
    color: var(--ink-soft);
    backdrop-filter: blur(6px);
}
.hero-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

.hero h1 { margin: 1.2rem 0 1rem; }
.hero h1 em {
    font-style: normal;
    color: var(--accent);
    font-variation-settings: 'opsz' 60;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 1.5rem 0 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--r-md);
    text-decoration: none;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1;
}
.btn-primary {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 1px 2px rgba(10, 37, 64, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--hair-strong);
}
.btn-ghost:hover { background: var(--bg-deep); color: var(--ink); }

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 1.6rem;
    margin-top: 0.5rem;
    font-size: 0.83rem;
    color: var(--ink-mute);
}
.trust-row span { display: inline-flex; align-items: center; gap: 0.45rem; }
.trust-row svg { color: var(--accent); flex-shrink: 0; }

/* -------------------------------------------------------- */
/*  Glass icons                                             */
/* -------------------------------------------------------- */
.glass-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.glass-icon svg { width: 100%; height: 100%; display: block; }

.glass-icon-sm { width: 40px; height: 40px; }
.glass-icon-lg { width: 72px; height: 72px; }

/* -------------------------------------------------------- */
/*  Card grids                                              */
/* -------------------------------------------------------- */
.grid {
    display: grid;
    gap: 1.2rem;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
    background: var(--bg);
    border: 1px solid var(--hair);
    border-radius: var(--r-lg);
    padding: 1.4rem 1.4rem 1.5rem;
    transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.card:hover {
    border-color: var(--hair-strong);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(10, 37, 64, 0.05);
}
.card h3 { margin-top: 0.7rem; }
.card p {
    color: var(--ink-mute);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0;
}

/* -------------------------------------------------------- */
/*  Numbers / stats block                                   */
/* -------------------------------------------------------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0;
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}
.stat {
    padding: 1.6rem 1.4rem;
    border-right: 1px solid var(--hair);
}
.stat:last-child { border-right: none; }
@media (max-width: 760px) {
    .stat { border-right: none; border-bottom: 1px solid var(--hair); }
    .stat:last-child { border-bottom: none; }
}
.stat-num {
    font-family: var(--serif);
    font-variation-settings: 'opsz' 60;
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    font-weight: 400;
    color: var(--ink);
    line-height: 1;
    margin: 0 0 0.45rem;
    letter-spacing: -0.015em;
    font-feature-settings: 'tnum';
}
.stat-num em { color: var(--accent); font-style: normal; }
.stat-label {
    font-size: 0.78rem;
    color: var(--ink-mute);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* -------------------------------------------------------- */
/*  Pull quote / honest-scope callout                       */
/* -------------------------------------------------------- */
.callout {
    border-left: 3px solid var(--accent);
    padding: 0.6rem 1.2rem;
    margin: 1.8rem 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-variation-settings: 'opsz' 14;
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 64ch;
}
.callout small {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--ink-mute);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* -------------------------------------------------------- */
/*  Footer                                                  */
/* -------------------------------------------------------- */
.foot {
    border-top: 1px solid var(--hair);
    padding: 3rem 0 4rem;
    background: var(--bg-tint);
    font-size: 0.88rem;
    color: var(--ink-mute);
}
.foot-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2rem;
}
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot h3 {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0 0 0.6em;
    font-variation-settings: normal;
    line-height: 1.4;
}
.foot h4 { color: var(--ink); }    /* legacy — kept until all pages switch to h3 */
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.4rem; }
.foot a { color: var(--ink-mute); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot-bottom {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--hair);
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
}

/* -------------------------------------------------------- */
/*  Logo marquee (social proof — partners, sectors, refs)   */
/*  Pattern lifted from Mistral / Newsrooms.ai. CSS-only,   */
/*  no JS dependency.                                       */
/* -------------------------------------------------------- */
.marquee {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
    padding: 2.2rem 0;
    background: var(--bg);
}
.marquee-track {
    display: inline-flex;
    gap: 4rem;
    align-items: center;
    white-space: nowrap;
    animation: marquee 38s linear infinite;
    will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
    color: var(--ink-mute);
    font-family: var(--serif);
    font-variation-settings: 'opsz' 20;
    font-size: 1.05rem;
    font-weight: 420;
    letter-spacing: -0.005em;
    flex-shrink: 0;
}
.marquee-item small {
    display: block;
    font-family: var(--sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    margin-top: 0.15rem;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}

/* -------------------------------------------------------- */
/*  Compliance / certification badges                       */
/*  Pattern from Newsrooms.ai. Eldric science-worker has    */
/*  GLP, FDA 21 CFR Part 11, GDPR, HIPAA-ready stories.     */
/* -------------------------------------------------------- */
.cert-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.cert {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--hair-strong);
    border-radius: var(--r-md);
    font-size: 0.82rem;
    color: var(--ink-soft);
    background: var(--bg);
}
.cert strong { color: var(--ink); font-weight: 600; }
.cert-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

/* -------------------------------------------------------- */
/*  Product screenshot frame                                */
/*  Pattern from Mistral / Newsrooms.ai — bordered, shadowed*/
/*  Container hosts an <img> screenshot or inline SVG mock. */
/* -------------------------------------------------------- */
.shot {
    position: relative;
    border: 1px solid var(--hair-strong);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--bg-deep);
    box-shadow:
        0 1px 2px rgba(10, 37, 64, 0.04),
        0 24px 60px -20px rgba(10, 37, 64, 0.18);
}
.shot::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent 16%);
}
.shot img, .shot svg { display: block; width: 100%; height: auto; }
.shot-frame {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg);
    border-bottom: 1px solid var(--hair);
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--ink-mute);
}
.shot-frame::before {
    content: '';
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--hair-strong);
    box-shadow: 16px 0 0 var(--hair-strong), 32px 0 0 var(--hair-strong);
    margin-right: 1.6rem;
}

/* -------------------------------------------------------- */
/*  Vienna / provenance mark — small tag for European pos.  */
/* -------------------------------------------------------- */
.provenance {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--hair-strong);
    border-radius: var(--r-full);
    font-size: 0.75rem;
    color: var(--ink-soft);
    background: var(--bg);
}
.provenance svg { color: var(--accent); }

/* -------------------------------------------------------- */
/*  Quote / pedigree callout                                */
/*  For "Built on the work of Sepp Hochreiter (xLSTM)"      */
/*  Pattern from NXAI's pedigree treatment.                 */
/* -------------------------------------------------------- */
.pedigree {
    border-left: 2px solid var(--ink);
    padding: 0.4rem 0 0.4rem 1.4rem;
    margin: 2rem 0;
    max-width: 64ch;
}
.pedigree p {
    font-family: var(--serif);
    font-variation-settings: 'opsz' 16;
    font-size: 1.05rem;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0;
}
.pedigree cite {
    display: block;
    margin-top: 0.55rem;
    font-style: normal;
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--ink-mute);
    letter-spacing: 0.04em;
}

/* -------------------------------------------------------- */
/*  Sector list (use cases) — compact directory             */
/* -------------------------------------------------------- */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
    border-top: 1px solid var(--hair);
}
.sector {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid var(--hair);
    border-right: 1px solid var(--hair);
    color: var(--ink);
    text-decoration: none;
    transition: background 0.18s var(--ease);
}
.sector:last-child { border-right: none; }
.sector:hover { background: var(--bg-deep); color: var(--ink); }
.sector strong {
    font-weight: 500;
    flex-grow: 1;
}
.sector small {
    color: var(--ink-faint);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}
.sector svg { color: var(--accent); flex-shrink: 0; }

/* Push H1 a touch larger on big screens — Mistral pattern. */
@media (min-width: 1200px) {
    h1 { font-size: clamp(3rem, 5.8vw, 5.2rem); }
}

/* -------------------------------------------------------- */
/*  Page-load reveal                                        */
/* -------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(8px);
        animation: rise 0.7s var(--ease) forwards;
    }
    .reveal-1 { animation-delay: 0.05s; }
    .reveal-2 { animation-delay: 0.15s; }
    .reveal-3 { animation-delay: 0.25s; }
    .reveal-4 { animation-delay: 0.35s; }
    .reveal-5 { animation-delay: 0.45s; }
}
@keyframes rise {
    to { opacity: 1; transform: none; }
}

/* -------------------------------------------------------- */
/*  Utility                                                 */
/* -------------------------------------------------------- */
.tnum { font-feature-settings: 'tnum'; }
.mono { font-family: var(--mono); font-size: 0.88em; }
.muted { color: var(--ink-mute); }
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }

::selection { background: var(--ink); color: #fff; }
