/*
Theme Name: Down the Rabbit Hole
Theme URI: https://example.com/down-the-rabbit-hole
Author: Mel Leavitt
Author URI: https://example.com
Description: A theme for exploring the depths of the internet.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * The White Rabbit - Global Stylesheet
 * Version 1.0
 *
 * --- TABLE OF CONTENTS ---
 * 1. Font Imports
 * 2. Root Variables (Color Palette & Fonts)
 * 3. Global Resets & Body Styles
 * 4. Typography System
 * 5. Layout & Section Styling
 * 6. Component Styling
 * - Hero Section
 * - Buttons (CTA)
 * - Pricing Table
 * - Footer
 * 7. Responsive Design Adjustments
*/

/* --- 1. Font Imports --- */
/* Importing Lora for authoritative headings and Inter for clean, readable body text. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* --- 2. Root Variables --- */
:root {
    /* Color Palette */
    --color-background-dark: #121212;
    /* A very dark grey, not pure black */
    --color-background-light: #1A1A1A;
    /* A slightly lighter grey for alternating sections */
    --color-text-primary: #E0E0E0;
    /* Off-white for primary text to reduce eye strain */
    --color-text-secondary: #A0A0A0;
    /* A softer grey for sub-text and less important details */
    --color-accent: #00BFFF;
    /* A sharp, clinical "Deep Sky Blue" for CTAs and highlights */
    --color-accent-hover: #009ACD;
    /* A slightly darker blue for hover states */
    --color-border: #333333;
    /* A subtle border color */

    /* Font Families */
    --font-serif: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 6rem 2rem;
    /* Generous vertical padding, standard horizontal padding */
}

/* --- 3. Global Resets & Body Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-background-dark);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    hyphens: auto; /* Enable automatic hyphenation */
}

/* --- 4. Typography System --- */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    overflow-wrap: break-word; /* Prevent overflow from long words */
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    /* Responsive font size */
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
}

p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    max-width: 70ch;
    /* Improves readability */
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-hover);
}


/* --- 5. Layout & Section Styling --- */
.section {
    padding: var(--section-padding);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Alternating background colors for rhythm */
.section:nth-of-type(even) {
    background-color: var(--color-background-light);
}

.three-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    text-align: left;
}

.column {
    padding: 1rem;
}

/* --- 6. Component Styling --- */

/* Hero Section */
.hero {
    position: relative; /* Needed for absolute positioning of children */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80vh;
    padding: 2rem;
    overflow: hidden; /* Hide canvas overflow */
}

#hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Place canvas behind content */
}

.hero-content {
    position: relative;
    z-index: 2; /* Place content above canvas */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* Buttons (CTA) */
.cta-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-background-dark);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    /* Pill shape */
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--color-accent-hover);
    color: var(--color-background-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Pricing Table */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
}

.tier {
    background-color: var(--color-background-dark);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tier:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Center-stage effect for the 'Analyst' tier */
.tier:nth-child(2) {
    transform: scale(1.05);
    border: 1px solid var(--color-accent);
}

.tier .price {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tier .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-secondary);
}

.tier .cta-button {
    margin-top: 1.5rem;
    background-color: var(--color-accent);
}

.tier:nth-child(2) .cta-button {
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
    /* Add a glow to the featured plan's button */
}

/* Footer */
.footer {
    background-color: var(--color-background-light);
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--color-border);
}

.footer p {
    margin: 0 auto;
    color: var(--color-text-secondary);
}

.footer p:first-child {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

/* --- 7. Responsive Design Adjustments --- */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1rem;
    }

    h1, h2, h3 {
        /* On smaller screens, allow words to break to prevent overflow. */
        word-break: break-word;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero {
        min-height: 60vh;
    }

    /* Remove the scaling on mobile for the center tier to prevent layout issues */
    .tier:nth-child(2) {
        transform: scale(1);
    }
}

/* Additional adjustments for very small screens */
@media (max-width: 400px) {
    h1 {
        font-size: 2rem; /* Further reduce font size for the smallest devices */
    }
    h2 {
        font-size: 1.6rem;
    }
}

/* --- 8. Interior Page Template Styles --- */

/* This is the main container for page content. */
.site-main {
    padding: var(--section-padding);
    width: 100%;
}

/* This sets up a clean, readable content area. */
.page-content-area {
    max-width: 800px;
    /* A comfortable width for reading text. */
    margin: 0 auto;
    /* Centers the content area. */
}

/* Styles for the main title of the page. */
.page-header .page-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    /* Large, authoritative title */
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text-primary);
}

/* Styles for the main body content of the page. */
.entry-content p,
.entry-content ul,
.entry-content ol {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    /* Slightly larger for better readability on text-heavy pages */
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: var(--font-serif);
    color: var(--color-text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    color: var(--color-accent-hover);
}

/* --- 9. Scroll-Triggered Animations --- */

/* The initial state of the sections before they are scrolled into view */
.section-hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* The final state of the sections once they become visible */
.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 10. Header and Navigation Menu Styles --- */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--color-background-dark);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-branding .site-title-link {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
}

.main-navigation ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-navigation li {
    margin-left: 2rem;
}

.main-navigation a {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a {
    color: var(--color-text-primary);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item>a::after {
    transform: scaleX(1);
}

/* Responsive adjustments for the menu */
@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        gap: 1rem;
    }

    .main-navigation li {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}