/* ============================================
   Beanie's Coffee and Cakes — Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

/* --- Navbar --- */
.nav {
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: rgba(253, 248, 246, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
  border-radius: 1px;
}

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

/* Hamburger */
.hamburger-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-line:nth-child(1) { top: 9px; width: 20px; }
.hamburger-line:nth-child(2) { top: 14px; width: 20px; }
.hamburger-line:nth-child(3) { top: 19px; width: 16px; }

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  top: 14px;
  transform: translateX(-50%) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  top: 14px;
  width: 20px;
  transform: translateX(-50%) rotate(-45deg);
}

.mobile-menu {
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-link {
  font-size: 1.25rem;
}

/* --- Hero --- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #5c1f29 0%, #7B2D3B 50%, #932235 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-img.loaded {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(61, 18, 24, 0.55) 0%,
    rgba(92, 31, 41, 0.45) 40%,
    rgba(77, 18, 24, 0.7) 100%
  );
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  padding-top: 80px;
  padding-bottom: 100px;
}

.hero-badge {
  animation: fadeDown 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.3s;
}

.hero-title {
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
  animation-delay: 0.5s;
}

.hero-subtitle {
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
  animation-delay: 0.7s;
}

.hero-ctas {
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
  animation-delay: 0.9s;
}

.hero-stats {
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
  animation-delay: 1.1s;
}

.hero-stat-num {
  animation: countUp 1s ease forwards;
  opacity: 0;
}

.hero-scroll {
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 1.5s;
}

.hero-mouse {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* --- Buttons --- */
.btn-primary {
  background: #7B2D3B;
  color: #FDF8F6;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
  background: #932235;
  transform: translateY(-2px);
}

.btn-secondary {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

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

/* --- Section Shared --- */
.section {
  position: relative;
}

.section-header {
  margin-bottom: 0;
}

.section-eyebrow {
  letter-spacing: 0.12em;
}

.section-title {
  line-height: 1.15;
}

.section-desc {
  line-height: 1.7;
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(123, 45, 59, 0.06);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(123, 45, 59, 0.12);
}

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

.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61, 18, 24, 0.08) 0%, transparent 40%);
  pointer-events: none;
  border-radius: 0.75rem;
}

/* --- About --- */
.about-images {
  position: relative;
}

.about-img-main {
  box-shadow: 0 25px 60px rgba(123, 45, 59, 0.15);
}

.about-img-float {
  box-shadow: 0 15px 40px rgba(123, 45, 59, 0.18);
}

.about-badge {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-feature-num {
  line-height: 1;
}

.about-feature-label {
  line-height: 1.3;
}

/* --- Testimonials --- */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

/* --- CTA Pattern --- */
.cta-pattern {
  background-image: radial-gradient(circle at 25% 25%, rgba(245, 213, 200, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 75% 75%, rgba(244, 151, 163, 0.2) 0%, transparent 50%);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Default state: visible for reduced-motion / no-JS */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Staggered delays --- */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.19s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.33s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* --- Focus styles --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Mobile Menu Background --- */
.mobile-menu {
  background: rgba(253, 248, 246, 0.98);
}

/* --- Subtle decorative elements --- */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 213, 200, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 151, 163, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* --- Selection --- */
::selection {
  background: rgba(123, 45, 59, 0.15);
  color: #5c1f29;
}

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

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

::-webkit-scrollbar-thumb {
  background: #f9c3cc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #f497a3;
}
