/* ============================================
   poppi — Retail Store Website 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;
}

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

::selection {
  background: rgba(230, 176, 63, 0.3);
  color: #102a43;
}

/* --- Header Scroll State --- */
#site-header.scrolled {
  background: rgba(240, 244, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

#site-header.scrolled .font-serif {
  color: #102a43;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
  display: flex;
}

.mobile-link {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
}

/* --- Reveal Animations (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
}

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

/* --- Input Transitions --- */
input, textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(235, 192, 96, 0.15);
}

/* --- Smooth Scroll Offset for Fixed Header --- */
section[id] {
  scroll-margin-top: 80px;
}

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

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

::-webkit-scrollbar-thumb {
  background: #bcccdc;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9fb3c8;
}

/* --- Mobile Menu Animation --- */
#mobile-menu {
  animation: menuSlideIn 0.3s ease forwards;
}

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

/* --- Mobile Menu Close State --- */
#mobile-menu.hidden {
  display: none;
}

/* --- Hamburger Animation --- */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

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

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

/* --- Button Hover Lift --- */
button[type="submit"] {
  position: relative;
  overflow: hidden;
}

button[type="submit"]::after {
  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;
}

button[type="submit"]:hover::after {
  opacity: 1;
}
