/* ============================================
   LIMINALWORKS — Ghost Theme
   Dark Editorial Luxury
   ============================================ */

:root {
    --bg: #0e0d0b;
    --bg2: #141310;
    --bg3: #1c1a16;
    --gold: #c9a84c;
    --gold-dim: #8a6d2e;
    --cream: #e8e0d0;
    --muted: #5a5448;
    --text: #d4ccbc;
    --accent: #e06b3a;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

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

/* Custom cursor */
.cursor {
    position: fixed;
    width: 8px; height: 8px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
}
.cursor-ring {
    position: fixed;
    width: 32px; height: 32px;
    border: 1px solid var(--gold-dim);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.12s ease;
    opacity: 0.6;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 48px;
    border-bottom: 1px solid rgba(201,168,76,0.1);
    background: linear-gradient(to bottom, rgba(14,13,11,0.98), transparent);
    animation: fadeDown 1s ease both;
}

.nav-logo a {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.35em;
    color: var(--cream);
    text-transform: uppercase;
    text-decoration: none;
}
.nav-logo span { color: var(--gold); }
.nav-logo .nav-works { color: var(--gold-dim); font-size: 14px; letter-spacing: 0.2em; }

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }

.nav-cta {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--gold);
    border: none;
    padding: 10px 24px;
    cursor: none;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
}
.nav-cta:hover { background: var(--cream); transform: translateY(-1px); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--gold);
    border: none;
    padding: 14px 32px;
    cursor: none;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}
.btn-primary:hover { background: var(--cream); transform: translateY(-2px); }

.btn-ghost {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    border: 1px solid var(--muted);
    padding: 14px 32px;
    cursor: none;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 140px 48px 80px;
    position: relative;
    z-index: 2;
    animation: fadeUp 1.2s ease 0.3s both;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(48px, 5.5vw, 84px);
    font-weight: 300;
    line-height: 1.0;
    color: var(--cream);
    margin-bottom: 32px;
}
.hero-title em { font-style: italic; color: var(--gold); }

.hero-desc {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--muted);
    max-width: 420px;
    margin-bottom: 48px;
}

.hero-actions { display: flex; gap: 20px; align-items: center; }

.hero-right { position: relative; overflow: hidden; }

.hero-visual {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 40%, rgba(201,168,76,0.08) 0%, transparent 65%),
                radial-gradient(ellipse at 20% 80%, rgba(224,107,58,0.05) 0%, transparent 50%);
}

.hero-grid-lines { position: absolute; inset: 0; }
.hero-grid-lines::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(15deg);
    width: 120%; height: 120%;
    background-image:
        linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
}

.floating-card {
    position: absolute;
    background: var(--bg2);
    border: 1px solid rgba(201,168,76,0.15);
    padding: 20px 24px;
    animation: float 6s ease-in-out infinite;
}
.fc1 { top: 22%; right: 12%; width: 220px; animation-delay: 0s; }
.fc2 { top: 50%; right: 30%; width: 180px; animation-delay: 2s; }
.fc3 { bottom: 20%; right: 8%; width: 200px; animation-delay: 4s; }

.fc-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 8px;
}
.fc-value { font-size: 22px; font-weight: 300; color: var(--cream); }
.fc-value a { color: var(--cream); text-decoration: none; font-size: 15px; line-height: 1.4; }
.fc-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 4px; }

.divider-line {
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(201,168,76,0.2), transparent);
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee-wrap {
    border-top: 1px solid rgba(201,168,76,0.1);
    border-bottom: 1px solid rgba(201,168,76,0.1);
    padding: 14px 0;
    background: var(--bg2);
    overflow: hidden;
    white-space: nowrap;
}
.marquee-track {
    display: inline-flex;
    gap: 48px;
    animation: scroll 30s linear infinite;
}
.marquee-item {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
}
.marquee-item span { color: var(--gold); margin-right: 48px; }

/* ============================================
   SECTION SHARED STYLES
   ============================================ */
.section-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(201,168,76,0.2);
    max-width: 60px;
}

.section-heading {
    font-size: clamp(36px, 4vw, 58px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--cream);
    margin-bottom: 16px;
}
.section-heading em { font-style: italic; color: var(--gold); }

/* ============================================
   ESSAYS SECTION
   ============================================ */
.essays-section { padding: 100px 48px; }

.essays-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2px;
    margin-top: 56px;
    background: rgba(201,168,76,0.06);
}

.essay-featured {
    background: var(--bg2);
    padding: 48px;
    position: relative;
    overflow: hidden;
    cursor: none;
    transition: background 0.3s;
}
.essay-featured:hover { background: var(--bg3); }
.essay-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, var(--gold), transparent);
}

.essay-stack { display: flex; flex-direction: column; gap: 2px; }

