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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===== NAV ===== */
.nav {
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.nav.scrolled {
  background: rgba(7, 21, 37, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #a8e6cf;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #fff;
}

/* ===== MOBILE MENU ===== */
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-menu a {
  transition: color 0.3s ease;
}

.mobile-link:hover {
  color: #a8e6cf !important;
}

/* Hamburger animation */
.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 1.375rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
}

.hero-gradient {
  background: linear-gradient(
    145deg,
    #071525 0%,
    #0a1f3f 30%,
    #0d2a4a 50%,
    #0a2540 70%,
    #071525 100%
  );
}

.hero-pattern {
  background-image:
    radial-gradient(ellipse 600px 600px at 20% 50%, rgba(168, 230, 207, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 80% 30%, rgba(125, 212, 176, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 60% 80%, rgba(95, 196, 160, 0.04) 0%, transparent 70%);
}

.hero-float-1 {
  animation: float 8s ease-in-out infinite;
}

.hero-float-2 {
  animation: float 6s ease-in-out infinite 1s;
}

.hero-float-3 {
  animation: float 4s ease-in-out infinite 2s;
}

.hero-float-4 {
  animation: float 5s ease-in-out infinite 0.5s;
}

.hero-float-5 {
  animation: float 7s ease-in-out infinite 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
  opacity: 1;
}

.hero-headline {
  opacity: 1;
}

.hero-subtitle {
  opacity: 1;
}

.hero-eyebrow {
  opacity: 1;
}

.hero-ctas {
  opacity: 1;
}

.hero-scroll {
  opacity: 1;
}

.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* ===== CTA BUTTONS ===== */
.cta-primary {
  box-shadow: 0 0 40px rgba(168, 230, 207, 0.2);
  transition: all 0.3s ease;
}

.cta-primary:hover {
  box-shadow: 0 0 60px rgba(168, 230, 207, 0.35);
  transform: translateY(-2px);
}

.cta-secondary {
  transition: all 0.3s ease;
}

.cta-secondary:hover {
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-state="hidden"] {
  opacity: 0;
  transform: translateY(40px);
}

/* ===== STORY ===== */
.story-img-float {
  animation: float 10s ease-in-out infinite;
}

/* ===== BAKE CARDS ===== */
.bake-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bake-card:hover {
  transform: translateY(-8px);
}

.bake-card-img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== PANTRY ===== */
.pantry-item {
  transition: transform 0.3s ease;
}

.pantry-item:hover {
  transform: translateX(8px);
}

.pantry-img-float {
  animation: float 12s ease-in-out infinite;
}

/* ===== VISIT CARDS ===== */
.visit-card {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.visit-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.04);
}

/* ===== CTA SECTION ===== */
.cta-gradient {
  background: linear-gradient(
    135deg,
    #0d2137 0%,
    #0a2540 40%,
    #0d2a4a 60%,
    #0a1f3f 100%
  );
}

.cta-pattern {
  background-image:
    radial-gradient(ellipse 500px 500px at 30% 50%, rgba(168, 230, 207, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 70% 40%, rgba(125, 212, 176, 0.06) 0%, transparent 70%);
}

/* ===== DIVIDER ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 230, 207, 0.15), transparent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .story-img-float {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: -40px;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
  }

  .story-badge {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 16px;
  }

  .pantry-img-float {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: -40px;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
  }

  .pantry-images {
    order: 0 !important;
  }

  .story-images {
    order: 0 !important;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal[data-state="hidden"] {
    opacity: 1;
    transform: none;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #071525;
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 230, 207, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 230, 207, 0.4);
}
