/* ============================================================================
   JB Gallery — redesign 2026-10-01 for secondary pages:
   - nft/<collection>/<id>.html share landings (redirect to the gallery)
   - nft/<id>.html legacy redirects
   - shop-terms.html (together with css/gallery.css)
   Same language as css/redesign.css: no frames, 1px lines, white/black/gray,
   accent --nav #5a9bb8 / --nav-ink #2a6580, Outfit Light + Inter 300.
   Generated by generate_og_preview.py (share_page_html / legacy_redirect_html).
   ========================================================================== */
@font-face {
    font-family: 'Outfit';
    src: url('../assets/fonts/Outfit-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
:root {
    color-scheme: light dark;
    --rp-bg: #ffffff;
    --rp-fg: #0a0a0a;
    --rp-muted: #737373;
    --rp-body: #525252;
    --rp-faint: #9a9a9a;
    --rp-rule: rgba(0, 0, 0, 0.08);
    --rp-rule-strong: rgba(0, 0, 0, 0.14);
    --rp-accent: #5a9bb8;
    --rp-accent-ink: #2a6580;
    --rp-green: #0b5c3a;
    --rp-ui: 'Outfit', 'Inter', system-ui, sans-serif;
    --rp-text: 'Inter', system-ui, sans-serif;
    --rp-sig: url('../assets/signature.png');
}
@media (prefers-color-scheme: dark) {
    :root {
        --rp-bg: #0c0c0c;
        --rp-fg: #f0f0f0;
        --rp-muted: #a3a3a3;
        --rp-body: #c4c4c4;
        --rp-rule: rgba(255, 255, 255, 0.1);
        --rp-rule-strong: rgba(255, 255, 255, 0.16);
        --rp-accent-ink: #5a9bb8;
        --rp-green: #7ed0a8;
        --rp-sig: url('../assets/signature-ice-ink.png');
    }
}

/* ── NFT share landings + legacy redirects (body = one link) ── */
html.rp-landing,
html:has(> body > p:only-child > a:only-child) {
    background: var(--rp-bg);
}
body.rp-landing,
html:has(> body > p:only-child > a:only-child) body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 24px;
    box-sizing: border-box;
    background: var(--rp-bg);
    color: var(--rp-fg);
    font-family: var(--rp-text);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}
/* handwritten signature above the link — no markup needed */
html:has(> body > p:only-child > a:only-child) body::before {
    content: '';
    display: block;
    width: 180px;
    height: 64px;
    background: var(--rp-sig) center / contain no-repeat;
}
html:has(> body > p:only-child > a:only-child) body > p {
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--rp-rule);
    min-width: 220px;
    text-align: center;
}
html:has(> body > p:only-child > a:only-child) body > p > a {
    font-family: var(--rp-ui);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.01em;
    color: var(--rp-fg);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--rp-accent);
}
html:has(> body > p:only-child > a:only-child) body > p > a:hover { color: var(--rp-accent-ink); }
html:has(> body > p:only-child > a:only-child) body > p > a::after { content: ' →'; }

/* ── Studio Shop terms ── */
body.rp-terms,
body:has(> article.terms) {
    background: var(--rp-bg);
    color: var(--rp-fg);
    font-family: var(--rp-text);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.75;
}
body:has(> article.terms) .terms {
    max-width: 42rem;
    margin: 0 auto;
    padding: 56px 40px 80px;
}
body:has(> article.terms) .terms > p:first-child {
    margin: 0 0 40px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rp-rule);
}
body:has(> article.terms) .terms > p:first-child a {
    font-family: var(--rp-ui);
    font-size: 14px;
    color: var(--rp-muted);
    text-decoration: none;
}
body:has(> article.terms) .terms > p:first-child a:hover { color: var(--rp-accent-ink); }
body:has(> article.terms) .terms h1 {
    margin: 0 0 8px;
    font-family: var(--rp-ui);
    font-size: 34px;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--rp-fg);
}
body:has(> article.terms) .terms .meta {
    margin: 0 0 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--rp-rule);
    font-family: var(--rp-ui);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rp-faint);
}
body:has(> article.terms) .terms p { margin: 0 0 16px; color: var(--rp-body); }
body:has(> article.terms) .terms strong { font-weight: 400; color: var(--rp-fg); }
body:has(> article.terms) .terms a {
    color: var(--rp-fg);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--rp-accent);
    text-decoration-thickness: 1px;
}
@media (max-width: 768px) {
    body:has(> article.terms) .terms { padding: 36px 20px 56px; }
    body:has(> article.terms) .terms h1 { font-size: 28px; }
}
