/*
Theme Name: Melaleuca Lane
Theme URI: https://melaleucalane.com
Author: Hän Creative Studio
Author URI: https://hancreativestudio.com
Description: A clean, minimalist one-page theme for Melaleuca Lane creative studio featuring story-driven work across multiple creative disciplines.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: melaleuca-lane
*/

/* ========================================
   CSS Reset & Base Styles
======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #fff;
    background-color: #1a1a1a;
    overflow-x: hidden;
}

/* ========================================
   Accessibility & SEO
======================================== */
.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   Image & Link Base
======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* ========================================
   Typography
======================================== */
.site-title {
    font-size: clamp(0.6rem, 1.5vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 1.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-right: -1.2em; /* Compensate for letter-spacing */
}

.tagline {
    font-family: 'Bebas Neue', 'Impact', sans-serif;
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.8em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-right: -0.8em; /* Compensate for letter-spacing */
}

/* ========================================
   Hero Section
======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, 
        #5a7a6a 0%, 
        #6d8f7d 20%,
        #7a9e8a 40%,
        #8aad98 50%,
        #7a9e8a 60%,
        #6d8f7d 80%,
        #5a7a6a 100%
    );
    background-size: 200% 200%;
    overflow: hidden;
}

/* Radial glow effect behind logo */
.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vmin;
    height: 60vmin;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.08) 30%,
        rgba(255, 255, 255, 0.02) 60%,
        transparent 80%
    );
    pointer-events: none;
}

.hero-header {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.hero-logo-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: clamp(280px, 45vmin, 500px);
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.2));
}

/* ========================================
   Glass Logo Effect
======================================== */
.glass-logo-wrapper {
    position: relative;
    width: clamp(300px, 50vmin, 550px);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-logo-base {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Glass highlight overlay - masked to logo shape */
.glass-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.15) 25%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    mix-blend-mode: overlay;
    /* Mask to logo shape using the same image */
    -webkit-mask-image: url('https://melaleucalane.com/wp-content/uploads/2025/12/envato-labs-image-edit-scaled.webp');
    mask-image: url('https://melaleucalane.com/wp-content/uploads/2025/12/envato-labs-image-edit-scaled.webp');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Glass specular - moving reflection point */
.glass-specular {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 15%,
        rgba(255, 255, 255, 0) 35%
    );
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.9;
    transition: background 0.1s ease-out;
    /* Mask to logo shape */
    -webkit-mask-image: url('https://melaleucalane.com/wp-content/uploads/2025/12/envato-labs-image-edit-scaled.webp');
    mask-image: url('https://melaleucalane.com/wp-content/uploads/2025/12/envato-labs-image-edit-scaled.webp');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Glass edge light - rim lighting effect */
.glass-edge-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 10%,
        rgba(255, 255, 255, 0) 90%,
        rgba(255, 255, 255, 0.15) 100%
    );
    pointer-events: none;
    mix-blend-mode: screen;
    transition: background 0.15s ease-out;
    /* Mask to logo shape */
    -webkit-mask-image: url('https://melaleucalane.com/wp-content/uploads/2025/12/envato-labs-image-edit-scaled.webp');
    mask-image: url('https://melaleucalane.com/wp-content/uploads/2025/12/envato-labs-image-edit-scaled.webp');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* ========================================
   Tagline Section (continuation of hero gradient)
