/* =========================================================
   Yumis Forge — Home & Global Styles
   Dark Fantasy | Arcane | Tactical RPG
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

/* ─── CSS Variables ─── */
:root {
  --gold:        #cfb275;
  --gold-dim:    rgba(207, 178, 117, 0.18);
  --gold-glow:   rgba(207, 178, 117, 0.55);
  --blue:        #3f74db;
  --blue-dim:    rgba(63, 116, 219, 0.18);
  --blue-glow:   rgba(63, 116, 219, 0.5);
  --crimson:     #9b2335;
  --void:        #05070f;
  --deep:        #090c18;
  --panel:       rgba(12, 16, 28, 0.82);
  --panel-hover: rgba(16, 22, 38, 0.9);
  --border:      rgba(207, 178, 117, 0.22);
  --border-blue: rgba(63, 116, 219, 0.3);
  --mist:        rgba(210, 220, 240, 0.72);
  --mist-dim:    rgba(180, 195, 225, 0.45);
  --text:        #e8e4d8;
  --font-display: 'Cinzel', serif;
  --font-body:    'Crimson Pro', Georgia, serif;
  --radius:       14px;
  --radius-sm:    8px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text);
  background: var(--void);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── ANIMATED BACKGROUND ─── */
.arcane-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Starfield canvas sits here */
.arcane-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Deep nebula base */
.arcane-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 15% 20%, rgba(63, 116, 219, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 75%, rgba(155, 35, 53, 0.11) 0%, transparent 55%),
    radial-gradient(ellipse 90% 40% at 50% 100%, rgba(207, 178, 117, 0.07) 0%, transparent 55%),
    linear-gradient(165deg, #08091a 0%, #05070f 45%, #0a060e 100%);
}

/* Animated mist layers */
.arcane-bg .mist-1,
.arcane-bg .mist-2,
.arcane-bg .mist-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: mistDrift 18s ease-in-out infinite;
}

.arcane-bg .mist-1 {
  width: 700px; height: 400px;
  top: -10%; left: -5%;
  background: radial-gradient(ellipse, rgba(63, 116, 219, 0.18), transparent 70%);
  animation-delay: 0s; animation-duration: 22s;
}
.arcane-bg .mist-2 {
  width: 600px; height: 500px;
  bottom: -5%; right: -8%;
  background: radial-gradient(ellipse, rgba(155, 35, 53, 0.14), transparent 70%);
  animation-delay: -7s; animation-duration: 26s;
}
.arcane-bg .mist-3 {
  width: 500px; height: 400px;
  top: 40%; left: 40%;
  background: radial-gradient(ellipse, rgba(207, 178, 117, 0.1), transparent 70%);
  animation-delay: -14s; animation-duration: 20s;
}

@keyframes mistDrift {
  0%   { opacity: 0;    transform: translate(0, 0) scale(1); }
  25%  { opacity: 1;    transform: translate(30px, -20px) scale(1.08); }
  50%  { opacity: 0.7;  transform: translate(-20px, 30px) scale(0.95); }
  75%  { opacity: 1;    transform: translate(15px, 10px) scale(1.05); }
  100% { opacity: 0;    transform: translate(0, 0) scale(1); }
}

/* Runic circle decoration */
.arcane-bg .rune-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(207, 178, 117, 0.06);
  animation: runeRotate 60s linear infinite;
}
.arcane-bg .rune-circle:nth-child(4) {
  width: 700px; height: 700px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.arcane-bg .rune-circle:nth-child(5) {
  width: 500px; height: 500px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(63, 116, 219, 0.05);
  animation-direction: reverse;
  animation-duration: 40s;
}
.arcane-bg .rune-circle:nth-child(6) {
  width: 300px; height: 300px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(155, 35, 53, 0.06);
  animation-duration: 25s;
}

@keyframes runeRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Lightning veins */
.arcane-bg .vein {
  position: absolute;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(63, 116, 219, 0.6), transparent);
  animation: veinFlash 8s ease-in-out infinite;
  opacity: 0;
}
.arcane-bg .vein-1 {
  height: 300px; top: 10%; right: 20%;
  animation-delay: 0s;
}
.arcane-bg .vein-2 {
  height: 200px; bottom: 20%; left: 15%;
  background: linear-gradient(to bottom, transparent, rgba(207, 178, 117, 0.5), transparent);
  animation-delay: -4s;
}

