/* Campfire — one page, phone first, light by day and dark by night (follows the phone). */

:root {
  --bg: #fbf4ea;
  --glow: #ffd9b0;
  --card: #fffaf3;
  --line: #ecdcc8;
  --text: #2b1d12;
  --muted: #6e5a48;
  --ember: #c2410c;
  --ember-text: #b13a0a;
  --soft: #fde7d3;
  --shadow: 0 1px 2px rgb(60 30 10 / 0.06), 0 8px 24px rgb(60 30 10 / 0.07);
  --radius: 18px;
  --font: "Noto Sans Hebrew", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130e0a;
    --glow: #4a230d;
    --card: #1d1510;
    --line: #34271d;
    --text: #f6ecdf;
    --muted: #bba792;
    --ember: #ff7b2e;
    --ember-text: #ff9a52;
    --soft: #33200f;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.35), 0 10px 30px rgb(0 0 0 / 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(90% 420px at 50% -60px, var(--glow), transparent 75%),
    var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
}

.page {
  max-width: 560px;
  margin-inline: auto;
  padding: 28px 16px calc(40px + env(safe-area-inset-bottom));
}

h1, h2 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--muted); }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { text-align: center; padding-block: 8px 6px; }

.fire { position: relative; width: 120px; height: 120px; margin: 0 auto 6px; }
.fire svg { display: block; overflow: visible; }

.flame-outer, .flame-inner { transform-box: fill-box; transform-origin: 50% 100%; }
.flame-outer { animation: flicker 1.7s ease-in-out infinite alternate; }
.flame-inner { animation: flicker 1.15s ease-in-out infinite alternate-reverse; }

@keyframes flicker {
  0%   { transform: scale(1, 1) skewX(0deg); }
  35%  { transform: scale(0.97, 1.05) skewX(1.6deg); }
  70%  { transform: scale(1.02, 0.97) skewX(-1.4deg); }
  100% { transform: scale(0.99, 1.03) skewX(0.8deg); }
}

.spark {
  position: absolute; bottom: 58px; left: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: #ffb347; box-shadow: 0 0 6px #ff8a2a;
  opacity: 0;
  animation: rise 2.6s ease-out infinite;
}
.s1 { margin-left: -14px; animation-delay: 0s; }
.s2 { margin-left: 9px;  animation-delay: 0.7s; animation-duration: 3s; }
.s3 { margin-left: -4px; animation-delay: 1.3s; }
.s4 { margin-left: 15px; animation-delay: 1.9s; animation-duration: 2.3s; }
.s5 { margin-left: -19px; animation-delay: 2.2s; animation-duration: 3.2s; }

@keyframes rise {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translate(6px, -78px) scale(0.4); opacity: 0; }
}

.kicker { color: var(--ember-text); font-weight: 500; font-size: 15px; }

.hero h1 {
  font-size: clamp(40px, 12vw, 56px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.countdown {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ember-text);
  font-weight: 500;
  font-size: 15px;
}
.countdown:empty { display: none; }

.facts { margin: 20px 0 0; display: grid; gap: 10px; text-align: start; }
.fact {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.fact dt { color: var(--muted); font-size: 14px; }
.fact dd { margin: 0; }
.fact-note { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.fact-note:empty { display: none; }

.nav-buttons { display: flex; gap: 10px; margin-top: 10px; }
.nav-buttons:empty { display: none; }
.nav-buttons .btn { flex: 1; }

.intro { margin-top: 16px; color: var(--muted); text-wrap: pretty; }

/* ── Jump links to the sections ───────────────────────────────────────── */

.jump {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}
.jump a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.jump a:active { background: var(--soft); }

/* ── Cards and sections ───────────────────────────────────────────────── */

.card {
  margin-top: 16px;
  padding: 20px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 12px;
}
.card h2 { font-size: 24px; font-weight: 700; }

.section-head { display: flex; align-items: flex-start; gap: 12px; }
.badge {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--soft);
  font-size: 22px; line-height: 1;
}
.section-head h2 { margin-top: 6px; }
.note { color: var(--muted); font-size: 15px; margin-top: 4px; text-wrap: pretty; }

.list { margin-top: 12px; }
.list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list .qty { color: var(--muted); white-space: nowrap; font-size: 15px; }

.bring { margin-top: 12px; display: grid; gap: 10px; }
.bring li { position: relative; padding-inline-start: 22px; text-wrap: pretty; }
.bring li::before {
  content: "✓"; position: absolute; inset-inline-start: 2px; top: 0;
  color: var(--ember-text); font-weight: 700;
}

.cost { font-size: 30px; font-weight: 800; margin-top: 6px; color: var(--ember-text); }
.cost + .muted { margin-top: 2px; }

/* ── Buttons, footer, toast ───────────────────────────────────────────── */

.btn {
  appearance: none;
  font: inherit;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn.ghost { background: transparent; color: var(--ember-text); border-color: var(--line); }
.btn:focus-visible, .jump a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ember) 55%, transparent);
  outline-offset: 2px;
}

.foot { text-align: center; margin-top: 28px; display: grid; gap: 12px; justify-items: center; }
.foot p { font-size: 22px; font-weight: 800; color: var(--ember-text); }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: calc(100% - 32px);
  padding: 10px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 500; font-size: 15px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flame-outer, .flame-inner, .spark { animation: none; }
  .spark { display: none; }
  .toast { transition: none; }
}
