/* 
==================================
  Flex The Bar - Design System
==================================
*/

:root {
  /* DRD Brand Palette: Flex Red, Flex Cream, Deep Brown */
  --color-primary:       #FF5757; /* Flex Red */
  --color-primary-dark:  #CC2222; /* Red Dark */
  --color-primary-light: #FFD6D6; /* Red Light */
  
  --color-accent:        #9C7B6B; /* Muted Warm - Used for secondary highlights instead of cyan */
  
  --color-bg:            #FFF5E9; /* Flex Cream */
  --color-bg-alt:        #F5E6D3; /* Cream Dark (alt backgrounds/dividers) */
  
  --color-text:          #1A0A00; /* Deep Brown (Primary Text) */
  --color-text-muted:    #7A3B1E; /* Warm Brown (Secondary Text) */
  --color-white:         #FFFFFF;
  --color-dark:          #1A0A00; /* Deep Brown for footer */
  
  /* Typography */
  --font-display: 'Fredoka', cursive, Georgia, serif; /* Fallback for One Little Font */
  --font-body:    'DM Sans', Arial, sans-serif;
  
  /* Layout Spacing Scale (4px base) */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;
  --sp-4: 16px;  --sp-5: 20px;  --sp-6: 24px;
  --sp-8: 32px;  --sp-10: 40px; --sp-12: 48px; 
  --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;
  
  /* Border Radius */
  --radius-pill: 100px;
  --radius-card: 20px;
  --radius-input: 12px;
  
  /* Shadows & Transitions */
  --shadow-sm: 0 4px 12px rgba(26, 10, 0, 0.05); /* Tinted with Deep Brown */
  --shadow-hover: 0 12px 32px rgba(255, 87, 87, 0.15); /* Tinted with Flex Red */
  --shadow-nav: 0 2px 16px rgba(255, 87, 87, 0.08);
  
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.25s ease-out;
  
  --max-width: 1200px;
}

/* ==================================
  Reset & Base
================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

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

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

/* Typography Hierarchy */
h1, h2, h3, .font-display {
  font-family: var(--font-display);
  font-weight: 400; /* Pacifico is single weight */
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: var(--sp-4);
}

h1 { font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; color: var(--color-text); font-family: var(--font-body); font-weight: 700;}
h4 { font-family: var(--font-body); font-size: 1.25rem; font-weight: 700; margin-bottom: var(--sp-2); }

p { margin-bottom: var(--sp-4); }

.body-large { font-size: 1.125rem; line-height: 1.75; }
.muted-text { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-primary { color: var(--color-primary); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--sp-3);
}

/* ==================================
  Utilities & Layout
================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container-narrow {
  max-width: 800px;
}

.section-padding {
  padding: var(--sp-20) 0;
}

.bg-cream { background-color: var(--color-bg); }
.bg-alt { background-color: var(--color-bg-alt); }
.bg-primary { background-color: var(--color-primary); }
.bg-dark { background-color: var(--color-dark); }

.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.mb-12 { margin-bottom: var(--sp-12); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-8 { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.w-full { width: 100%; display: block; }
.center-text { text-align: center; }

/* Grids */
.grid {
  display: grid;
  gap: var(--sp-6);
}

.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}


/* ==================================
  Components
================================== */
/* Brand Logo */
.logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
  color: var(--color-primary);
  text-shadow: 2px 2px 0px var(--color-primary-dark);
  line-height: 1;
  position: relative;
  z-index: 10;
}
.logo span {
  font-size: 1.25rem;
  color: var(--color-text);
  text-shadow: none;
  font-family: var(--font-body);
  font-weight: 700;
  display: inline-block;
  transform: translateY(-2px);
}

/* Background Motifs */
.bg-motifs {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.motif {
  position: absolute;
  font-family: var(--font-display);
  color: var(--color-primary);
  opacity: 0.05;
  font-size: 8rem;
  user-select: none;
}
.motif-1 { top: 10%; left: 5%; transform: rotate(-15deg); }
.motif-2 { top: 60%; right: 10%; transform: rotate(20deg); font-size: 12rem;}
.motif-3 { bottom: -5%; left: 20%; transform: rotate(5deg); }
.motif-4 { top: 20%; right: 5%; transform: rotate(-25deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  text-align: center;
}

.btn-large {
  padding: var(--sp-4) var(--sp-8);
  font-size: 1.125rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
}

.hover-invert:hover {
  background-color: var(--color-primary) !important;
  color: var(--color-white) !important;
  border-color: var(--color-white);
}


/* Badges & Tags */
.tag {
  display: inline-block;
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  margin-right: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.badge {
  position: absolute;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 700;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  transform: rotate(12deg);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

/* ==================================
  Navigation
================================== */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: rgba(251, 245, 236, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  transition: box-shadow var(--transition-base);
  height: 80px;
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  box-shadow: var(--shadow-nav);
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-text);
  margin: 0 var(--sp-4);
  position: relative;
  transition: color var(--transition-fast);
}
.nav-links a:hover {
  color: var(--color-primary);
}
.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: width var(--transition-base);
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}
.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  border-radius: 10px;
  transition: all 0.3s linear;
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .hamburger.mobile-only { display: flex; }
}

/* Mobile Drawer */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--color-bg);
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  z-index: 200;
  padding: var(--sp-6);
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.mobile-menu-drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--sp-8);
}

