/* ============================================================
   IndieSouls — indiesouls.io
   Dark bonfire theme · pixel accents · no dependencies
   ============================================================ */

:root {
  --bg0: #07080c;
  --bg1: #0b0e14;
  --bg2: #0c0f16;
  --line: #232a36;
  --text: #e9e4da;
  --muted: #9b948a;
  --faint: #7d776d;
  --ember: #ff8c3b;
  --ember-deep: #e8542f;
  --gold: #ffd27a;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-pixel: 'Press Start 2P', monospace;
  --n: 8px; /* pixel-notch size for buttons */
  color-scheme: dark;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% 100%, rgba(255, 110, 40, 0.07), transparent 60%),
    radial-gradient(900px 500px at 85% -10%, rgba(90, 120, 200, 0.05), transparent 60%),
    var(--bg0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

::selection { background: var(--ember); color: #140b04; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: #222836; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #333c4f; }

a { color: var(--ember); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ---------- atmosphere layers ---------- */
.grain {
  position: fixed; inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

#embers {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
}

header, main, footer { position: relative; z-index: 2; }

/* ---------- layout ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}

.section { padding: 108px 0; position: relative; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; }

h1 {
  font-size: clamp(2.7rem, 7.5vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 40px rgba(255, 140, 60, 0.15);
}

h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  line-height: 1.15;
  margin: 14px 0 18px;
}

.lead {
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.75;
  font-size: 1.03rem;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #d99a55;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 12px;
  line-height: 1.8;
}
.eyebrow span { white-space: nowrap; }

.ember-text {
  background: linear-gradient(180deg, var(--gold), var(--ember) 55%, var(--ember-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 140, 60, 0.35));
}

.dia {
  width: 6px; height: 6px;
  background: var(--ember);
  transform: rotate(45deg);
  display: inline-block;
  flex: none;
  box-shadow: 0 0 8px rgba(255, 140, 60, 0.5);
}

/* ---------- pixel art mounts ---------- */
[data-px] svg { width: 100%; height: 100%; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  isolation: isolate; /* keep the notched ::before/::after glow inside the button's own stacking context */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  font: 700 12px/1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  border: 0;
  background: none;
  transition: transform 0.2s ease;
}

.btn-primary { color: #190c02; }

.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #ffb45e, var(--ember) 55%, #f26b2a);
  clip-path: polygon(
    0 var(--n), var(--n) var(--n), var(--n) 0,
    calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n),
    100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)),
    calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - var(--n)),
    0 calc(100% - var(--n))
  );
  transition: filter 0.2s ease;
}

.btn-primary::after {
  content: "";
  position: absolute; inset: -10px;
  z-index: -2;
  background: radial-gradient(closest-side, rgba(255, 140, 60, 0.4), transparent 72%);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:hover::before { filter: brightness(1.08); }
.btn-primary:hover::after { opacity: 1; }

.btn-ghost {
  border: 1px solid #2c3442;
  background: rgba(12, 15, 22, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 60, 0.6);
  color: var(--gold);
}

.btn-small { padding: 10px 16px; font-size: 10.5px; letter-spacing: 0.12em; --n: 5px; }
.btn-block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 9, 13, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(35, 42, 54, 0.6);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 18px; aspect-ratio: 8 / 10; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  color: var(--text);
}
.brand-name em { font-style: normal; color: var(--ember); }

.nav-links { display: flex; align-items: center; gap: 26px; }

.nav-links a:not(.btn) {
  font: 500 12px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a49d91;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover { color: var(--gold); }

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.burger span {
  width: 20px; height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav.open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .burger span:nth-child(2) { opacity: 0; }
.nav.open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 130px 0 40px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
  width: 100%;
}

.hero .eyebrow { justify-content: center; }

.hero-sub {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
  max-width: 56ch;
}

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-left { justify-content: flex-start; margin-top: 48px; }

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}
.chips li {
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1;
  color: #a89f92;
  border: 1px solid #262d3a;
  background: rgba(12, 15, 22, 0.66);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chips li::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--ember);
  transform: rotate(45deg);
}
.chips-left { justify-content: flex-start; margin-top: 28px; }

/* ---------- bonfire ---------- */
.bonfire {
  position: relative;
  width: clamp(170px, 22vw, 240px);
  margin-top: 18px;
  cursor: pointer;
  transition: filter 0.3s ease;
}
.bonfire:hover { filter: brightness(1.1); }

.bonfire-frames {
  position: relative;
  width: 100%;
  aspect-ratio: 20 / 22;
}
.frame { position: absolute; inset: 0; }
.frame-b { opacity: 0; animation: flick 0.8s steps(1, end) infinite; }

