/* ============================================================
 * RESET & BASE
 * ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --radius: 0.625rem;
  --background: #1a0f08;
  --foreground: #faf3e8;
  --card: #261812;
  --card-foreground: #faf3e8;
  --border: #4a3328;
  --input: #2a1d14;
  --muted: #3d2b20;
  --muted-foreground: #c4a882;
  --accent: #ffb347;
  --accent-foreground: #1a0f08;
  --primary: #e85d3f;
  --primary-foreground: #faf3e8;
  --secondary: #f09340;
  --secondary-foreground: #1a0f08;
  --wood: #7a4f2e;
  --ember: #ff6b35;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Color Emoji', system-ui, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(232,93,63,0.18), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(240,147,64,0.15), transparent 55%);
  background-attachment: fixed;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' style='font-size:24px'%3E%3Ctext y='24'%3E🔥%3C/text%3E%3C/svg%3E") 14 14, auto;
}
button, .cursor-pointer, .toggle-btn, .tipo-btn, .stepper-btn, a {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' style='font-size:28px'%3E%3Ctext y='28'%3E🔥%3C/text%3E%3C/svg%3E") 16 16, pointer !important;
}
h1, h2, h3, .font-display {
  font-family: 'Anton', 'Noto Color Emoji', 'Bebas Neue', Impact, sans-serif;
  letter-spacing: 0.02em;
}

/* ============================================================
 * ACCESSIBILITY & FOCUS
 * ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ============================================================
 * EMBERS ANIMATION
 * ============================================================ */
