@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }

input, select, textarea, button { font-family: inherit; }

:root {
  --bg:        #0C0C0C;
  --bg2:       #111111;
  --card:      #141414;
  --card2:     #1A1A1A;
  --border:    #1E1E1E;
  --border2:   #2A2A2A;
  --yellow:    #FFD212;
  --white:     #FFFFFF;
  --muted:     #888888;
  --dim:       #555555;
  --red:       #E05555;
  --red-bg:    #1A0000;
  --red-bg2:   #2A0000;
  --green:     #5DBF72;
  --green-bg:  #0A1A0A;
}

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  line-height: 1;
  overflow-x: hidden;
}

/* ── CONTAINER ───────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img { height: 26px; display: block; }
.nav-badge {
  background: var(--card2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
  border: 1px solid var(--border2);
}

/* ── HERO ────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, #111111 0%, #0C0C0C 100%);
  padding: 80px 0 64px;
  text-align: center;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card2);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 1px;
  border: 1px solid var(--border2);
}
.hero-tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.hero-title { font-size: 56px; font-weight: 900; line-height: 1.1; max-width: 800px; }
.hero-sub { font-size: 16px; color: var(--muted); max-width: 680px; line-height: 1.6; }

/* ── STEP INDICATOR ──────────────────────────── */
.step-nav {
  padding: 0 0 48px;
}
.step-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step-item { display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900;
  background: var(--card2);
  color: var(--dim);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.step-num.active { background: var(--yellow); color: #0C0C0C; }
.step-num.done   { background: var(--yellow); color: #0C0C0C; }
.step-label { font-size: 13px; font-weight: 700; color: var(--dim); transition: color 0.2s; white-space: nowrap; }
.step-label.active, .step-label.done { color: var(--white); }
.step-line { width: 48px; height: 1px; background: var(--border2); margin: 0 4px; flex-shrink: 0; }

/* ── CARDS WRAPPER ───────────────────────────── */
.cards { padding-bottom: 80px; display: flex; flex-direction: column; gap: 32px; }

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  display: none;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  width: 100%;
}
.card.active { display: flex; }

/* ── STEP TAG ROW ────────────────────────────── */
.step-tag-row { display: flex; align-items: center; gap: 10px; }
.step-tag { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 2px; }
.nutrient-pill {
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 700;
}
.pill-a  { background: var(--red-bg2); color: var(--red); }
.pill-c  { background: var(--green-bg); color: var(--green); }

/* ── CARD TITLE / SUB ────────────────────────── */
.card-title { font-size: 22px; font-weight: 900; }
.card-sub   { font-size: 14px; color: var(--muted); line-height: 1.5; max-width: 600px; }

/* ── INFO BOX ────────────────────────────────── */
.info-box {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}
.info-box.a-info { background: var(--red-bg); }
.info-box.c-info { background: var(--green-bg); }
.info-bar { width: 3px; min-height: 36px; border-radius: 2px; flex-shrink: 0; }
.info-bar.a { background: var(--red); }
.info-bar.c { background: var(--green); }

/* ── PRODUCT TYPE TOGGLES ────────────────────── */
.type-toggles { display: flex; gap: 16px; }
.type-btn {
  flex: 1; padding: 28px; border-radius: 16px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer; border: 1px solid transparent;
  transition: all 0.2s;
  background: var(--card2);
  border-color: var(--border2);
}
.type-btn.selected { background: var(--yellow); border-color: var(--yellow); }
.type-btn.selected .type-label { color: #0C0C0C; }
.type-btn.selected .type-desc  { color: #333; }
.type-emoji {
  font-size: 28px;
  width: 52px; height: 52px;
  background: var(--card);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.type-btn.selected .type-emoji {
  background: var(--bg);
}
.type-label { font-size: 18px; font-weight: 900; color: var(--white); }
.type-desc  { font-size: 13px; color: var(--dim); line-height: 1.4; }

/* ── FORM GRID ───────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.form-input-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border2);
  transition: border-color 0.2s;
}
.form-input-wrap:focus-within { border-color: var(--yellow); }
.form-input-wrap input {
  background: none; border: none; outline: none;
  color: var(--white); font-family: 'Lato', sans-serif;
  font-size: 14px; width: 100%; min-width: 0;
}
.form-unit { font-size: 12px; color: var(--dim); white-space: nowrap; margin-left: 8px; flex-shrink: 0; }

/* ── FIBRE NOTE ──────────────────────────────── */
.fibre-note {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.fibre-note-title { font-size: 12px; font-weight: 700; color: var(--muted); }
.fibre-note-text  { font-size: 12px; color: var(--dim); line-height: 1.5; }

/* ── REVIEW TABLE ────────────────────────────── */
.review-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.review-table {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}
.review-table-header {
  padding: 14px 20px; font-size: 13px; font-weight: 900;
  display: flex; align-items: center;
}
.review-table-header.a  { background: var(--red-bg);   color: var(--red); }
.review-table-header.c  { background: var(--green-bg); color: var(--green); }
.review-table-header.pt { background: var(--card); color: var(--muted); }
.review-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--border);
  font-size: 13px;
}
.review-row-label { color: var(--muted); }
.review-row-value { font-weight: 700; }

/* ── CALC BUTTON ─────────────────────────────── */
.calc-btn {
  width: 100%; padding: 20px 52px;
  background: var(--yellow); color: #0C0C0C;
  border: none; border-radius: 10px;
  font-family: 'Lato', sans-serif; font-size: 16px; font-weight: 900;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity 0.15s;
}
.calc-btn:hover { opacity: 0.9; }

/* ── RESULT ──────────────────────────────────── */
.result-top { display: flex; gap: 20px; align-items: stretch; }
.score-box {
  width: 220px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 20px; padding: 32px;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center;
}
.score-label { font-size: 11px; font-weight: 700; color: var(--dim); letter-spacing: 2px; }
.score-num   { font-size: 72px; font-weight: 900; line-height: 1; }
.score-pts   { font-size: 13px; color: var(--dim); }
.verdict-box {
  flex: 1; padding: 28px; border-radius: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.verdict-box.less-healthy {
  background: var(--red-bg); border: 1px solid #3A0000;
}
.verdict-box.not-less-healthy {
  background: #0A1A0A; border: 1px solid #1A3A1A;
}
.verdict-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 20px; width: fit-content;
  font-size: 12px; font-weight: 900; letter-spacing: 1px;
}
.verdict-badge.lh  { background: #3A0000; color: var(--red); }
.verdict-badge.nlh { background: #1A3A1A; color: var(--green); }
.verdict-badge-dot { width: 8px; height: 8px; border-radius: 50%; }
.verdict-badge.lh  .verdict-badge-dot { background: var(--red); }
.verdict-badge.nlh .verdict-badge-dot { background: var(--green); }
.verdict-title { font-size: 20px; font-weight: 900; line-height: 1.3; }
.verdict-desc  { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── BREAKDOWN ───────────────────────────────── */
.breakdown-title { font-size: 16px; font-weight: 900; }
.breakdown-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.breakdown-table {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
}
.breakdown-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; font-size: 12px; font-weight: 900;
}
.breakdown-header.a  { background: var(--red-bg);   color: var(--red); }
.breakdown-header.c  { background: var(--green-bg); color: var(--green); }
.breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px;
}
.breakdown-row-label { color: var(--muted); }
.breakdown-row-val.a { color: var(--red); font-weight: 700; }
.breakdown-row-val.c { color: var(--green); font-weight: 700; }

/* ── DISCLAIMER ──────────────────────────────── */
.disclaimer {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border2);
  font-size: 12px; color: var(--dim); line-height: 1.5;
}
.disclaimer-icon { font-size: 16px; flex-shrink: 0; }

/* ── NAV BUTTONS ─────────────────────────────── */
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-row.end { justify-content: flex-end; }
.nav-row .btn { min-width: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px;
  font-family: 'Lato', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-arrow { display: block; flex-shrink: 0; width: 16px; height: auto; }
.btn-arrow--left { transform: scaleX(-1); }
.btn-secondary .btn-arrow { filter: brightness(0) invert(1) opacity(0.55); }
.btn-primary  { background: var(--yellow); color: #0C0C0C; padding: 14px 32px; }
.btn-secondary {
  background: var(--card2); color: var(--muted);
  border: 1px solid var(--border2);
}

/* ── FOOTER ──────────────────────────────────── */
footer {
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.footer-inner { padding-bottom: 40px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  gap: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-logo-img { height: 24px; display: block; }
.footer-tagline { font-size: 13px; color: var(--dim); max-width: 280px; line-height: 1.5; }
.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.footer-col-title { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px; margin-bottom: 2px; }
.footer-col a { font-size: 13px; color: var(--dim); text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  gap: 20px;
}
.footer-copy { font-size: 12px; color: var(--dim); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 12px; color: var(--dim); text-decoration: none; transition: color 0.15s; }
.footer-legal a:hover { color: var(--white); }

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.active {
  opacity: 1; pointer-events: all;
}
.modal-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 48px 40px 40px;
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}
.modal-overlay.active .modal-card {
  transform: translateY(0);
}
.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 8px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { background: var(--border2); color: var(--white); }
.modal-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--yellow); color: #0C0C0C;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.modal-title { font-size: 22px; font-weight: 900; line-height: 1.2; }
.modal-sub { font-size: 14px; color: var(--muted); line-height: 1.6; }
.modal-field { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.modal-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.modal-input {
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 10px; padding: 14px 18px;
  color: var(--white); font-size: 14px;
  width: 100%; transition: border-color 0.2s;
}
.modal-input:focus { outline: none; border-color: var(--yellow); }
.modal-error { font-size: 12px; color: var(--red); min-height: 16px; }
.modal-btn {
  width: 100%; padding: 16px 24px;
  background: var(--yellow); color: #0C0C0C;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 900;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity 0.15s;
  margin-top: 4px;
}
.modal-btn:hover { opacity: 0.9; }
.modal-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-btn .btn-arrow { filter: none; }
.modal-note { font-size: 11px; color: var(--dim); text-align: center; line-height: 1.5; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .hero { padding: 56px 0 48px; }
  .hero-title { font-size: 36px; }
  .form-grid, .review-grid, .breakdown-grid { grid-template-columns: 1fr; }
  .type-toggles { flex-direction: column; }
  .result-top { flex-direction: column; }
  .score-box { width: 100%; }
  .step-label { display: none; }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-col { align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Phone: prevent cropped buttons, align full-width actions, tighter padding */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .card { padding: 24px 20px; gap: 24px; }
  .nav-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .nav-row .btn { width: 100%; }
  .nav-row.end { justify-content: stretch; }
  .nav-row.end .btn { width: 100%; }
  .hero { padding: 44px 0 40px; }
  .hero-title { font-size: 28px; }
  .step-nav { padding-bottom: 32px; }
  .step-line { width: 24px; margin: 0 2px; }
  .step-num { width: 28px; height: 28px; font-size: 12px; }
  .nav-inner { height: 60px; padding: 0; }
  .nav-badge { font-size: 11px; padding: 6px 10px; max-width: 50%; text-align: center; }
  .form-input-wrap { padding: 12px 14px; }
  .review-row, .breakdown-row { padding: 10px 14px; font-size: 12px; }
  .review-table-header, .breakdown-header { padding: 12px 14px; font-size: 12px; }
  .calc-btn { padding: 16px 24px; font-size: 15px; }
  .type-btn { padding: 20px; }
  .info-box { padding: 12px 14px; font-size: 12px; }
}