======================================== */
.tagline-section {
    position: relative;
    padding: 6rem 2rem;
    background: linear-gradient(180deg, 
        #5a7a6a 0%, 
        #6d8f7d 50%,
        #5a7a6a 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

/* ========================================
   Divisions Section (in Footer)
======================================== */
.divisions-section {
    background-color: #1a1a1a;
    padding: 5rem 2rem;
    text-align: center;
}

.divisions-title {
    margin-bottom: 4rem;
}

.divisions-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.division-item {
    flex: 0 0 auto;
    width: 220px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: transparent;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.division-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.division-logo {
    width: auto;
    height: 80px;
    max-width: 160px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Make logos white */
    transition: filter 0.3s ease;
}

/* Hän Creative - Warm red/coral brand color */
.division-item:nth-child(1):hover {
    background-color: rgba(207, 92, 82, 0.15);
    box-shadow: 0 8px 32px rgba(207, 92, 82, 0.2);
    transform: translateY(-4px);
}

.division-item:nth-child(1):hover .division-logo {
    filter: brightness(0) invert(48%) sepia(79%) saturate(482%) hue-rotate(322deg) brightness(101%) contrast(92%);
}

/* Ian Took This - Warm beige/tan brand color */
.division-item:nth-child(2):hover {
    background-color: #DDD5CA;
    box-shadow: 0 8px 32px rgba(221, 213, 202, 0.4);
    transform: translateY(-4px);
}

.division-item:nth-child(2):hover .division-logo {
    filter: brightness(0) invert(0); /* Dark/black logo */
}

/* Ian H Johnston - Gold/amber brand color */
.division-item:nth-child(3):hover {
    background-color: rgba(212, 175, 85, 0.15);
    box-shadow: 0 8px 32px rgba(212, 175, 85, 0.2);
    transform: translateY(-4px);
}

.division-item:nth-child(3):hover .division-logo {
    filter: brightness(0) invert(72%) sepia(49%) saturate(497%) hue-rotate(7deg) brightness(93%) contrast(86%);
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background-color: #1a1a1a;
}

.footer-bottom {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-credits {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-credits a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-credits a:hover {
    color: #8aad98;
    opacity: 1;
}

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: #8aad98;
    transform: translateY(-2px);
    opacity: 1;
}

/* Icon font fallback styles using text */
.social-icon {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem;
    }
    
    .hero-header {
        top: 1.5rem;
    }
    
    .site-title {
        letter-spacing: 0.6em;
        margin-right: -0.6em;
        font-size: 0.5rem;
    }
    
    .tagline-section {
        padding: 4rem 1.5rem;
        min-height: 40vh;
    }
    
    .divisions-section {
        padding: 3rem 1.5rem;
    }
    
    .divisions-grid {
        gap: 1rem;
    }
    
    .division-item {
        width: 160px;
        height: 140px;
        padding: 1.5rem;
    }
    
    .division-logo {
        height: 60px;
        max-width: 120px;
    }
    
    .footer-bottom {
        padding: 1.5rem;
    }
    
    .social-icons {
        order: -1;
    }
}

@media (max-width: 480px) {
    .site-title {
        letter-spacing: 0.4em;
        margin-right: -0.4em;
    }
    
    .section-title {
        letter-spacing: 0.4em;
        margin-right: -0.4em;
    }
    
    .division-item {
        width: 140px;
        height: 120px;
        padding: 1rem;
    }
    
    .division-logo {
        height: 50px;
        max-width: 100px;
    }
}

/* ========================================
   Utility Classes
======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   WordPress Specific Styles
======================================== */
.wp-block-image {
    margin-bottom: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

/* ========================================
   Animations
======================================== */
.et_animated {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.et_animated.animated-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for division items */
.division-item:nth-child(1) { transition-delay: 0.1s; }
.division-item:nth-child(2) { transition-delay: 0.2s; }
.division-item:nth-child(3) { transition-delay: 0.3s; }

/* Dynamic shadow logo base styles */
.dynamic-shadow-logo {
    transition: filter 0.6s ease-out;
    will-change: filter;
    filter: drop-shadow(0px 5px 15px rgba(0, 0, 0, 0.2)) brightness(1);
    position: relative;
    z-index: 10;
}

/* Body light effect base */
body {
    position: relative;
    transition: background-image 0.6s ease-out !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    transition: background 0.6s ease-out;
    background: radial-gradient(circle 400px at 50% 50%, rgba(255, 245, 220, 0) 0%, rgba(0, 0, 0, 0) 100%);
}
