/* site.css — shared styles for elgnis.app */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800&family=Barlow:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    --purple: #774D8E;
    --purple-light: #BB86CC;
    --purple-dim: rgba(119,77,142,0.18);
    --bg: #07060a;
    --bg-raised: #121016;
    --border: rgba(255,255,255,0.08);
    --text: #f0f0f0;
    --muted: #8a8590;
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(119,77,142,0.30), transparent 60%),
        radial-gradient(ellipse 700px 500px at 110% 10%, rgba(187,134,204,0.14), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    scrollbar-gutter: stable;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Legacy simple header (kept for pages not yet on the full nav) ── */

.site-header.simple {
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.site-header.simple .wordmark {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--purple-light);
    text-decoration: none;
}

/* ── Top nav ─────────────────────────────────── */

.site-nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px max(20px, calc((100% - 1080px) / 2));
    border-bottom: 1px solid var(--border);
    background: rgba(7,6,10,0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 200;
    flex-shrink: 0;
}

.site-nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-nav-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav-links a {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #cfc9d6;
    text-decoration: none;
    transition: color 0.15s;
}

.site-nav-links a:hover { color: #fff; }
.site-nav-links a.active { color: var(--purple-light); }

.site-nav-links a.site-nav-cta {
    background: var(--purple);
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    transition: background 0.15s, transform 0.15s;
}

.site-nav-links a.site-nav-cta:hover {
    background: #8b5ba3;
    transform: translateY(-1px);
}

.site-nav-links a.site-nav-cta.active {
    background: #8b5ba3;
    color: #fff;
}

.site-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.site-nav-toggle span {
    width: 22px;
    height: 2px;
    background: #eee;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.site-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav-toggle.open span:nth-child(2) { opacity: 0; }
.site-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
    .site-nav-links {
        position: fixed;
        top: 57px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(7,6,10,0.98);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .site-nav-links.open { max-height: 400px; }

    .site-nav-links a {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
    }

    .site-nav-links a.site-nav-cta {
        border-radius: 0;
        text-align: center;
        margin: 0;
    }

    .site-nav-toggle { display: flex; }
}

/* ── Inner page layout ──────────────────────── */

.page-content {
    flex: 1;
    max-width: 640px;
    width: 100%;
    padding: 48px 28px 96px;
}

.page-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 8vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--text);
    margin-bottom: 0.2em;
    text-transform: uppercase;
}

.page-content .datestamp {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    display: block;
}

.page-content h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--purple-light);
    margin-top: 2.5rem;
    margin-bottom: 0.6rem;
}

.page-content p {
    color: #bbb;
    margin-bottom: 0.9em;
    font-size: 0.975rem;
}

.page-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1em;
}

.page-content ul li {
    color: #bbb;
    font-size: 0.975rem;
    padding: 0.35em 0 0.35em 1.2em;
    position: relative;
}

.page-content ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--purple-light);
    font-weight: 600;
}

.page-content a {
    color: var(--purple-light);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

/* ── Site footer ────────────────────────────── */

.site-footer {
    width: 100%;
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 20px 28px calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    z-index: 100;
    flex-shrink: 0;
}

.site-footer.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 0;
    transition: color 0.15s;
    position: relative;
}

.site-footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--purple-light);
    transform: scaleX(0);
    transition: transform 0.15s;
}

.site-footer a:hover { color: var(--text); }
.site-footer a:hover::after { transform: scaleX(1); }
.site-footer a.active { color: var(--text); font-weight: 600; }
.site-footer a.active::after { transform: scaleX(1); }
