:root {
  --bg-top: #101828;
  --bg-bottom: #1b2a4a;
  --fg: #e7ecf5;
  --fg-muted: #93a1b8;
  --accent: #7ee0ff;
  --card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.12);
  --quote-fade: 300ms;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--fg);
  line-height: 1.5;
}

.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}

.gear {
  color: var(--accent);
  animation: spin 12s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 650;
  max-width: 28ch;
}

h1.text-medium {
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  max-width: 44ch;
}

h1.text-long {
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  max-width: 60ch;
}

.text-sub {
  margin: 0;
  max-width: 46ch;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--fg-muted);
}

.emergency-contact {
  margin: 0;
  max-width: 46ch;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.footer {
  margin: 0.3rem 0 0;
  max-width: 46ch;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--fg-muted);
  opacity: 0.7;
}

.logo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2rem;
}

.logo-header img {
  display: block;
  height: 64px;
  width: auto;
  min-width: 64px;
  max-width: 20rem;
  object-fit: contain;
}

.countdown {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
}

.cd-label {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cd-grid {
  display: flex;
  gap: 0.6rem;
}

.cd-box {
  min-width: 76px;
  padding: 0.9rem 0.5rem 0.6rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.cd-box span {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.cd-box small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cd-done {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
}

.faq {
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: 0 1.5rem 4.5rem;
}

.faq h2 {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 0 0 0.9rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.5rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: 0.6rem 0 0.2rem;
  color: var(--fg);
}

.quote-corner {
  position: fixed;
  top: 1rem;
  right: 1rem;
  max-width: 26rem;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--fg-muted);
  opacity: 0.85;
  transition: opacity var(--quote-fade, 300ms) ease;
}

.quote-corner.fade {
  opacity: 0;
}

.corner-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.35rem;
}

.corner-toggle button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.corner-toggle button:hover {
  color: var(--fg);
}

.corner-toggle button.active {
  color: var(--bg-top);
  background: var(--accent);
  border-color: var(--accent);
}

.campfire {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  width: 90px;
  height: 110px;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.campfire .glow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 120px;
  height: 64px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 140, 40, 0.4), rgba(255, 100, 20, 0.12) 55%, transparent 75%);
  animation: campfire-pulse 3s ease-in-out infinite;
}

.campfire .flame {
  position: absolute;
  left: 50%;
  transform: rotate(45deg);
  transform-origin: 50% 100%;
  border-radius: 0 50% 50% 50%;
  filter: blur(1.5px);
}

.campfire .flame-outer {
  bottom: 14px;
  width: 40px;
  height: 40px;
  margin-left: -30px;
  background: radial-gradient(circle at 50% 88%, #ff6d00 0%, #e64a19 55%, #b71c1c 100%);
  animation: campfire-sway 2.6s ease-in-out infinite;
}

.campfire .flame-mid {
  bottom: 16px;
  width: 27px;
  height: 27px;
  margin-left: -18px;
  background: radial-gradient(circle at 50% 86%, #ffb300 0%, #ff8f00 60%, #ff6d00 100%);
  animation: campfire-sway 2.1s ease-in-out -0.7s infinite;
}

.campfire .flame-core {
  bottom: 18px;
  width: 15px;
  height: 15px;
  margin-left: -10px;
  background: radial-gradient(circle at 50% 82%, #fffde7 0%, #b3e5fc 65%, #4fc3f7 100%);
  filter: blur(1px);
  animation: campfire-sway 1.7s ease-in-out -0.4s infinite;
}

.campfire .spark {
  position: absolute;
  bottom: 40px;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffcc80;
  opacity: 0;
  animation: campfire-spark 3.4s linear infinite;
}

.campfire .coal {
  position: absolute;
  bottom: 11px;
  left: 50%;
  width: 7px;
  height: 4px;
  border-radius: 50%;
  background: #ff9800;
  box-shadow: 0 0 6px 1px rgba(255, 120, 30, 0.8);
  animation: campfire-ember 2.4s ease-in-out infinite;
}

.campfire .log {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 76px;
  height: 11px;
  margin-left: -38px;
  border-radius: 6px;
  background: linear-gradient(180deg, #6d4527, #3f2712);
}

.campfire .log-left {
  transform: rotate(16deg);
}

.campfire .log-right {
  transform: rotate(-16deg);
}

@keyframes campfire-sway {
  0%, 100% { transform: rotate(45deg) scale(1, 1); }
  25% { transform: rotate(43.5deg) scale(1.02, 1.05); }
  50% { transform: rotate(46deg) scale(0.97, 0.96); }
  75% { transform: rotate(44deg) scale(1.01, 1.03); }
}

@keyframes campfire-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  12% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(5px, -60px) scale(0.35); }
}

@keyframes campfire-pulse {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.55; transform: translateX(-50%) scale(0.88); }
}

@keyframes campfire-ember {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.45; }
}

.center, .faq {
  position: relative;
  z-index: 1;
}

.corner-toggle, .quote-corner {
  z-index: 1;
}

@media (max-width: 640px) {
  .quote-corner {
    position: static;
    max-width: 100%;
    margin: 0.75rem auto 0;
    padding: 0 1.5rem;
  }

  body {
    padding-top: 0.5rem;
  }

  .campfire {
    transform: scale(0.72);
    transform-origin: bottom left;
    opacity: 0.55;
  }

  .cd-box {
    min-width: 64px;
  }

  .cd-box span {
    font-size: 1.7rem;
  }

  .logo-header img {
    height: 44px;
  }
}
