/* --- Main Stylesheet --- */

/* --- Global & Typography --- */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Roboto", sans-serif;
  background-color: #f8fafc; /* bg-slate-50 */
}

.font-roboto {
  font-family: "Roboto", sans-serif;
}

/* General rule for section titles */
.section-title {
  background: linear-gradient(135deg, #15803d 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.5rem;
  font-weight: 300;
}

/* --- Intro Animation --- */
#intro-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100; /* Highest z-index to cover everything */
  background: white;
  transition:
    background 1s ease,
    opacity 1s ease;
}

/* New wrapper for initial content */
#intro-content-wrapper {
  position: fixed;
  top: 20px;
  left: 8px;
  right: 8px; /* Added for responsiveness */
  z-index: 110;
}

#raw-h1 {
  font-family: "Times New Roman", serif;
  font-weight: bold;
  font-size: 2em;
  margin: 0;
  margin-bottom: 10px;
  color: black;
  transition:
    opacity 0.8s ease-out,
    filter 0.8s ease-out;
}

#raw-btn {
  font-family: serif;
  font-size: 13.3333px;
  padding: 1px 6px;
  border-width: 2px;
  border-style: outset;
  border-color: buttonborder;
  background-color: buttonface;
  cursor: pointer;
  transition: opacity 0.5s ease;
  z-index: 110;
}

#intro-container.animating {
  background: #f0fdf4;
}

#modern-h1 {
  position: fixed;
  width: 100%;
  text-align: center;
  font-family: "Roboto", sans-serif !important;
  font-weight: 300;
  font-size: 2.5rem !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin-bottom: 0;
  background: linear-gradient(135deg, #15803d 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  filter: blur(10px);
  transition:
    opacity 0.8s ease-in,
    filter 0.8s ease-in;
}

.aurora-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vw;
  background: radial-gradient(
    circle,
    rgba(74, 222, 128, 0.4) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  border-radius: 50%;
  filter: blur(60px);
  z-index: 10;
  opacity: 0;
  transition: opacity 2s ease;
  animation: pulse-bubble 8s infinite alternate;
}

@keyframes pulse-bubble {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

#text-sequence {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  font-family: "Roboto", sans-serif;
  font-size: 2.5rem;
  font-weight: 300;
  opacity: 0;
  z-index: 110;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #15803d 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Main Content & General Animations --- */
#main-content {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.animate-in {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
.animate-slide-up {
  transform: translateY(20px);
}
.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Navigation Bar --- */
#main-nav {
  padding: 0.75rem 1rem;
  background-color: transparent !important;
  transition: background-color 0.3s ease-in-out;
}

#main-nav.scrolled {
  background-color: transparent !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#nav-content {
  opacity: 0;
  filter: blur(5px);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.03);
  transition:
    opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#nav-content.is-visible {
  opacity: 1;
  filter: blur(0);
}

.nav-link {
  position: relative;
  color: #166534;
  font-weight: 500;
  font-family: "Roboto", sans-serif;
  padding: 2px 10px;
  border-radius: 9999px;
  transition:
    color 0.3s,
    background-color 0.3s ease-out;
}
.nav-link::after {
  content: "";
  position: absolute;
  height: 2px;
  bottom: -4px;
  left: 50%;
  width: 0;
  background-color: #22c55e;
  transition:
    width 0.3s ease-in-out,
    left 0.3s ease-in-out;
  transform-origin: center;
}
.nav-link:hover::after {
  width: 100%;
  left: 0;
}

.nav-link.selected {
  background-color: #dcfce7;
  color: #166534;
}

/* --- Mobile Menu --- */
#mobile-menu {
  position: fixed;
  top: 0;
  right: -100%; /* Start off-screen */
  width: 75%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: right 0.3s ease-in-out;
  z-index: 50; /* Must be above content but below intro */
  /* Vertical fade-out left border */
  border-left: none;
}

#mobile-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(15, 118, 110, 0.35) 20%,
    rgba(15, 118, 110, 0.5) 50%,
    rgba(15, 118, 110, 0.35) 80%,
    transparent 100%
  );
  pointer-events: none;
}

#mobile-menu.open {
  right: 0;
}

/* --- Mobile Menu Close Button --- */
.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 0.75rem;
  color: #0f766e;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  z-index: 51;
}

.mobile-menu-close:hover {
  background: rgba(15, 118, 110, 0.14);
  border-color: rgba(15, 118, 110, 0.2);
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.12);
}

.mobile-menu-close:active {
  transform: rotate(90deg) scale(0.95);
}

.mobile-menu-close svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.25s ease;
}

.mobile-menu-close:hover svg {
  transform: scale(1.1);
}

/* --- Hamburger Menu Circle --- */
#hamburger-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.1);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
  padding: 0;
}

#hamburger-btn:hover {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.18);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.08);
}

#hamburger-btn:active {
  transform: scale(0.95);
}

#hamburger-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Flex centering only on mobile so md:hidden can hide it on desktop */
@media (max-width: 767px) {
  #hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* === Section Fade-Out Dividers === */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(15, 118, 110, 0.12) 15%,
    rgba(15, 118, 110, 0.2) 50%,
    rgba(15, 118, 110, 0.12) 85%,
    transparent 100%
  );
  margin: 0 auto;
}

.section-divider--dense {
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(15, 118, 110, 0.18) 10%,
    rgba(15, 118, 110, 0.3) 50%,
    rgba(15, 118, 110, 0.18) 90%,
    transparent 100%
  );
}
