/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS — mismos nombres/valores que
   habitos.krotonoficial.com y el manual de marca Kroton
═══════════════════════════════════════════════════════ */
:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #111111;
  --text: #ffffff;
  --text-muted: #888888;
  --border: #2a2a2a;

  --brand: #fcb827;
  --brand-ink: #d99a1a;
  --brand-soft: rgba(252, 184, 39, .12);
  --brand-soft-2: #ffd770;

  --grad: linear-gradient(135deg, #fcb827 0%, #ffd770 55%, #ffffff 100%);
  --grad-btn: linear-gradient(135deg, #d99a1a 0%, #fcb827 45%, #ffd770 75%, rgba(255,255,255,.95) 100%);
  --grad-line: linear-gradient(90deg, #fcb827, #ffd770 70%, rgba(255,255,255,.4));

  --danger: #ff5555;
  --danger-soft: rgba(255, 85, 85, .14);
  --success: #3ddc84;
  --track: #1c1c1c;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 28px rgba(0,0,0,.45);

  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Bebas Neue', var(--font-body);
  --font-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-top: 143px;
}

button { cursor: pointer; font-family: inherit; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ── FONDO con difuminados amarillo/blanco — idéntico a habitos ── */
body::before {
  content: '';
  position: fixed;
  top: -10%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle at 100% 0%, rgba(252,184,39,.14) 0%, rgba(252,184,39,.04) 30%, transparent 65%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -15%; left: -10%;
  width: 550px; height: 550px;
  background: radial-gradient(circle at 0% 100%, rgba(255,255,255,.05) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* ===== HEADER — panel de vidrio esmerilado único, se oculta al bajar y aparece al subir ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  will-change: transform;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
  background: rgba(10, 9, 8, .38);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 10px 30px rgba(0,0,0,.25);
}
.site-header.is-hidden { transform: translateY(-100%); }

/* ===== INSTAGRAM BAR — igual a .ig-topbar de habitos ===== */
.ig-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ig-icon-wrap {
  width: 22px; height: 22px;
  background: linear-gradient(135deg, #FCB827 0%, #ffd770 50%, #FCB827 100%);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(252,184,39,.3);
}
.ig-icon-wrap svg { width: 13px; height: 13px; fill: #000; }
.ig-topbar-text { font-size: 12px; color: rgba(255,255,255,.55); }
.ig-topbar-handle {
  font-size: 12px; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: .3px;
  text-decoration: none;
}
.ig-topbar-handle:hover { opacity: .85; }
@media (max-width: 480px) { .ig-topbar-text { display: none; } }

/* ===== TOPBAR — logo centrado + acceso a la tienda ===== */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
}
.topbar__spacer { grid-column: 1; }
.brand__mark {
  grid-column: 2; justify-self: center;
  object-fit: contain;
  height: 70px; width: 70px;
}
.topbar__shop {
  grid-column: 3; justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .82rem;
  color: var(--brand);
  text-decoration: none; white-space: nowrap;
  border: 1px solid rgba(252,184,39,.35);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 8px 16px;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.topbar__shop svg { width: 16px; height: 16px; flex: none; }
.topbar__shop:hover { border-color: var(--brand); background: rgba(252,184,39,.2); transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 44px 20px 36px;
  position: relative; z-index: 1;
}

.hero .tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--brand);
  text-transform: uppercase;
  animation: fadeUp .8s ease;
}
.hero p {
  color: var(--text-muted); font-size: 15px;
  margin-top: 18px; max-width: 500px;
  margin-left: auto; margin-right: auto;
  line-height: 1.6;
  animation: fadeUp 1s ease;
}

/* ===== PROGRESS ===== */
.progress-bar {
  display: flex; justify-content: center; align-items: center;
  gap: 0; padding: 28px 20px; position: relative; z-index: 1;
}
.step-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--text-muted); transition: all .4s ease; background: var(--surface);
}
.step-circle.active {
  border-color: var(--brand); color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 20px rgba(252,184,39,.35);
}
.step-circle.done {
  border-color: var(--brand);
  background: linear-gradient(135deg, #FCB827, #ffd770);
  color: #000;
}
.step-label {
  font-size: 10px; color: var(--text-muted); text-align: center;
  font-family: var(--font-mono); letter-spacing: 1px;
  text-transform: uppercase; max-width: 60px;
}
.step-line {
  width: 40px; height: 2px; background: var(--border);
  margin-bottom: 22px; transition: background .4s ease;
}
.step-line.done { background: linear-gradient(90deg, #FCB827, #ffd770); }

/* ===== CONTAINER — mismo lienzo de 1080px que .dashboard de habitos ===== */
.container {
  max-width: 1080px; margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 100px; position: relative; z-index: 1;
}
.section { display: none; animation: sectionIn .5s ease; }
.section.active { display: block; }
@keyframes sectionIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CARDS GRID — aprovecha el ancho en desktop, igual al patrón .overview de habitos ===== */
.cards-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
.cards-grid > .card { margin-bottom: 0; }
@media (min-width: 860px) {
  .cards-grid--2 { grid-template-columns: 1fr 1fr; }
}

/* ===== CARD — idéntico al .card de habitos (línea degradada superior + surface-2) ===== */
.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-line);
  opacity: .6;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--text);
  margin-bottom: 6px;
}
.card-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; line-height: 1.6; }

/* ===== FORM ===== */
.form-group { margin-bottom: 20px; }
.inline-fields { display: flex; gap: 12px; }
.inline-fields .form-group { flex: 1; }
label {
  display: block; font-size: .78rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 8px;
}
input[type="number"], input[type="text"], select {
  width: 100%; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 16px; font-family: var(--font-body);
  font-size: .95rem; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(252,184,39,.16);
}
input::placeholder { color: var(--text-muted); }
select option { background: var(--surface); }
.ft-conversion { text-align: center; color: var(--brand); font-family: var(--font-mono); font-size: 14px; margin-top: 8px; }

/* ===== UNIT TOGGLE — mismo patrón que .term-toggle/.term-btn de habitos ===== */
.unit-toggle {
  display: flex; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.unit-btn {
  flex: 1; padding: 10px; text-align: center; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  transition: all .2s; border: none; background: transparent;
  font-family: var(--font-body);
}
.unit-btn.active { background: var(--grad-btn); color: #000; }

/* ===== RADIO CARDS ===== */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.radio-card { cursor: pointer; position: relative; }
.radio-card input { display: none; }
.radio-label {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 16px 10px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; text-align: center;
  color: var(--text-muted); cursor: pointer; transition: all .2s;
  text-transform: uppercase; letter-spacing: .03em;
}
.radio-label .icon { font-size: 24px; }
.radio-hint { display: block; font-size: 9px; font-weight: 400; color: var(--text-muted); margin-top: 2px; text-transform: none; letter-spacing: 0; }
.radio-card input:checked + .radio-label {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: 0 0 0 2px rgba(252,184,39,.15);
}
.radio-card input:checked + .radio-label .radio-hint { color: var(--brand-ink); }

/* ===== SLIDER ===== */
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 6px;
  border-radius: 3px; background: var(--track); outline: none; padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FCB827, #ffd770);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(252,184,39,.55);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #FCB827, #ffd770);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(252,184,39,.55);
}
.slider-value {
  text-align: center; font-family: var(--font-mono);
  font-size: 2rem; font-weight: 700; margin-bottom: 10px;
  color: var(--brand);
}
.slider-unit { font-size: 14px; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }
.slider-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted); margin-top: 8px;
  font-family: var(--font-mono);
}