.essay-card {
    background: var(--bg2);
    padding: 32px 36px;
    cursor: none;
    transition: background 0.2s;
}
.essay-card:hover { background: var(--bg3); }

.essay-meta {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
}

.essay-title {
    font-size: 26px;
    font-weight: 300;
    line-height: 1.25;
    color: var(--cream);
    margin-bottom: 16px;
}
.essay-title a { color: inherit; text-decoration: none; }
.essay-title a:hover { color: var(--gold); }
.essay-featured .essay-title { font-size: clamp(28px, 2.8vw, 40px); margin-bottom: 20px; }

.essay-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 28px;
}

.essay-read-more {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: gap 0.2s;
}
.essay-read-more:hover { gap: 18px; }
.essay-read-more::after { content: '→'; }

/* ============================================
   ABOUT STRIP
   ============================================ */
.about-strip {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    padding: 80px 48px;
    border-top: 1px solid rgba(201,168,76,0.1);
    align-items: center;
}

.author-visual {
    aspect-ratio: 1;
    max-width: 280px;
    background: var(--bg2);
    border: 1px solid rgba(201,168,76,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-family: var(--serif);
    font-style: italic;
    color: rgba(201,168,76,0.2);
    position: relative;
    overflow: hidden;
}
.author-visual::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(201,168,76,0.05), transparent);
}

.author-bio {
    font-size: 19px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--text);
    max-width: 620px;
    margin-bottom: 16px;
}
.author-bio em { font-style: italic; color: var(--gold); }
.author-note {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 24px;
}

/* ============================================
   MEMBERSHIP
   ============================================ */
.membership-section {
    padding: 100px 48px;
    position: relative;
    overflow: hidden;
}
.membership-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.membership-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 56px;
    background: rgba(201,168,76,0.06);
}

.membership-card {
    background: var(--bg2);
    padding: 48px 40px;
    transition: background 0.2s;
    cursor: none;
}
.membership-card:hover { background: var(--bg3); }
.membership-card.featured {
    background: var(--bg3);
    border-top: 2px solid var(--gold);
}

.member-tier {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 16px;
}

.member-price {
    font-size: 52px;
    font-weight: 300;
    color: var(--cream);
    line-height: 1;
    margin-bottom: 4px;
}
.member-price sup { font-size: 22px; vertical-align: super; color: var(--gold); }
.member-price sub { font-size: 14px; font-family: var(--mono); color: var(--muted); letter-spacing: 0.1em; }

.member-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    margin: 20px 0 32px;
}

.member-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}
.member-features li {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding-left: 16px;
    position: relative;
}
.member-features li::before { content: '—'; position: absolute; left: 0; color: var(--gold-dim); }
.member-features li.active { color: var(--text); }

/* ============================================
   POST / ESSAY PAGE
   ============================================ */
.post-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 140px 48px 80px;
}

.post-header { margin-bottom: 48px; }

.post-meta {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
}

.post-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--cream);
    margin-bottom: 20px;
}

.post-excerpt {
    font-size: 20px;
    font-weight: 300;
    font-style: italic;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
    border-left: 2px solid var(--gold);
    padding-left: 24px;
}

.post-author {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
}

.post-feature-image {
    margin: 0 -48px 48px;
}
.post-feature-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: grayscale(20%) brightness(0.8);
}

.gh-content {
    font-size: 18px;
    line-height: 1.85;
    color: var(--text);
}
.gh-content p { margin-bottom: 1.5em; }
.gh-content h2 {
    font-size: 32px;
    font-weight: 300;
    color: var(--cream);
    margin: 2em 0 0.75em;
    font-style: italic;
}
.gh-content h3 {
    font-size: 22px;
    font-weight: 400;
    color: var(--cream);
    font-family: var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 1.5em 0 0.75em;
}
.gh-content blockquote {
    border-left: 2px solid var(--gold);
    padding-left: 24px;
    margin: 2em 0;
    font-style: italic;
    font-size: 20px;
    color: var(--cream);
    line-height: 1.6;
}
.gh-content a { color: var(--gold); text-decoration: underline; text-decoration-color: var(--gold-dim); }
.gh-content a:hover { color: var(--cream); }
.gh-content img { width: 100%; height: auto; margin: 2em 0; }
.gh-content hr {
    border: none;
    border-top: 1px solid rgba(201,168,76,0.2);
    margin: 3em auto;
    width: 60px;
}

.post-footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid rgba(201,168,76,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 16px;
}
.post-share a {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--gold);
    text-decoration: none;
}