@keyframes flick {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

.bonfire-glow {
  position: absolute;
  inset: -30% -55%;
  background: radial-gradient(closest-side, rgba(255, 140, 60, 0.26), rgba(255, 140, 60, 0.07) 45%, transparent 72%);
  animation: glowpulse 2.6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes glowpulse {
  from { opacity: 0.75; transform: scale(0.96); }
  to   { opacity: 1;    transform: scale(1.04); }
}

/* ---------- ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: rgba(255, 140, 60, 0.03);
  overflow: hidden;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: tick 46s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.seq {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 15px 3rem 15px 0;
}
.seq span {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #7e786d;
  white-space: nowrap;
}

@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}

.card {
  position: relative;
  background: rgba(13, 17, 25, 0.82);
  border: 1px solid #1f2632;
  padding: 30px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 140, 60, 0.45);
}
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--ember);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.card:hover::before, .card:hover::after { opacity: 1; }

.card-icon { display: inline-block; width: 44px; aspect-ratio: 1; margin-bottom: 18px; }

.card h3 {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 10px;
}

/* ---------- checklist ---------- */
.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
  margin-top: 44px;
  list-style: none;
}
.checklist li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 8px; height: 8px;
  background: var(--ember);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(255, 140, 60, 0.4);
}
.checklist strong { color: var(--text); font-weight: 600; }

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 60px;
}
.step {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.step-num {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--ember);
  text-shadow: 0 0 12px rgba(255, 140, 60, 0.5);
}
.step h3 {
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 12px 0 8px;
}
.step p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }

/* ---------- forge strip ---------- */
.forge {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #2a2417;
  background: linear-gradient(90deg, rgba(255, 140, 60, 0.06), transparent 70%);
  padding: 18px 22px;
  margin-top: 56px;
}
.forge-dot {
  flex: none;
  width: 10px; height: 10px;
  background: var(--ember);
  box-shadow: 0 0 12px 2px rgba(255, 140, 60, 0.6);
  animation: glowpulse 1.6s ease-in-out infinite alternate;
}
.forge p {
  font-family: var(--font-pixel);
  font-size: 8.5px;
  line-height: 1.9;
  color: #b9b2a6;
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-mail { margin-top: 30px; color: var(--muted); font-size: 0.95rem; }
.contact-mail a {
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
}
.contact-mail a:hover { text-decoration: underline; }

.contact-note { margin-top: 18px; color: var(--faint); font-size: 0.88rem; }

.form-card {
  position: relative;
  background: rgba(12, 15, 22, 0.82);
  border: 1px solid var(--line);
  padding: 30px 28px;
}
.form-card::before, .form-card::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid rgba(255, 140, 60, 0.5);
  opacity: 0.7;
}
.form-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.form-card::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row .field { margin-bottom: 0; }
.form-row, .field { margin-bottom: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input, .field select, .field textarea {
  background: #080b10;
  border: 1px solid #202634;
  color: var(--text);
  padding: 12px;
  font: 400 15px/1.5 var(--font-body);
  border-radius: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 140, 60, 0.14);
}
.field ::placeholder { color: #57534b; }
.field textarea { resize: vertical; min-height: 120px; }

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a49d91'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-alert {
  margin-top: 16px;
  color: #ff9d7a;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid rgba(232, 84, 47, 0.4);
  background: rgba(232, 84, 47, 0.08);
  padding: 12px 14px;
}
.form-alert small { color: var(--faint); display: block; margin-top: 4px; }

.form-success {
  text-align: center;
  padding: 56px 28px;
  border: 1px solid rgba(255, 140, 60, 0.35);
  background: rgba(13, 17, 25, 0.82);
}
.success-flame {
  width: 46px;
  aspect-ratio: 8 / 10;
  display: inline-block;
  filter: drop-shadow(0 0 16px rgba(255, 140, 60, 0.5));
  margin-bottom: 14px;
}
.form-success h3 { font-size: 1.5rem; margin-bottom: 8px; }
.form-success p { color: var(--muted); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 28px;
  background: rgba(9, 11, 16, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.footer-col h4 {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #8a8478;
  margin-bottom: 16px;
  letter-spacing: 0.08em;
}
.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 22px;
  color: var(--faint);
  font-size: 0.85rem;
}

.you-died {
  background: none;
  border: 0;
  font-family: var(--font-pixel);
  font-size: 9px;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  padding: 10px 0;
}
.yd { color: #b3402e; letter-spacing: 0.18em; }
.rs {
  color: var(--ember);
  border-bottom: 1px dashed rgba(255, 140, 60, 0.5);
  transition: color 0.2s ease;
}
.you-died:hover .rs { color: var(--gold); }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 780px) {
  .burger { display: flex; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 22px 22px;
    background: rgba(8, 10, 15, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 0; font-size: 13px; }
  .nav-links .btn { margin-top: 12px; }
}

@media (max-width: 700px) {
  .checklist { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 84px 0; }
  .eyebrow { font-size: 8px; }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .frame-b { animation: none; }
  .bonfire-glow, .forge-dot { animation: none; }
  .btn, .card { transition: none; }
}