@keyframes veinFlash {
  0%,100% { opacity: 0; transform: scaleY(0.3); }
  50%      { opacity: 1; transform: scaleY(1); }
}

/* ─── Layout wrappers ─── */
.page-shell,
.hero-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

/* ─── Page Header ─── */
.page-header {
  text-align: center;
  margin-bottom: 44px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 0 40px rgba(207, 178, 117, 0.3);
  margin: 10px 0 12px;
}

.page-header p {
  color: var(--mist);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0 auto;
}

/* ─── Eyebrow / Badge ─── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gold-dim);
  border: 1px solid rgba(207, 178, 117, 0.38);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-dim);
  border: 1px solid var(--border-blue);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8ab2f5;
  margin-bottom: 8px;
}

.tiny-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(207, 178, 117, 0.1);
  border: 1px solid rgba(207, 178, 117, 0.3);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* ─── Fantasy Panel (card base) ─── */
.fantasy-panel,
.content-card,
.metric-card,
.stat-card,
.feed-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.fantasy-panel::after,
.content-card::after,
.stat-card::after,
.feed-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(207, 178, 117, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Corner ornaments */
.fantasy-panel::before,
.content-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border-top: 2px solid rgba(207, 178, 117, 0.5);
  border-left: 2px solid rgba(207, 178, 117, 0.5);
  border-radius: 4px 0 0 0;
  pointer-events: none;
}

.content-card:hover,
.stat-card:hover,
.feed-card:hover {
  border-color: rgba(207, 178, 117, 0.4);
  box-shadow: 0 0 30px rgba(207, 178, 117, 0.08), 0 20px 50px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* ─── Typography ─── */
h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

h2 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 6px;
}

p { color: var(--mist); line-height: 1.65; }
p.muted { color: var(--mist-dim); font-size: 0.92rem; }

/* ─── Buttons ─── */
.button, .button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.button {
  background: linear-gradient(135deg, #cfb275 0%, #a88840 100%);
  color: #0a0c14;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(207, 178, 117, 0.3);
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.button:hover { box-shadow: 0 6px 30px rgba(207, 178, 117, 0.5); transform: translateY(-1px); }
.button:hover::before { opacity: 1; }

.button-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(207, 178, 117, 0.5);
}
.button-outline:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(207, 178, 117, 0.15);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ─── Grids ─── */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

/* ─── Hero Card ─── */
.arcane-hero-card {
  background:
    radial-gradient(600px 250px at 90% -10%, rgba(207, 178, 117, 0.2) 0%, transparent 60%),
    radial-gradient(500px 250px at -5% 115%, rgba(63, 116, 219, 0.18) 0%, transparent 65%),
    linear-gradient(160deg, rgba(18, 23, 38, 0.97), rgba(8, 10, 18, 0.98));
  border-color: rgba(207, 178, 117, 0.38);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(207, 178, 117, 0.15);
  padding: 44px 40px;
}

.arcane-hero-card h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.05;
  background: linear-gradient(135deg, #e8d8a0 0%, #cfb275 40%, #a07830 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin: 14px 0 18px;
}

/* Decorative glow orb */
.arcane-hero-card .hero-orb {
  position: absolute;
  bottom: -80px; right: -80px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 116, 219, 0.22) 0%, transparent 70%);
  pointer-events: none;
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.15); opacity: 1; }
}

/* Hero copy */
.hero-copy {
  font-size: 1.05rem;
  color: var(--mist);
  max-width: 58ch;
  line-height: 1.7;
}

/* ─── List Stack ─── */
.list-stack { display: grid; gap: 12px; }

