/* ============================================
   KINDLED FLAME STUDIOS — Design System
   Dark Ember Aesthetic
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  /* Ember Palette */
  --bg-void: #050505;
  --bg-deep: #0a0908;
  --bg-surface: #121010;
  --bg-raised: #1a1510;
  --bg-elevated: #221c14;

  /* Fire Accents */
  --ember: #e8720c;
  --ember-bright: #ff8a2e;
  --ember-glow: #f4a644;
  --ember-dim: #a85a0a;
  --flame: #ff6b1a;
  --coal: #3d2a14;

  /* Text */
  --text-primary: #e8ddd0;
  --text-secondary: #a89880;
  --text-muted: #6b5d4f;
  --text-faint: #3d3530;

  /* Fonts */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-accent: 'Crimson Pro', Georgia, serif;

  /* Spacing */
  --section-pad: clamp(60px, 10vw, 120px);
  --container-max: 1180px;
  --container-narrow: 800px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--ember-glow); text-decoration: none; transition: color 0.3s var(--ease-out); }
a:hover { color: var(--ember-bright); }

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

::selection { background: var(--ember); color: var(--bg-void); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.container--narrow { max-width: var(--container-narrow); }

section {
  padding: var(--section-pad) 0;
  position: relative;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

.text-gradient {
  background: linear-gradient(135deg, var(--ember-glow), var(--ember), var(--flame));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--text-secondary);
}

.text-muted { color: var(--text-secondary); }
.text-faint { color: var(--text-muted); }

.lead {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 clamp(20px, 4vw, 40px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: none;
  transition: background 0.4s;
  overflow: visible;
}

.nav.scrolled {
  background: rgba(5, 5, 5, 0.95);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.nav-logo .nav-logo-img { height: 28px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--ember);
  border-radius: 1px;
}

/* Account icon in nav */
.nav-account {
  display: flex;
  align-items: center;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-account a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  transition: all 0.3s;
}

.nav-account a:hover {
  background: rgba(232, 114, 12, 0.15);
  color: var(--ember-glow);
}

.nav-account svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Nav smoldering border */
.nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #c45a00 10%, #e8720c 25%, #ff8a2e 40%, #ffe066 50%, #ff8a2e 60%, #e8720c 75%, #c45a00 90%, transparent 100%);
  background-size: 200% 100%;
  animation: nav-smolder 6.5s ease-in-out infinite;
}

.nav::before {
  content: '';
  position: absolute;
  bottom: -4px; left: 10%; right: 10%;
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(232, 114, 12, 0.4), rgba(255, 138, 46, 0.3), rgba(232, 114, 12, 0.4), transparent);
  background-size: 200% 100%;
  animation: nav-smolder 6.5s ease-in-out infinite;
  filter: blur(6px);
  z-index: -1;
}

@keyframes nav-smolder {
  0% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    order: 10;
  }
  .nav-account {
    margin-left: auto;
    padding-left: 0;
    border-left: none;
    order: 9;
  }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    height: calc(100vh - 64px);
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out);
    z-index: 999;
    padding: 0;
    margin: 0;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { list-style: none; text-align: center; }
  .nav-links a {
    font-size: 1.3rem;
    color: var(--text-primary);
  }
  .nav-menu-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
  }
  .nav-menu-particles .ember-particle {
    position: absolute;
    bottom: -10px;
    opacity: 0;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: linear-gradient(135deg, var(--ember), var(--flame));
  color: var(--bg-void);
  box-shadow: 0 0 0 0 rgba(232, 114, 12, 0);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 114, 12, 0.25);
  color: var(--bg-void);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-muted);
}

.btn--ghost:hover {
  border-color: var(--ember);
  color: var(--ember-glow);
  transform: translateY(-2px);
}

.btn--sm { padding: 10px 22px; font-size: 0.85rem; }

/* --- Cards --- */
.card {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: clamp(24px, 3vw, 36px);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: visible;
  background:
    linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
    linear-gradient(135deg, #e8720c, #c45a00, #e8720c, #ff8a2e, #e8720c) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: fire-border-shift 15s ease-in-out infinite;
}

.card::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8720c, #ff8a2e, #ffe066, #ff8a2e, #e8720c);
  background-size: 300% 300%;
  animation: fire-border-shift 22s ease-in-out infinite;
  filter: blur(12px);
  opacity: 0.12;
  z-index: -1;
}

.card::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  background: linear-gradient(135deg, #c45a00, #e8720c, #ff8a2e, #e8720c, #c45a00);
  background-size: 400% 400%;
  animation: fire-border-shift 18s ease-in-out infinite reverse, fire-flicker 2.5s ease-in-out infinite alternate;
  filter: blur(20px);
  opacity: 0.06;
  z-index: -2;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
  opacity: 0.2;
}

