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

/* Psychology Cabinet Design System */
/* 3 Colors: Sage Green, Warm Sand, Deep Terracotta */
/* 2 nuances each for depth and layering */

:root {
  /* Primary: Sage Green - Healing, Growth, Calm */
  --sage-primary: #7A9B7A;
  --sage-light: #A3B8A3;
  --sage-dark: #5A7A5A;
  
  /* Secondary: Warm Sand - Comfort, Safety, Warmth */
  --sand-primary: #E8E0D5;
  --sand-light: #F7F3EE;
  --sand-dark: #D4C9B8;
  
  /* Accent: Deep Terracotta - Grounding, Connection */
  --terracotta-primary: #B87B5C;
  --terracotta-light: #D49A7A;
  --terracotta-dark: #9A5D40;
  
  /* Text Colors derived from palette */
  --text-primary: #3D4A3D;
  --text-secondary: #6B7A6B;
  --text-muted: #9AA89A;
  --text-light: #F7F3EE;
  
  /* Background Colors */
  --bg-primary: var(--sand-light);
  --bg-secondary: var(--sand-primary);
  --bg-accent: var(--sage-primary);
  
  /* Typography - Distinctive, Human */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;
  
  /* Type Scale - Elegant hierarchy */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 4rem;
  
  /* Generous Spacing - Breathing room */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  
  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;
  
  /* Subtle, Organic Shapes */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Soft, Calming Shadows */
  --shadow-sm: 0 2px 8px rgba(61, 74, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(61, 74, 61, 0.08);
  --shadow-lg: 0 16px 48px rgba(61, 74, 61, 0.12);
  
  /* Transitions - Gentle, Unhurried */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Base Styles - Serene Foundation */
html {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Skip Link - WCAG 2.4.1 Bypass Blocks */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: var(--sage-dark);
  color: var(--text-light);
  font-weight: 500;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
  outline: 3px solid var(--terracotta-primary);
  outline-offset: 2px;
}

/* Focus Indicators - WCAG 2.4.7 Focus Visible */
*:focus-visible {
  outline: 3px solid var(--terracotta-primary);
  outline-offset: 2px;
}

/* Remove default focus for elements with custom styling */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Navigation Focus - Enhanced visibility */
nav a:focus-visible {
  outline: 3px solid var(--terracotta-primary);
  outline-offset: 2px;
  background: var(--sand-dark);
}

/* Reduced Motion - WCAG 2.3.3 Animation from Interactions */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Typography - Elegant Hierarchy */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 65ch;
}

p:last-child {
  margin-bottom: 0;
}

/* Navigation - Minimal, Floating */
nav {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  height: var(--nav-height);
  padding: 0 var(--space-sm);
  background: rgba(247, 243, 238, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius-full);
  z-index: 100;
  box-shadow: var(--shadow-md);
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
}

nav a:hover {
  color: var(--text-primary);
  background: var(--sand-dark);
}

nav a.active {
  color: var(--text-light);
  background: var(--sage-primary);
}

/* Main Content - Generous Breathing Room */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-lg) var(--space-3xl);
}

/* Links - Subtle Enhancement */
a {
  color: var(--sage-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

a:hover {
  border-bottom-color: var(--terracotta-primary);
}

/* Special Sections */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-3xl) 0;
}

.hero h1 {
  font-size: var(--text-5xl);
  max-width: 800px;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--sage-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: var(--text-xl);
  max-width: 600px;
  color: var(--text-secondary);
}

