/* =========================================================================
   Reboot Lab · Design System
   Based on Paleta 2 + Montserrat + style guide Reboot Lifestyle
   ========================================================================= */

:root {
  /* Brand */
  --c-black: #0f0f0f;
  --c-deep: #02251f;
  --c-turquoise: #76d3d1;
  --c-carrot: #e85c26;
  --c-cream: #f3f6fb;
  --c-yellow: #fae62b;          /* Arie yellow brand — NO usar para verdicts */
  --c-text: #1a1a1a;
  --c-muted: #666;
  --c-border: #e3e7ee;

  /* Verdict palette · "Atardecer Caribe" (TCA-safe, sin rojo señal) */
  --verdict-green:  #7BA886;     /* aguacate sage */
  --verdict-green-bg:  rgba(123,168,134, 0.10);
  --verdict-green-line: rgba(123,168,134, 0.45);

  --verdict-yellow: #E8B84F;     /* miel mostaza */
  --verdict-yellow-bg: rgba(232,184,79, 0.10);
  --verdict-yellow-line: rgba(232,184,79, 0.45);

  --verdict-red:    #9B7BA8;     /* lavanda atardecer (NO es rojo) */
  --verdict-red-bg:    rgba(155,123,168, 0.12);
  --verdict-red-line:  rgba(155,123,168, 0.45);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --shadow-cta: 0 8px 24px rgba(232, 92, 38, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--c-text);
  background: var(--c-cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select { font-family: inherit; }

/* Header */
.site-header {
  background: var(--c-black);
  color: #fff;
  padding: 14px 0;
}
.site-header__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
}
.brand .accent { color: var(--c-turquoise); }
.lang-toggle {
  background: transparent;
  color: #aaa;
  border: 1px solid #333;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
}
.lang-toggle:hover { border-color: var(--c-turquoise); color: var(--c-turquoise); }

main { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 0; }

/* Hero */
.hero { text-align: center; }
.badge {
  display: inline-block;
  background: var(--c-yellow);
  color: var(--c-black);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2.5px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  margin: 0 0 18px;
}
h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.5px; }
h3 { font-size: 19px; font-weight: 700; }
.hl { color: var(--c-turquoise); }
.subtitle {
  font-size: 17px;
  color: var(--c-muted);
  margin: 0 0 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--c-carrot);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 28px;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.2s ease;
  min-height: 44px;
  text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 22px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  cursor: pointer;
  min-height: 44px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.btn-secondary:hover { border-color: var(--c-turquoise); }

.btn-ghost {
  background: transparent;
  color: var(--c-muted);
  font-weight: 600;
  padding: 10px 14px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.btn-ghost:hover { color: var(--c-turquoise); }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 6px;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 16px;
  background: #fff;
  min-height: 44px;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--c-turquoise);
}

/* Dashboard tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 28px 0;
}
.tile {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 24px 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: var(--c-text);
}
.tile:hover { border-color: var(--c-turquoise); transform: translateY(-2px); }
.tile__icon { font-size: 28px; margin-bottom: 10px; }
.tile__title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.tile__meta { font-size: 12px; color: var(--c-muted); }

/* Score display */
.score-hero {
  text-align: center;
  padding: 40px 0;
}
.score-hero__num {
  font-size: 140px;
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -6px;
  color: var(--c-text);
  margin: 0;
}
.score-hero__label {
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-top: 12px;
  font-weight: 700;
}
.verdict-pill {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 18px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.30);
}
.verdict-pill--zero { background: linear-gradient(135deg, #fee 0%, #fcd1d1 100%); color: #b91c1c; }
.verdict-pill--low { background: linear-gradient(135deg, #ffeed4 0%, #ffd9a8 100%); color: #a14a00; }
.verdict-pill--almost { background: linear-gradient(135deg, #fef7c0 0%, #fce793 100%); color: #854d0e; }
.verdict-pill--full {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f0c3 100%);
  color: #065f46;
  box-shadow: 0 6px 22px rgba(123,168,134,0.40), inset 0 1px 0 rgba(255,255,255,0.40);
  animation: result-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both, verdict-pulse 2.2s ease-in-out 1s infinite;
}
@keyframes verdict-pulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(123,168,134,0.40), inset 0 1px 0 rgba(255,255,255,0.40); }
  50%      { box-shadow: 0 6px 30px rgba(123,168,134,0.65), inset 0 1px 0 rgba(255,255,255,0.40); }
}
.verdict-pill--reboot { background: linear-gradient(135deg, var(--c-yellow) 0%, #f9d76b 100%); color: var(--c-black); }

/* Ingredient list */
.ingredient {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
}
.ingredient__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.ingredient__dot--ok { background: var(--verdict-green); }
.ingredient__dot--warn { background: var(--verdict-yellow); }
.ingredient__dot--bad { background: var(--verdict-red); }
.ingredient__name { font-weight: 600; font-size: 14px; }
.ingredient__did { font-size: 13px; color: var(--c-muted); margin-top: 4px; }

/* Dish list (for menus) */
.dish {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-left-width: 4px;
  border-radius: var(--r-sm);
  margin-bottom: 10px;
}
.dish--green { border-left-color: var(--verdict-green); background: var(--verdict-green-bg); }
.dish--yellow { border-left-color: var(--verdict-yellow); background: var(--verdict-yellow-bg); }
.dish--red { border-left-color: var(--verdict-red); background: var(--verdict-red-bg); }
.dish__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dish__name { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; }
.dish__brand {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 100px;
  text-transform: none;
  white-space: nowrap;
  border: 1px solid;
}
.dish__brand--green {
  background: rgba(123,168,134,0.18);
  color: #4d7a5b;
  border-color: rgba(123,168,134,0.5);
}
.dish__brand--yellow {
  background: rgba(232,184,79,0.2);
  color: #8a6a1f;
  border-color: rgba(232,184,79,0.55);
}
.dish__brand--red {
  background: rgba(155,123,168,0.18);
  color: #6e548a;
  border-color: rgba(155,123,168,0.5);
}
.dish__reason { font-size: 13px; color: var(--c-text); }
.dish__sub { font-size: 13px; color: var(--c-deep); background: rgba(118,211,209,0.15); padding: 8px 10px; border-radius: 6px; margin-top: 6px; }

/* Invites wallet */
.invite-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.invite-code {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--c-text);
}
.invite-rule {
  text-align: center;
  font-size: 15px;
  color: var(--c-muted);
  font-style: italic;
  padding: 20px 0;
}

/* Badges grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.badge-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 20px 16px;
  text-align: center;
}
.badge-card--locked { opacity: 0.45; }
.badge-card__icon { font-size: 36px; margin-bottom: 8px; }
.badge-card__name { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.badge-card__hint { font-size: 12px; color: var(--c-muted); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 36px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.modal__icon { font-size: 64px; margin-bottom: 16px; }

/* Footer */
.site-footer {
  max-width: 720px;
  margin: 60px auto 0;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--c-border);
}
.disclaimer { font-size: 12px; color: var(--c-muted); line-height: 1.6; }
.copyright { font-size: 11px; color: #999; margin-top: 12px; }

/* Loading */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--c-border);
  border-top-color: var(--c-turquoise);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 480px) {
  .section { padding: 28px 0; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .score-hero__num { font-size: 110px; }
  .badges-grid { grid-template-columns: 1fr 1fr; }
}
