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

:root {
    --tn-orange: #FF8200;
    --tn-smokey: #58595B;
    --tn-white: #FFFFFF;
    --dark-gray: #2C2C2C;
    --light-gray: #F5F5F5;
    --tree-gradient: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(88,89,91,0.6) 100%);
}

/* Dark mode color variables */
:root[data-theme="dark"] {
    --tn-orange: #FF8200;
    --tn-smokey: #b0b0b0;
    --tn-white: #2d2d2d;
    --dark-gray: #e0e0e0;
    --light-gray: #1a1a1a;
    --tree-gradient: linear-gradient(135deg, rgba(255,130,0,0.2) 0%, rgba(88,89,91,0.3) 100%);
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: var(--light-gray);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
header {
    background: var(--tn-white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 2.7rem; /* 1.5x larger: 1.8rem -> 2.7rem */
    font-weight: bold;
    color: var(--tn-orange);
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Adjusted gap to maintain proportions */
    line-height: 1.2; /* Tighter line spacing when text wraps */
}

.logo-icon {
    width: 48px; /* 2x larger: 24px -> 48px */
    height: 48px; /* 2x larger: 24px -> 48px */
    fill: var(--tn-orange);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--tn-smokey);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--tn-orange);
}

.nav-links a.current {
    color: var(--tn-orange);
    font-weight: bold;
    border-bottom: 2px solid var(--tn-orange);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-left: 1rem;
}

.dark-mode-toggle:hover {
    background-color: rgba(255, 130, 0, 0.1);
    transform: scale(1.05);
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--tn-smokey);
    transition: fill 0.3s ease, transform 0.3s ease;
}

