/* DESIGN SYSTEM TOKENS */
:root {
  /* COLORS */
  --color-bg: #F5F1E8; /* Background - Warm Off-white */
  --color-bg: #ffffff;
  --color-text: #292824; /* Dark Text - Charcoal */
  --color-stone: #77736A; /* Stone - Warm Grey */
  --color-red-ochre: #913832; /* Primary - Red Ochre */
  --color-red-ochre-dark: #71352A; /* Deep Ochre - Dark Earth */
  --color-forest-green: #304936; /* Forest Green - Deep Forest */
  --color-grass: #A59A5A; /* Grass - Dry Grass */
  --color-sand: #D8C9AD; /* Sand - Pale Earth */
  --color-water: #526F6B; /* Water accent - Muted Blue */
  
  --color-leaf-green: #66734A;

  /* TYPOGRAPHY */
  --font-heading: var(--gh-font-heading, "DM Serif Display", serif);
  --font-body: var(--gh-font-body, "Source Sans 3", sans-serif);
  --font-logo: "Cinzel", serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --container-max-width: 1200px;
  --article-max-width: 1000px;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--color-red-ochre);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-red-ochre-dark);
}

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

p {
  margin-bottom: var(--space-4);
  text-align: justify;
  hyphens: none;
  -webkit-hyphens: none;
}

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

/* ACCESSIBILITY */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-red-ochre);
  color: white;
  padding: 8px;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* LAYOUT */
/* LAYOUT CONTAINERS 
   .container: Standard content width (max ~1200px)
   .container-wide: Immersive sections (max ~1400px)
   .container-read: Long-form text (max ~68ch)
*/
.site-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.site-main {
  flex-grow: 1;
  padding-top: 50px; /* Compensate for fixed header */
}

/* Home page hero section needs to underlap the transparent header */
.home-template .site-main {
  padding-top: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-read {
  width: 100%;
  max-width: 68ch;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* HEADER */
.site-header {
  background-color: transparent;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-4) 0 var(--space-3) 0;
  transition:
    background-color 0.3s ease,
    backdrop-filter 0.3s ease,
    padding 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-template .site-header:not(.scrolled) {
  padding-top: var(--space-4);
}

.home-template .site-header:not(.scrolled) .site-header-inner {
  background-color: rgba(226, 222, 212, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
}

.site-header.scrolled {
  background-color: rgba(245, 241, 232, 0.95); /* Light Warm Off-white */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(216, 201, 173, 0.5); /* Soft Sand border */
  box-shadow: 0 4px 20px rgba(41, 40, 36, 0.05); /* Subtle charcoal shadow */
  padding: 0.25rem 0;
}

.site-header.scrolled .site-header-inner {
  height: 70px;
}

.site-header.scrolled .site-logo,
.site-header.scrolled .site-nav .nav-list a,
.site-header.scrolled .site-nav .nav-dropdown-toggle,
.site-header.scrolled .header-controls button,
.site-header.scrolled .mobile-menu-toggle {
  color: var(--color-text);
}

.site-header.scrolled .site-nav .nav-list a:hover {
  color: var(--color-red-ochre);
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
  padding: 0 2rem;
}

.site-brand {
  flex-shrink: 0;
  min-width: 120px;
}

.site-logo {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-block;
  transform-origin: left center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-template .site-header:not(.scrolled) .site-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Removed circle background behind the logo */

.site-logo img {
  height: 100px;
  width: auto;
  margin: -30px 0;
  transform: none;
  will-change: height, transform, margin;
  transition: height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), margin 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-template .site-header:not(.scrolled) .site-logo img {
  height: 120px;
  margin: 0;
  transform: translateY(5px);
}

@media (max-width: 768px) {
  .site-logo img {
    height: 70px !important;
    margin: -20px 0 !important;
  }
  .home-template .site-header:not(.scrolled) .site-logo img {
    height: 90px !important;
    margin: 0 !important;
  }
}

.site-nav {
  margin-left: auto;
}

.site-nav .nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-5);
  justify-content: flex-end;
}

.site-nav .nav-list a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s ease;
  padding-bottom: 4px;
  position: relative;
  white-space: nowrap;
}

.case-excerpt-container > *:not(p:first-of-type) {
  display: none;
}

.site-nav .nav-list a:hover {
  color: var(--color-red-ochre);
}

.site-nav .nav-list li.nav-current a {
  color: var(--color-text);
}

/* Trail marker active state */
.site-nav .nav-list li.nav-current > a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-red-ochre);
  border-radius: 2px;
}

/* Desktop Dropdown Styles */
.site-nav .nav-list .has-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.site-nav .nav-list .nav-dropdown-toggle {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0 2px 0 4px;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.site-nav .nav-list .has-dropdown:hover .nav-dropdown-toggle {
  transform: rotate(180deg);
}

.site-nav .nav-list .nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-bg);
  border: 1px solid rgba(216, 201, 173, 0.5); /* Matching header border */
  border-radius: var(--radius-m);
  box-shadow: 0 8px 24px rgba(41, 40, 36, 0.1);
  min-width: 180px;
  list-style: none;
  padding: var(--space-2) 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  pointer-events: none;
}

