/* ========================================
   MATT BANGS WOOD - MAIN STYLES
   Industrial meets refined aesthetic
   ======================================== */

/* CSS Variables - Theme System */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #242b3d;
    --text-primary: #f5f1eb;
    --text-secondary: #a8a095;
    --text-muted: #6b635e;
    --accent-primary: #ff6b35;
    --accent-secondary: #1B3B5A;
    --accent-wood: #8B5A2B;
    --border-color: #2d3446;
    --shadow: rgba(0, 0, 0, 0.4);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Source Serif 4', Georgia, serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #faf8f5;
    --bg-secondary: #f5f1eb;
    --bg-tertiary: #ebe5dc;
    --text-primary: #2c2825;
    --text-secondary: #5a544f;
    --text-muted: #8b8580;
    --border-color: #d4cfc7;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-base), border-color var(--transition-base);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

/* Add separator before theme toggle */
.nav-link:last-of-type {
    margin-right: 0.5rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   THEME TOGGLE
   ======================================== */

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.mobile-theme-toggle {
    display: none;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

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

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.4;
}

.blueprint-grid {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

.measurement-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg, transparent 49%, var(--accent-primary) 50%, transparent 51%);
    background-size: 200px 100%;
    opacity: 0.1;
}

.hero-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.hero-content {
    animation: slideUp 1s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.title-line {
    display: block;
    opacity: 0;
    animation: slideIn 0.6s ease-out forwards;
}

.title-line:nth-child(1) { animation-delay: 0.1s; }
.title-line:nth-child(2) { animation-delay: 0.2s; }
.title-line:nth-child(3) { animation-delay: 0.3s; }

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: var(--space-lg);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
}

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

.stat-divider {
    color: var(--text-muted);
    font-size: 1.5rem;
    align-self: center;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
}

.btn-primary:hover {
    background: #ff8555;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
}

/* ========================================
   TOOL SHOWCASE (HERO VISUAL)
   ======================================== */

.hero-visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
}

.hero-photo {
    position: relative;
    width: 280px;
    height: 280px;
}

.matt-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.photo-frame {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px solid var(--accent-primary);
    border-radius: 25px;
    opacity: 0.3;
}

.tool-showcase {
    position: relative;
    width: 300px;
    height: 300px;
}

.tool-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.tool-item svg {
    width: 80px;
    height: 80px;
    color: var(--text-primary);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    transition: var(--transition-base);
}

.tool-item:hover svg {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.tool-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tool-hammer {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.tool-saw {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.tool-drill {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.tool-measure {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* ========================================
   SCROLL INDICATOR
   ======================================== */

.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    animation: scrollPulse 2s infinite;
}

/* ========================================
   SECTION STYLES
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--accent-secondary);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   BOOK SECTION
   ======================================== */

.book-section {
    position: relative;
    padding: var(--space-xl) 0;
}

.wood-texture {
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(139, 90, 43, 0.05) 2px,
            rgba(139, 90, 43, 0.05) 4px
        );
}

.book-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
    align-items: center;
}

.book-3d {
    position: relative;
    width: 320px;
    height: 440px;
    perspective: 1000px;
}

.book-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transform: rotateY(-15deg) rotateX(5deg);
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.4),
        inset 2px 0 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease;
    animation: float 6s ease-in-out infinite;
}

.book-cover-image:hover {
    transform: rotateY(-10deg) rotateX(2deg);
}

.book-features {
    display: grid;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-base);
}

.feature-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.feature-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.book-pricing {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.price-tag {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects-section {
    padding: var(--space-xl) 0;
}

/* Video Thumbnails Auto Scroll */
.videos-scroll-wrapper {
    overflow: hidden;
    padding: var(--space-md) 0;
}

.videos-scroll {
    display: flex;
    gap: var(--space-md);
    animation: scrollVideos 30s linear infinite;
}

.videos-scroll:hover {
    animation-play-state: paused;
}

@keyframes scrollVideos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.video-thumb {
    flex-shrink: 0;
    width: 280px;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-base);
}

.video-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.video-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
}

.project-card.featured-video {
    grid-row: span 1;
}

.project-card.featured-video .project-info {
    padding: 1rem;
}

.project-card.featured-video .project-title {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.project-card.featured-video .project-description {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Video Thumbnail Styles */
.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-video:hover .thumbnail-image {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.featured-video:hover .video-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition-base);
}

.play-button:hover {
    transform: scale(1.1);
    background: #ff8555;
}

.play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 3px;
}

.badge-popular {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 0.35rem 0.875rem;
    background: var(--accent-primary);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 4px;
}

.youtube-link {
    color: #ff0000 !important;
}

.youtube-link:hover {
    color: #cc0000 !important;
}

.project-comparison {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.comparison-before,
.comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.comparison-after {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.1s ease;
}

.comparison-label {
    position: absolute;
    top: var(--space-sm);
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    border-radius: 4px;
}

.comparison-before .comparison-label {
    left: var(--space-sm);
}

.comparison-after .comparison-label {
    right: var(--space-sm);
}

.comparison-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.house-outline {
    width: 120px;
    height: 80px;
    opacity: 0.5;
}

.before-house {
    stroke: var(--text-muted);
}

.after-house {
    stroke: var(--accent-primary);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--accent-primary);
    cursor: ew-resize;
    transform: translateX(-50%);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--accent-primary);
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.2s;
}

.slider-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-button svg {
    width: 16px;
    height: 16px;
}

.project-info {
    padding: var(--space-sm);
}

.project-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    line-height: 1.4;
}

