/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0F1115;
  --bg-alt: #171A20;
  --card-bg: #1B1F26;
  --border: #2A2F38;
  --text: #F4F6F5;
  --text-dim: #9BA3AE;
  --accent: #C6FF3D;
  --accent-dark: #9FDB1E;
  --accent-2: #FF6B4A;
  --font-heading: 'Archivo', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --radius: 14px;
  --container-w: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { color: var(--text-dim); margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--font-heading); color: var(--text); margin: 0 0 0.5em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; padding: 10px 16px; background: var(--accent);
  color: #0a0c0f; z-index: 9999; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.8rem; margin-bottom: 10px; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-block; font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem;
  padding: 14px 26px; border-radius: 8px; transition: transform .15s var(--ease-out), background .15s ease;
}
.btn-primary { background: var(--accent); color: #0a0c0f; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 10px 16px; font-size: 0.85rem; }
.btn-outline { border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); }
.btn-ghost-dark { color: var(--text-dim); font-weight: 700; text-decoration: underline; }

/* =============================================================
   5. Header / nav
   ============================================================= */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(15,17,21,0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { font-family: var(--font-heading); font-weight: 900; font-size: 1.3rem; letter-spacing: 0.02em; color: var(--text); }
.main-nav ul { list-style: none; display: flex; gap: 26px; padding: 0; margin: 0; }
.main-nav a { font-weight: 600; font-size: 0.92rem; color: var(--text-dim); }
.main-nav a:hover, .main-nav a.is-active { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 38px; height: 38px; justify-content: center; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* =============================================================
   6. Tool card (calculator)
   ============================================================= */
.tool-section { padding: 56px 0 40px; }
.tool-subtitle { max-width: 560px; color: var(--text-dim); font-size: 1.05rem; }
.tool-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-top: 28px;
}
.calc-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row-full { grid-column: 1 / -1; }
.form-row label { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); }
.form-row input, .form-row select, .form-row textarea {
  font-family: var(--font-body); font-size: 0.98rem; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  width: 100%; min-width: 0;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.calc-result { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border); text-align: center; }
.result-kcal-num { font-family: var(--font-heading); font-weight: 900; font-size: clamp(2.6rem, 8vw, 3.6rem); color: var(--accent); display: block; }
.result-kcal-label { color: var(--text-dim); font-weight: 600; }
.result-detail { margin: 10px auto 20px; max-width: 480px; font-size: 0.88rem; }

.macro-bar { display: flex; width: 100%; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg); margin-bottom: 16px; }
.macro-seg { display: block; height: 100%; }
.macro-protein { background: var(--accent); }
.macro-carbs { background: var(--accent-2); }
.macro-fat { background: #4FA8FF; }
.macro-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.macro-list li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-dim); }
.macro-list strong { color: var(--text); }
.macro-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.macro-dot.macro-protein { background: var(--accent); }
.macro-dot.macro-carbs { background: var(--accent-2); }
.macro-dot.macro-fat { background: #4FA8FF; }

.privacy-badge { margin-top: 18px; font-size: 0.88rem; color: var(--text-dim); }
.honest-limits { font-size: 0.8rem; color: var(--text-dim); opacity: 0.8; }

/* =============================================================
   7. Steps / tips / faq
   ============================================================= */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.step { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  background: var(--accent); color: #0a0c0f; font-family: var(--font-heading); font-weight: 900;
  border-radius: 50%; margin-bottom: 12px;
}

.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.tip-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.tip-card h3 { color: var(--accent); }
.tip-card p { font-size: 0.92rem; margin: 0; }

.faq-list { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.faq-item summary { cursor: pointer; font-weight: 700; }
.faq-item p { margin: 12px 0 0; font-size: 0.92rem; }

.store-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* =============================================================
   8. Store / products
   ============================================================= */
.store-hero { padding: 48px 0 24px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.product-card img { border-radius: 10px; margin-bottom: 14px; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-card p { font-size: 0.88rem; }
.product-price { font-family: var(--font-heading); font-weight: 800; color: var(--accent); font-size: 1.1rem; }
.product-actions { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.product-pay { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--border); padding-top: 12px; }
.pay-btn {
  display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; font-weight: 600;
  color: var(--text-dim); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 12px; cursor: not-allowed;
}
.pay-btn span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }

.order-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-top: 20px; }
.form-status { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; min-height: 1.2em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--accent-2); }

/* =============================================================
   9. Footer
   ============================================================= */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.brand-footer { color: var(--text-dim); }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--text-dim); font-size: 0.88rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--text-dim); opacity: 0.7; margin: 0; }

/* =============================================================
   10. Responsive (mobile-first overrides for small screens)
   ============================================================= */
@media (max-width: 780px) {
  .main-nav {
    position: absolute; top: 70px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .main-nav.is-open { max-height: 320px; }
  .main-nav ul { flex-direction: column; padding: 12px 20px 20px; gap: 4px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .steps-grid, .tips-grid, .product-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .calc-form { grid-template-columns: minmax(0,1fr); }
  .order-form { grid-template-columns: minmax(0,1fr); padding: 20px; }
  .steps-grid, .tips-grid, .product-grid { grid-template-columns: 1fr; }
  .store-cta { text-align: center; justify-content: center; }
}