/* ===== BUTTONS — DM Sans Bold uppercase, igual al spec del manual y al .btn de habitos ===== */
.btn {
  display: block; width: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 16px; border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s, color .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--grad-btn); color: #000; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(252,184,39,.35); }
.btn-secondary {
  background: transparent; border: 1.5px solid var(--border);
  color: var(--text-muted); font-size: .85rem; margin-top: 10px;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-copy { background: var(--grad-btn); color: #000; font-size: 1rem; padding: 18px; }
.btn-copy:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(252,184,39,.35); }

/* ===== IMC ===== */
.imc-display { text-align: center; padding: 30px 0; }
.imc-number {
  font-family: var(--font-display); font-size: 96px; line-height: 1; letter-spacing: .02em;
  color: var(--brand); font-weight: 400;
}
.imc-desc { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.imc-label {
  font-size: 16px; font-weight: 600; margin-top: 6px;
  padding: 8px 20px; border-radius: 999px; display: inline-block;
}
.imc-label.bajo { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.2); }
.imc-label.normal { background: rgba(61,220,132,.12); color: var(--success); border: 1px solid rgba(61,220,132,.3); }
.imc-label.sobrepeso { background: var(--brand-soft); color: var(--brand); border: 1px solid rgba(252,184,39,.4); }
.imc-label.obesidad1 { background: rgba(255,85,85,.12); color: var(--danger); border: 1px solid rgba(255,85,85,.3); }
.imc-label.obesidad2 { background: rgba(255,50,50,.18); color: #ff4444; border: 1px solid rgba(255,50,50,.4); }

.imc-bar-wrap { margin: 20px 0; position: relative; }
.imc-bar {
  height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, #ffffff 0%, #3ddc84 22%, #FCB827 50%, #ff8855 75%, #ff5555 100%);
  position: relative;
}
.imc-pointer {
  position: absolute; top: -8px;
  width: 30px; height: 30px; background: #fff;
  border-radius: 50%; border: 3px solid var(--brand);
  transform: translateX(-50%);
  box-shadow: 0 4px 15px rgba(252,184,39,.6);
  transition: left .8s cubic-bezier(.34,1.56,.64,1);
}
.imc-bar-labels {
  display: flex; justify-content: space-between;
  margin-top: 10px; font-size: 10px; color: var(--text-muted);
  font-family: var(--font-mono);
}
.imc-explanation { font-size: 14px; line-height: 1.8; color: var(--text-muted); }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
  transition: border-color .15s;
}
.stat-card:hover { border-color: rgba(252,184,39,.4); }
.stat-value {
  font-family: var(--font-mono); font-size: 1.35rem; font-weight: 700;
  color: var(--brand);
}
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }

/* ===== CHIPS ===== */
.profile-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip {
  background: var(--brand-soft);
  border: 1px solid rgba(252,184,39,.3);
  border-radius: 999px; padding: 6px 14px; font-size: 12px;
  color: var(--brand); font-family: var(--font-mono);
}

/* ===== PROMPT BOX ===== */
.prompt-box {
  background: #050505;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-mono); font-size: 12px;
  line-height: 1.8; color: #c8c8c8;
  white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow-y: auto;
}
.prompt-box::-webkit-scrollbar { width: 6px; }
.prompt-box::-webkit-scrollbar-track { background: transparent; }
.prompt-box::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; opacity: .5; }
.prompt-highlight { color: var(--brand); font-weight: 700; }
.prompt-section { color: rgba(252,184,39,.6); }

/* ===== TOAST — flotante, mismo patrón que .toast de habitos ===== */
.copy-toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translate(-50%, 10px);
  max-width: min(90vw, 420px);
  background: #141414;
  border: 1px solid rgba(252,184,39,.4);
  border-radius: 11px;
  padding: 12px 20px;
  text-align: center;
  color: var(--text); font-size: .88rem; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
}
.copy-toast--visible { opacity: 1; transform: translate(-50%, 0); }

/* ===== MISC ===== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.alert {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 2px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px; font-size: 13px; margin-top: 16px; line-height: 1.7;
  color: var(--text-muted);
}
.alert strong { color: var(--text); }
.alert-warn { border-left-color: var(--danger); background: var(--danger-soft); }
.steps-list { padding-left: 20px; font-size: 14px; line-height: 2.2; color: var(--text-muted); }
.text-brand { color: var(--brand); }

.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--brand);
  background: var(--brand-soft); border: 1px solid rgba(252,184,39,.3);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(26px, 7vw, 34px);
  font-weight: 400; letter-spacing: .02em; color: var(--text);
}

/* ===== IG FOOTER (dentro de cada paso) ===== */
.ig-footer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 20px;
  background: rgba(0,0,0,.9);
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.ig-footer-text { font-size: 12px; color: rgba(255,255,255,.4); }
.ig-footer-handle {
  font-size: 12px; font-weight: 700; text-decoration: none;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.ig-footer-handle:hover { opacity: .85; }

/* ===== FOOTER — igual a .site-footer de habitos ===== */
footer {
  text-align: center; padding: 40px 20px 32px; color: var(--text-muted);
  font-size: 12px; position: relative; z-index: 1;
  border-top: 1px solid var(--border);
}
.footer-logo {
  width: 44px; height: 44px; margin: 0 auto 10px;
  border-radius: 12px; overflow: hidden;
  background: #000;
  border: 1.5px solid rgba(252,184,39,.4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(252,184,39,.2);
}
.footer-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.footer-brand {
  font-family: var(--font-display); letter-spacing: .06em;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-size: 1rem; font-weight: 400; display: block;
}
.footer-sub { color: var(--text-muted); font-size: 11px; display: block; margin-top: 6px; }
.footer-note { color: var(--text-muted); font-size: 10px; display: block; margin-top: 4px; }
.footer-ig { color: var(--brand); font-size: 11px; font-weight: 700; text-decoration: none; display: inline-block; margin-top: 14px; }
.footer-ig:hover { text-decoration: underline; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .card { padding: 20px; }
  .radio-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .imc-number { font-size: 72px; }
  .step-line { width: 24px; }
  .hero .tagline { font-size: 10px; letter-spacing: 2px; }
  .topbar__shop span { display: none; }
  .topbar__shop { padding: 8px; }
}
