:root {
  --bg: #0b0806;
  --ink: #f6e9dc;
  --muted: #b49a86;
  --ember: #ff6a1a;
  --ember-hot: #ffb347;
  --panel: rgba(30, 21, 16, .92);
  --line: rgba(255, 106, 26, .45);
  --danger: #ff4d3d;
  --ok: #6fdc8c;
  --display: "Cinzel", "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); overflow-x: hidden; }

.bg {
  position: fixed; inset: 0; z-index: 0;
  background: url("/logo.jpg") center / cover no-repeat;
  filter: blur(28px) brightness(.35) saturate(1.3);
  transform: scale(1.15);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 0%, var(--bg) 75%);
}
canvas#embers { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

main {
  position: relative; z-index: 2;
  max-width: 460px; margin: 0 auto;
  padding-block: 40px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}

.crest { position: relative; display: grid; place-items: center; }
.crest::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed rgba(255,140,50,.55);
  mask: conic-gradient(#000 0 30%, transparent 40% 55%, #000 70% 100%);
  -webkit-mask: conic-gradient(#000 0 30%, transparent 40% 55%, #000 70% 100%);
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.emblem {
  width: min(320px, 82vw); aspect-ratio: 1; max-width: 100%;
  border-radius: 50%;
  background: url("/logo.jpg") 50% 46% / 152% auto no-repeat;
  box-shadow: 0 0 60px rgba(255,106,26,.45), 0 0 140px rgba(255,106,26,.18);
  animation: glow 3.2s ease-in-out infinite;
}
@keyframes glow { 50% { box-shadow: 0 0 80px rgba(255,106,26,.65), 0 0 180px rgba(255,106,26,.28); } }

h1 {
  margin: 0;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(1.9rem, 9vw, 3rem); letter-spacing: .05em;
  text-align: center; line-height: 1;
  background: linear-gradient(180deg, var(--ember-hot), var(--ember) 60%, #a8320a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flicker 4s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.15) drop-shadow(0 0 10px rgba(255,106,26,.5)); }
  50% { filter: brightness(.92); }
  55% { filter: brightness(1.12) drop-shadow(0 0 14px rgba(255,106,26,.6)); }
}
.divider { display: flex; align-items: center; gap: 12px; width: 70%; margin-top: -10px; }
.divider i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--ember)); }
.divider i:last-child { background: linear-gradient(90deg, var(--ember), transparent); }
.gem {
  width: 12px; height: 18px; flex: none;
  background: linear-gradient(160deg, #ff8a6a, #d01a10 55%, #5a0505);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 0 6px rgba(255,40,20,.9));
}
.tag { margin: -14px 0 0; color: var(--muted); font-size: .8rem; letter-spacing: .28em; text-transform: uppercase; }

.links { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.btn {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(40,28,22,.92), rgba(22,16,12,.92));
  border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,179,71,.12), 0 6px 24px rgba(0,0,0,.5);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,150,60,.16), transparent);
  transform: skewX(-20deg);
  animation: sweep 5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .35s);
}
@keyframes sweep { 0%, 60% { left: -60%; } 85%, 100% { left: 130%; } }
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px); border-color: var(--ember-hot);
  box-shadow: inset 0 1px 0 rgba(255,179,71,.2), 0 0 28px rgba(255,106,26,.45);
  outline: none;
}
.ico {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--ember-hot), var(--ember) 55%, #8a2a08);
  box-shadow: 0 0 16px rgba(255,106,26,.6);
}
.ico svg { width: 22px; height: 22px; fill: #fff; }
.txt { display: flex; flex-direction: column; min-width: 0; }
.txt b { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: .06em; overflow-wrap: anywhere; }
.txt span { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.arrow { margin-left: auto; color: var(--ember); font-size: 1.4rem; }

footer { color: var(--muted); font-size: .75rem; letter-spacing: .1em; opacity: .7; }

@media (prefers-reduced-motion: reduce) {
  .emblem, h1, .crest::before, .btn::after { animation: none; }
  .btn { transition: none; }
}
