/* 
  Rocky Mountain Cookie Company - Custom Styles
  Warm, rustic, mountain + German heritage aesthetic
*/

/* Base enhancements */
:root {
  --color-forest: #1E3A2F;
  --color-pine: #2C4A3E;
  --color-bark: #4A3728;
  --color-cream: #F8F1E3;
  --color-warmwhite: #FDF8F0;
  --color-rust: #9C3C2E;
  --color-charcoal: #2D2D2D;
  --color-gold: #C5A46E;
}

/* Smooth everything */
html {
  scroll-behavior: smooth;
}

/* Elegant serif for headings (when Playfair loads) */
.heading-serif {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-feature-settings: "kern" "liga" "tnum";
}

/* Brand logo (transparent PNG) */
.site-logo {
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.site-logo-footer {
  height: 3.75rem;
  width: 3.75rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

/*
  Page-top logo banner — same pattern as Wick & Wonder.
  Sits in document flow under the sticky nav and scrolls away.
*/
.logo-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.5rem 2rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% 40%, rgba(197, 164, 110, 0.14), transparent 65%),
    linear-gradient(180deg, #F8F1E3 0%, #FDF8F0 100%);
  border-bottom: 1px solid #D1C7B8;
  overflow: hidden;
}

.logo-banner img {
  position: relative;
  z-index: 1;
  width: min(72vw, 340px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(30, 58, 47, 0.18));
}

@media (min-width: 768px) {
  .logo-banner {
    padding: 2.25rem 2rem 2.5rem;
  }

  .logo-banner img {
    width: min(50vw, 400px);
  }
}

/* Decorative watermark for hero / dark sections */
.logo-watermark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url('../images/RMCCLLC-Logo-watermark.png');
  opacity: 0.08;
}

.logo-watermark--hero {
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  right: -6%;
  bottom: -8%;
  opacity: 0.14;
  filter: brightness(1.15) drop-shadow(0 0 20px rgba(0, 0, 0, 0.15));
}

.logo-watermark--center {
  width: min(420px, 60vw);
  height: min(420px, 60vw);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.07;
}

/* Soft section watermark — used under each major homepage block for continuity */
.logo-watermark--section {
  width: min(460px, 62vw);
  height: min(460px, 62vw);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.055;
}

.logo-watermark--soft {
  opacity: 0.05;
}

.logo-watermark-host {
  position: relative;
  overflow: hidden;
}

.logo-watermark-host > *:not(.logo-watermark) {
  position: relative;
  z-index: 1;
}

/* Fade-up on scroll (Wick & Wonder style) */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

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

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

.nav-link.active {
  color: #1E3A2F;
}

/* Hero — warm bakery welcome */
.hero-bakery {
  border-bottom: 1px solid #EDE5D5;
}

/* Simple cookie “portraits” for the hero (no stock photos needed) */
.hero-cookie {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  position: relative;
  box-shadow:
    inset 0 -6px 12px rgba(74, 55, 40, 0.12),
    0 6px 14px rgba(74, 55, 40, 0.12);
}

.hero-cookie--classic {
  background:
    radial-gradient(circle at 30% 28%, #F5E6C8 0%, #E8C99A 42%, #D4A574 100%);
}

.hero-cookie--classic::before,
.hero-cookie--classic::after,
.hero-cookie--chocolate::before,
.hero-cookie--chocolate::after,
.hero-cookie--linzer::before {
  content: '';
  position: absolute;
  border-radius: 9999px;
  background: #5C3A21;
  opacity: 0.85;
}

.hero-cookie--classic::before {
  width: 0.55rem;
  height: 0.55rem;
  top: 28%;
  left: 32%;
}

.hero-cookie--classic::after {
  width: 0.4rem;
  height: 0.4rem;
  top: 52%;
  right: 30%;
  background: #6B4423;
}

.hero-cookie--chocolate {
  width: 3.5rem;
  height: 3.5rem;
  background:
    radial-gradient(circle at 35% 30%, #8B5A3C 0%, #5C3A21 55%, #3D2414 100%);
}

.hero-cookie--chocolate::before {
  width: 0.45rem;
  height: 0.45rem;
  top: 30%;
  left: 28%;
  background: #2A1810;
}

.hero-cookie--chocolate::after {
  width: 0.35rem;
  height: 0.35rem;
  bottom: 28%;
  right: 26%;
  background: #1A0F0A;
}

.hero-cookie--linzer {
  width: 3.5rem;
  height: 3.5rem;
  background:
    radial-gradient(circle at 40% 35%, #F0D9B0 0%, #E0C090 50%, #C9A06E 100%);
}

.hero-cookie--linzer::before {
  width: 1.15rem;
  height: 1.15rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #C45C4A 0%, #9C3C2E 70%);
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(253, 248, 240, 0.55);
}

/* Product Cards */
.cookie-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  background-color: white;
}

.cookie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.cookie-card img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-card:hover img {
  transform: scale(1.06);
}

/* Price tiers */
.price-tier {
  font-feature-settings: "tnum";
}

/* Nav cart badge — running subtotal ($), not item count */
#cart-count {
  min-width: 1.75rem;
  height: auto;
  min-height: 1.15rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.625rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  top: -0.2rem;
  right: -0.45rem;
}

/*
  Mobile: floating jump-to-cart on the order page.
  Cart lives in “Your picks” at the bottom — no popup drawer.
*/
.mobile-cart-jump {
  display: none;
  position: fixed;
  z-index: 80;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: #1e3a2f;
  color: #fdf8f0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 28px rgba(30, 58, 47, 0.35);
  border: 1px solid rgba(253, 248, 240, 0.12);
  max-width: calc(100vw - 2rem);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.mobile-cart-jump:active {
  transform: translateX(-50%) scale(0.97);
}

.mobile-cart-jump__label {
  opacity: 0.9;
  font-weight: 500;
}

.mobile-cart-jump__total {
  font-variant-numeric: tabular-nums;
  color: #c5a46e;
}

.mobile-cart-jump__hint {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 1023px) {
  body.page-order .mobile-cart-jump.is-visible:not(.is-at-cart) {
    display: inline-flex;
  }
}

/* Buttons */
.btn-primary {
  background-color: #1E3A2F;
  color: #FDF8F0;
  transition: all 0.2s ease;
}

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

.btn-secondary {
  background-color: transparent;
  color: #1E3A2F;
  border: 1px solid #1E3A2F;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #1E3A2F;
  color: #FDF8F0;
}

.btn-accent {
  background-color: #9C3C2E;
  color: white;
  transition: all 0.2s ease;
}

.btn-accent:hover {
  background-color: #7A2F25;
}

/* Section dividers */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #C5A46E, transparent);
}

/* Form styles */
.form-input {
  background-color: #FDF8F0;
  border: 1px solid #D1C7B8;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #1E3A2F;
  box-shadow: 0 0 0 3px rgba(30, 58, 47, 0.1);
  outline: none;
}

/* Market / Event cards */
.event-card {
  transition: all 0.2s ease;
}

.event-card:hover {
  border-color: #1E3A2F;
}

/* Footer */
.footer-link {
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #C5A46E;
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu.open {
  max-height: 420px;
}

/* Cookie image container */
.cookie-img-container {
  overflow: hidden;
  background: #F8F1E3;
}

/* Trust bar */
.trust-bar {
  background-color: #F8F1E3;
}

/* Subtle German-inspired decorative line */
.decor-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(to right, #9C3C2E, #C5A46E);
}

/* Modal */
.modal {
  animation: modalPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Accessibility */
.focus-visible:focus-visible {
  outline: 2px solid #1E3A2F;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}
