/**
 * Holsea Public Page Template (N-Page)
 * Scope: .gene-n-page
 * Aesthetics: Clinical Luxury, Editorial, Magazine-like
 */

/* =========================================
   1. Scoping & Reset
   ========================================= */

/* 
 * Force scroll and height reset - CRITICAL
 * This counters main.css which sets body { overflow: hidden; }
 */
html.gene-n-page,
body.gene-n-page,
html:has(body.gene-n-page) {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: static !important;
    touch-action: auto !important;
    overscroll-behavior: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Additional wrapper reset */
body.gene-n-page .npage-wrapper {
    overflow: visible !important;
    height: auto !important;
}

body.gene-n-page {
    background-color: #FAFAFA;
    color: #111;
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Isolate content area */
.gene-n-page .npage-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* =========================================
   2. Typography System (Editorial)
   ========================================= */
.gene-n-page h1,
.gene-n-page h2,
.gene-n-page h3,
.gene-n-page h4,
.gene-n-page h5,
.gene-n-page h6 {
    font-family: 'Playfair Display', serif;
    /* Use theme's serif */
    font-weight: 400;
    line-height: 1.3;
    color: #000;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.gene-n-page h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    margin-top: 0;
    margin-bottom: 1rem;
}

.gene-n-page h2 {
    font-size: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    /* Editorial divider */
}

.gene-n-page h3 {
    font-size: 1.5rem;
    font-family: 'Inter', sans-serif;
    /* Sub-headings can be sans */
    font-weight: 500;
    margin-top: 2.5rem;
}

.gene-n-page p {
    font-size: 1.05rem;
    /* ~17px */
    margin-bottom: 1.5rem;
    color: #333;
}

/* Lead Paragraph (First paragraph inside content) */
.gene-n-page .npage-content>p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #111;
    font-family: 'Playfair Display', serif;
}

/* Blockquote */
.gene-n-page blockquote {
    margin: 3rem 0;
    padding-left: 2rem;
    border-left: 3px solid #111;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-style: italic;
    color: #111;
}

.gene-n-page blockquote cite {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1rem;
    color: #666;
}

/* Lists */
.gene-n-page ul,
.gene-n-page ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.gene-n-page li {
    margin-bottom: 0.5rem;
}

/* =========================================
   3. Page Hero
   ========================================= */
.npage-hero {
    padding: 8rem 0 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.npage-hero-micro {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #999;
    margin-bottom: 1.5rem;
    display: block;
}

.npage-hero-subline {
    font-size: 1.2rem;
    color: #666;
    margin-top: 1rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.npage-hero-meta {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #999;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.npage-hero-divider {
    width: 60px;
    height: 1px;
    background: #111;
    margin: 3rem auto 0;
}

/* Background Decoration Text */
.npage-bg-deco {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12vw;
    font-family: 'Playfair Display', serif;
    opacity: 0.03;
    pointer-events: none;
    white-space: nowrap;
    z-index: -1;
}

/* =========================================
   4. Layout Grid is implemented via container
   ========================================= */
.npage-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    /* Content | Sidebar */
    gap: 4rem;
    align-items: start;
}

/* Center content if sidebar is hidden/empty */
.npage-container.no-sidebar {
    grid-template-columns: minmax(auto, 760px);
    justify-content: center;
}

.npage-content {
    /* Main content styling styles already defined above globally for .gene-n-page */
}

/* Sidebar */
.npage-sidebar {
    position: sticky;
    top: 120px;
    font-size: 0.9rem;
}

.npage-toc-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.npage-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.npage-toc-list li {
    margin-bottom: 0.8rem;
}

.npage-toc-list a {
    text-decoration: none;
    color: #888;
    transition: color 0.2s;
}

.npage-toc-list a:hover,
.npage-toc-list a.active {
    color: #111;
}

/* =========================================
   5. Components
   ========================================= */
/* Editorial Image */
.gene-n-page figure {
    margin: 3rem 0;
}

.gene-n-page img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.gene-n-page figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.8rem;
    font-style: italic;
    font-family: 'Playfair Display', serif;
}

/* Callout Box */
.npage-callout {
    background: #F0F0F0;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 2px solid #111;
}

/* =========================================
   6. Footer CTA
   ========================================= */
.npage-footer-cta {
    margin-top: 6rem;
    padding: 6rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    background: white;
}

.npage-cta-quote {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #111;
}

.npage-btn-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.npage-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid #111;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    transition: all 0.3s;
}

.npage-btn-primary {
    background: #111;
    color: white;
}

.npage-btn-primary:hover {
    background: #333;
    border-color: #333;
}

.npage-btn-ghost {
    background: transparent;
    color: #111;
}

.npage-btn-ghost:hover {
    background: #111;
    color: white;
}

/* =========================================
   7. Mobile Responsive
   ========================================= */
@media (max-width: 900px) {
    .npage-container {
        grid-template-columns: 1fr;
        /* Stack sidebar below or hide */
    }

    .npage-sidebar {
        display: none;
        /* Hide sidebar on mobile for simplicity, or move to bottom */
    }

    .gene-n-page h1 {
        font-size: 2.5rem;
    }
}