/* The unlockers.ai look on top of Ghost's Source theme.
 *
 * Source of truth: src/layouts/Base.astro in github.com/unlockers-ai/unlockers-site.
 * Sections 1 and 3 are copied from its <style is:global> block and should stay
 * a plain copy, so that syncing after a site change is a copy-paste. Section 2
 * is ours: it points Source's own variables at those tokens.
 * See the README, "Design shared with unlockers.ai".
 */

/* 1. Tokens — copied from Base.astro's :root
/* ---------------------------------------------------------- */

:root {
    --bg: #0b0b0f;
    --bg-alt: #11121a;
    --surface: #181a25;
    --text: #e8e9f0;
    --text-muted: #9ea0b3;
    --text-dim: #6b6e85;
    --accent: #a78bfa;
    --accent-strong: #8b5cf6;
    --border: #23253a;
    --max-width: 760px;
    /* Wider than the text column, so the navigation has room. */
    --shell-width: 1040px;
}

/* 2. Source, pointed at the tokens
/* ---------------------------------------------------------- */

/* html:root outranks the :root rule {{ghost_head}} prints after this file with
   the accent colour chosen in Ghost Admin: the brand wins over the setting. */
html:root {
    --background-color: var(--bg);
    --color-darker-gray: var(--text);
    --color-secondary-text: var(--text-muted);
    --color-lighter-gray: var(--surface);
    --color-border: var(--border);
    --color-dark-border: var(--text-dim);
    --ghost-accent-color: var(--accent);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Buttons are the site's CTA: the strong violet, white text, 8px corners. */
.gh-button,
.gh-form .gh-button {
    background-color: var(--accent-strong);
    color: #fff;
    border-radius: 8px;
}
.gh-button:hover { background-color: #7c3aed; opacity: 1; }

.gh-content a { color: var(--accent); }
.gh-content a:hover { color: var(--accent-strong); opacity: 1; }

/* The homepage hero is the site's .hero (from src/styles/content.css in
   unlockers-site): two faint violet glows, never the Ghost cover image. */
.gh-header.is-classic {
    background:
        radial-gradient(circle at 20% 0%, rgba(167, 139, 250, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        var(--bg);
    border-bottom: 1px solid var(--border);
    padding-block: 80px;
}
.gh-header.is-classic:not(.has-image) + :is(.gh-container, .gh-featured) { margin-top: 64px; }
@media (max-width: 600px) {
    .gh-header.is-classic { padding-block: 60px; }
}

/* The signup block sits right above the site footer. */
.gh-footer { margin-top: 96px; }
.gh-footer-signup { margin-bottom: 96px; }

/* 3. Header and footer — copied from Base.astro (HEADER, FOOTER), minus the
   FR/EN switch (.site-lang), which the newsletters do not have
/* ---------------------------------------------------------- */

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 11, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header-inner {
    max-width: var(--shell-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 51px; width: auto; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    font-weight: 500;
}
.site-nav a { color: var(--text-muted); }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav .site-nav-cta {
    color: #fff;
    background: var(--accent-strong);
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.15s ease;
}
.site-nav .site-nav-cta:hover { color: #fff; background: #7c3aed; }

.site-menu-toggle {
    display: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
}

@media (max-width: 760px) {
    .site-menu-toggle { display: block; }
    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 20px 24px 24px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
    }
    .site-header.menu-open .site-nav { display: flex; }
}

/* FOOTER */
.site-footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 14px;
}
.site-footer-inner {
    max-width: var(--shell-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.site-footer strong { color: var(--text); }
.site-footer-year { margin-left: 12px; }
.site-footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.site-footer-links a { color: var(--text-dim); }
.site-footer-links a:hover { color: var(--text); }

@media (max-width: 600px) {
    .site-footer-inner { flex-direction: column; align-items: flex-start; }
}

/* 4. Newsletter additions to the header
/* ---------------------------------------------------------- */

/* The newsletter's name next to the Unlockers logo. */
.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.site-publication {
    padding-left: 14px;
    border-left: 1px solid var(--border);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-publication:hover { color: var(--accent); opacity: 1; }
.site-nav a:hover,
.site-footer-links a:hover { opacity: 1; }

@media (max-width: 480px) {
    .site-logo img { height: 40px; }
}