.card--glow:hover {
  box-shadow: 0 12px 40px rgba(232, 114, 12, 0.08), 0 0 0 1px rgba(232, 114, 12, 0.12);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card__text {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.65;
}

/* --- Grids --- */
.grid { display: grid; gap: clamp(16px, 2.5vw, 24px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* --- Section Dividers --- */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--ember), transparent);
  border-radius: 2px;
  margin-bottom: 20px;
}

.divider--center { margin-left: auto; margin-right: auto; }

/* --- Badges --- */
.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--ember-dim);
  color: var(--ember-glow);
  background: rgba(232, 114, 12, 0.08);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
  position: relative;
  overflow: hidden;
}

/* Background atmosphere */
.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.hero-glow--left {
  top: -20%;
  left: -10%;
  width: 70vw;
  height: 70vw;
  background: rgba(232, 114, 12, 0.1);
  animation: glow-pulse 8s ease-in-out infinite;
}

.hero-glow--right {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: rgba(255, 138, 46, 0.05);
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Two-column grid */
.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: 1400px;
  width: 100%;
  position: relative;
  z-index: 2;
  flex: 1;
}

/* Hero bottom — KFS identity */
.hero-bottom {
  text-align: center;
  padding: 32px 20px 28px;
  width: 100%;
  z-index: 2;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 20%, rgba(0, 0, 0, 0.6) 100%);
  margin: 0 -20px -40px;
  width: calc(100% + 40px);
  padding-bottom: 40px;
}

.hero-bottom__line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ember-dim), transparent);
  margin: 0 auto 20px;
}

.hero-bottom__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-bottom__desc {
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

/* Left: text content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* CinderACE product title */
.hero-product-title {
  margin-bottom: -4px;
}

.product-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ember);
  position: relative;
  padding-left: 20px;
}

.product-name::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px rgba(232, 114, 12, 0.6);
}

/* Comic-book announcement banner */
.hero-announcement {
  position: relative;
  display: inline-block;
  width: fit-content;
}

.announcement-text {
  font-family: var(--font-accent);
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #050505;
  background: linear-gradient(135deg, #ffe066, #ff8a2e, #e8720c);
  padding: 10px 28px;
  border-radius: 6px;
  display: inline-block;
  position: relative;
  transform: rotate(-2deg);
  box-shadow:
    4px 4px 0 #c45a00,
    0 0 30px rgba(232, 114, 12, 0.3);
  animation: announce-pop 0.6s 0.2s var(--ease-out) both;
}

.announcement-text::before {
  content: '⚡';
  margin-right: 8px;
}

@keyframes announce-pop {
  from { opacity: 0; transform: rotate(-2deg) scale(0.8) translateY(-10px); }
  to { opacity: 1; transform: rotate(-2deg) scale(1) translateY(0); }
}

.hero-desc {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Glow button */
.btn--glow {
  padding: 16px 32px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--ember);
  color: #050505;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px -5px rgba(232, 114, 12, 0.5);
  transition: all 0.3s;
  text-decoration: none;
}

.btn--glow:hover {
  background: var(--ember-bright);
  box-shadow: 0 0 30px -5px rgba(255, 138, 46, 0.6);
  transform: translateY(-2px);
}

.btn--outline {
  padding: 16px 32px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: transparent;
  color: var(--ember);
  border: 2px solid rgba(232, 114, 12, 0.3);
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn--outline:hover {
  border-color: var(--ember);
  background: rgba(232, 114, 12, 0.1);
}

/* Trust badges */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

/* Inline stats in hero */
.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 8px;
}

.hero-stat {
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  min-width: 80px;
}

.hero-stat__number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffe066, #e8720c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-stat__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

/* Right: Mascot visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
  padding-top: 0;
}

.mascot-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 114, 12, 0.3), rgba(255, 224, 102, 0.15));
  filter: blur(80px);
  border-radius: 50%;
  animation: glow-pulse 6s ease-in-out infinite;
}

.mascot-float {
  position: relative;
  z-index: 2;
  animation: mascot-bob 6s ease-in-out infinite;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(2deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

.mascot-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 45px rgba(232, 114, 12, 0.45));
  border-radius: 16px;
}

/* Floating UI cards around mascot */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(12px);
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 3;
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(26, 26, 26, 0.92), rgba(26, 26, 26, 0.92)) padding-box,
    linear-gradient(135deg, #e8720c, #c45a00, #e8720c, #ff8a2e, #e8720c) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: fire-border-shift 15s ease-in-out infinite;
}

.float-card--top {
  top: -15px;
  right: -35px;
  animation: float-a 4s ease-in-out infinite;
}

