/* ==========================================================================
   APPLE-INSPIRED DESIGN SYSTEM - PHASE 1: FOUNDATION
   Warm Earth-Toned Palette | Typography-Driven | Mobile-First
   ========================================================================== */

/* ==========================================================================
   CSS VARIABLE SYSTEM
   ========================================================================== */

:root {
/* ================================================= */
/* COLORS - LIGHT MODE (Theme Park Flow) */
/* ================================================= */

  /* Primary Text: Standard dark color, maintaining contrast */
  --color-text-primary: #1d1d1f;

  /* Secondary Text/Subtle Elements: Lush Grass Green (from background) */
  --color-text-secondary: #689A4C;

  /* Tertiary Text: Muted gray/green */
  --color-text-tertiary: #A5B69C;

  /* Background: Pure White/Clean background (Donald's body) */
  --color-background: #FFFFFF; 

  /* Elevated Backgrounds/Cards: Very slight off-white/light gray */
  --color-background-elevated: #F8F8F8; 

  /* Tertiary Background: Subtle hint of warmth from the building */
  --color-background-tertiary: #F7F5EE;

  /* Border: Subtle contrast */
  --color-border: rgba(0, 0, 0, 0.08);

  /* Accent/Primary Action: Bright Primary Blue (from Donald's hat) */
  --color-accent: #3B60E0;

  /* Accent Hover State */
  --color-accent-hover: #4C72F2;

  /* Secondary Accent/Alert/Warning (Optional - from Donald's bill) */
  --color-secondary-accent: #F7A93F;

  /* ================================================= */
  /* TYPOGRAPHY (NO CHANGE) */
  /* ================================================= */

  /* System font stack for native feel */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", Monaco, Consolas, "Courier New", monospace;

  /* Font Sizes - Apple's scale */
  --font-size-headline: 48px;
  --font-size-title: 28px;
  --font-size-title2: 22px;
  --font-size-title3: 20px;
  --font-size-body: 17px;
  --font-size-callout: 16px;
  --font-size-subhead: 15px;
  --font-size-caption: 13px;
  --font-size-caption2: 11px;

  /* Font Weights */
  --font-weight-light: 200;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ================================================= */
  /* SPACING SYSTEM (8px grid - NO CHANGE) */
  /* ================================================= */

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-xxl: 120px;

  /* Additional spacing for fine control */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ================================================= */
  /* LAYOUT (NO CHANGE) */
  /* ================================================= */

  /* Container max-width: wider than typical for generous whitespace */
  --container-max-width: 1280px;

  /* Section padding */
  --section-padding-vertical: 80px;
  --section-padding-horizontal: 24px;

  /* ================================================= */
  /* EFFECTS (NO CHANGE) */
  /* ================================================= */

  /* Frosted glass blur effect */
  --blur-glass: blur(20px);

  /* Transitions with spring physics */
  --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s;
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s;
  --transition-fast: cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;

  /* Shadows - minimal, subtle */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ================================================= */
/* DARK MODE (Ocean Sunset Flow) */
/* ================================================= */

[data-theme="dark"] {
  /* Primary Text: Soft Gold from the reflection */
  --color-text-primary: #F8DFA7;

  /* Secondary Text/Subtle Elements: Muted blue-gray for contrast */
  --color-text-secondary: #8E9BA8;

  /* Tertiary Text */
  --color-text-tertiary: #5C768D;

  /* Background: Deep Ocean Navy (from the water) */
  --color-background: #14191E;

  /* Elevated Backgrounds/Cards: Slightly Lighter Muted Slate */
  --color-background-elevated: #273440;

  /* Tertiary Background */
  --color-background-tertiary: #1E2730;

  /* Border: Subtle light line for separation */
  --color-border: rgba(248, 223, 167, 0.1); /* Based on the primary text color */

  /* Accent/Primary Action: Rich Sunset Orange/Brown */
  --color-accent: #AA522D;

  /* Accent Hover */
  --color-accent-hover: #C5633C;

  /* Deeper shadows in dark mode (keep as is) */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* System preference detection for auto dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-text-primary: #F8DFA7;
    --color-text-secondary: #8E9BA8;
    --color-text-tertiary: #5C768D;
    --color-background: #14191E;
    --color-background-elevated: #273440;
    --color-background-tertiary: #1E2730;
    --color-border: rgba(248, 223, 167, 0.1);
    --color-accent: #AA522D;
    --color-accent-hover: #C5633C;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  }
}

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

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}

