/* =========================================================
   Subtle Blue “paper + ink” theme (optimized)
   - tighter variables
   - consistent alpha tokens
   - mobile nav uses transform instead of display (smoother)
   - accessibility: focus-visible rings
   - performance: reduced blend-mode + lighter grain
   ========================================================= */

:root {
    /* Layout */
    --radius: 18px;
    --max: 1100px;
    /* Paper (warm greige / rose stone) */
    --paper: #f1efec; /* main background */
    --paper-2: #e7e3de; /* section contrast */
    --panel: rgba(255,255,255,.82);
    /* Ink */
    --ink: #1e1f22; /* soft charcoal */
    --muted: #6b6660; /* warm grey */
    /* Lines / fills */
    --line: rgba(30,31,34,.14);
    --soft: rgba(30,31,34,.07);
    /* Accent (rose-gold / copper ink) */
    --accent: #111827; /* primary rose-bronze */
    --accent-2: #6b6660; /* rose-gold highlight (from reference) */
    /* Shadows */
    --shadow: 0 14px 40px rgba(30,31,34,.12);
    --shadow2: 0 10px 26px rgba(30,31,34,.14);
    /* Focus */
    --focus: rgba(189,140,125,.28);
}

    * {
        box-sizing: border-box;
    }

    html, body {
        margin: 0;
        padding: 0;
    }

    body {
        font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
        font-size: 15px;
        color: var(--ink);
        background: var(--paper);
        min-height: 100vh;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
        /* Subtle paper grain (lighter + less expensive) */
        body::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            background: radial-gradient(circle at 18% 12%, rgba(11,18,32,.03), transparent 44%), radial-gradient(circle at 82% 32%, rgba(11,18,32,.022), transparent 48%), repeating-linear-gradient(0deg, rgba(11,18,32,.010), rgba(11,18,32,.010) 1px, transparent 1px, transparent 14px);
            opacity: .50;
        }
    /* Links */
    a {
        color: inherit;
        text-decoration: none;
    }

        a:hover {
            color: var(--accent-2);
        }

    code {
        color: var(--muted);
    }
    /* Container */
    .container {
        width: min(var(--max), calc(100% - 32px));
        margin: 0 auto;
    }
    /* =========================================================
   Header
   ========================================================= */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
        background: rgba(247,249,252,.88);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
    }

    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 0;
        gap: 12px;
    }

    .brand {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .brand-mark {
        font-family: "Fraunces", serif;
        font-weight: 700;
        font-size: 22px;
        letter-spacing: .2px;
        line-height: 1.05;
        color: var(--accent);
        font-variation-settings: "SOFT" 35, "WONK" 0;
    }

    .brand-sub {
        color: var(--muted);
        font-size: 12px;
    }

    .nav {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .nav-toggle {
        display: none;
        background: #fff;
        border: 1px solid var(--line);
        color: var(--ink);
        padding: 10px 12px;
        border-radius: 999px;
        cursor: pointer;
    }

    .nav-links {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .nav-links a {
            color: var(--muted);
            padding: 10px 10px;
            border-radius: 999px;
        }

            .nav-links a:hover {
                color: var(--ink);
                background: var(--soft);
            }

    .nav-user {
        color: var(--muted);
        font-size: 13px;
        padding: 10px 8px;
    }
    /* =========================================================
   Buttons
   ========================================================= */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 14px;
        border-radius: 999px;
        background: var(--accent);
        border: 1px solid var(--accent);
        color: #fff !important;
        cursor: pointer;
        box-shadow: 0 10px 18px rgba(11,18,32,.10);
        transition: filter .15s ease, transform .15s ease;
    }

        .btn:hover {
            filter: brightness(1.05);
        }

        .btn:active {
            transform: translateY(1px);
        }

    .btn-ghost {
        background: transparent;
        border: 1px solid var(--line);
        color: var(--ink) !important;
        box-shadow: none;
    }

        .btn-ghost:hover {
            background: var(--soft);
        }
    /* Focus ring (keyboard friendly) */
    :where(a, button, input, textarea, .btn, .like, .nav-toggle):focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--focus);
    }
    /* =========================================================
   Main
   ========================================================= */
    .site-main {
        padding: 26px 0 48px;
    }
    /* =========================================================
   Hero / panels
   ========================================================= */
    .hero {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 22px;
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        position: relative;
        overflow: hidden;
    }

        .hero::after {
            content: "";
            position: absolute;
            top: -120px;
            right: -120px;
            width: 320px;
            height: 320px;
            background: radial-gradient(circle at 30% 30%, rgba(11,31,59,.10), transparent 62%);
            transform: rotate(8deg);
            opacity: .9;
            pointer-events: none;
        }

        .hero h1 {
            margin: 0;
            font-family: "Fraunces", serif;
            font-weight: 650;
            font-size: 32px;
            letter-spacing: -.2px;
            font-variation-settings: "SOFT" 30, "WONK" 0;
        }

        .hero p {
            margin: 0;
            color: var(--muted);
            line-height: 1.55;
        }

    .notice {
        margin-top: 12px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        background: rgba(255,255,255,.88);
        border-radius: 14px;
        color: var(--muted);
    }
    /* Prompt bar */
    .prompt-bar {
        margin-top: 12px;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
    }

        .prompt-bar input {
            flex: 1;
            min-width: 260px;
            padding: 12px 12px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255,255,255,.96);
            color: var(--ink);
            outline: none;
        }

            .prompt-bar input:focus {
                border-color: rgba(59,130,246,.55);
                box-shadow: 0 0 0 3px var(--focus);
            }

        .prompt-bar .hint {
            color: var(--muted);
            font-size: 12px;
        }
    /* =========================================================
   Grid
   ========================================================= */
    .grid {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 14px;
        margin-top: 16px;
    }
    /* =========================================================
   Cards
   ========================================================= */
    .card {
        grid-column: span 4;
        background: rgba(255,255,255,.88);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow2);
        display: flex;
        flex-direction: column;
        position: relative;
    }

        .card::before {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255,255,255,.55), transparent 28%);
            pointer-events: none;
            opacity: .55;
        }

    .card-top {
        padding: 14px 14px 10px;
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: flex-start;
        position: relative;
        z-index: 1;
    }