@keyframes flicker {
  0%, 100% { opacity: 1; transform: translateY(0) scale(1); }
  50% { opacity: 0.85; transform: translateY(-2px) scale(1.02); }
}
@keyframes ember-rise {
  0% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50% { transform: translate(calc(var(--drift, 0px) / 2), -50vh) scale(0.7); opacity: 0.8; }
  100% { transform: translate(var(--drift, 0px), -110vh) scale(0.2); opacity: 0; }
}
.animate-flicker { animation: flicker 2.4s ease-in-out infinite; }
.embers-container {
  position: fixed; top: 0; bottom: 0; left: 0; right: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.ember {
  position: absolute; bottom: -20px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  filter: blur(1px);
  animation: ember-rise var(--dur) ease-in var(--delay) infinite;
}

/* ============================================================
 * UTILITIES
 * ============================================================ */
.text-fire {
  background: linear-gradient(135deg, #e85d3f, #f09340, #ffb347);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.bg-fire { background: linear-gradient(135deg, #e85d3f, #f09340, #ffb347); }
.shadow-fire { box-shadow: 0 20px 60px -20px rgba(232,93,63,0.55); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.relative { position: relative; }
.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-24 { margin-bottom: 6rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-10 { padding-bottom: 2.5rem; }
.pb-24 { padding-bottom: 6rem; }
.pt-12 { padding-top: 3rem; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-4xl { font-size: clamp(2.25rem, 4vw + 1rem, 3rem); }
.text-6xl { font-size: clamp(2.75rem, 6vw + 1rem, 5rem); }
.leading-none { line-height: 1; }
.rounded-full { border-radius: 9999px; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.w-full { width: 100%; }
.max-w-3xl { max-width: 48rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-xl { max-width: 36rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.inline-flex { display: inline-flex; }
.z-10 { z-index: 10; }
.transition { transition: all 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }
.hover\:scale-102:hover { transform: scale(1.02); }
.active\:scale-98:active { transform: scale(0.98); }
.overflow-hidden { overflow: hidden; }
.group { position: relative; }
.cursor-pointer { cursor: pointer; }
.flex-col { flex-direction: column; }
.text-left { text-align: left; }
.flex-wrap { flex-wrap: wrap; }

/* ============================================================
 * HEADER
 * ============================================================ */
.header-badge {
  display: inline-flex; align-items: center; gap: 0.75rem;
  border: 1px solid rgba(74,51,40,0.6);
  background: rgba(38,24,18,0.6);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted-foreground);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============================================================
 * NAVIGATION MENU
 * ============================================================ */
.nav-menu {
  display: flex; gap: 1rem; justify-content: center;
  margin-top: 2rem; margin-bottom: 2rem;
  flex-wrap: wrap;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(42,29,20,0.6);
  border: 1px solid rgba(74,51,40,0.7);
  border-radius: 9999px;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 600; font-size: 0.875rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}
.nav-link:hover {
  border-color: rgba(255,179,71,0.5);
  color: var(--foreground);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(232,93,63,0.3);
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(232,93,63,0.2), rgba(240,147,64,0.15));
  border-color: var(--accent);
  color: var(--foreground);
}

/* ============================================================
 * FORM CARD
 * ============================================================ */
.form-card {
  position: relative;
  border: 1px solid rgba(74,51,40,0.7);
  background: rgba(38,24,18,0.7);
  border-radius: 1.5rem;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px -20px rgba(232,93,63,0.55);
}
.form-card::before {
  content: '';
  position: absolute; top: -1px; left: 3rem; right: 3rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.8;
}

/* ============================================================
 * STEPPER
 * ============================================================ */
.stepper-label {
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  display: block;
}
.stepper-box {
  display: flex; align-items: center;
  height: 3.5rem;
  border: 1px solid var(--border);
  background: rgba(42,29,20,0.4);
  border-radius: 1rem;
  padding: 0 0.5rem;
}
.stepper-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border: none; border-radius: 0.75rem;
  background: var(--muted);
  color: var(--foreground);
  font-size: 1.25rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.stepper-btn:hover {
  background: var(--primary); color: var(--primary-foreground);
}
.stepper-value {
  flex: 1; text-align: center;
  font-size: 1.25rem; font-weight: 700;
  min-width: 3rem;
  background: transparent;
  border: none;
  color: var(--foreground);
  -moz-appearance: textfield;
}
.stepper-value:focus {
  outline: none;
}
.stepper-value::-webkit-inner-spin-button,
.stepper-value::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============================================================
 * TOGGLE / TIPO SELECTOR
 * ============================================================ */
.toggle-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  height: 3.5rem; border-radius: 1rem; border: 1px solid var(--border);
  padding: 0 1.25rem;
  background: rgba(42,29,20,0.4);
  cursor: pointer; transition: all 0.3s;
  color: var(--muted-foreground);
}
.toggle-btn.active {
  border-color: rgba(255,179,71,0.7);
  background: rgba(255,179,71,0.15);
  color: var(--foreground);
}
.toggle-switch {
  position: relative; width: 3rem; height: 1.75rem;
  border-radius: 9999px; transition: background 0.3s;
}
.toggle-switch .knob {
  position: absolute; top: 2px;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  background: var(--background);
  transition: left 0.3s;
}
.toggle-btn.active .toggle-switch { background: linear-gradient(135deg, #e85d3f, #f09340, #ffb347); }
.toggle-btn.active .knob { left: 22px; }
.toggle-btn:not(.active) .toggle-switch { background: var(--muted); }
.toggle-btn:not(.active) .knob { left: 2px; }

/* TIPO BUTTONS */
.tipo-btn {
  position: relative; overflow: hidden;
  border-radius: 1rem; border: 1px solid var(--border);
  padding: 0.75rem;
  background: rgba(42,29,20,0.3);
  color: var(--muted-foreground);
  cursor: pointer; transition: all 0.3s;
  text-align: left;
  flex: 1;
}
.tipo-btn:hover { border-color: rgba(255,179,71,0.5); color: var(--foreground); }
.tipo-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(232,93,63,0.3), rgba(240,147,64,0.2), rgba(255,179,71,0.2));
  color: var(--foreground);
}
.tipo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }

/* ============================================================
 * CALCULATE BUTTON
 * ============================================================ */
.calc-btn {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; width: 100%;
  border: none; border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #e85d3f, #f09340, #ffb347);
  color: var(--primary-foreground);
  font-size: 1.125rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  cursor: pointer; transition: all 0.3s;
  box-shadow: 0 20px 60px -20px rgba(232,93,63,0.55);
}
.calc-btn:hover { transform: scale(1.02); }
.calc-btn:active { transform: scale(0.98); }
.calc-btn .shine {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s;
}
.calc-btn:hover .shine { transform: translateX(100%); }

/* ============================================================
 * RESULT CARDS
 * ============================================================ */
.categoria-section { margin-bottom: 2rem; }
.categoria-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.categoria-header h3 {
  font-size: 1.5rem; color: var(--foreground);
}
.categoria-header .icon {
  font-size: 1.5rem; width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232,93,63,0.15);
  border-radius: 0.75rem;
}
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.item-card {
  border: 1px solid var(--border);
  background: rgba(38,24,18,0.6);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 0.875rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.item-card:hover {
  border-color: rgba(255,179,71,0.5);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(232,93,63,0.3);
}
.item-emoji { font-size: 1.75rem; flex-shrink: 0; }
.item-name { font-size: 0.9rem; font-weight: 600; color: var(--foreground); }
.item-qtd { font-size: 1.05rem; font-weight: 700; color: var(--accent); }

/* ============================================================
 * CONTENT CARDS (TIPS)
 * ============================================================ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.tip-card {
  border: 1px solid var(--border);
  background: rgba(38,24,18,0.6);
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
}
.tip-card:hover {
  border-color: rgba(255,179,71,0.5);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(232,93,63,0.3);
}
.tip-card h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.tip-card p {
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-align: justify;
}
.tip-card .best-for {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(74,51,40,0.4);
  font-weight: 600;
  color: var(--foreground);
  font-size: 0.875rem;
}

/* ============================================================
 * FOOTER
 * ============================================================ */
footer {
  border-top: 1px solid rgba(74,51,40,0.6);
  background: rgba(38,24,18,0.4);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.donate-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: rgba(42,29,20,0.8);
  border: 1px solid var(--accent);
  border-radius: 9999px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700; font-size: 0.9rem;
  transition: all 0.3s ease;
}
.donate-btn:hover {
  background: var(--accent);
  color: var(--accent-foreground);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(255,179,71,0.4);
}

/* ============================================================
 * RESPONSIVE
 * ============================================================ */
@media (min-width: 640px) {
  .form-card { padding: 2.5rem; }
  .tipo-btn { padding: 1rem; }
  .items-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .pt-12 { padding-top: 5rem; }
}
@media (max-width: 480px) {
  .items-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .tipo-grid { gap: 0.35rem; }
  .tipo-btn { padding: 0.5rem; }
}