.float-card--bottom {
  bottom: -10px;
  left: -40px;
  animation: float-b 5s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-5px, -10px); }
}

@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5px, 8px); }
}

.float-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.float-card__icon--green {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.float-card__icon--ember {
  background: rgba(232, 114, 12, 0.2);
  color: var(--ember);
}

.float-card__label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.float-card__value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-header.center { text-align: center; }
.section-header.center .lead { margin-left: auto; margin-right: auto; }
.section-header.center .divider { margin-left: auto; margin-right: auto; }

.section-header h2 { margin-bottom: 16px; }

/* --- Platform Pills --- */
.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 100px;
  background: var(--bg-raised);
  border: 1px solid rgba(232, 221, 208, 0.06);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.platform-pill:hover {
  border-color: rgba(232, 114, 12, 0.2);
  color: var(--text-primary);
}

/* --- Ember Glow Accent Line --- */
.ember-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember-dim), transparent);
  margin: 0;
  border: none;
}

/* --- Section Label (Wix-style) --- */
.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-label span {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(232, 114, 12, 0.8);
  white-space: nowrap;
}

.label-line {
  height: 1px;
  width: 48px;
  background: linear-gradient(90deg, transparent, rgba(232, 114, 12, 0.5));
}

.label-line:last-child {
  background: linear-gradient(90deg, rgba(232, 114, 12, 0.5), transparent);
}

/* --- Timeline Roadmap --- */
.roadmap-section {
  background: rgba(0, 0, 0, 0.2);
}

.timeline {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-50%);
}

/* Timeline item */
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 60px;
  position: relative;
}

.timeline-item:last-of-type {
  margin-bottom: 0;
}

.timeline-item--left {
  flex-direction: row;
  padding-right: calc(50% + 40px);
}

.timeline-item--right {
  flex-direction: row-reverse;
  padding-left: calc(50% + 40px);
}

/* Center dot */
.timeline-item__dot {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #050505;
  border: 2px solid var(--ember);
  z-index: 3;
}

.timeline-item__ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ember);
  animation: ping 2s ease-out infinite;
  opacity: 0;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(3); opacity: 0; }
}

