/* Swamp Labs Website Styles */

/* CSS Custom Properties (Variables) */
:root {
  /* Colors */
  --color-swamp-dark: rgb(35, 76, 42);
  --color-swamp-green: rgb(78, 125, 78);
  --color-mid-green: rgb(119, 169, 110);
  --color-neon-lime: rgb(183, 229, 81);
  --color-off-white: rgb(245, 245, 236);
  --color-charcoal: rgb(10, 45, 26);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --font-size-h1: 3rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  --font-size-body: 1rem;
  --font-size-small: 0.875rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;

  /* Layout */
  --container-max-width: 1200px;
  --container-padding: 2rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.6;
  color: var(--color-charcoal);
  background-color: var(--color-swamp-green);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Typography */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-h1);
  letter-spacing: 0.05ch;
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: 600;
  letter-spacing: 0.03ch;
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: 600;
  letter-spacing: 0.02ch;
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 2;
}

a {
  color: var(--color-neon-lime);
  text-decoration: underline;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--color-mid-green);
  text-decoration-thickness: 2px;
}

a:visited {
  color: var(--color-mid-green);
}

/* Navigation */
.nav {
  position: fixed;
  bottom: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-swamp-dark);
  z-index: 1000;
  padding: 0;
  transition: all var(--transition-normal);
  transform: translateY(0%);
  overflow: hidden;
  min-height: 4rem;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.08);
  filter: url(#noise-texture) blur(0.5px);
  opacity: 0.7;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

.nav.visible {
  transform: translateY(100%);
}

.nav__container {
  position: relative;
  z-index: 2;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo-img {
  height: 3rem;
  margin-top: 0.5rem;
  width: auto;
  filter: drop-shadow(0 0 10px var(--color-swamp-green));
  object-fit: contain;
  object-position: center;
  transform: scale(1.4);
}

.nav__links {
  display: flex;
  gap: var(--spacing-lg);
  position: relative;
  top: 2px;
}

.nav__link {
  color: var(--color-off-white);
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  font-size: var(--font-size-small);
  transition: all var(--transition-fast);
}

.nav__link:hover {
  color: var(--color-neon-lime);
  text-decoration: none;
}

/* Hero Section - Simplified Parallax */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Create a view timeline for this section */
  view-timeline-name: --hero;
  view-timeline-axis: block;
}

.hero__background {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat url('images/swamp-light.jpg');

  will-change: transform;
  animation: heroParallax linear both;
  /* Use the hero's view timeline instead of page scroll */
  animation-timeline: --hero;
  /* Start when the hero enters, end when it exits */
  animation-range: entry 0% exit 100%;
}

.hero__background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(35, 76, 42, 0.7) 0%,
      rgba(78, 125, 78, 0.5) 50%,
      rgba(183, 229, 81, 0.3) 100%);
  z-index: 1;
}

/* Fog Layers */
.hero__fog-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  will-change: transform;
  filter: url(#fog-texture-1);
  background: rgba(245, 245, 236, 0.02);
  mix-blend-mode: overlay;
  opacity: 0.25;
}

