/*
Theme Name: Ethereal Guardian
Theme URI: https://damngoodinspection.com
Description: Custom WordPress theme for Damngood Inspection based on Fred's Stitch design exports. Features warm cream backgrounds, navy/gold accents, glassmorphism navigation, and people-focused emotional design.
Version: 1.0.0
Author: Damngood Inspection
Author URI: https://damngoodinspection.com
License: Proprietary
Text Domain: ethereal-guardian
Tags: custom, home-inspection, responsive, accessibility-ready

Design System:
- Warm Cream: #fff9ec (backgrounds)
- Navy: #1E3A5F (headers, CTAs)
- Gold: #F7C924 (accents)
- Terracotta: #D4725C (accent)
- Forest Green: #2D5D3F (accent)
- Typography: Inter (400-800 weights)
*/

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

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #1e1c11;
    background-color: #fff9ec;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================
   DESIGN TOKENS
   ========================================== */

:root {
    /* Colors */
    --color-cream: #fff9ec;
    --color-navy: #1E3A5F;
    --color-gold: #F7C924;
    --color-terracotta: #D4725C;
    --color-forest: #2D5D3F;
    --color-text-primary: #1e1c11;
    --color-text-secondary: #4e4632;
    --color-white: #ffffff;
    --color-primary-red: #aa3621;
    --color-primary-light: #ffc4b8;
    
    /* Typography */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(30, 28, 17, 0.08);
    --shadow-md: 0 8px 24px rgba(30, 28, 17, 0.12);
    --shadow-lg: 0 20px 40px rgba(78, 70, 50, 0.06);
    
    /* Container */
    --container-max: 1280px;
    --container-padding: 1.5rem;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 600;
}

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

.lead {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* ==========================================
   LAYOUT CONTAINERS
   ========================================== */

.container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container-wide {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.transparent {
    background: transparent;
}

.site-header.scrolled {
    background: rgba(255, 249, 236, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--container-padding);
    max-width: var(--container-max);
    margin: 0 auto;
}

.site-logo img {
    height: 50px;
    width: auto;
    transition: transform 0.2s ease;
}

.site-logo:hover img {
    transform: scale(1.05);
}

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

.main-nav a {
    font-weight: 500;
    font-size: 1.125rem;
    color: var(--color-navy);
    transition: color 0.2s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.current {
    color: var(--color-gold);
}

.main-nav a:hover::after,
.main-nav a.current::after {
    width: 100%;
}

.cta-button {
    background: var(--color-navy);
    color: var(--color-white);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.cta-button:hover {
    background: var(--color-gold);
    color: var(--color-navy);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: var(--color-navy);
    color: var(--color-white);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 249, 236, 0.98);
        backdrop-filter: blur(20px);
        padding: 2rem;
        box-shadow: var(--shadow-lg);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-cta {
        display: none;
    }
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

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

.hero-text {
    z-index: 10;
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero h1 .emphasis {
    color: var(--color-navy);
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: var(--space-xl);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-gold) 100%);
    color: var(--color-white);
    padding: 1.25rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.125rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(30, 58, 95, 0.2);
}

.btn-secondary {
    color: var(--color-navy);
    padding: 1.25rem 2.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    border: 2px solid var(--color-navy);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

.hero-image {
    position: relative;
    z-index: 5;
}

.hero-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

/* ==========================================
   REVIEW BADGE WIDGET
   ========================================== */

.review-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.review-stars {
    display: flex;
    gap: 0.25rem;
    color: var(--color-gold);
}

.review-stars svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.review-info {
    display: flex;
    flex-direction: column;
}

.review-rating {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-navy);
    line-height: 1;
}

.review-source {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ==========================================
   SOCIAL PROOF TOAST
   ========================================== */

.social-proof-toast {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--color-white);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 360px;
    z-index: 999;
    transform: translateY(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-proof-toast.show {
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toast-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-navy));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--color-white);
}

.toast-text {
    flex: 1;
}

.toast-message {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-navy);
    margin-bottom: 0.25rem;
}

.toast-time {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

@media (max-width: 640px) {
    .social-proof-toast {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

/* ==========================================
   CARD COMPONENTS
   ========================================== */

.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-navy));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.card-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--color-white);
}

.card h3 {
    color: var(--color-navy);
    margin-bottom: var(--space-sm);
}

/* ==========================================
   UTILITIES
   ========================================== */

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

.text-navy {
    color: var(--color-navy);
}

.text-gold {
    color: var(--color-gold);
}

.bg-cream {
    background-color: var(--color-cream);
}

.bg-white {
    background-color: var(--color-white);
}

.bg-navy {
    background-color: var(--color-navy);
}

.mt-auto {
    margin-top: auto;
}

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

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

.site-footer {
    background: var(--color-navy);
    color: rgba(255, 249, 236, 0.9);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(255, 249, 236, 0.8);
}

.footer-contact p {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.footer-contact a {
    color: var(--color-gold);
    transition: opacity 0.2s ease;
}

.footer-contact a:hover {
    opacity: 0.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: var(--color-white);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul a {
    color: rgba(255, 249, 236, 0.8);
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-column ul a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 249, 236, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 249, 236, 0.7);
    margin: 0;
}

.footer-legal {
    font-size: 0.875rem;
    margin: 0;
}

.footer-legal a {
    color: rgba(255, 249, 236, 0.7);
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--color-gold);
}

@media (max-width: 968px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

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

:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