@keyframes fire-border-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Card */
.timeline-item__card {
  background: rgba(17, 17, 17, 0.9);
  border: 2px solid transparent;
  border-radius: 24px;
  padding: 28px;
  width: 100%;
  transition: all 0.3s;
  background:
    linear-gradient(rgba(17, 17, 17, 0.95), rgba(17, 17, 17, 0.95)) padding-box,
    linear-gradient(135deg, #e8720c, #c45a00, #e8720c, #ff8a2e, #e8720c) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: fire-border-shift 15s ease-in-out infinite;
}

.timeline-item__card:hover {
  border-color: rgba(232, 114, 12, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.timeline-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.timeline-item__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  transition: color 0.3s;
}

.timeline-item__card:hover .timeline-item__title {
  color: var(--ember);
}

.timeline-item__date {
  font-size: 0.8rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.4);
}

/* Status badges */
.timeline-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-badge--live {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.timeline-badge--dev {
  background: rgba(232, 114, 12, 0.15);
  color: var(--ember);
}

.timeline-badge--planned {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

/* Image in card */
.timeline-item__img-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  height: 180px;
}

.timeline-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.timeline-item__card:hover .timeline-item__img {
  transform: scale(1.05);
}

.timeline-item__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

.timeline-item__desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
}

/* Mobile: stack timeline */
@media (max-width: 768px) {
  .timeline__line {
    left: 20px;
  }

  .timeline-item--left,
  .timeline-item--right {
    flex-direction: row;
    padding-left: 50px;
    padding-right: 0;
  }

  .timeline-item__dot {
    left: 20px;
  }
}

/* --- About Prose --- */
.about-prose {
  max-width: 680px;
  margin: 0 auto;
}

.about-prose h2 {
  margin-bottom: 24px;
}

.about-prose p {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

.about-prose p:last-child {
  margin-bottom: 0;
}

.about-prose a {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-prose a:hover {
  color: var(--ember-glow);
}

.about-prose em {
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

/* --- Page Hero (subpages) --- */
.page-hero {
  padding: clamp(120px, 15vw, 180px) 20px clamp(60px, 8vw, 100px);
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 20px;
}

/* --- Feature Cards Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  border-radius: 20px;
  border: 2px solid transparent;
  transition: all 0.3s;
  background:
    linear-gradient(rgba(17, 17, 17, 0.95), rgba(17, 17, 17, 0.95)) padding-box,
    linear-gradient(135deg, #e8720c, #c45a00, #e8720c, #ff8a2e, #e8720c) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: fire-border-shift 15s ease-in-out infinite;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card:hover .feature-card__title {
  color: var(--ember);
}

.feature-card__desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
}

/* --- Platform Grid --- */
.platform-group-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.platform-group-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 28px;
  max-width: 600px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.platform-card {
  padding: 24px;
  border-radius: 16px;
  border: 2px solid transparent;
  transition: all 0.3s;
  background:
    linear-gradient(rgba(17, 17, 17, 0.95), rgba(17, 17, 17, 0.95)) padding-box,
    linear-gradient(135deg, #e8720c, #c45a00, #e8720c, #ff8a2e, #e8720c) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: fire-border-shift 15s ease-in-out infinite;
}

.platform-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.platform-card--companion {
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(17, 17, 17, 0.95), rgba(17, 17, 17, 0.95)) padding-box,
    linear-gradient(135deg, #e8720c, #c45a00, #e8720c, #ff8a2e, #e8720c) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: fire-border-shift 15s ease-in-out infinite;
}

.platform-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.platform-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.platform-card:hover .platform-card__name {
  color: var(--ember);
}

.platform-card__by {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Platform tags */
.platform-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.ptag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
}

.ptag--ember {
  background: rgba(232, 114, 12, 0.15);
  color: var(--ember);
}

.ptag--blue {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.ptag--green {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.ptag--pink {
  background: rgba(244, 114, 182, 0.15);
  color: #f472b6;
}

.ptag--violet {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

.platform-card__desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

/* --- Mystery Cards ("Who's That Pokémon") --- */
.mystery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.mystery-card {
  position: relative;
  border-radius: 20px;
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(5, 5, 5, 0.98), rgba(5, 5, 5, 0.98)) padding-box,
    linear-gradient(135deg, rgba(232, 114, 12, 0.4), rgba(196, 90, 0, 0.15), rgba(232, 114, 12, 0.4)) border-box;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.4s;
}

.mystery-card:hover {
  border-color: transparent;
  background:
    linear-gradient(rgba(5, 5, 5, 0.95), rgba(5, 5, 5, 0.95)) padding-box,
    linear-gradient(135deg, #e8720c, #c45a00, #ff8a2e, #e8720c) border-box;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(232, 114, 12, 0.15);
}

.mystery-card__silhouette {
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 900;
  font-family: var(--font-display);
  color: rgba(232, 114, 12, 0.12);
  text-shadow: 0 0 40px rgba(232, 114, 12, 0.08);
  transition: all 0.4s;
  user-select: none;
}

.mystery-card:hover .mystery-card__silhouette {
  color: rgba(232, 114, 12, 0.25);
  text-shadow: 0 0 60px rgba(232, 114, 12, 0.15);
  transform: scale(1.1);
}

.mystery-card__label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.2);
  margin-top: 16px;
  transition: color 0.4s;
}

.mystery-card:hover .mystery-card__label {
  color: rgba(232, 114, 12, 0.5);
}

/* --- Footer --- */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid rgba(232, 221, 208, 0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  width: 100%;
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(232, 221, 208, 0.04);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* --- Utilities --- */
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 32px; }
.mt-lg { margin-top: 48px; }
.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 32px; }
.mb-lg { margin-bottom: 48px; }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* --- Ember Particles (Page-wide) --- */
.ember-particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ember-particle {
  position: absolute;
  bottom: -10px;
  left: var(--x, 50%);
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: var(--ember-glow);
  box-shadow: 0 0 6px 2px rgba(244, 166, 68, 0.4);
  animation: float-up var(--dur, 4s) var(--delay, 0s) infinite;
  opacity: 0;
}

@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100vh) scale(0.3); opacity: 0; }
}


/* Mobile: stack hero */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { align-items: center; }
  .hero-desc { margin: 0 auto; }
  .hero-cta { justify-content: center; }
  .hero-trust { justify-content: center; flex-wrap: wrap; }
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; min-height: 220px; }
  .mascot-img { max-width: 280px; }
  .float-card { display: none; }
  .timeline-badge { font-size: 0.65rem; padding: 4px 8px; white-space: nowrap; }
  .timeline-item__header { flex-wrap: wrap; gap: 8px; }
}


/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--ember-dim);
  background: var(--bg-deep);
  color: var(--ember-glow);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.4s var(--ease-out);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--ember);
  background: var(--ember);
  color: var(--bg-void);
  box-shadow: 0 4px 20px rgba(232, 114, 12, 0.25);
  transform: translateY(-3px);
}

/* --- Ember-Dripping Text --- */
.ember-text-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.ember-text {
  background: linear-gradient(180deg, #ffe066 0%, #ff8a2e 40%, #e8720c 70%, #c45a00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(232, 114, 12, 0.3));
}

.ember-text .text-gradient {
  -webkit-text-fill-color: transparent;
}

.ember-text-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 200%;
  pointer-events: none;
}