body {
  font-family: var(--font-system);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.47;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

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

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

h1 {
  font-size: var(--font-size-headline);
  font-weight: var(--font-weight-light);
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--font-size-title2);
  font-weight: var(--font-weight-medium);
}

h4 {
  font-size: var(--font-size-title3);
  font-weight: var(--font-weight-medium);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
  line-height: 1.6;
}

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

a:hover {
  opacity: 0.7;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(217, 119, 107, 0.3);
  border-radius: var(--radius-sm);
}

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

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-horizontal);
}

.section {
  padding: var(--section-padding-vertical) 0;
}

/* Card component - minimal, elevated */
.card {
  background-color: var(--color-background-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

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

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

/* Hide on mobile */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Hide on desktop */
@media (min-width: 768px) {
  .hide-desktop {
    display: none !important;
  }
}

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing utilities */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ==========================================================================
   PHASE 2: COMPONENT REDESIGN
   ========================================================================== */

/* ==========================================================================
   BUTTONS - Minimal, Text-Focused
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* Touch-friendly */
  padding: var(--space-3) var(--space-6);
  border: none;
  background: none;
  font-family: var(--font-system);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: opacity var(--transition-fast), transform var(--transition-smooth);
  text-decoration: none;
}

/* Primary button - black text, subtle background on hover */
.btn-primary {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.btn-primary:hover {
  opacity: 0.6;
  background: var(--color-background-elevated);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Secondary button - gray text */
.btn-secondary {
  color: var(--color-text-secondary);
}

.btn-secondary:hover {
  opacity: 0.6;
  background: var(--color-background-elevated);
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* Accent button - uses terracotta accent color */
.btn-accent {
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}

.btn-accent:hover {
  opacity: 0.7;
  background: rgba(217, 119, 107, 0.1);
}

.btn-accent:active {
  transform: scale(0.98);
}

/* Filled button variant - for primary actions */
.btn-filled {
  background: var(--color-accent);
  color: var(--color-background);
}

.btn-filled:hover {
  background: var(--color-accent-hover);
  opacity: 1;
}

.btn-filled:active {
  transform: scale(0.98);
}

/* Text link style button */
.btn-text {
  min-height: auto;
  padding: var(--space-2);
  color: var(--color-accent);
}

.btn-text:hover {
  opacity: 0.7;
  background: none;
}

/* Full width button */
.btn-full {
  width: 100%;
}

/* Large button */
.btn-lg {
  min-height: 52px;
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-title3);
}

/* Small button */
.btn-sm {
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-subhead);
}

/* ==========================================================================
   FORMS - Borderless with Bottom Border
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-6);
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  min-height: 44px; /* Touch-friendly */
  padding: var(--space-3) 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-system);
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast);
  border-radius: 0;
}

textarea {
  min-height: 120px;
  resize: vertical;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: calc(var(--space-3) - 1px); /* Compensate for thicker border */
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-tertiary);
  opacity: 1;
}

/* Variant: Elevated input with background */
.input-elevated {
  background: var(--color-background-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.input-elevated:focus {
  border-color: var(--color-accent);
  padding-bottom: var(--space-3);
}

/* Select styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A9A8B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: var(--space-6);
}

/* Checkbox and radio */
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: auto;
  margin-right: var(--space-2);
  border: 1px solid var(--color-border);
  cursor: pointer;
}

/* Error state */
.input-error {
  border-bottom-color: #D9534F;
}

.error-message {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-caption);
  color: #D9534F;
}

