/* Enhanced CSS Design for Scents for Gents */
/* Refined color palette, typography, and breathing bottle animation */

/* ============================================
   ENHANCED COLOR PALETTE
   ============================================ */
:root {
  /* Core palette - refined for sophistication */
  --mist: #e7f0ec;        /* Neutral background - unchanged (good as is) */
  --ink: #0a1a16;         /* Richer, deeper green-black for text */
  --glass: #1d4640;       /* Deeper bottle glass green */
  --juice: #3e8c7d;       /* Richer teal for interactive elements */
  --atomizer: #6d857f;    /* More distinct metallic gray */
  --bergamot: #d4a55b;    /* Warmer, richer gold accent */
  --paper: #f8fdf9;       /* Cleaner, brighter white */
  --line: #a8c0ba;        /* Softer, more natural line color */
  
  /* New accent colors */
  --spice: #b74c3e;       /* Warm spice accent for CTAs/hover states */
  --petrichor: #5a7d7a;   /* Earthy, rain-on-stone color */
  --sillage: rgba(61, 140, 125, 0.08); /* Subtle fragrance trail effect */
  
  /* Typography scale */
  --font-size-xs: 0.7rem;
  --font-size-sm: 0.8rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
}

/* ============================================
   ENHANCED TYPOGRAPHY SYSTEM
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Literata:ital,wght@0,400;0,500;0,600;1,400&family=Syne:wght@600;700;800&display=swap');

/* Base typography reset */
* {
  font-variant-ligatures: common-ligatures;
  font-feature-settings: "kern", "liga", "clig", "calt";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Literata', 'Iowan Old Style', 'Charter', serif;
  font-weight: 400;
  font-size: var(--font-size-lg);
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Display faces */
.wordmark-name,
.featured-copy h1,
.post-header h1 {
  font-family: 'Syne', 'Futura', sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.featured-copy h1 {
  font-size: var(--font-size-5xl);
}

/* Utility/technical text */
.wordmark-kicker,
.site-nav,
.text-link,
.filter-label,
.filter-btn,
.control-btn,
.instruction-text,
.progress-text,
.nav-btn,
.quiz-restart,
.quiz-filter {
  font-family: 'IBM Plex Mono', 'Menlo', 'Monaco', ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Headings */
h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 0;
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

/* ============================================
   BREATHING BOTTLE SIGNATURE ANIMATION
   ============================================ */

/* Breathing bottle container */
.bottle-container {
  position: relative;
  animation: bottleFloat 6s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes bottleFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.002);
  }
}

/* Breathing effect on the bottle body */
.bottle-body {
  position: relative;
  overflow: hidden;
  animation: bottleBreathe 8s ease-in-out infinite;
}

@keyframes bottleBreathe {
  0%, 100% {
    transform: scaleY(1);
    box-shadow: 
      0 0 0 0 rgba(61, 140, 125, 0),
      inset 0 0 0 1px color-mix(in srgb, white 12%, transparent);
  }
  25% {
    transform: scaleY(0.998);
    box-shadow: 
      0 0 20px 2px rgba(61, 140, 125, 0.1),
      inset 0 0 0 1px color-mix(in srgb, white 20%, transparent);
  }
  50% {
    transform: scaleY(1.002);
    box-shadow: 
      0 0 30px 4px rgba(61, 140, 125, 0.15),
      inset 0 0 0 1px color-mix(in srgb, white 12%, transparent);
  }
  75% {
    transform: scaleY(0.998);
    box-shadow: 
      0 0 20px 2px rgba(61, 140, 125, 0.1),
      inset 0 0 0 1px color-mix(in srgb, white 20%, transparent);
  }
}

/* Individual band breathing */
.band {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.band::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  opacity: 0;
  animation: bandShimmer 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bandShimmer {
  0%, 100% {
    opacity: 0;
    transform: translateY(-100%);
  }
  25%, 75% {
    opacity: 0.6;
    transform: translateY(0);
  }
  50% {
    opacity: 0.8;
    transform: translateY(0);
  }
}

/* Delayed animations for each band */
.band-top::before {
  animation-delay: 0.5s;
}

.band-heart::before {
  animation-delay: 1s;
}

.band-base::before {
  animation-delay: 1.5s;
}

/* Interactive states */
.bottle-container:hover {
  animation-play-state: paused;
}

.bottle-container:hover .bottle-body {
  animation: bottleBreatheFast 2s ease-in-out infinite;
}

@keyframes bottleBreatheFast {
  0%, 100% {
    transform: scaleY(1);
    box-shadow: 
      0 0 0 0 rgba(61, 140, 125, 0),
      inset 0 0 0 1px color-mix(in srgb, white 12%, transparent);
  }
  50% {
    transform: scaleY(1.004);
    box-shadow: 
      0 0 40px 8px rgba(61, 140, 125, 0.2),
      inset 0 0 0 1px color-mix(in srgb, white 25%, transparent);
  }
}

/* Scent trail effect on hover */
.bottle-container::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 60%;
  height: 20px;
  background: radial-gradient(
    ellipse at center,
    var(--sillage) 0%,
    transparent 70%
  );
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bottle-container:hover::after {
  opacity: 1;
}

/* ============================================
   ENHANCED INTERACTIVE ELEMENTS
   ============================================ */

/* Refined link styling */
a {
  color: var(--glass);
  text-decoration: none;
  background: linear-gradient(to right, var(--glass), var(--glass)) no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: color 0.3s ease, background-size 0.3s ease;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--spice);
  background-size: 100% 1px;
}

/* Enhanced buttons */
.filter-btn,
.nav-btn,
.quiz-restart,
.quiz-filter,
.control-btn {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn::before,
.nav-btn::before,
.quiz-restart::before,
.quiz-filter::before,
.control-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--juice), var(--bergamot));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.filter-btn:hover::before,
.nav-btn:hover::before,
.quiz-restart:hover::before,
.quiz-filter:hover::before,
.control-btn:hover::before {
  opacity: 0.1;
}