.badge {
    font-size: 12px;
    color: #fff; /* ALWAYS white text */
    border: 1px solid transparent;
    padding: 6px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

    .card h3 {
        margin: 0;
        font-family: "Fraunces", serif;
        font-weight: 600;
        font-size: 16px;
        line-height: 1.25;
        letter-spacing: -.1px;
        font-variation-settings: "SOFT" 20, "WONK" 0;
    }

    .card p {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.35;
    }
    /* Image area */
    .card-media {
        width: 100%;
        aspect-ratio: 16 / 10;
        object-fit: cover;
        background: #f2f4f7;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        position: relative;
        z-index: 0;
    }
    /* Bottom bar */
    .card-actions {
        padding: 12px 14px 14px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        position: relative;
        z-index: 1;
    }

    .small {
        color: var(--muted);
        font-size: 12px;
    }
    /* Like */
    .like {
        display: inline-flex;
        gap: 8px;
        align-items: center;
        cursor: pointer;
        padding: 10px 12px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: rgba(255,255,255,.94);
        color: var(--ink);
        transition: background .15s ease;
    }

        .like:hover {
            background: var(--soft);
        }
    /* Prompt row thumb */
    .prompt-row {
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }

    .prompt-thumb {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        object-fit: cover;
        border: 1px solid var(--line);
        background: #f2f4f7;
        flex: 0 0 auto;
    }
    /* Titles */
    .page-title {
        margin: 0 0 10px;
        font-family: "Fraunces", serif;
        font-weight: 650;
        font-size: 28px;
        letter-spacing: -.2px;
        font-variation-settings: "SOFT" 30, "WONK" 0;
    }
    /* =========================================================
   Forms
   ========================================================= */
    .form {
        max-width: 720px;
        margin-top: 14px;
        background: rgba(255,255,255,.88);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 16px;
        box-shadow: var(--shadow);
    }

        .form label {
            display: block;
            font-size: 13px;
            color: var(--muted);
            margin: 10px 0 6px;
        }

        .form input,
        .form textarea {
            width: 100%;
            padding: 12px 12px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255,255,255,.96);
            color: var(--ink);
            outline: none;
        }

            .form input:focus,
            .form textarea:focus {
                border-color: rgba(59,130,246,.55);
                box-shadow: 0 0 0 3px var(--focus);
            }

        .form textarea {
            min-height: 110px;
            resize: vertical;
        }
/* =========================================================
   Minimal Legal Footer
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.78);
    margin-top: 40px;
}

.footer-inner {
    padding: 18px 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

    .footer-inner a {
        color: var(--muted);
        margin: 0 6px;
        position: relative;
    }

        .footer-inner a:hover {
            color: var(--accent);
        }

        /* Separator dots between links (more reliable than last-of-type) */
        .footer-inner a:not(:last-child)::after {
            content: "·";
            margin-left: 10px;
            color: var(--line);
        }

/* Responsive spacing */
@media (max-width: 640px) {
    .footer-inner {
        font-size: 12px;
        padding: 16px 0;
    }

        .footer-inner a {
            display: inline-block;
            margin: 4px 6px;
        }
}
    /* =========================================================
   Responsive
   ========================================================= */
    @media (max-width: 920px) {
        .card {
            grid-column: span 6;
        }
    }

    @media (max-width: 640px) {
        .nav-toggle {
            display: inline-flex;
        }
        /* Mobile menu: animate in/out instead of display:none */
        .nav-links {
            position: fixed;
            top: 62px;
            right: 16px;
            left: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 12px;
            border-radius: var(--radius);
            border: 1px solid var(--line);
            background: rgba(255,255,255,.96);
            box-shadow: var(--shadow);
            transform: translateY(-8px);
            opacity: 0;
            pointer-events: none;
            transition: opacity .15s ease, transform .15s ease;
        }

        body.nav-open .nav-links {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .card {
            grid-column: span 12;
        }
    }
    /* Respect reduced motion */
    @media (prefers-reduced-motion: reduce) {
        * {
            transition: none !important;
            scroll-behavior: auto !important;
        }
    }