/* Sun icon needs stroke styling for path elements */
.dark-mode-toggle .sun-icon {
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dark-mode-toggle:hover .sun-icon {
    stroke: var(--tn-orange);
}

/* Dark mode styling for sun icon */
:root[data-theme="dark"] .dark-mode-toggle .sun-icon {
    stroke: white;
}

:root[data-theme="dark"] .dark-mode-toggle:hover .sun-icon {
    stroke: var(--tn-orange);
}

.dark-mode-toggle:hover svg {
    fill: var(--tn-orange);
    transform: rotate(15deg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    z-index: 1001;
    position: relative;
}

.hamburger {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--tn-smokey);
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* Hamburger animation when menu is open */
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    transition: right 0.3s ease;
    display: none;
}

.mobile-nav-overlay.active {
    right: 0;
}

.mobile-nav-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: var(--tn-white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    padding: 5rem 0 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav-overlay.active .mobile-nav-menu {
    transform: translateX(0);
}

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-links li {
    margin: 0;
    border-bottom: 1px solid var(--light-gray);
}

.mobile-nav-links a {
    display: block;
    padding: 1.2rem 2rem;
    text-decoration: none;
    color: var(--tn-smokey);
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover {
    background: var(--light-gray);
    color: var(--tn-orange);
    padding-left: 2.5rem;
}

.mobile-nav-links a.current {
    color: var(--tn-orange);
    background: var(--light-gray);
    border-left: 4px solid var(--tn-orange);
}

/* Add transitions to key elements for smooth theme switching */
header, .hero, .philosophy, .four-pillars, .case-study, footer, .pillar-card, .result-item, .quote {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    margin-top: 80px; /* Initial spacing - will be dynamically updated */
}

.hero-background {
    position: absolute;
    top: 0;
    right: -10%;
    width: 60%;
    height: 100%;
    background-image: url('logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 2;
    position: relative;
}

.hero-text {
    max-width: 950px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: bold;
    color: #2C2C2C !important; /* Keep black in both light and dark mode */
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--tn-orange);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-description {
    font-size: 1.2rem;
    color: #58595B !important; /* Keep smokey gray in both light and dark mode */
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-button {
    background: var(--tn-orange);
    color: var(--tn-white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 2rem;
}

.cta-button:hover {
    background: #e67300;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 130, 0, 0.3);
}

/* Philosophy Section */
.philosophy {
    padding: 5rem 0;
    background: var(--tn-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-gray);
    margin-bottom: 3rem;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.philosophy-text h3 {
    font-size: 1.8rem;
    color: var(--tn-orange);
    margin-bottom: 1rem;
}

.philosophy-text p {
    font-size: 1.1rem;
    color: var(--tn-smokey);
    margin-bottom: 1.5rem;
}

.quote {
    background: var(--light-gray);
    padding: 2rem;
    border-left: 4px solid var(--tn-orange);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--dark-gray);
}

/* Four Pillars Section */
.four-pillars {
    padding: 5rem 0;
    background: var(--light-gray);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 1024px) {
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pillar-card {
    background: var(--tn-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-top: 4px solid var(--tn-orange);
    display: flex;
    flex-direction: column;
}

.pillar-card:hover {
    transform: translateY(-5px);
}

.pillar-card h4 {
    font-size: 1.3rem;
    color: var(--tn-orange);
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    min-height: 4.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
}

.pillar-card p {
    color: var(--tn-smokey);
    margin-bottom: 1.5rem;
}

.pillar-card-button {
    background: var(--tn-orange);
    color: var(--tn-white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: auto;
    height: 3rem;
    line-height: 1.2;
}

.pillar-card-button:hover {
    background: #e67300;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 130, 0, 0.3);
}

/* Case Study Section */
.case-study {
    padding: 5rem 0;
    background: var(--tn-white);
}

.case-study-content {
    background: var(--light-gray);
    padding: 3rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.case-study h4 {
    color: var(--tn-orange);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.result-item {
    text-align: center;
    padding: 1rem;
    background: var(--tn-white);
    border-radius: 5px;
}

.result-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Newsletter Section */
.newsletter {
    padding: 4rem 0;
    background: var(--tn-smokey);
    color: var(--tn-white);
    text-align: center;
}

.newsletter-form {
    max-width: 500px;
    margin: 2rem auto 0;
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.newsletter-form button {
    background: var(--tn-orange);
    color: var(--tn-white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

/* Footer */
footer {
    background: var(--dark-gray);
    color: var(--tn-white);
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .pillars-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    /* Mobile Navigation */
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-nav-overlay {
        display: block;
    }
    
    /* Adjust navigation spacing on mobile */
    nav {
        padding: 0 1rem;
    }
    
    /* Ensure mobile menu is above everything */
    .mobile-nav-overlay {
        z-index: 1000;
    }
    
    .mobile-menu-toggle {
        z-index: 1001;
    }
    
    /* Adjust hero padding for mobile */
    .hero-content {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Additional Mobile Breakpoints */
@media (max-width: 480px) {
    /* Extra small mobile devices */
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Smaller mobile menu width */
    .mobile-nav-menu {
        width: 250px;
    }
    
    /* Larger touch targets for mobile */
    .mobile-nav-links a {
        padding: 1.5rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .cta-button {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Better spacing on small screens */
    .philosophy, .four-pillars, .case-study {
        padding: 3rem 0;
    }
    
    .pillar-card {
        padding: 1.5rem;
    }
    
    /* Adjust logo size for very small screens */
    .logo {
        font-size: 2.2rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    /* Tablet/medium screen optimizations */
    .nav-links {
        gap: 1.5rem;
    }
    
    nav {
        padding: 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Better touch targets */
    .pillar-card-button, .cta-button {
        min-height: 48px;
        min-width: 48px;
    }
    
    .dark-mode-toggle, .mobile-menu-toggle {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem;
    }
    
    /* Remove hover effects on touch devices */
    .pillar-card:hover {
        transform: none;
    }
    
    .cta-button:hover {
        transform: none;
        background: var(--tn-orange);
    }
}

/* Landscape phone optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-tagline {
        margin-bottom: 1rem;
    }
    
    .hero-description {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile menu adjustments for landscape */
    .mobile-nav-menu {
        padding: 4rem 0 1rem;
    }
}

/* Smooth Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeIn 1.2s ease forwards;
}

.philosophy {
    animation: fadeIn 1.5s ease forwards;
}