/* ==========================================================================
   GOWHEREWHYWHEN DESIGN SYSTEM
   Palette: Rich stone, warm amber/crimson accents, editorial typography
   File: public/css/styles.css
   ========================================================================== */

/* Resets & Base Box Model */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0c0a09;
    /* Stone 950 */
    --bg-surface: #1c1917;
    /* Stone 900 */
    --bg-surface-alt: #292524;
    /* Stone 800 */
    --border-color: #292524;
    /* Stone 800 */
    --border-muted: #1c1917;
    /* Stone 900 */
    --text-primary: #fafaf9;
    /* Stone 50 */
    --text-body: #d6d3d1;
    /* Stone 300 */
    --text-muted: #78716c;
    /* Stone 500 */
    --accent-amber: #22c55e;
    /* Green 500 */
    --accent-amber-hover: #4ade80;
    /* Green 400 */

    --font-serif: 'Newsreader', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-body);
    font-family: var(--font-sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background-color: var(--accent-amber);
    color: var(--bg-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 10, 9, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.brand:hover .brand-title {
    color: var(--accent-amber-hover);
}

.brand-tag {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.nav-links {
    display: none;
    gap: 1.75rem;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a:hover {
    color: var(--accent-amber-hover);
}

.nav-pill-btn {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
}

.nav-pill-btn:hover {
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}

/* ==========================================================================
   HERO / COVER SECTION
   ========================================================================== */

.hero-cover {
    position: relative;
    height: 80vh;
    min-height: 550px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4rem;
    overflow: hidden;
}

.hero-cover-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.05);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(12, 10, 9, 0.45) 50%, transparent 100%);
}

.hero-meta {
    position: relative;
    z-index: 10;
    max-width: 850px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(28, 25, 23, 0.85);
    border: 1px solid rgba(120, 113, 108, 0.3);
    backdrop-filter: blur(8px);
    color: var(--accent-amber);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero-subline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.video-section {
    max-width: 980px;
    width: 100%;
    margin: 0 auto 2rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    background: rgba(28, 25, 23, 0.7);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);
}

.video-copy {
    margin-bottom: 1.5rem;
}

.video-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.75rem);
    line-height: 1.2;
    color: var(--text-primary);
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(120, 113, 108, 0.45);
    background: #000;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ==========================================================================
   LAYOUT CONTAINERS & TYPOGRAPHY
   ========================================================================== */

.page-container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;
}

@media (min-width: 992px) {
    .page-container {
        grid-template-columns: 8fr 4fr;
    }
}

.breadcrumb-trail {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.breadcrumb-trail a:hover {
    color: var(--accent-amber);
}

.editorial-column {
    font-size: 1.125rem;
    line-height: 1.85;
}

.editorial-column p {
    margin-bottom: 1.75rem;
}

.editorial-column h2 {
    font-family: var(--font-serif);
    font-size: 1.95rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.editorial-column h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.quote-prologue {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.4rem;
    color: #e7e5e4;
    border-left: 2px solid var(--accent-amber);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
}

.pillar-section {
    padding-top: 2rem;
    margin-bottom: 3rem;
}

.pillar-heading-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pillar-idx {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--accent-amber);
}

/* ==========================================================================
   MEDIA: FIGURES, CHECKLISTS & VIDEO WRAPPERS
   ========================================================================== */

.editorial-figure {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.editorial-figure img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.editorial-caption {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.video-frame-container {
    margin: 2.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.video-bar {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.responsive-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
}

.responsive-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.checklist-card {
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(28, 25, 23, 0.5);
    border: 1px solid var(--border-color);
    margin: 1.75rem 0;
}

.checklist-title {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-amber);
    margin-bottom: 0.75rem;
}

.checklist-card ul {
    list-style: disc inside;
    font-size: 0.95rem;
    color: var(--text-body);
}

.checklist-card li {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   MONETIZATION & REVENUE MODULES
   ========================================================================== */

.affiliate-zone {
    margin: 3.5rem 0;
    padding: 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-primary) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.affiliate-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-amber);
    margin-bottom: 0.75rem;
}

.affiliate-title {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.affiliate-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.affiliate-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .affiliate-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.affiliate-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.affiliate-card:hover {
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-2px);
}

.affiliate-pill {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-amber);
    margin-bottom: 0.35rem;
}

.affiliate-card-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.affiliate-card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.affiliate-link-prompt {
    font-size: 0.75rem;
    color: var(--accent-amber);
    margin-top: 1rem;
    font-weight: 500;
}

.gear-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gear-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.15rem;
    border-radius: 8px;
    background: rgba(12, 10, 9, 0.6);
    border: 1px solid var(--border-color);
}