.hero__fog-layer--1 {
  filter: url(#fog-texture-1);
  background: rgba(245, 245, 236, 0.04);
  animation: fogDrift1 70s ease-in-out infinite alternate;
}

.hero__fog-layer--2 {
  filter: url(#fog-texture-2);
  background: rgba(245, 245, 236, 0.03);
  animation: fogDrift2 85s ease-in-out infinite alternate;
  animation-delay: -20s;
}

.hero__fog-layer--3 {
  filter: url(#fog-texture-3);
  background: rgba(245, 245, 236, 0.02);
  animation: fogDrift3 60s ease-in-out infinite alternate;
  animation-delay: -40s;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-off-white);
  max-width: 800px;
  padding: 0 var(--spacing-md);
  animation: heroFade linear both;
  animation-timeline: scroll();
  animation-range: 0% 50%;
  padding-top: 40vh;
}

.hero__logo {
  opacity: 1;
  transition: opacity 0.5s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
  max-width: 100%;
}

.hero__logo.hidden {
  opacity: 0;
}

.hero__title,
.hero__subtitle {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.hero__title.visible,
.hero__subtitle.visible {
  opacity: 1;
}

.hero__subtitle {
  letter-spacing: 0.02ch;
}

/* Parallax movement - background moves slower than scroll */
@keyframes heroParallax {
  from {
    transform: translateY(15vh) scale(1.3);
  }

  to {
    transform: translateY(-15vh) scale(1.3);
  }
}

/* Content fades slightly as you scroll */
@keyframes heroFade {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.8;
  }
}

/* Fog Drift Animations */
@keyframes fogDrift1 {
  from {
    transform: translateX(-20%) translateY(10%);
  }
  to {
    transform: translateX(20%) translateY(-5%);
  }
}

@keyframes fogDrift2 {
  from {
    transform: translateX(15%) translateY(15%);
  }
  to {
    transform: translateX(-15%) translateY(-10%);
  }
}

@keyframes fogDrift3 {
  from {
    transform: translateX(-25%) translateY(5%);
  }
  to {
    transform: translateX(25%) translateY(-15%);
  }
}



.hero__title {
  font-size: clamp(2.5rem, 5vw, var(--font-size-h1));
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero__subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero__tagline {
  font-size: var(--font-size-body);
  opacity: 0.9;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* About Section */
.about {
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xxl) 0;
  background-color: var(--color-swamp-dark);
  background-image: 
    radial-gradient(circle at 30% 70%, rgba(183, 229, 81, 0.1) 0%, transparent 50%);
  filter: drop-shadow(0 -3em 3em rgba(0, 0, 0, 0.5));
}

.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.04);
  filter: url(#noise-texture) blur(0.8px);
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

.about__container {
  position: relative;
  z-index: 2;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  min-height: 67vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.about__title {
  text-align: center;
  color: var(--color-off-white);
  margin-bottom: var(--spacing-xl);
}

.about__content {
  display: flex;
  flex-direction: column;
  max-width: 80ch;
  gap: var(--spacing-xl);
  align-items: center;
}

.about__text {
  color: var(--color-off-white);
  opacity: 0.9;
}

.about__text p {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
}

/* Contact Section */
.contact {
  position: relative;
  padding: var(--spacing-xxl) 0;
  overflow: hidden;

  background-color: var(--color-mid-green);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(183, 229, 81, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(35, 76, 42, 0.1) 0%, transparent 50%);
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.04);
  filter: url(#noise-texture) blur(0.8px);
  opacity: 0.45;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 1;
}

.contact__container {
  position: relative;
  z-index: 2;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.contact__title {
  color: var(--color-off-white);
  margin-bottom: var(--spacing-xl);
}

.contact__content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-xl);
  max-width: 1000px;
  margin: 0 auto;
}

.contact__mascot {
  width: 350px;
  height: auto;
  flex-shrink: 0;
  max-width: 100%;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.2));
  margin-left: 6%;
}

.contact__text {
  font-size: 1.25rem;
  color: var(--color-off-white);
  flex: 1;
}

.contact__email {
  color: var(--color-neon-lime);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.contact__email:hover {
  color: var(--color-off-white);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
  pointer-events: none;
}

.footer__text {
  font-size: 0.75rem;
  color: var(--color-charcoal);
  opacity: 0.4;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Responsive Design */

/* Mobile First - Base styles for mobile */
@media (max-width: 639px) {
  :root {
    --container-padding: 1rem;
    --spacing-xxl: 2.5rem;
    --font-size-h1: 2.25rem;
    --font-size-h2: 1.75rem;
  }

  /* Navigation - Keep horizontal layout */
  .nav__container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--container-padding);
  }

  .nav__logo-img {
    height: 3rem;
  }

  .nav__links {
    gap: var(--spacing-md);
    justify-content: flex-end;
  }

  .nav__link {
    font-size: 1rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Hero Section */
  .hero__content {
    padding: 0 var(--spacing-sm);
    padding-top: 35vh;
  }

  .hero__logo {
    width: 300px;
    height: auto;
  }

  .hero__title {
    font-size: clamp(1rem, 8vw, 2rem);
    margin-bottom: var(--spacing-sm);
  }

  .hero__subtitle {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
  }

  /* About Section */
  .about__container {
    padding: var(--spacing-lg) var(--spacing-lg);
    min-height: auto;
  }

  .about__content {
    max-width: 100%;
  }

  .about__text p {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* Contact Section */
  .contact__container {
    padding: var(--spacing-lg) var(--container-padding);
  }

  .contact__content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-lg);
  }

  .contact__mascot {
    width: 300px;
    height: auto;
  }

  .contact__text {
    font-size: 1.1rem;
  }

  /* Reduce animations on mobile for better performance */
  .hero__background {
    animation: none;
  }

  .hero__content {
    animation: none;
  }

  /* Disable fog animations on mobile for performance */
  .hero__fog-layer--1,
  .hero__fog-layer--2,
  .hero__fog-layer--3 {
    animation: none;
    opacity: 0.3;
  }

  /* Footer adjustments for mobile */
  .footer {
    bottom: 0.5rem;
    right: 0.5rem;
  }

  .footer__text {
    font-size: 0.7rem;
    opacity: 0.3;
  }
}

/* Tablet */
@media (min-width: 640px) and (max-width: 1024px) {
  :root {
    --container-padding: 1.5rem;
    --spacing-xxl: 3.5rem;
  }

  /* Navigation - Keep horizontal but optimize */
  .nav__container {
    padding: var(--spacing-sm) var(--container-padding);
  }

  .nav__logo-img {
    height: 3.5rem;
  }

  .nav__links {
    gap: var(--spacing-lg);
  }

  .nav__link {
    font-size: 0.95rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Hero Section */
  .hero__content {
    padding: 0 var(--spacing-md);
    padding-top: 38vh;
  }

  .hero__logo {
    width: 500px;
    height: auto;
  }

  .hero__title {
    font-size: clamp(2rem, 6vw, 2.75rem);
  }

  .hero__subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  /* About Section */
  .about__container {
    padding: var(--spacing-xl) var(--container-padding);
  }

  .about__content {
    max-width: 70ch;
  }

  .about__text p {
    font-size: 1.1rem;
  }

  /* Contact Section */
  .contact__container {
    padding: var(--spacing-xl) var(--container-padding);
  }

  .contact__content {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-xl);
  }

  .contact__mascot {
    width: 300px;
    height: auto;
  }

  .contact__text {
    font-size: 1.2rem;
    text-align: left;
  }
}

/* Desktop - Keep existing styles but ensure they work well */
@media (min-width: 1025px) {
  .nav__link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .hero__logo {
    width: 600px;
    height: auto;
  }

  .contact__mascot {
    width: 350px;
    height: auto;
  }
}

/* Progressive Enhancement - Fallback for older browsers */
@supports not (animation-timeline: auto) {
  .hero__background {
    background-attachment: fixed;
    /* desktop browsers */
    background-position: center;
    animation: none;
  }

  .hero__content {
    animation: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Disable scroll-driven animations for reduced motion */
  .hero__background,
  .hero__content {
    animation: none !important;
  }
}

/* Remove unwanted focus outlines and active states */
a:focus,
a:active,
button:focus,
button:active {
  outline: none;
  box-shadow: none;
}

/* Remove default link styling */
a {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-neon-lime: #FFFF00;
    --color-off-white: #FFFFFF;
  }
}

/* Page Load Animation */
.page-load {
  opacity: 0;
  background-color: var(--color-swamp-green);
  filter: blur(4px);
  transition: none;
}

.loaded {
  animation: fadeIn 1.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .loaded {
    animation: none;
    opacity: 1;
  }
}