.filter-btn:hover,
.nav-btn:hover,
.quiz-restart:hover,
.quiz-filter:hover,
.control-btn:hover {
  transform: translateY(-2px);
  border-color: var(--juice);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-btn.active {
  background: var(--juice);
  color: var(--paper);
  border-color: var(--juice);
}

/* Enhanced card hover effects */
.collection-card,
.recommendation-card,
.quiz-option {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.collection-card:hover,
.recommendation-card:hover,
.quiz-option:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.04);
}

/* ============================================
   ENHANCED LAYOUT & SPACING
   ============================================ */

/* Improved vertical rhythm */
.shell {
  width: min(100% - 3rem, 48rem);
  margin-inline: auto;
}

.site-header {
  padding: var(--space-2xl) 0 var(--space-xl);
}

.featured {
  padding: var(--space-2xl) 0;
}

.journal,
.prose {
  padding-bottom: var(--space-2xl);
}

.seasonal-collections {
  padding: var(--space-2xl) 0;
  margin: var(--space-2xl) 0;
}

.scent-quiz {
  padding: var(--space-2xl) 0;
  margin: var(--space-2xl) 0;
}

/* Enhanced grid spacing */
.featured-grid {
  gap: var(--space-2xl);
}

.collections-grid {
  gap: var(--space-xl);
}

/* ============================================
   ACCESSIBILITY & REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .bottle-container,
  .bottle-body,
  .band::before,
  .bottle-container::after,
  .filter-btn,
  .nav-btn,
  .quiz-restart,
  .quiz-filter,
  .control-btn,
  .collection-card,
  .recommendation-card,
  .quiz-option {
    animation: none !important;
    transition: none !important;
  }
  
  .bottle-container:hover,
  .filter-btn:hover,
  .nav-btn:hover,
  .quiz-restart:hover,
  .quiz-filter:hover,
  .control-btn:hover,
  .collection-card:hover,
  .recommendation-card:hover,
  .quiz-option:hover {
    transform: none !important;
  }
}

/* Enhanced focus states */
:focus-visible {
  outline: 3px solid var(--bergamot);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 720px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.75rem;
    --font-size-2xl: 1.375rem;
  }
  
  .shell {
    width: min(100% - 2rem, 100%);
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .bottle-container {
    max-width: 12rem;
    margin: 0 auto;
  }
  
  /* Scale down breathing animation on mobile */
  @keyframes bottleFloat {
    0%, 100% {
      transform: translateY(0) scale(1);
    }
    50% {
      transform: translateY(-2px) scale(1.001);
    }
  }
  
  @keyframes bottleBreathe {
    0%, 100% {
      transform: scaleY(1);
      box-shadow: 
        0 0 0 0 rgba(61, 140, 125, 0),
        inset 0 0 0 1px color-mix(in srgb, white 12%, transparent);
    }
    50% {
      transform: scaleY(1.001);
      box-shadow: 
        0 0 15px 2px rgba(61, 140, 125, 0.1),
        inset 0 0 0 1px color-mix(in srgb, white 12%, transparent);
    }
  }
}

/* ============================================
   DARK MODE CONSIDERATIONS
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --mist: #0a1a16;
    --ink: #e7f0ec;
    --glass: #3e8c7d;
    --juice: #5aa8c5;
    --paper: #121a18;
    --line: #2f3f3b;
    --sillage: rgba(94, 200, 178, 0.08);
  }
  
  .bottle-body {
    background: var(--glass);
  }
  
  .band-top {
    background: color-mix(in srgb, var(--juice) 40%, white);
  }
  
  .band-heart {
    background: var(--juice);
  }
  
  .band-base {
    background: var(--glass);
  }
  
  /* Adjust breathing animation colors for dark mode */
  @keyframes bottleBreathe {
    0%, 100% {
      box-shadow: 
        0 0 0 0 rgba(94, 200, 178, 0),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    50% {
      box-shadow: 
        0 0 30px 4px rgba(94, 200, 178, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    }
  }
}