/* Services Cards */
.service-item {
  padding: var(--space-xl);
  background: var(--sand-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.service-item:last-child {
  margin-bottom: 0;
}

.service-item h2 {
  color: var(--sage-dark);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

/* Contact Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet: 1024px and below */
@media (max-width: 1024px) {
  :root {
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
  }
  
  main {
    padding: calc(var(--nav-height) + var(--space-xl)) var(--space-md) var(--space-2xl);
  }
  
  .hero-with-photo {
    gap: var(--space-xl);
    min-height: 60vh;
  }
  
  .about-layout {
    gap: var(--space-xl);
  }
  
  .contact-grid {
    gap: var(--space-xl);
  }
}

/* Tablet/Mobile: 768px and below */
@media (max-width: 768px) {
  :root {
    --text-3xl: 1.875rem;
    --text-4xl: 2rem;
    --text-5xl: 2.5rem;
    --space-2xl: 4rem;
    --space-3xl: 5rem;
    --nav-height: 56px;
  }
  
  /* Mobile Navigation - Optimized height */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    height: var(--nav-height);
    border-radius: 0;
    justify-content: space-around;
    padding: 0;
    gap: 0;
    border: none;
    border-bottom: 1px solid var(--sand-dark);
    box-shadow: var(--shadow-sm);
  }
  
  nav a {
    flex: 1;
    text-align: center;
    padding: var(--space-xs) var(--space-xs);
    border-radius: 0;
    font-size: var(--text-sm);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
  }
  
  nav a:hover {
    background: transparent;
    border-bottom-color: var(--sand-dark);
  }
  
  nav a.active {
    border-bottom-color: var(--sage-primary);
    background: transparent;
    color: var(--sage-primary);
  }
  
  /* Adjust main content for optimized nav */
  main {
    padding: calc(var(--nav-height) + var(--space-md)) var(--space-md) var(--space-2xl);
  }
  
  /* Hide logo on mobile or reposition below nav */
  .logo {
    display: none;
  }
  
  /* Hero adjustments */
  .hero {
    min-height: 50vh;
    padding: var(--space-xl) 0;
  }
  
  .hero h1 {
    font-size: var(--text-3xl);
  }
  
  .hero p {
    font-size: var(--text-lg);
  }
  
  /* Layout stacks */
  .hero-with-photo {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    min-height: auto;
  }
  
  .about-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  /* Photo placeholders full width */
  .photo-placeholder {
    max-width: 100%;
  }
  
  .photo-placeholder.portrait {
    max-width: 250px;
    margin: 0 auto;
  }
}

/* Small Mobile: 480px and below */
@media (max-width: 480px) {
  :root {
    --text-2xl: 1.5rem;
    --text-3xl: 1.625rem;
    --text-4xl: 1.875rem;
    --text-5xl: 2rem;
  }
  
  nav {
    height: 60px;
  }
  
  nav a {
    font-size: var(--text-xs);
    padding: var(--space-xs) var(--space-xs);
  }
  
  main {
    padding: 80px var(--space-sm) var(--space-xl);
  }
  
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-xl);
  }
  
  .hero h1 {
    font-size: var(--text-2xl);
  }
  
  .hero p {
    font-size: var(--text-base);
  }
  
  .service-item h2 {
    font-size: var(--text-xl);
  }
}

/* Large Desktop: 1400px and above */
@media (min-width: 1400px) {
  :root {
    --max-width: 1320px;
  }
}

/* Decorative Elements */
.accent-line {
  width: 60px;
  height: 3px;
  background: var(--terracotta-primary);
  border-radius: var(--radius-full);
  margin: var(--space-md) 0 var(--space-lg);
}

/* Section spacing utility */
.section-spaced {
  margin-top: var(--space-xl);
}

@media (max-width: 768px) {
  .section-spaced {
    margin-top: var(--space-lg);
  }
  
  .service-item {
    padding: var(--space-lg);
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--sage-primary);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn:hover {
  background: var(--sage-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Logo - Elegant placement */
.logo {
  position: fixed;
  top: var(--space-md);
  left: var(--space-lg);
  z-index: 101;
}

.logo-link {
  border-bottom: none;
}

.logo-link:hover {
  border-bottom: none;
}

.logo-placeholder {
  width: 120px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sand-light);
  border: 2px dashed var(--sand-dark);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
}

/* Photo Placeholders */
.photo-placeholder {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/3;
  background: var(--sand-primary);
  border: 2px dashed var(--sand-dark);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: var(--space-lg) 0;
}

.photo-placeholder.portrait {
  aspect-ratio: 3/4;
  max-width: 300px;
}

.photo-placeholder.square {
  aspect-ratio: 1/1;
  max-width: 350px;
}

/* Hero with photo */
.hero-with-photo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  min-height: 80vh;
  padding: var(--space-3xl) 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* About page layout */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-3xl);
  align-items: start;
}

.about-photo {
  display: flex;
  justify-content: center;
  padding-top: var(--space-xl);
}

@media (max-width: 768px) {
  .logo {
    left: var(--space-sm);
    top: calc(var(--nav-height) + var(--space-sm));
  }
  
  .logo-placeholder {
    width: 80px;
    height: 40px;
    font-size: var(--text-xs);
  }
  
  .hero-with-photo {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .about-layout {
    grid-template-columns: 1fr;
  }
  
  .photo-placeholder {
    max-width: 100%;
  }
}

/* Footer Styles */
footer {
  background: var(--sage-dark);
  color: var(--text-light);
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.footer-section h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.footer-section p {
  color: var(--sand-primary);
  font-size: var(--text-sm);
  max-width: none;
}

.footer-section a {
  color: var(--sand-light);
  border-bottom-color: transparent;
}

.footer-section a:hover {
  color: var(--text-light);
  border-bottom-color: var(--terracotta-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(247, 243, 238, 0.2);
  text-align: center;
}

.footer-bottom p {
  color: var(--sage-light);
  font-size: var(--text-sm);
  max-width: none;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  footer {
    padding: var(--space-xl) var(--space-md) var(--space-md);
    margin-top: var(--space-2xl);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .footer-bottom {
    margin-top: var(--space-lg);
  }
}
