/* ==========================================================================
   Starbucks Calorie Calculator & Macro Builder - Clean Stylesheet (No Icons)
   ========================================================================== */

/* ─── 1. CSS Custom Properties / Design Tokens ─── */
:root {
  --sb-green-dark: #1E3932;
  --sb-green: #00704A;
  --sb-green-light: #00875A;
  --sb-gold: #CBA258;
  --sb-gold-light: #F4E8C1;
  --sb-cream: #F4F1EA;
  --sb-cream-light: #F9F8F6;
  --sb-dark: #111827;
  --sb-gray-dark: #374151;
  --sb-gray: #6B7280;
  --sb-gray-light: #E5E7EB;
  --sb-white: #FFFFFF;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Space Grotesk', var(--font-main);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── 2. Base & Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--sb-cream);
  color: var(--sb-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── 3. Top Announcement Bar ─── */
.top-bar {
  background: var(--sb-green-dark);
  color: var(--sb-white);
  padding: 8px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.badge-tag {
  background: var(--sb-gold);
  color: var(--sb-dark);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── 4. Navbar ─── */
.navbar {
  background: var(--sb-white);
  border-bottom: 1px solid var(--sb-gray-light);
  position: relative; /* Non-sticky natural flow so content doesn't scroll under */
  z-index: 100;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  min-width: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--sb-green-dark);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-name .highlight {
  color: var(--sb-green);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--sb-gray);
  font-weight: 500;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--sb-gray-dark);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--sb-green);
  background: rgba(0, 112, 74, 0.08);
}

/* Mobile & Tablet Responsive Header Layout (No Dropdown Overlay Needed) */
@media (max-width: 900px) {
  .nav-container {
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
  }
  
  .brand-logo {
    justify-content: center;
  }
  
  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-link {
    font-size: 0.82rem;
    padding: 5px 9px;
  }
}

/* ─── 5. Hero Section ─── */
.hero {
  background: linear-gradient(135deg, var(--sb-green-dark) 0%, #152A25 100%);
  color: var(--sb-white);
  padding: 48px 20px 60px;
  position: relative;
}

.hero-container {
  max-width: 1240px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, #FFE082 0%, var(--sb-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 800px;
  margin-bottom: 28px;
}

/* Preset Filters in Hero */
.preset-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--sb-gold);
  margin-right: 4px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--sb-white);
  padding: 8px 18px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.preset-btn:hover {
  background: var(--sb-gold);
  color: var(--sb-dark);
  border-color: var(--sb-gold);
  transform: translateY(-2px);
}

.reset-btn {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.reset-btn:hover {
  background: #EF4444;
  color: var(--sb-white);
  border-color: #EF4444;
}

/* ─── 6. Calculator App Section ─── */
.calculator-section {
  padding: 40px 20px 60px;
  margin-top: -30px;
}

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 992px) {
  .app-container {
    grid-template-columns: 1fr;
  }
}

/* Controls Card (Left Side) */
.controls-card {
  background: var(--sb-white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
}

.card-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--sb-cream);
}

.card-title-bar h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--sb-green-dark);
}

.step-indicator {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sb-green);
  background: rgba(0, 112, 74, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Mode Toggle Buttons */
.mode-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--sb-cream);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.mode-btn {
  background: transparent;
  border: none;
  padding: 10px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--sb-gray-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.mode-btn.active {
  background: var(--sb-green-dark);
  color: var(--sb-white);
  box-shadow: var(--shadow-sm);
}

/* Form Groups */
.form-group {
  margin-bottom: 22px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--sb-dark);
  margin-bottom: 8px;
}

.badge-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sb-green);
  background: rgba(0, 112, 74, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.custom-select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sb-dark);
  background-color: var(--sb-cream-light);
  border: 1.5px solid var(--sb-gray-light);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300704A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select:focus {
  outline: none;
  border-color: var(--sb-green);
  box-shadow: 0 0 0 3px rgba(0, 112, 74, 0.15);
}

/* Cup Size Chips */
.size-selector-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 500px) {
  .size-selector-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.size-chip {
  background: var(--sb-cream-light);
  border: 1.5px solid var(--sb-gray-light);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.size-chip:hover {
  border-color: var(--sb-green);
  background: rgba(0, 112, 74, 0.04);
}

.size-chip.active {
  background: var(--sb-green-dark);
  border-color: var(--sb-green-dark);
  color: var(--sb-white);
  box-shadow: var(--shadow-sm);
}

.size-name {
  font-weight: 700;
  font-size: 0.85rem;
}

.size-oz {
  font-size: 0.72rem;
  opacity: 0.8;
}

/* Ice Buttons */
.ice-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 500px) {
  .ice-buttons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ice-chip {
  background: var(--sb-cream-light);
  border: 1.5px solid var(--sb-gray-light);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sb-dark);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.ice-chip.active {
  background: var(--sb-green);
  color: var(--sb-white);
  border-color: var(--sb-green);
}

/* Stepper Lists (Syrups & Shots) */
.stepper-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--sb-cream-light);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sb-gray-light);
  max-height: 280px;
  overflow-y: auto;
}

.stepper-row, .shot-stepper-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--sb-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--sb-gray-light);
}

.stepper-info {
  display: flex;
  flex-direction: column;
}

.stepper-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--sb-dark);
}

.stepper-sub {
  font-size: 0.75rem;
  color: var(--sb-gray);
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--sb-green);
  background: var(--sb-white);
  color: var(--sb-green);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.step-btn:hover {
  background: var(--sb-green);
  color: var(--sb-white);
}

