/* ==========================================================================
   Black Lotus Software — hand-rolled stylesheet
   No framework. Design tokens in :root, fluid type via clamp(), dark-first.
   ========================================================================== */

:root {
    /* Surfaces */
    --color-background: #f8f8f6;
    --color-surface: rgba(0, 0, 0, 0.02);
    --color-surface-hover: rgba(0, 0, 0, 0.04);
    --color-hairline: rgba(0, 0, 0, 0.11);

    /* Text */
    --color-text-primary: #16161a;
    --color-text-secondary: #57575f;
    --color-text-faint: #9a9aa3;

    /* Brand + per-product accents (deepened for contrast on light) */
    --color-accent-brand: #7c3aed;   /* Black Lotus violet */
    --color-accent-forum: #0f9d6e;   /* The Forum teal      */
    --color-accent-swole: #2563eb;   /* SwoleScroll blue    */
    --color-accent-ping: #007aff;    /* Ping iOS blue       */

    /* Type */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Fluid type scale */
    --text-hero: clamp(2.75rem, 7vw, 5rem);
    --text-section: clamp(0.78rem, 1.4vw, 0.85rem);
    --text-product: clamp(1.6rem, 3.4vw, 2.25rem);
    --text-lead: clamp(1.05rem, 2vw, 1.3rem);
    --text-body: 1rem;

    /* Spacing rhythm */
    --space-section: clamp(5rem, 12vw, 9rem);
    --content-max: 56rem;
    --radius: 14px;

    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Soft brand glow anchored top-center, behind everything. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 60% 45% at 50% -10%,
            rgba(124, 58, 237, 0.10), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 2rem);
    position: relative;
    z-index: 1;
}

/* --- Header ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    background: color-mix(in srgb, var(--color-background) 78%, transparent);
    border-bottom: 1px solid var(--color-hairline);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 1.02rem;
}

.wordmark__mark {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--color-accent-brand);
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 4vw, 2.25rem);
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

.site-nav a {
    transition: color 0.18s ease;
}

.site-nav a:hover {
    color: var(--color-text-primary);
}

/* --- Hero -------------------------------------------------------------- */
.hero {
    padding-top: clamp(5rem, 16vw, 9rem);
    padding-bottom: var(--space-section);
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.hero__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-brand);
    box-shadow: 0 0 12px var(--color-accent-brand);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.03em;
    max-width: 16ch;
    margin-bottom: 1.5rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--color-accent-brand);
}

.hero__lead {
    font-size: var(--text-lead);
    color: var(--color-text-secondary);
    max-width: 46ch;
    line-height: 1.5;
}

/* --- Products ---------------------------------------------------------- */
.section-label {
    display: block;
    font-size: var(--text-section);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-hairline);
}

.products {
    padding-bottom: var(--space-section);
}

.product {
    --product-accent: var(--color-accent-brand);
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: clamp(1rem, 4vw, 2.5rem);
    padding: clamp(2rem, 5vw, 2.75rem) 0;
    border-top: 1px solid var(--color-hairline);
    transition: background-color 0.2s ease;
}

.product:last-child {
    border-bottom: 1px solid var(--color-hairline);
}

.product__aside {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 0.4rem;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--color-hairline);
    border-radius: 999px;
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--product-accent);
    box-shadow: 0 0 8px var(--product-accent);
}

.product__platform {
    font-size: 0.82rem;
    color: var(--color-text-faint);
}

.product__name {
    font-family: var(--font-display);
    font-size: var(--text-product);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 0.85rem;
}

.product__name .dot {
    color: var(--product-accent);
}

.product__tagline {
    font-size: var(--text-lead);
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.product__desc {
    color: var(--color-text-secondary);
    max-width: 52ch;
    margin-bottom: 1.5rem;
}

.product__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--color-hairline);
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    border-color: color-mix(in srgb, var(--product-accent) 50%, transparent);
    background: color-mix(in srgb, var(--product-accent) 12%, transparent);
    color: var(--product-accent);
}

.btn--primary:hover {
    background: color-mix(in srgb, var(--product-accent) 20%, transparent);
    border-color: var(--product-accent);
}

.btn--ghost:hover {
    border-color: var(--color-text-secondary);
    background: var(--color-surface-hover);
}

.btn .arrow {
    transition: transform 0.18s ease;
}

.btn:hover .arrow {
    transform: translateX(3px);
}

/* Per-product accent assignment */
.product--forum { --product-accent: var(--color-accent-forum); }
.product--swole { --product-accent: var(--color-accent-swole); }
.product--ping  { --product-accent: var(--color-accent-ping); }

/* --- Footer ------------------------------------------------------------ */
.site-footer {
    border-top: 1px solid var(--color-hairline);
    padding-block: clamp(3rem, 8vw, 4.5rem);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-footer__brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
}

.site-footer__legal {
    font-size: 0.85rem;
    color: var(--color-text-faint);
    margin-top: 0.4rem;
}

.site-footer__links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

.site-footer__links a {
    transition: color 0.18s ease;
}

.site-footer__links a:hover {
    color: var(--color-text-primary);
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 640px) {
    .product {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .product__aside {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding-top: 0;
    }
}

/* --- Motion preferences ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