.close-drawer {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  cursor: pointer;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.drawer-link {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-bg-alt);
  padding-bottom: var(--sp-2);
}

.drawer-cta {
  margin-top: var(--sp-6);
  width: 100%;
}


/* ==================================
  Sections
================================== */

/* Hero Section */
.hero-section {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: var(--sp-12) 0 var(--sp-24);
  overflow: hidden;
}

.hero-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-content h1 {
  margin-bottom: var(--sp-4);
}

.hero-subtext {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-8);
  max-width: 500px;
}

.hero-ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.order-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Placeholder for Product image */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-mockup {
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  box-shadow: var(--shadow-hover);
  display: block;
  object-fit: cover;
  position: relative;
}



.floating {
  animation: float 4s ease-in-out infinite;
}

.new-badge {
  top: 20px;
  right: -10px;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

.wave-divider {
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
}

.wave-divider svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}
@media(min-width: 768px) {
  .wave-divider svg { height: 120px; }
}

/* Ticker Section */
.ticker-section {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--sp-3) 0;
  overflow: hidden;
  border-bottom: 2px solid var(--color-primary-dark);
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ticker {
  display: inline-block;
  animation: ticker 30s linear infinite;
}

.ticker:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 var(--sp-6);
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Numbered Features List */
.numbered-features-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.numbered-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  width: 100%;
}

.list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  text-align: left;
}

.number-circle {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-dark);
}

.list-content h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-1);
  color: var(--color-dark);
}

.list-content p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* Circular Badges Row */
.circular-badges-row {
  display: flex;
  justify-content: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  width: 100%;
}

.circle-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 90px;
}

.badge-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-2);
  color: var(--color-dark);
}

.circle-badge span {
  font-size: 0.75rem;
  color: var(--color-dark);
  line-height: 1.2;
  letter-spacing: 0.05em;
}

/* Creative Content Box */
.creative-content-box {
  background: var(--color-bg);
  padding: var(--sp-6);
  border-radius: var(--radius-card);
  border: 2px dashed var(--color-primary-light);
  text-align: left;
}

.creative-content-box h4 {
  color: var(--color-primary-dark);
  font-size: 1.5rem;
  margin-bottom: var(--sp-3);
  font-family: var(--font-display);
}

.creative-content-box p {
  color: var(--color-text);
  line-height: 1.6;
}

.feature-icon {
  width: 32px;
  height: 32px;
}

/* Product Feature Section */
.product-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
}

@media(min-width: 1024px) {
  .product-feature-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.product-feature-image {
  display: flex;
  justify-content: center;
}
.large-mockup {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.hover-lift { transition: transform var(--transition-base); }
.hover-lift:hover { transform: translateY(-8px) scale(1.02); }

.product-feature-content h2 span {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--color-text);
  display: block;
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.nutrition-box {
  background: var(--color-white);
  border: 1px solid var(--color-bg-alt);
  border-radius: var(--radius-card);
  padding: var(--sp-6);
}

.nutrition-table {
  display: flex;
  flex-direction: column;
}

.n-row {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--color-bg-alt);
  font-family: monospace;
  font-size: 1.1rem;
}
.n-row:last-child { border-bottom: none; }

/* Testimonials */
.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-bg-alt);
  padding: var(--sp-8);
  border-radius: var(--radius-card);
  position: relative;
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-primary-light);
  line-height: 1;
  position: absolute;
  top: 10px;
  left: 20px;
  opacity: 0.5;
}

.testimonial-card p {
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: var(--sp-6);
}

.reviewer {
  display: flex;
  flex-direction: column;
}

.stars { color: var(--color-primary); margin-bottom: 4px; }


/* Newsletter Section */
.newsletter-section {
  background-color: var(--color-primary);
  padding: var(--sp-16) 0;
  background-image: radial-gradient(circle at 100% 0%, var(--color-primary-dark) 0%, transparent 60%);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 500px;
  margin: 0 auto;
}

@media(min-width: 600px) {
  .newsletter-form {
    flex-direction: row;
  }
}

.input-field {
  flex-grow: 1;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}
.input-field:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Footer */
.footer {
  padding: var(--sp-16) 0 var(--sp-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: start;
}

@media(min-width: 768px) {
  .footer.text-center .footer-grid {
    text-align: left;
  }
  .footer.text-center .footer-brand {
    align-items: flex-start !important;
  }
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    text-align: left !important;
  }
}

.footer h4 { color: var(--color-primary); font-size: 1.25rem; margin-bottom: var(--sp-4); }

.footer-links, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: center; /* Center links on mobile */
}

@media(min-width: 768px) {
  .footer-links, .footer-contact {
    align-items: flex-start;
  }
}

.footer-links a, .footer-contact a {
  color: var(--color-bg-alt);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}
.footer-links a:hover, .footer-contact a:hover {
  opacity: 1;
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-6);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  width: 90%;
  max-width: 450px;
  border: 2px solid var(--color-primary);
}
.toast p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.toast-close {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
  flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast.hidden {
  display: none !important;
}
