/* ==========================================================================
   GreenPlate Nutrition - style.css   (loads AFTER Bootstrap 5.3.3)
   Bootstrap gives the grid, navbar, forms, carousel and accordion.
   This file adds the colours, rounded navbar, animations and custom parts.
   Sections: 1 Tokens | 2 Base | 3 Buttons | 4 Navbar | 5 Hero | 6 Cards & Plans
             7 Calculator | 8 Meals | 9 Pricing | 10 Stories | 11 Forms | 12 FAQ
             13 Footer | 14 Floating UI | 15 Animations | 16 Responsive
   ========================================================================== */

/* ---------- 1. THEME TOKENS (edit these to re-brand) ---------- */
:root {
  --leaf: #1f6f4a;
  --leaf-2: #2bb673;
  --leaf-dark: #154d34;
  --beet: #b5174e;
  --butter: #ffd166;
  --sky: #3a8fd9;
  --orange: #f28c28;
  --mint: #eaf5ee;
  --ink: #14261d;
  --muted: #4d6357;
  --card: #ffffff;
  --line: #d6e6dc;
  --shadow: 0 14px 36px rgba(20, 38, 29, .12);
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* wire the tokens into Bootstrap variables */
  --bs-body-font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-bg: #f7fbf8;
  --bs-body-color: var(--ink);
  --bs-primary: var(--leaf);
  --bs-primary-rgb: 31, 111, 74;
  --bs-border-color: var(--line);
  --bs-link-color: var(--leaf);
  --bs-heading-color: var(--ink);
}
[data-bs-theme="dark"] {
  --leaf: #4cc38a;
  --leaf-2: #6ee2a8;
  --leaf-dark: #1d4d37;
  --beet: #ff6b9a;
  --mint: #12251c;
  --ink: #e6f2ea;
  --muted: #a9c2b4;
  --card: #172b21;
  --line: #27412f;
  --shadow: 0 14px 36px rgba(0, 0, 0, .45);
  --bs-body-bg: #0e1b14;
  --bs-body-color: var(--ink);
  --bs-heading-color: var(--ink);
}

/* ---------- 2. BASE ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 100px; overflow-x: hidden; }
body { overflow-x: hidden; }
h1, h2, h3, h4, .display-font { color: var(--ink); font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
section { padding: 5.5rem 0; position: relative; }
.bg-mint { background: var(--mint); }
.bg-rainbow { background: linear-gradient(135deg, rgba(255,209,102,.22), rgba(43,182,115,.16) 45%, rgba(58,143,217,.16)); }
.text-muted-2 { color: var(--muted); }
.sec-eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--beet); background: color-mix(in srgb, var(--beet) 12%, transparent); padding: .3rem .8rem; border-radius: 50rem; margin-bottom: .8rem; }
.sec-title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .5rem; }
.sec-sub { color: var(--muted); max-width: 55ch; font-size: 1.05rem; }
.text-center .sec-sub { margin-inline: auto; }
.grad-text { background: linear-gradient(90deg, var(--beet), var(--orange), var(--leaf-2)); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shine 6s linear infinite; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; }

/* ---------- 3. BUTTONS (Bootstrap .btn + colour classes) ---------- */
.btn { position: relative; overflow: hidden; font-weight: 600; border-radius: 50rem; padding: .75rem 1.7rem; transition: transform .25s, box-shadow .25s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(20, 38, 29, .22); }
.btn-leaf, .btn-beet { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent; --bs-btn-active-border-color: transparent; border: 0; }
.btn-leaf { background: linear-gradient(135deg, var(--leaf), var(--leaf-2)); }
.btn-beet { background: linear-gradient(135deg, var(--beet), #e8457c); }
.btn-leaf:hover, .btn-beet:hover { filter: brightness(1.08); }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); transform: scale(0); animation: ripple .6s linear; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-grid; place-items: center; transition: transform .3s, background .3s; }
.icon-btn:hover { transform: rotate(18deg) scale(1.08); background: var(--mint); color: var(--ink); box-shadow: none; }

