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

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

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(123, 45, 59, 0.15);
  color: #7B2D3B;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #fdf9f3;
}
::-webkit-scrollbar-thumb {
  background: #d9c4c8;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c23356;
}

/* ===== Navigation ===== */
.nav-link {
  position: relative;
}

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

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

#site-header {
  background: rgba(254, 253, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(123, 45, 59, 0.08);
}

#site-header.scrolled {
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.06);
}

/* ===== Mobile Menu ===== */
.mobile-menu-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(254, 253, 251, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: menuSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.mobile-menu-fixed.hidden {
  display: none;
}

.mobile-link {
  display: block;
  text-align: center;
  padding: 0.5rem;
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: #c23356;
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 40px;
}

/* ===== Hero Buttons ===== */
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #7B2D3B;
  color: #fefdfb;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #5c1f2c;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.hero-btn-primary:hover::before {
  transform: translateX(0);
}

.hero-btn-primary span {
  position: relative;
  z-index: 1;
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: #7B2D3B;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(123, 45, 59, 0.3);
  transition: all 0.3s ease;
}

.hero-btn-secondary:hover {
  border-color: #7B2D3B;
  background: rgba(123, 45, 59, 0.04);
}

/* ===== Roast Cards ===== */
.roast-card {
  position: relative;
}

.roast-card:hover {
  background: #fefdfb;
}

.roast-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(123, 45, 59, 0.06);
  pointer-events: none;
  transition: border-color 0.3s ease;
}

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

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

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }

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

/* ===== Scroll to Top ===== */
.scroll-top-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #c23356;
  outline-offset: 2px;
}

/* ===== Form Success ===== */
#form-success {
  animation: fadeInUp 0.4s ease forwards;
}

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

/* ===== Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #fefdfb inset !important;
  -webkit-text-fill-color: #3d141b !important;
  caret-color: #3d141b;
}

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