.gear-item:hover {
    border-color: var(--text-muted);
}

.support-card {
    margin: 3.5rem 0;
    padding: 2rem;
    text-align: center;
    border-radius: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.btn-primary {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.65rem 1.65rem;
    background-color: var(--accent-amber);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-amber-hover);
}

/* Display Advertisement Blocks */
.ad-slot-wrap {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(28, 25, 23, 0.3);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.ad-slot-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.ad-unit {
    background: rgba(12, 10, 9, 0.6);
    border: 1px dashed var(--border-muted);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ad-fluid {
    width: 100%;
    height: 100px;
}

.ad-300x250 {
    width: 100%;
    height: 250px;
}

.ad-300x600 {
    width: 100%;
    height: 500px;
}

/* ==========================================================================
   SIDEBAR & STAT TABLES
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sticky-panel {
    position: sticky;
    top: 6rem;
}

.sidebar-card {
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(28, 25, 23, 0.4);
    border: 1px solid var(--border-color);
}

.author-thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent-amber);
    margin-bottom: 1rem;
}

.sidebar-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.sidebar-sub {
    font-size: 0.75rem;
    color: var(--accent-amber);
    margin-bottom: 0.75rem;
}

.stat-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.stat-table tr {
    border-bottom: 1px solid var(--border-muted);
}

.stat-table td {
    padding: 0.65rem 0;
}

.stat-table td:last-child {
    text-align: right;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
    }
}

.footer-credits {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.framework-section {
    padding: 5rem 1.5rem;
    background-color: #0d1117;
    color: #e6edf3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.framework-container {
    max-width: 1200px;
    margin: 0 auto;
}

.framework-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.framework-tag {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #58a6ff;
    margin-bottom: 0.75rem;
}

.framework-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    color: #f0f6fc;
}

.framework-subtitle {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #8b949e;
    margin: 0;
}

.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.framework-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.framework-card:hover {
    transform: translateY(-4px);
    border-color: #58a6ff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.card-step {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #8b949e;
    margin-bottom: 0.35rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0 0 0.75rem;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #8b949e;
    margin: 0;
}
/* Tailored Landscape Hero Background */
.hero-valley {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 5rem;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.hero-valley-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    /* Keeps the red sandstone peaks in prime view */
    filter: brightness(0.82) contrast(1.08);
    /* Deepens shadows for text contrast */
}

/* Dual-layer Gradient: Soft dark top for header, dark fade at bottom for content */
.hero-valley-overlay {
    position: absolute;
    inset: 0;
    background:
        /* Top fade for navigation visibility */
        linear-gradient(to bottom, rgba(12, 10, 9, 0.7) 0%, rgba(12, 10, 9, 0.1) 25%, transparent 45%),
        /* Bottom fade to seamlessly dissolve scrubland into page text */
        linear-gradient(to top, #0c0a09 0%, rgba(12, 10, 9, 0.75) 25%, transparent 60%),
        /* Soft center warmth */
        radial-gradient(ellipse at center, rgba(12, 10, 9, 0.2) 0%, rgba(12, 10, 9, 0.55) 100%);
    pointer-events: none;
}