/* Success state */
.input-success {
  border-bottom-color: #5CB85C;
}

/* ==========================================================================
   NAVIGATION - Sticky with Blur
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 252, 245, 0.8); /* Semi-transparent warm background */
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: background var(--transition-smooth), backdrop-filter var(--transition-smooth);
}

[data-theme="dark"] header {
  background: rgba(26, 23, 21, 0.8); /* Dark mode semi-transparent */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) header {
    background: rgba(26, 23, 21, 0.8);
  }
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-horizontal);
  min-height: 68px;
}

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

.nav-logo a {
  font-size: var(--font-size-title2);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--font-size-subhead);
  font-weight: var(--font-weight-regular);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text-primary);
  background: var(--color-background-elevated);
  opacity: 1;
}

.nav-link.active {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

/* Welcome message in nav */
.welcome-msg {
  color: var(--color-text-secondary);
  font-size: var(--font-size-subhead);
  margin-right: var(--space-2);
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 20px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--color-background-elevated);
  color: var(--color-text-primary);
}

/* Mobile hamburger menu */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-primary);
  font-size: 24px;
  transition: background var(--transition-fast);
}

.hamburger:hover {
  background: var(--color-background-elevated);
}

/* Mobile navigation */
@media (max-width: 767px) {
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 252, 245, 0.95);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) 0;
    box-shadow: var(--shadow-md);
  }

  [data-theme="dark"] .nav-links {
    background: rgba(26, 23, 21, 0.95);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nav-links {
      background: rgba(26, 23, 21, 0.95);
    }
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-3) var(--section-padding-horizontal);
    border-radius: 0;
  }

  .welcome-msg {
    padding: var(--space-3) var(--section-padding-horizontal);
    width: 100%;
  }
}

/* ==========================================================================
   GALLERY / GRID - No Borders, Hover Effects
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xs); /* 8px gap as per design */
  margin-top: var(--space-8);
}

@media (max-width: 479px) {
  .gallery-grid {
    grid-template-columns: 1fr; /* 1 column on very small screens */
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on small screens */
  }
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 3+ columns on larger screens */
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Metadata overlay on hover */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  color: white;
  font-size: var(--font-size-subhead);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-1);
}

.gallery-item-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-caption);
}

/* Overlay text - reusable for any page with image overlays */
.overlay-title {
  color: white;
  font-size: var(--font-size-subhead);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
  margin-bottom: var(--space-2);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Placeholder for failed/missing images */
.item-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-background-elevated);
  color: var(--color-text-tertiary);
  font-size: var(--font-size-caption);
  text-align: center;
  padding: var(--space-4);
}

/* ==========================================================================
   MODALS - Frosted Glass Effect
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  display: none !important; /* Force hide by default */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.modal.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background: var(--color-background);
  border: 1px solid var(--color-border); /* Hairline border */
  border-radius: var(--radius-lg);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-12);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s var(--transition-smooth);
  pointer-events: auto; /* Ensure content is clickable */
}

/* Mobile: slide up from bottom */
@media (max-width: 767px) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: slideUpMobile 0.4s var(--transition-smooth);
  }
}

.modal-header {
  margin-bottom: var(--space-6);
}

.modal-title {
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.modal-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-tertiary);
  font-size: 28px;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
  z-index: 10;
  pointer-events: auto; /* Ensure button is clickable */
}

.modal-close:hover {
  background: var(--color-background-elevated);
  color: var(--color-text-primary);
}

