/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    /* Colors */
    --color-bg: #ffffff;
    --color-text: #2c2c2c; /* Dark charcoal */
    --color-text-muted: rgba(44, 44, 44, 0.7);
    --color-accent-sage: #e9ece4; /* Very light sage green */
    --color-accent-taupe: #efece9; /* Soft muted taupe */
    --color-border: rgba(44, 44, 44, 0.15);
    --color-focus: var(--color-text);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-xxl: 12rem;

    /* Architecture */
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

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

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

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--space-sm);
    color: var(--color-text-muted);
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

/* Accessibility */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 4px;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    text-decoration: none;
}

.btn-small {
    padding: 0.75rem 1.5rem;
}

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

.btn-outline:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--color-bg);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-links a:not(.btn) {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:not(.btn):hover {
    opacity: 0.6;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 10px; /* Min 44x44px touch target */
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 90px;
    background-color: var(--color-accent-sage);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: var(--space-xl) 0;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    padding: var(--space-xxl) 0;
    background-color: var(--color-bg);
}

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.service-card {
    padding: var(--space-lg);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-text);
}

.service-icon {
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

/* ==========================================================================
   The Experience Section
   ========================================================================== */
.experience {
    padding: var(--space-xxl) 0;
    background-color: var(--color-accent-taupe);
}

.split-layout {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.split-image {
    flex: 1;
}

.tall-img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.split-content {
    flex: 1;
    padding: var(--space-lg) 0;
}

.split-content h2 {
    margin-bottom: var(--space-md);
}

.split-content p {
    margin-bottom: var(--space-md);
}

.split-content .btn {
    margin-top: var(--space-sm);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-bg);
    padding: var(--space-lg) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.site-footer p {
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-links {
        gap: var(--space-sm);
    }
    
    .grid-3 {
        gap: var(--space-md);
    }
    
    .split-layout {
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .split-layout {
        flex-direction: column;
    }
    
    .tall-img {
        aspect-ratio: 4/3;
    }
    
    :root {
        --space-xxl: 6rem;
        --space-xl: 4rem;
        --space-lg: 3rem;
    }
}

/* Elm St Digital Return Badge */
.elm-st-return-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: #111827;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 50px;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.elm-st-return-badge:hover {
  background-color: #374151;
  transform: translateY(-2px);
}