.project-stats {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.project-stat {
    display: flex;
    flex-direction: column;
}

.project-stat span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-stat strong {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--accent-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: #ff8555;
}

.project-coming-soon {
    opacity: 0.7;
}

.project-placeholder {
    height: 300px;
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.placeholder-icon svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
}

.placeholder-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.placeholder-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========================================
   TOOLS SECTION
   ======================================== */

.tools-section {
    position: relative;
    padding: var(--space-xl) 0;
}

.grid-pattern {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.3;
}

.tools-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
}

.tools-list {
    display: grid;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.tool-category h4 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    margin-bottom: var(--space-xs);
}

.tool-category ul {
    list-style: none;
}

.tool-category li {
    padding: var(--space-xs) 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: var(--space-md);
}

.tool-category li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-wood);
}

.tools-cta {
    margin-top: var(--space-lg);
}

.cta-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-md);
}

.cta-box h4 {
    font-family: var(--font-display);
    margin-bottom: var(--space-sm);
}

.cta-box ul {
    list-style: none;
    margin-bottom: var(--space-md);
}

.cta-box li {
    padding: var(--space-xs) 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.cta-box li::before {
    content: '✓';
    color: var(--accent-primary);
}

.email-form {
    display: flex;
    gap: var(--space-xs);
}

.email-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.email-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.tools-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tools-showcase-large {
    position: relative;
    width: 300px;
    height: 300px;
}

.tool-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 30s linear infinite;
}

.tool-ring-1 {
    width: 100%;
    height: 100%;
}

.tool-ring-2 {
    width: 70%;
    height: 70%;
    animation-direction: reverse;
}

.tool-ring-3 {
    width: 40%;
    height: 40%;
}

.center-tool {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
}

.center-tool svg {
    width: 100%;
    height: 100%;
    color: var(--accent-primary);
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */

.newsletter-section {
    padding: var(--space-xl) 0;
}

.newsletter-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
}

.newsletter-topics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin: var(--space-md) 0;
}

.topic-tag {
    padding: 0.35rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group {
    display: flex;
    gap: var(--space-xs);
}

.form-group input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.email-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.email-header {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.email-from {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.email-subject {
    font-weight: 600;
    color: var(--text-primary);
}

.email-body {
    padding: var(--space-md);
    font-size: 0.9rem;
}

.email-body p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.email-highlight {
    padding: var(--space-sm);
    background: var(--bg-primary);
    border-left: 3px solid var(--accent-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

/* Family Photo in Newsletter */
.family-photo {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.family-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.photo-caption span {
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.5;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-section {
    padding: var(--space-xl) 0;
}

.center-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* Dad Quote Section */
.dad-quote-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    margin-bottom: var(--space-xl);
}

.dad-photo {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.quote-box {
    position: relative;
    padding: var(--space-xl);
}

.quote-icon {
    width: 60px;
    height: 60px;
    color: var(--accent-primary);
    opacity: 0.3;
    margin-bottom: var(--space-md);
}

.quote-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.quote-author {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* About Stats */
.about-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

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

.about-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.about-philosophy h3 {
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.philosophy-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: 8px;
}

.philosophy-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-wood);
    opacity: 0.5;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.85rem;
    transition: var(--transition-base);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

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

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.footer-brand {
    margin-bottom: var(--space-md);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: var(--space-xs);
    transition: var(--transition-fast);
}

.footer-column a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-built {
    font-family: var(--font-display);
    letter-spacing: 0.05em;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */

.toast {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-base);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.toast-message {
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   MOBILE MENU BUTTON
   ======================================== */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.mobile-menu-btn:hover span {
    background: var(--accent-primary);
}

/* Position mobile theme toggle absolutely in nav */
.mobile-theme-toggle {
    display: none;
}

/* Base mobile menu styles (hidden by default) */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    padding-top: 3.5rem;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav-link {
        padding: var(--space-sm) 0;
        color: var(--text-secondary);
        text-decoration: none;
        font-family: var(--font-display);
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-nav-link:last-child {
        border-bottom: none;
    }

    .mobile-nav-link:hover {
        color: var(--text-primary);
    }

    /* Position theme toggle in top right of mobile menu */
    .mobile-theme-toggle {
        display: flex;
        position: absolute;
        top: var(--space-sm);
        right: var(--space-md);
    }

    /* Hide desktop theme toggle on mobile */
    .nav-links .theme-toggle:not(.mobile-theme-toggle) {
        display: none;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: flex;
        flex-direction: column;
        order: -1;
        margin-bottom: var(--space-md);
    }

    .hero-photo {
        width: 200px;
        height: 200px;
    }

    .tool-showcase {
        width: 250px;
        height: 250px;
    }

    .logo-image {
        width: 32px;
        height: 32px;
    }

    .book-layout,
    .tools-layout,
    .newsletter-layout,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .book-3d {
        margin: 0 auto;
    }

    .tools-showcase-large {
        order: -1;
        margin-bottom: var(--space-md);
    }

    .email-preview,
    .family-photo {
        display: none;
    }

    .dad-quote-section {
        grid-template-columns: 1fr;
    }

    .dad-photo {
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-stats {
        flex-direction: column;
    }

    .stat-divider {
        transform: rotate(90deg);
        height: 30px;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .project-stats {
        flex-direction: column;
    }

    .email-form {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .dad-quote-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dad-photo {
        max-width: 100%;
        margin: 0 auto;
    }

    .quote-text {
        font-size: 1.25rem;
    }

    .about-stats {
        flex-direction: column;
        gap: var(--space-md);
    }
}