.modal-body {
  margin-bottom: var(--space-6);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUpMobile {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ==========================================================================
   ALERTS & MESSAGES
   ========================================================================== */

.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  border-left: 3px solid;
  font-size: var(--font-size-subhead);
}

.alert-success {
  background: rgba(92, 184, 92, 0.1);
  border-color: #5CB85C;
  color: #3D7E3D;
}

[data-theme="dark"] .alert-success {
  background: rgba(92, 184, 92, 0.15);
  color: #7FD47F;
}

.alert-error {
  background: rgba(217, 83, 79, 0.1);
  border-color: #D9534F;
  color: #A94442;
}

[data-theme="dark"] .alert-error {
  background: rgba(217, 83, 79, 0.15);
  color: #F19894;
}

.alert-info {
  background: rgba(217, 119, 107, 0.1);
  border-color: var(--color-accent);
  color: #A0584E;
}

[data-theme="dark"] .alert-info {
  background: rgba(232, 136, 115, 0.15);
  color: #F5B5A8;
}

.alert-warning {
  background: rgba(240, 173, 78, 0.1);
  border-color: #F0AD4E;
  color: #8A6D3B;
}

[data-theme="dark"] .alert-warning {
  background: rgba(240, 173, 78, 0.15);
  color: #FFCC80;
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 252, 245, 0.8);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

[data-theme="dark"] .loading-overlay {
  background: rgba(26, 23, 21, 0.8);
}

/* ================================================= */
/* WHIMSICAL NAV ICONS (Applies to Logout, Links, etc.) */
/* ================================================= */

.logout-form {
    display: inline-block;
    vertical-align: middle;
}

/* Common style for ALL icon buttons in nav */
.nav-icon-btn {
    /* 1. Reset Styles */
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    text-decoration: none; /* Removes underline from links */
    
    /* 2. WHIMSICAL SHAPE */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 8px; /* Spacing between bubbles */
    
    /* 3. COLORS & ALIGNMENT */
    background-color: var(--color-background-elevated); 
    color: var(--color-text-secondary);
    
    /* Center the icon */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    
    /* 4. ANIMATION */
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Hover Effect */
.nav-icon-btn:hover {
    background-color: var(--color-accent);
    color: #ffffff;
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Active State */
.nav-icon-btn:active {
    transform: scale(0.95);
}

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

.footer-images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
  margin-top: var(--space-6);
  justify-content: center; /* or center if you want them centered */
}

.footer-image {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-background-elevated);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  max-width: 140px;
  max-height: 140px;
  margin: 0 auto;
  justify-content: center; 
}

.footer-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 107, 0.15);
}

.footer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  justify-content: center; 
}

/* Mobile: smaller gap, no lift effect */
@media (max-width: 767px) {
  .footer-images-grid {
    gap: var(--space-2);
    grid-template-columns: repeat(4, 1fr); /* Max 4 images on mobile */
  }

  .footer-image:hover {
    transform: none;
  }
}

@media (min-width: 1024px) {
  .footer-image { max-width: 120px; max-height: 120px; }
}
@media (min-width: 1400px) {
  .footer-image { max-width: 100px; max-height: 100px; }
}

/* ==========================================================================
   NOTES
   ========================================================================== */

/*
 * PHASE 1 & 2 COMPLETE
 *
 * Phase 1 - Foundation:
 * ✓ CSS variable system with warm earth-toned palette
 * ✓ Typography scale, spacing system, effects
 * ✓ Dark mode support with system preference detection
 * ✓ Base styles and layout containers
 *
 * Phase 2 - Components:
 * ✓ Minimal, text-focused buttons
 * ✓ Forms with bottom-border styling
 * ✓ Gallery grid with hover effects
 * ✓ Frosted glass modals
 * ✓ Sticky navigation with blur effect
 * ✓ Alert messages and loading states
 *
 * NEXT: Phase 3 - Page-Specific Redesigns
 * - Landing page (hero section)
 * - Form page (textarea, style selector)
 * - Edit/parameters page (progressive disclosure)
 * - Result page (full-screen image, metadata overlay)
 * - Gallery page (masonry grid, search)
 * - Auth pages (minimal forms)
 */