.list-item {
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(18, 23, 38, 0.7), rgba(8, 12, 22, 0.75));
  border: 1px solid rgba(126, 139, 170, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.list-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(63, 116, 219, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.list-item:hover {
  transform: translateX(4px);
  border-color: rgba(63, 116, 219, 0.4);
  background: linear-gradient(145deg, rgba(22, 30, 52, 0.8), rgba(12, 16, 30, 0.85));
}

.list-item:hover::before { opacity: 1; }

.list-item p {
  margin: 0;
  color: var(--mist);
  font-size: 0.95rem;
}

/* ─── Metric Cards ─── */
.metric-card {
  text-align: center;
  padding: 24px 16px;
  border-color: rgba(207, 178, 117, 0.2);
  background: linear-gradient(160deg, rgba(18, 22, 36, 0.9), rgba(8, 10, 18, 0.95));
}

.metric-card:hover {
  border-color: rgba(207, 178, 117, 0.45);
  box-shadow: 0 0 30px rgba(207, 178, 117, 0.1);
  transform: translateY(-3px);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e8d8a0, #cfb275);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist-dim);
  font-family: var(--font-display);
}

/* ─── Timeline ─── */
.timeline-stack { display: grid; gap: 12px; }

.timeline-item {
  padding: 14px 16px;
  border-left: 2px solid rgba(207, 178, 117, 0.35);
  background: rgba(207, 178, 117, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: border-color 0.2s, background 0.2s;
}

.timeline-item:hover {
  border-color: var(--gold);
  background: rgba(207, 178, 117, 0.08);
}

.timeline-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-item p.muted { margin: 2px 0 6px; font-size: 0.85rem; }

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--mist-dim);
  font-style: italic;
  font-size: 0.95rem;
  border: 1px dashed rgba(207, 178, 117, 0.15);
  border-radius: var(--radius-sm);
}

/* ─── Content card spacing ─── */
.content-card { margin-bottom: 20px; }
.content-card p { font-size: 1rem; }

/* ─── Reveal animations ─── */
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  animation: revealUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-delay-2 { animation-delay: 0.18s; }
.reveal-delay-3 { animation-delay: 0.32s; }
.reveal-delay-4 { animation-delay: 0.46s; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Nav (if present) ─── */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
}

.nav-brand span {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--mist-dim);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mist);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: var(--gold-dim);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb {
  background: rgba(207, 178, 117, 0.3);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(207, 178, 117, 0.55); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .hero-grid    { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .arcane-hero-card { padding: 32px 24px; }
  .page-shell, .hero-shell { padding: 24px 0 60px; }
}

@media (max-width: 520px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .button, .button-outline { width: 100%; text-align: center; justify-content: center; }
}
/* --- New landing experience --- */
.landing-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 90px;
}

.landing-hero,
.landing-section {
  background: rgba(7, 14, 30, 0.72);
  border: 1px solid rgba(109, 149, 224, 0.3);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  padding: clamp(18px, 2.8vw, 34px);
  margin-bottom: 18px;
  box-shadow: 0 16px 38px rgba(3, 8, 20, 0.45);
  will-change: transform;
}

.landing-hero h1 {
  font-size: clamp(2.2rem, 6.8vw, 4rem);
  line-height: 0.95;
  margin: 10px 0 14px;
  text-shadow: 0 0 calc(16px + var(--scroll-glow, 0) * 22px) rgba(210, 177, 109, 0.55);
}

.hero-copy {
  max-width: 76ch;
  color: rgba(231, 238, 255, 0.84);
  margin-bottom: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.feature-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(141, 178, 246, 0.26);
  background: rgba(20, 33, 60, 0.45);
}

.feature-card h3 {
  margin: 0 0 6px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.price-card {
  border: 1px solid rgba(130, 167, 233, 0.28);
  border-radius: 14px;
  padding: 14px;
  background: rgba(11, 18, 33, 0.74);
}

.price-card strong {
  display: inline-block;
  margin: 8px 0 10px;
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
}

.price-card ul {
  margin: 0;
  padding-left: 18px;
}

.price-card.highlight {
  border-color: rgba(216, 178, 110, 0.48);
  box-shadow: 0 0 0 1px rgba(216, 178, 110, 0.2) inset;
}

.price-card.galaxy {
  border-color: rgba(159, 122, 234, 0.5);
  background: linear-gradient(160deg, rgba(25, 20, 53, 0.82), rgba(13, 26, 46, 0.84));
}

.comparison-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(154, 178, 223, 0.22);
  text-align: left;
}

.comparison-table thead th {
  color: #f3d8a1;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .landing-shell {
    width: min(1180px, calc(100% - 16px));
    padding: 20px 0 70px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button,
  .hero-actions .button-outline {
    flex: 1;
    justify-content: center;
  }
}