.site-nav .nav-list .has-dropdown:hover .nav-dropdown-menu,
.site-nav .nav-list .has-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.site-nav .nav-list .nav-dropdown-menu li {
  padding: 0;
  display: block;
}

.site-nav .nav-list .nav-dropdown-menu a {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text);
  font-weight: 400;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav .nav-list .nav-dropdown-menu a::after {
  display: none; /* Hide trail marker in dropdowns */
}

.site-nav .nav-list .nav-dropdown-menu a:hover {
  background: rgba(216, 201, 173, 0.15); /* Soft highlight */
  color: var(--color-red-ochre);
}


/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: var(--space-4);
}

.has-fixed-bg .site-header:not(.scrolled) .site-logo,
.has-fixed-bg .site-header:not(.scrolled) .site-nav .nav-list a,
.has-fixed-bg .site-header:not(.scrolled) .site-nav .nav-dropdown-toggle,
.has-fixed-bg .site-header:not(.scrolled) .header-controls button {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.mobile-menu-toggle {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
}

.audio-toggle {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 1000;
  background: var(--color-forest-green);
  color: var(--color-bg);
  border: 1px solid var(--color-grass);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.audio-toggle:hover {
  transform: scale(1.05);
  background: var(--color-leaf-green);
}

.audio-toggle[data-state="playing"] {
  color: var(--color-red-ochre);
}

.audio-toggle[data-state="playing"] .icon-speaker-muted {
  display: none;
}

.audio-toggle[data-state="playing"] .icon-speaker-playing {
  display: block !important;
}

/* Micro-interaction tooltip/pulse */
.audio-hint-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  background-color: var(--color-red-ochre);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

@keyframes audioHintPulseAnim {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.audio-toggle.hint-active .audio-hint-pulse {
  animation: audioHintPulseAnim 2s infinite ease-out;
}

.header-controls {
  display: none; /* Hidden on desktop */
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: absolute;
  top: 100%; /* Drop down just below the header */
  left: 0;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 84px);
  overflow-y: auto;
  padding: var(--space-5) 0;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  background-color: rgba(48, 73, 54, 0.95); /* Slightly more opaque glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Force mobile nested menus to strictly use .is-open class (overrides Ghost's injected hover/focus behavior) */
.mobile-menu-overlay .nav-item.has-dropdown .nav-dropdown-menu {
  display: none !important;
}
.mobile-menu-overlay .nav-item.has-dropdown.is-open .nav-dropdown-menu {
  display: block !important;
}

.mobile-menu-overlay .nav-list {
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--text-2xl);
}

.mobile-menu-overlay .nav-list a,
.mobile-menu-overlay .nav-list button.nav-dropdown-toggle {
  color: var(--color-bg);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.mobile-menu-overlay.is-open .nav-list a,
.mobile-menu-overlay.is-open .nav-list button.nav-dropdown-toggle {
  opacity: 1;
  transform: translateY(0);
}

/* Add stagger delay for mobile menu items */
.mobile-menu-overlay.is-open .nav-list li:nth-child(1) > * {
  transition-delay: 0.1s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(2) > * {
  transition-delay: 0.15s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(3) > * {
  transition-delay: 0.2s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(4) > * {
  transition-delay: 0.25s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(5) > * {
  transition-delay: 0.3s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(6) > * {
  transition-delay: 0.35s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(7) > * {
  transition-delay: 0.4s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(8) > * {
  transition-delay: 0.45s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(9) > * {
  transition-delay: 0.5s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(10) > * {
  transition-delay: 0.55s;
}
.mobile-menu-overlay.is-open .nav-list li:nth-child(11) > * {
  transition-delay: 0.6s;
}

@media (max-width: 1024px) {
  .site-nav {
    display: none;
  }
  .header-controls {
    display: flex;
  }
  .site-header {
    color: var(--color-text);
  }
  .site-header.is-open,
  .site-header.scrolled {
    color: var(--color-bg);
  }
}

.site-footer {
  background-color: var(--color-forest-green);
  color: var(--color-bg);
  padding: var(--space-4) 0 var(--space-2);
  margin-top: auto;
  font-size: 0.95rem;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.footer-widget h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--color-bg);
  margin-bottom: var(--space-2);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer-widget p {
  color: #b0ac9d;
  text-align: left;
  margin-bottom: 0.5em;
}

.footer-widget a {
  color: #e0dcd0;
  transition: color 0.2s ease;
}

.footer-widget a:hover {
  color: var(--color-grass);
}

.footer-widget .nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
}

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

.social-links a {
  color: #b0ac9d;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--color-grass);
}

.social-links svg {
  width: 20px;
  height: 20px;
  display: block;
}

.site-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-2);
  text-align: center;
  font-size: 0.8rem;
  color: #8c897d;
  font-family: var(--font-body);
}

/* EDITORIAL & SCIENTIFIC STYLING */
.mono {
  font-family: var(--font-body);
  font-size: 0.9em;
  letter-spacing: 0.02em;
}



.editorial-layout {
  max-width: var(--article-max-width);
  margin: 0 auto;
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: var(--container-max-width);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .editorial-grid {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }
}

.case-stats-sidebar {
  background-color: #f0ebd8;
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: inset 0 0 40px rgba(181, 101, 43, 0.03);
  border: 1px solid rgba(181, 101, 43, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stats-grid > hr {
  display: none;
}

.stats-grid > p {
  border-bottom: 1px solid rgba(60, 90, 69, 0.15);
  padding-bottom: var(--space-3);
  margin-bottom: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-stone);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stats-grid > p:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.stats-grid > p strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-forest-green);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-1);
  text-transform: none;
  letter-spacing: normal;
}

.case-sidebar {
  border-left: 1px solid var(--color-sand);
  padding-left: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stat-highlight span.mono {
  display: block;
  font-size: 1.5rem;
  color: var(--color-forest-green);
  margin-bottom: var(--space-1);
  font-weight: 600;
}

.stat-highlight p {
  font-size: 0.9rem;
  color: var(--color-stone);
  line-height: 1.4;
}

/* Asymmetric Grid for Research */
.asymmetric-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}

.asymmetric-grid > article:nth-child(1) {
  grid-column: span 8;
}

.asymmetric-grid > article:nth-child(2) {
  grid-column: span 4;
}

.asymmetric-grid > article:nth-child(3) {
  grid-column: span 12;
}

/* Field Journal Grid for Team (4 per line) */
.field-journal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  justify-content: center;
}

@media (max-width: 1024px) {
  .field-journal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .field-journal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }
}


.editorial-header {
  border-bottom: 2px solid var(--color-sand);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.home-template .editorial-header {
  background: rgba(252, 250, 246, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-4);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid var(--color-sand);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.editorial-header h2 {
  margin-bottom: 0;
}

/* Slider Overlays */
.slide-content-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(
    to right,
    rgba(31, 42, 36, 0.7) 0%,
    rgba(31, 42, 36, 0) 100%
  );
  z-index: 10;
}

.slide-credit {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  z-index: 15;
  background: rgba(31, 42, 36, 0.5);
  padding: 4px 8px;
  border-radius: 2px;
}

/* HERO CROSSFADE */
.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.hero-slider .slide.active {
  opacity: 1;
}


/* ==========================================================================
   FEATURE 4: LIVING PAGE FRAME
   ========================================================================== */
.living-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.frame-corner {
  position: absolute;
  display: flex;
}

.frame-top-left {
  top: -20px;
  left: -20px;
}

.frame-bottom-right {
  bottom: -20px;
  right: -20px;
  flex-direction: row-reverse;
  align-items: flex-end;
}

/* Depth layering */
.leaf-back {
  color: var(--color-leaf-green);
  opacity: 0.85;
  z-index: 1;
}

.fern-front {
  color: var(--color-grass);
  opacity: 0.7;
  z-index: 2;
  margin-left: -100px;
  margin-top: -50px;
}

.flower-accent {
  color: var(--color-red-ochre);
  z-index: 3;
  margin-right: -40px;
  margin-bottom: 20px;
}

/* Hero specific */
.hero-top-border {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--color-grass);
  z-index: 20;
  opacity: 0.8;
}

/* Sway Animations */
@keyframes swayIdle {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(3deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sway {
    transform-origin: top left;
    animation-name: swayIdle;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
  }

  .frame-bottom-right .sway {
    transform-origin: bottom right;
  }

  .sway-slow {
    animation-duration: 12s;
  }
  .sway-medium {
    animation-duration: 8s;
    animation-delay: 1s;
  }
  .sway-fast {
    animation-duration: 6s;
    animation-delay: 2s;
  }
}

/* Simplify on Mobile */
@media (max-width: 768px) {
  .living-frame {
    opacity: 0.4;
  }
  .frame-corner svg {
    transform: scale(0.6);
  }
  .frame-top-left {
    top: -40px;
    left: -40px;
  }
  .frame-bottom-right {
    right: -40px;
  }
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVENESS SITE-WIDE SCALING
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    /* Shrink global spacing proportionately to prevent massive gaps on mobile */
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;
    --space-12: 4rem;
  }
  
  html {
    /* Shrink the base font size by ~12%, scaling down ALL typography, margins, and paddings that use rem units */
    font-size: 15px; 
  }
  
  /* Global max-width enforcement for all primary containers */
  body, main, section, div, img, video, iframe, figure, .container {
    max-width: 100vw;
    box-sizing: border-box;
  }
}
