/* ============================================
   Burnside Bakery — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

/* --- Fixed Geometric Background Shapes --- */
.geo-shapes {
  z-index: 0;
}

.geo-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.geo-circle--1 {
  width: 400px;
  height: 400px;
  background: #7B2D3B;
  top: 15%;
  right: -80px;
  animation: float-slow 20s ease-in-out infinite;
}

.geo-circle--2 {
  width: 250px;
  height: 250px;
  background: #ff8f66;
  bottom: 20%;
  left: -60px;
  animation: float-slow 16s ease-in-out infinite reverse;
}

.geo-triangle {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 104px solid rgba(123, 45, 59, 0.08);
  top: 40%;
  left: 5%;
  transform: rotate(15deg);
  animation: spin-slow 30s linear infinite;
}

.geo-rect {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(255, 143, 102, 0.1);
  border-radius: 16px;
  bottom: 10%;
  right: 10%;
  transform: rotate(45deg);
  animation: float-slow 12s ease-in-out infinite;
}

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

@keyframes spin-slow {
  from { transform: rotate(15deg); }
  to { transform: rotate(375deg); }
}

/* --- Navbar --- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 248, 245, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
  padding-top: 0;
  padding-bottom: 0;
}

.nav-logo-text {
  transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
  color: #7B2D3B;
}

.nav-link {
  position: relative;
}

#navbar:not(.scrolled) .nav-link {
  color: rgba(255, 248, 245, 0.9);
}

#navbar:not(.scrolled) .nav-link:hover {
  color: #ffd0be;
}

#navbar:not(.scrolled) .nav-link::after {
  background: #ffd0be;
}

#navbar:not(.scrolled) .btn-nav {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

#navbar:not(.scrolled) .btn-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Hero --- */
.hero-bg {
  will-change: transform;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(61, 20, 26, 0.82) 0%,
    rgba(123, 45, 59, 0.72) 50%,
    rgba(92, 31, 43, 0.80) 100%
  );
}

.hero-badge {
  animation: fade-in-down 0.8s ease-out both;
}

h1 {
  animation: fade-in-up 0.8s ease-out 0.2s both;
}

h1 span {
  display: inline-block;
}

.hero p {
  animation: fade-in-up 0.8s ease-out 0.4s both;
}

.hero > div > div > div:last-child {
  animation: fade-in-up 0.8s ease-out 0.6s both;
}

.hero > div > div:last-child {
  animation: fade-in-up 0.8s ease-out 0.8s both;
}

.hero-geo {
  animation: float-slow 10s ease-in-out infinite;
}

.hero-geo:nth-child(2) { animation-delay: -3s; animation-duration: 14s; }
.hero-geo:nth-child(3) { animation-delay: -6s; animation-duration: 18s; }

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Section Labels --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #7B2D3B;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, #7B2D3B, #ff8f66);
  border-radius: 2px;
}

/* --- Buttons --- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  backdrop-filter: blur(10px);
}

/* --- About Section --- */
.about-float-card {
  animation: float-slow 6s ease-in-out infinite;
}

/* --- Menu Cards --- */
.menu-card {
  border: 1px solid rgba(123, 45, 59, 0.06);
}

.menu-card:hover {
  border-color: rgba(123, 45, 59, 0.15);
}

.menu-card-img {
  position: relative;
}

.menu-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61, 20, 26, 0.15) 0%, transparent 40%);
  border-radius: inherit;
}

/* --- Gallery --- */
.gallery-item {
  position: relative;
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61, 20, 26, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

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

/* --- Visit Section --- */
.info-card {
  transition: transform 0.3s ease, background 0.3s ease;
}

.info-card:hover {
  transform: translateX(4px);
}

.hours-row:last-child {
  border-bottom: none;
}

/* --- CTA Section --- */
/* Geometric shapes handled via utility */

/* --- Footer --- */
footer a {
  text-decoration: none;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.hamburger-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

#menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  width: 20px;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .geo-circle--1 {
    width: 200px;
    height: 200px;
  }

  .geo-circle--2 {
    width: 120px;
    height: 120px;
  }

  h1 {
    font-size: 2.75rem;
  }

  h1 br {
    display: none;
  }

  .about-float-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1rem;
    display: inline-block;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.25rem;
  }
}