.post-nav {
    max-width: 740px;
    margin: 0 auto;
    padding: 48px 48px 80px;
    display: flex;
    gap: 2px;
}
.post-nav a {
    flex: 1;
    background: var(--bg2);
    padding: 28px 32px;
    text-decoration: none;
    transition: background 0.2s;
}
.post-nav a:hover { background: var(--bg3); }
.nav-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dim);
    display: block;
    margin-bottom: 8px;
}
.nav-title {
    font-size: 16px;
    font-weight: 300;
    color: var(--cream);
    display: block;
    line-height: 1.4;
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */
.archive-container { padding: 140px 48px 80px; }
.archive-header { margin-bottom: 56px; }
.archive-desc {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 540px;
    margin-top: 16px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: rgba(201,168,76,0.06);
}
.archive-card {
    background: var(--bg2);
    padding: 40px;
    transition: background 0.2s;
    cursor: none;
}
.archive-card:hover { background: var(--bg3); }

/* ============================================
   PAGE
   ============================================ */
.page-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 140px 48px 80px;
}
.page-header { margin-bottom: 48px; }
.page-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.1;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg2);
    border-top: 1px solid rgba(201,168,76,0.1);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-logo {
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
}
.footer-logo span { color: var(--gold-dim); }

.footer-links {
    display: flex;
    gap: 32px;
    list-style: none;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.footer-links a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

.footer-copy {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    opacity: 0.5;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .site-nav { padding: 20px 24px; }
    .nav-links { display: none; }
    .hero { grid-template-columns: 1fr; }
    .hero-right { display: none; }
    .hero-left { padding: 100px 24px 60px; }
    .essays-grid { grid-template-columns: 1fr; }
    .membership-grid { grid-template-columns: 1fr; }
    .about-strip { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px; }
    .author-visual { max-width: 120px; font-size: 40px; }
    .essays-section { padding: 60px 24px; }
    .membership-section { padding: 60px 24px; }
    .post-container { padding: 100px 24px 60px; }
    .archive-container { padding: 100px 24px 60px; }
    .archive-grid { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; gap: 24px; text-align: center; padding: 40px 24px; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
    body { cursor: auto; }
    .cursor, .cursor-ring { display: none; }
}

/* ============================================
   GHOST KOENIG EDITOR REQUIRED CLASSES
   ============================================ */
.kg-width-wide {
    grid-column: wide-start / wide-end;
    width: 85vw;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.kg-width-full {
    grid-column: full-start / full-end;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.kg-image { max-width: 100%; }
.kg-image-card { margin: 2em 0; }
.kg-image-card img { max-width: 100%; height: auto; }
.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; margin: 0; width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card { width: 100%; margin: 2em 0; }
.kg-bookmark-container { display: flex; background: var(--bg2); border: 1px solid rgba(201,168,76,0.15); text-decoration: none; }
.kg-bookmark-content { display: flex; flex-direction: column; padding: 20px; }
.kg-bookmark-title { font-size: 16px; color: var(--cream); font-weight: 400; }
.kg-bookmark-description { font-size: 13px; color: var(--muted); margin-top: 8px; }
.kg-bookmark-url { font-family: var(--mono); font-size: 11px; color: var(--gold-dim); margin-top: 12px; }
.kg-video-card { margin: 2em 0; }
.kg-video-card video { width: 100%; }
.kg-audio-card { margin: 2em 0; background: var(--bg2); border: 1px solid rgba(201,168,76,0.15); padding: 20px; }
.kg-callout-card { margin: 2em 0; padding: 20px 24px; background: var(--bg2); border-left: 3px solid var(--gold); display: flex; gap: 16px; }
.kg-callout-text { font-size: 16px; line-height: 1.7; color: var(--text); }
.kg-toggle-card { margin: 2em 0; border: 1px solid rgba(201,168,76,0.15); }
.kg-toggle-heading { padding: 16px 20px; cursor: pointer; color: var(--cream); }
.kg-toggle-content { padding: 0 20px 16px; color: var(--muted); }
.kg-button-card { margin: 2em 0; text-align: center; }
.kg-btn { display: inline-block; padding: 12px 28px; background: var(--gold); color: var(--bg); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.kg-header-card { margin: 2em 0; padding: 60px 40px; background: var(--bg2); text-align: center; }
.kg-header-card h2 { font-size: 36px; font-weight: 300; color: var(--cream); }
.kg-header-card p { color: var(--muted); margin-top: 12px; }
.kg-product-card { margin: 2em 0; }
.kg-nft-card { margin: 2em 0; }
.kg-file-card { margin: 2em 0; }
.kg-file-card-container { display: flex; align-items: center; padding: 16px 20px; background: var(--bg2); border: 1px solid rgba(201,168,76,0.15); text-decoration: none; }
.kg-file-card-title { color: var(--cream); font-size: 15px; }
.kg-file-card-caption { color: var(--muted); font-size: 12px; }
