/* Flame website: shared styles. Dark, warm, ember-lit. */

:root {
  --bg: #120d0b;
  --bg-2: #1b1310;
  --card: #231813;
  --line: #3a2a22;
  --text: #f4e9df;
  --muted: #b7a597;
  --ember: #ff8a3d;
  --flame: #ff5a1f;
  --gold: #ffc861;
  --radius: 16px;
  --maxw: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ember); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

#embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
header, main, footer { position: relative; z-index: 1; }

.wrap { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 13, 11, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 1.25rem;
  color: var(--text); text-decoration: none; letter-spacing: 0.02em;
}
.brand svg { width: 28px; height: 28px; animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 8px 14px;
  border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover { color: var(--text); background: var(--card); }
.nav a[aria-current="page"] { color: #1a0f08; background: var(--ember); }
.menu-btn {
  display: none; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px;
  font-size: 1.2rem; cursor: pointer;
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; text-align: center; }
.hero .flame-logo { width: 96px; height: 96px; margin: 0 auto 20px; animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; filter: drop-shadow(0 0 28px rgba(255, 110, 40, 0.55)); }
.hero h1 {
  font-family: var(--display); font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.01em;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--gold), var(--ember), var(--flame));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { max-width: 620px; margin: 0 auto 28px; font-size: 1.15rem; color: var(--muted); }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700;
  text-decoration: none; border: 1px solid var(--line); color: var(--text);
  background: var(--card); transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); color: var(--text); background: #2c1e17; }
.btn.primary {
  background: linear-gradient(135deg, var(--ember), var(--flame)); color: #1a0f08; border: 0;
  box-shadow: 0 8px 26px rgba(255, 90, 31, 0.3);
}
.btn.primary:hover { color: #1a0f08; box-shadow: 0 12px 34px rgba(255, 90, 31, 0.45); background: linear-gradient(135deg, var(--gold), var(--ember)); }

/* ---------- sections / cards ---------- */
section.block { padding: 44px 0; }
.block h2 { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 8px; }
.block .sub { color: var(--muted); margin: 0 0 24px; max-width: 640px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: transform 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--ember); }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card .ico { font-size: 1.6rem; line-height: 1; margin-bottom: 10px; }

.steps { counter-reset: s; display: grid; gap: 12px; padding: 0; list-style: none; margin: 0; }
.steps li {
  counter-increment: s; position: relative; padding: 14px 16px 14px 60px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ember), var(--flame)); color: #1a0f08; font-weight: 800;
}

.contact-card {
  background: linear-gradient(135deg, #2a1a12, #1f140f); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; display: flex; gap: 16px;
  align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.contact-card p { margin: 0; color: var(--muted); }
.contact-card strong { color: var(--text); }

/* ---------- legal pages ---------- */
.page-head { padding: 48px 0 20px; }
.page-head h1 { font-family: var(--display); font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); }
.legal { display: grid; grid-template-columns: 230px 1fr; gap: 36px; padding-bottom: 56px; align-items: start; }
.toc { position: sticky; top: 84px; font-size: 0.92rem; }
.toc strong { display: block; margin-bottom: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a {
  display: block; padding: 5px 12px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--ember); border-left-color: var(--ember); font-weight: 600; }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px clamp(18px, 4vw, 40px); }
.doc h2 { font-family: var(--display); font-size: 1.35rem; margin: 32px 0 8px; color: var(--gold); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.05rem; margin: 18px 0 4px; }
.doc p, .doc li { color: #e2d3c6; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.note {
  border-left: 3px solid var(--ember); background: rgba(255, 138, 61, 0.08);
  padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 14px 0;
}
.table-scroll { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0; margin-top: 24px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 0.92rem; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--gold); }

/* ---------- animation ---------- */
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.06, 1.1) rotate(-2deg); }
  50% { transform: scale(0.97, 1.04) rotate(1.5deg); }
  75% { transform: scale(1.05, 1.08) rotate(-1deg); }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.hero > .wrap > * { animation: rise 0.7s ease both; }
.hero > .wrap > *:nth-child(2) { animation-delay: 0.08s; }
.hero > .wrap > *:nth-child(3) { animation-delay: 0.16s; }
.hero > .wrap > *:nth-child(4) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  #embers { display: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .legal { grid-template-columns: 1fr; gap: 14px; }
  .toc { position: static; }
  .toc ol { display: flex; gap: 6px; border: 0; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 0; font-size: 0.85rem; white-space: nowrap; }
  .toc a.active { border-color: var(--ember); }
}
@media (max-width: 640px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 16px 14px;
    display: none;
  }
  .nav.open { display: flex; animation: rise 0.25s ease both; }
  .hero { padding: 40px 0 28px; }
  .hero .flame-logo { width: 72px; height: 72px; }
  section.block { padding: 28px 0; }
  .doc { padding: 20px 16px; }
}