/* ---------- 4. NAVBAR: Bootstrap navbar styled as a floating rounded pill ---------- */
.site-header { position: fixed; top: 14px; left: 0; right: 0; z-index: 1030; padding-inline: clamp(14px, 4vw, 48px); pointer-events: none; }
.site-nav {
  pointer-events: auto; max-width: 1180px; margin-inline: auto; padding: .5rem .6rem .5rem 1.4rem;
  border-radius: 50rem; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 8px 28px rgba(20, 38, 29, .1); transition: box-shadow .3s;
}
.site-nav.scrolled { box-shadow: 0 14px 40px rgba(20, 38, 29, .2); }
.site-nav .navbar-brand { font: 800 1.45rem var(--font-head); color: var(--leaf); display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: 0; }
.site-nav .navbar-nav { gap: .3rem; }
.site-nav .nav-link { font-weight: 500; font-size: .96rem; padding: .5rem 1.05rem; border-radius: 50rem; color: var(--ink); text-decoration: none; transition: background .25s, color .25s, transform .25s; }
.site-nav .nav-link:hover { background: var(--mint); color: var(--leaf); transform: translateY(-1px); }
.site-nav .nav-link.active { background: linear-gradient(135deg, var(--leaf), var(--leaf-2)); color: #fff; box-shadow: 0 6px 16px rgba(31, 111, 74, .35); }
.site-nav .navbar-toggler { border: 1px solid var(--line); border-radius: 50%; width: 42px; height: 42px; padding: 0; place-items: center; color: var(--ink); }
@media (max-width: 991.98px) { .site-nav .navbar-toggler { display: grid; } }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(76, 195, 138, .35); }