.step-val {
  font-weight: 800;
  font-size: 1.05rem;
  min-width: 20px;
  text-align: center;
}

/* Checkbox Cards for Toppings */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 500px) {
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--sb-cream-light);
  border: 1.5px solid var(--sb-gray-light);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-card:hover {
  border-color: var(--sb-green);
}

.checkbox-card input[type="checkbox"] {
  accent-color: var(--sb-green);
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.check-label {
  display: flex;
  flex-direction: column;
}

.check-label strong {
  font-size: 0.85rem;
  color: var(--sb-dark);
}

.check-sub {
  font-size: 0.72rem;
  color: var(--sb-gray);
}

/* Food Pairing Box */
.food-pairing-box {
  background: rgba(203, 162, 88, 0.12);
  border: 1.5px dashed var(--sb-gold);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 20px;
}

/* ─── 7. Output Panel (Right Side: FDA Label & Stats) ─── */
.output-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 80px;
}

/* Quick Stats Grid Strip */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.stat-card {
  background: var(--sb-white);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--sb-gray-light);
}

.stat-card.highlight {
  background: var(--sb-green-dark);
  color: var(--sb-white);
  border-color: var(--sb-green-dark);
}

.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sb-green-dark);
  line-height: 1.1;
}

.stat-card.highlight .stat-value {
  color: var(--sb-gold);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sb-gray);
  margin-top: 4px;
  display: block;
}

.stat-card.highlight .stat-label {
  color: rgba(255,255,255,0.8);
}

/* Official FDA Nutrition Label */
.fda-label {
  background: var(--sb-white);
  border: 3px solid #000;
  padding: 16px;
  border-radius: 4px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #000;
  box-shadow: var(--shadow-md);
}

.fda-header h2 {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 2.2rem;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.fda-sub {
  font-weight: 700;
  font-size: 0.95rem;
}

.fda-servings {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.fda-bar {
  background: #000;
}

.fda-bar.thick {
  height: 10px;
  margin: 6px 0;
}

.fda-bar.medium {
  height: 6px;
  margin: 6px 0;
}

.fda-amount-row {
  font-size: 0.8rem;
  font-weight: 700;
  border-bottom: 1px solid #000;
  padding-bottom: 2px;
}

.fda-cal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
}

.fda-cal-label {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 1.8rem;
}

.fda-cal-val {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 2.2rem;
}

.fda-dv-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
  border-bottom: 1px solid #000;
  padding-bottom: 2px;
}

.fda-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 3px 0;
  border-bottom: 1px solid #ccc;
}

.fda-line.sub {
  padding-left: 16px;
  font-size: 0.82rem;
}

.fda-line.highlight-net {
  background: #EFF6FF;
  padding-left: 16px;
  border-left: 3px solid #3B82F6;
}

.caffeine-row {
  background: #FFFBEB;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #FCD34D;
  margin-top: 6px;
}

.fda-footnote {
  font-size: 0.68rem;
  line-height: 1.3;
  margin-top: 8px;
  color: #444;
}

/* Order Script Box */
.order-script-box {
  background: var(--sb-green-dark);
  color: var(--sb-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.script-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--sb-gold);
}

.script-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  display: block;
  margin-bottom: 12px;
}

.script-content {
  background: rgba(0,0,0,0.25);
  border: 1px dashed rgba(255,255,255,0.3);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.92rem;
  color: #A7F3D0;
  margin-bottom: 14px;
  word-break: break-word;
}

.copy-btn {
  width: 100%;
  background: var(--sb-gold);
  color: var(--sb-dark);
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background: #E5B865;
  transform: translateY(-2px);
}

/* ─── 8. SEO Article & Guide Section ─── */
.guide-section {
  padding: 40px 20px 80px;
}

.guide-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.article-card {
  background: var(--sb-white);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
}

.article-card h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--sb-green-dark);
  margin-bottom: 16px;
}

.lead-text {
  font-size: 1.05rem;
  color: var(--sb-gray-dark);
  margin-bottom: 28px;
}

/* Info Grid Cards */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: var(--sb-cream-light);
  border: 1px solid var(--sb-gray-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.info-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sb-green-dark);
  margin-bottom: 6px;
}

.info-card p {
  font-size: 0.88rem;
  color: var(--sb-gray-dark);
}

/* Hack List */
.hack-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.hack-item {
  display: flex;
  gap: 20px;
  background: var(--sb-cream-light);
  border-radius: var(--radius-md);
  padding: 20px;
  border-left: 5px solid var(--sb-green);
}

.hack-badge {
  background: var(--sb-green-dark);
  color: var(--sb-gold);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  height: fit-content;
  white-space: nowrap;
}

.hack-details h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sb-dark);
  margin-bottom: 6px;
}

.hack-details p {
  font-size: 0.92rem;
  color: var(--sb-gray-dark);
  margin-bottom: 10px;
}

.hack-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: var(--sb-white);
  border: 1px solid var(--sb-gray-light);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sb-green);
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  background: var(--sb-cream-light);
  border: 1px solid var(--sb-gray-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--sb-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 0.92rem;
  color: var(--sb-gray-dark);
  line-height: 1.6;
}

/* Disclaimer Card */
.disclaimer-card {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.disclaimer-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 8px;
}

.disclaimer-card p {
  font-size: 0.85rem;
  color: #78350F;
  line-height: 1.6;
}

/* ─── 9. Toast Notification ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--sb-dark);
  color: var(--sb-white);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── 10. Footer ─── */
.footer {
  background: var(--sb-green-dark);
  color: rgba(255,255,255,0.7);
  padding: 32px 20px;
  text-align: center;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--sb-gold);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}