/* ---------- 5. HERO ---------- */
.hero { padding: 9.5rem 0 5.5rem; overflow: hidden; background: radial-gradient(circle at 88% 15%, rgba(255,209,102,.7) 0, transparent 30%), radial-gradient(circle at 8% 92%, rgba(43,182,115,.28) 0, transparent 40%), radial-gradient(circle at 50% 0, rgba(181,23,78,.1) 0, transparent 35%); }
[data-bs-theme="dark"] .hero { background: radial-gradient(circle at 88% 15%, #3b3a14 0, transparent 30%), radial-gradient(circle at 8% 92%, #12402b 0, transparent 40%); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; }
.hero .lead { color: var(--muted); max-width: 52ch; }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; background: var(--card); color: var(--leaf); padding: .35rem .9rem; border-radius: 50rem; border: 1px solid var(--line); }
.stat b { display: block; font: 800 2rem var(--font-head); background: linear-gradient(90deg, var(--leaf), var(--beet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .9rem; color: var(--muted); }
.ring-wrap { position: relative; width: min(400px, 82vw); aspect-ratio: 1; margin: auto; }
.ring { width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(var(--leaf) 0 var(--p1, 0%), var(--beet) 0 var(--p2, 0%), var(--butter) 0 var(--p3, 0%), var(--line) 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); }
.ring-photo { position: absolute; inset: 21%; border-radius: 50%; overflow: hidden; box-shadow: 0 12px 40px rgba(20, 38, 29, .3); border: 5px solid var(--card); }
.ring-photo img { width: 100%; height: 100%; object-fit: cover; }
.kcal-badge { position: absolute; left: 50%; bottom: 17%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--line); border-radius: 50rem; padding: .3rem 1rem; box-shadow: var(--shadow); text-align: center; line-height: 1.1; white-space: nowrap; }
.kcal-badge b { font: 800 1.5rem var(--font-head); color: var(--beet); }
.kcal-badge small { display: block; font-size: .7rem; color: var(--muted); }
.float-chip { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; padding: .5rem .9rem; font-size: .85rem; box-shadow: var(--shadow); animation: bob 4s ease-in-out infinite; }
.float-chip.c1 { top: 4%; right: -3%; }
.float-chip.c2 { bottom: 10%; left: -5%; animation-delay: 1s; }
.float-chip.c3 { top: 38%; left: -8%; animation-delay: 2s; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: .4rem; }
.dot-carb { background: var(--leaf); } .dot-protein { background: var(--beet); } .dot-fat { background: var(--butter); }
.ic-gold { color: #f2a900; } .ic-pink { color: #d63a6b; } .ic-green { color: #2bb673; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; z-index: 0; animation: drift 14s ease-in-out infinite alternate; pointer-events: none; }
.blob.b1 { width: 260px; height: 260px; background: var(--butter); top: 12%; left: 42%; }
.blob.b2 { width: 220px; height: 220px; background: var(--leaf-2); bottom: 5%; right: 6%; animation-delay: 3s; }
.hero .container { position: relative; z-index: 1; }

/* ---------- 6. CARDS & PLANS (Bootstrap .card) ---------- */
.card { --bs-card-bg: var(--card); --bs-card-border-color: var(--line); --bs-card-border-radius: 1.25rem; --bs-card-inner-border-radius: 1.2rem; transition: transform .3s, box-shadow .3s; overflow: hidden; }
.card:hover { box-shadow: var(--shadow); }
.tilt { transform-style: preserve-3d; will-change: transform; }
.plan-card { --accent: var(--leaf); border-top: 5px solid var(--accent); }
.plan-card.p2 { --accent: var(--beet); } .plan-card.p3 { --accent: var(--orange); } .plan-card.p4 { --accent: var(--sky); }
.plan-img { aspect-ratio: 16 / 10; overflow: hidden; }
.plan-img img, .meal-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.plan-card:hover .plan-img img { transform: scale(1.08); }
.icon-bub { width: 54px; height: 54px; border-radius: 16px; background: var(--accent, var(--leaf)); color: #fff; display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent, var(--leaf)) 45%, transparent); margin-top: -2.2rem; margin-bottom: .8rem; border: 4px solid var(--card); position: relative; }
.plan-card p { color: var(--muted); font-size: .95rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; background: var(--mint); color: var(--leaf); padding: .2rem .65rem; border-radius: 50rem; margin-right: .3rem; text-transform: capitalize; }

/* ---------- 7. CALCULATOR ---------- */
.calc-card { border-top: 5px solid var(--orange); }
.result-box { background: linear-gradient(135deg, var(--mint), color-mix(in srgb, var(--butter) 25%, var(--mint))); border-radius: 1.25rem; padding: 1.5rem; animation: pop .5s; }
.result-box .big { font: 800 2.4rem var(--font-head); color: var(--leaf); line-height: 1.1; }
.bar { height: 11px; border-radius: 10px; background: var(--line); overflow: hidden; margin-top: .3rem; }
.bar > div { height: 100%; width: 0; border-radius: 10px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.b-p { background: var(--beet); } .b-c { background: var(--leaf-2); } .b-f { background: var(--butter); }

/* ---------- 8. MEALS ---------- */
.filter-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 50rem; padding: .45rem 1.2rem; font-weight: 500; transition: .25s; }
.filter-btn:hover { transform: translateY(-2px); border-color: var(--leaf); }
.filter-btn.active { background: linear-gradient(135deg, var(--leaf), var(--leaf-2)); color: #fff; border-color: transparent; }
.meal-item { animation: pop .5s both; }
.meal-img { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.meal-card:hover .meal-img img { transform: scale(1.08) rotate(1deg); }
.kcal-pill { position: absolute; right: .8rem; top: .8rem; background: rgba(255,255,255,.92); color: #14261d; font-weight: 600; font-size: .8rem; padding: .25rem .7rem; border-radius: 50rem; }
.meal-meta { color: var(--muted); font-size: .9rem; }

/* ---------- 9. PRICING ---------- */
.price { font: 800 3rem var(--font-head); }
.price-card .list-unstyled li { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; font-size: .95rem; }
.price-card .list-unstyled i { color: var(--leaf-2); }
.price-card.featured { background: linear-gradient(160deg, var(--leaf-dark), var(--leaf)); color: #fff; transform: scale(1.05); border: 0; box-shadow: 0 24px 50px rgba(21, 77, 52, .4); }
.price-card.featured:hover { transform: scale(1.07) translateY(-4px); }
.price-card.featured .per { color: #cfe8da; }
.price-card.featured li i { color: var(--butter); }
.price-card .per { color: var(--muted); }
.ribbon { display: inline-block; background: var(--butter); color: #14261d; font-weight: 700; font-size: .75rem; padding: .25rem .8rem; border-radius: 50rem; }

/* ---------- 10. STORIES (Bootstrap carousel) ---------- */
.story-slider { max-width: 820px; }
.story-slider .carousel-item { padding: 0 1rem 1rem; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 4px solid var(--butter); box-shadow: var(--shadow); }
.quote { font: 600 clamp(1.15rem, 2.4vw, 1.6rem)/1.45 var(--font-head); }
.stars { color: var(--butter); letter-spacing: 2px; margin-bottom: .6rem; }
.story-slider .carousel-indicators { position: static; margin: 1rem 0 0; }
.story-slider .carousel-indicators [data-bs-target] { width: 11px; height: 11px; border-radius: 50%; border: 0; background: var(--line); opacity: 1; margin: 0 .25rem; transition: .3s; }
.story-slider .carousel-indicators .active { background: var(--beet); width: 30px; border-radius: 10px; }

/* ---------- 11. FORMS (Bootstrap form controls, rounded) ---------- */
.form-control, .form-select { border-radius: .9rem; padding: .75rem 1rem; background-color: var(--card); border: 1.5px solid var(--line); color: var(--ink); }
.form-control:focus, .form-select:focus { background-color: var(--card); color: var(--ink); border-color: var(--leaf); box-shadow: 0 0 0 .22rem rgba(76, 195, 138, .28); }
.form-label { font-weight: 500; font-size: .92rem; }
.form-card { border-top: 5px solid var(--leaf-2); }
.info-card { border-left: 5px solid var(--beet); line-height: 1.9; }
.info-card i { color: var(--beet); width: 1.3rem; }
.map { width: 100%; height: 100%; min-height: 360px; border: 0; border-radius: 1.25rem; box-shadow: var(--shadow); }

/* ---------- 12. FAQ (Bootstrap accordion) ---------- */
.accordion { --bs-accordion-bg: var(--card); --bs-accordion-border-color: var(--line); --bs-accordion-btn-bg: var(--card); --bs-accordion-active-bg: var(--mint); --bs-accordion-active-color: var(--leaf); --bs-accordion-btn-color: var(--ink); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(76, 195, 138, .3); }
.accordion-item { border: 1px solid var(--line); border-radius: 1rem !important; margin-bottom: .8rem; overflow: hidden; transition: box-shadow .3s; }
.accordion-item:has(.show) { box-shadow: var(--shadow); border-color: var(--leaf-2); }
.accordion-button { font-weight: 600; border-radius: 0 !important; }
.accordion-body { color: var(--muted); }

/* ---------- 13. FOOTER ---------- */
.site-footer { background: linear-gradient(135deg, var(--leaf-dark), #0e3524); color: #cfe8da; padding: 2.2rem 0; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; margin-inline: .3rem; }
.site-footer a:hover { color: var(--butter); }

/* ---------- 14. FLOATING UI ---------- */
.progress-top { position: fixed; top: 0; left: 0; height: 4px; width: 0; z-index: 1100; background: linear-gradient(90deg, var(--leaf-2), var(--butter), var(--beet)); }
.wa { position: fixed; right: 20px; bottom: 20px; z-index: 1030; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 1.8rem; text-decoration: none; box-shadow: 0 8px 24px rgba(37, 211, 102, .5); animation: pulse 2.2s infinite; }
.to-top { position: fixed; right: 24px; bottom: 92px; z-index: 1030; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--beet); color: #fff; opacity: 0; pointer-events: none; transition: .3s; transform: translateY(10px); }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 2000; pointer-events: none; animation: fall linear forwards; }

/* ---------- 15. ANIMATIONS ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@keyframes bob { 50% { transform: translateY(-9px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); } 100% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shine { to { background-position: 200% 0; } }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.15); } }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 16. RESPONSIVE ---------- */
@media (max-width: 991.98px) {
  section { padding: 4rem 0; }
  .site-nav { border-radius: 2rem; padding: .5rem .7rem .5rem 1.2rem; background: color-mix(in srgb, var(--card) 95%, transparent); }
  .site-nav .navbar-nav { margin-top: .8rem; text-align: center; }
  .site-nav .nav-link { padding: .75rem 1rem; }
  .site-nav .nav-actions { justify-content: center; margin: .6rem 0 .4rem; }
  .hero { padding-top: 8rem; }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-4px); }
}
@media (max-width: 575.98px) {
  .float-chip.c3 { display: none; }
  .float-chip.c1 { right: 0; } .float-chip.c2 { left: 0; }
}
