/* ==========================================================================
   RaidCloud - clean SaaS product design system
   bg #f8fafc  |  primary blue #2563eb  |  slate text #0f172a  |  Inter
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --primary: #2563eb;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --ok: #16a34a;
  --ok-bg: #f0fdf4;
  --warn: #b45309;
  --warn-bg: #fffbeb;

  --mystic: #2563eb;
  --valor: #dc2626;
  --instinct: #d97706;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-blue: 0 8px 24px rgba(37, 99, 235, 0.25);

  --ring: 0 0 0 4px rgba(37, 99, 235, 0.14);

  --wrap: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary-600);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { background: var(--primary-700); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.34); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--line-strong); background: #fff; }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn[disabled]:active { transform: none; }

.discord-icon { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Header ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.03em; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #2563eb 55%, #1d4ed8);
  display: grid; place-items: center;
  box-shadow: var(--shadow-blue);
  flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name b { color: var(--primary-600); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a.active { color: var(--primary-700); background: var(--primary-50); }

.nav-spacer { flex: 1; }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; }

/* ---------- Hero ------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(37, 99, 235, 0.14), transparent 60%),
    radial-gradient(700px 380px at 8% 12%, rgba(59, 130, 246, 0.10), transparent 55%),
    linear-gradient(180deg, #eef4ff 0%, #f8fafc 62%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(700px 380px at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(700px 380px at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 84px 0 92px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--primary-700);
  font-size: 0.8rem; font-weight: 600;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,0.16); }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, #2563eb, #3b82f6 60%, #06b6d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 1.14rem; color: var(--muted); max-width: 30ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-trust { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.hero-trust .t { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--ink-2); font-weight: 500; }
.hero-trust .check { color: var(--ok); flex: none; }

/* Hero product panel (fake dashboard) */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.panel-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.panel-bar .dots { display: flex; gap: 6px; }
.panel-bar .dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.panel-bar .dots i:nth-child(1) { background: #f87171; }
.panel-bar .dots i:nth-child(2) { background: #fbbf24; }
.panel-bar .dots i:nth-child(3) { background: #34d399; }
.panel-bar .title { font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.panel-bar .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--ok); }
.panel-bar .live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.4); } 50% { box-shadow: 0 0 0 6px rgba(22,163,74,0); } }
.panel-body { padding: 18px; display: grid; gap: 12px; }
.q-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.q-row:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.q-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-50); display: grid; place-items: center; flex: none; overflow: hidden; }
.q-icon img { width: 32px; height: 32px; object-fit: contain; }
.q-meta { flex: 1; min-width: 0; }
.q-meta .n { font-weight: 600; font-size: 0.92rem; }
.q-meta .s { font-size: 0.78rem; color: var(--muted); }
.q-status { font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.q-status.done { background: var(--ok-bg); color: var(--ok); }
.q-status.run { background: var(--primary-50); color: var(--primary-700); }
.q-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.q-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 999px; }

/* ---------- Section scaffolding --------------------------------------- */
section { padding: 84px 0; }
.section-head { max-width: 620px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.kicker {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary-600);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }

/* ---------- Stat tiles ------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}
.stat .num { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.stat .num .u { color: var(--primary-600); }
.stat .lbl { font-size: 0.86rem; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* ---------- Services grid (feature cards w/ checkmarks) ---------------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }
.svc-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary-50), #e0edff);
  border: 1px solid var(--primary-100);
  display: grid; place-items: center;
  margin-bottom: 18px;
  overflow: hidden;
}
.svc-icon img { width: 36px; height: 36px; object-fit: contain; }
.svc h3 { font-size: 1.12rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.svc h3 .check { color: var(--ok); }
.svc p { color: var(--muted); font-size: 0.94rem; }

/* ---------- How it works ---------------------------------------------- */
.how {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 48px;
}
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.step { position: relative; }
.step .n {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--primary-600); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem;
  box-shadow: var(--shadow-blue);
  margin-bottom: 16px;
}
.step h4 { font-size: 1.04rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.9rem; }
.step:not(:last-child)::after {
  content: '';
  position: absolute; top: 20px; left: 52px; right: -14px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}

/* ---------- Why-us / feature list ------------------------------------- */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-list { display: grid; gap: 16px; }
.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-item .fi-icon {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--ok-bg); color: var(--ok);
  display: grid; place-items: center;
  border: 1px solid #bbf7d0;
}
.feature-item h4 { font-size: 1rem; margin-bottom: 2px; }
.feature-item p { color: var(--muted); font-size: 0.92rem; }

.why-card {
  background: linear-gradient(160deg, #1e3a8a, #2563eb 70%);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.why-card::after {
  content: '';
  position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
}
.why-card .qt { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; margin-bottom: 24px; position: relative; }
.why-card .mini-stats { display: flex; gap: 28px; position: relative; }
.why-card .mini-stats .m .v { font-size: 1.7rem; font-weight: 800; }
.why-card .mini-stats .m .k { font-size: 0.8rem; opacity: 0.8; }

/* ---------- Testimonials ---------------------------------------------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.stars { color: #f59e0b; font-size: 0.95rem; letter-spacing: 2px; margin-bottom: 12px; }
.stars svg { display: block; }
.tcard p { color: var(--ink-2); font-size: 0.96rem; }
.tcard .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 0.9rem; flex: none;
}
.tcard .who .nm { font-weight: 600; font-size: 0.9rem; }
.tcard .who .rl { font-size: 0.78rem; color: var(--muted); }
.ph-tag {
  display: inline-block; margin-top: 4px;
  font-size: 0.68rem; font-weight: 600; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ---------- CTA band --------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(59,130,246,0.35), transparent 60%),
    linear-gradient(135deg, #1d4ed8, #2563eb 55%, #1e40af);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.86); font-size: 1.06rem; max-width: 42ch; margin: 0 auto 26px; }
.cta-band .btn-primary { background: #fff; color: var(--primary-700); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.cta-band .btn-primary:hover { background: #eff6ff; }

/* ---------- Page hero (inner pages) ----------------------------------- */
.page-hero {
  background:
    radial-gradient(700px 300px at 85% -20%, rgba(37,99,235,0.12), transparent 60%),
    linear-gradient(180deg, #eef4ff, #f8fafc);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 44px;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; }
.page-hero p { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.page-hero .kicker { margin-bottom: 10px; }

/* ---------- Raids ------------------------------------------------------ */
.raid-layout { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.boss-list { display: grid; gap: 10px; position: sticky; top: 92px; }
.boss-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-xs);
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.boss-card:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.boss-card.active { border-color: var(--primary-600); box-shadow: var(--ring); background: var(--primary-50); }
.boss-art { width: 46px; height: 46px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; flex: none; overflow: hidden; }
.boss-art img { width: 40px; height: 40px; object-fit: contain; }
.boss-card.active .boss-art { background: #fff; }
.boss-info { flex: 1; min-width: 0; }
.boss-info .bn { font-weight: 700; font-size: 0.98rem; }
.boss-info .bt { font-size: 0.78rem; color: var(--muted); }
.tier-pill { font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--primary-100); color: var(--primary-700); flex: none; }
.tier-pill.mega { background: #ede9fe; color: #7c3aed; }

.counter-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cp-head { padding: 24px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; background: linear-gradient(180deg, #f8fbff, #fff); }
.cp-head .boss-art-lg { width: 60px; height: 60px; border-radius: 14px; background: var(--primary-50); border: 1px solid var(--primary-100); display: grid; place-items: center; flex: none; overflow: hidden; }
.cp-head .boss-art-lg img { width: 52px; height: 52px; object-fit: contain; }
.cp-head h2 { font-size: 1.5rem; }
.cp-head .sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.type-chip { font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 5px; }
.type-chip img { width: 14px; height: 14px; object-fit: contain; }
.cp-head .cp-val { margin-left: auto; text-align: right; flex: none; }
.cp-head .cp-val .v { font-size: 1.4rem; font-weight: 800; color: var(--primary-700); }
.cp-head .cp-val .k { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.counter-table { width: 100%; border-collapse: collapse; }
.counter-table thead th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 700;
  padding: 14px 28px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.counter-table thead th.right { text-align: right; }
.counter-table tbody td { padding: 16px 28px; border-bottom: 1px solid var(--line); font-size: 0.94rem; vertical-align: middle; }
.counter-table tbody tr:last-child td { border-bottom: none; }
.counter-table tbody tr:hover { background: #fafcff; }
.rank-badge { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: inline-grid; place-items: center; font-weight: 700; font-size: 0.8rem; color: var(--ink-2); }
.rank-badge.top { background: var(--primary-600); color: #fff; }
.c-name { font-weight: 600; }
.c-move { color: var(--muted); font-size: 0.86rem; }
.type-tag { font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.type-tag img { width: 14px; height: 14px; object-fit: contain; }
.rating-cell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.rating-track { width: 84px; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rating-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #2563eb); }
.rating-num { font-weight: 700; font-size: 0.88rem; width: 30px; text-align: right; }

/* type colors */
.t-Dragon { background: #ede9fe; color: #6d28d9; }
.t-Ice { background: #e0f2fe; color: #0369a1; }
.t-Water { background: #dbeafe; color: #1d4ed8; }
.t-Grass { background: #dcfce7; color: #15803d; }
.t-Ghost { background: #f3e8ff; color: #7e22ce; }
.t-Dark { background: #e2e8f0; color: #334155; }
.t-Rock { background: #fef3c7; color: #92400e; }
.t-Fire { background: #ffe4e6; color: #be123c; }
.t-Psychic { background: #fce7f3; color: #be185d; }
.t-Flying { background: #e0f2fe; color: #0284c7; }
.t-Ground { background: #fef3c7; color: #a16207; }

/* ---------- Friends ---------------------------------------------------- */
.friends-layout { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
.note-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  color: var(--primary-700);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.note-bar svg { flex: none; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  position: sticky;
  top: 92px;
}
.form-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.form-card .fsub { color: var(--muted); font-size: 0.88rem; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  font-family: inherit; font-size: 0.94rem;
  color: var(--ink);
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary-600); box-shadow: var(--ring); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.team-select { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.team-opt { position: relative; }
.team-opt input { position: absolute; opacity: 0; pointer-events: none; }
.team-opt label {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; margin: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.78rem; font-weight: 600; text-align: center;
  transition: all 0.15s ease;
  color: var(--muted);
}
.team-opt .tdot { width: 16px; height: 16px; border-radius: 50%; }
.team-opt.mystic .tdot { background: var(--mystic); }
.team-opt.valor .tdot { background: var(--valor); }
.team-opt.instinct .tdot { background: var(--instinct); }
.team-opt input:checked + label { border-width: 2px; padding: 9px 5px; }
.team-opt.mystic input:checked + label { border-color: var(--mystic); background: #eff6ff; color: var(--mystic); }
.team-opt.valor input:checked + label { border-color: var(--valor); background: #fef2f2; color: var(--valor); }
.team-opt.instinct input:checked + label { border-color: var(--instinct); background: #fffbeb; color: var(--instinct); }
.form-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

.dir-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.dir-head h3 { font-size: 1.15rem; }
.dir-count { font-size: 0.86rem; color: var(--muted); }
.dir-count b { color: var(--primary-600); }

.code-list { display: grid; gap: 12px; }
.code-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
.code-card:hover { box-shadow: var(--shadow-sm); }
.code-card.mine { border-color: var(--primary-100); background: linear-gradient(180deg, #f7faff, #fff); }
.team-badge {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem;
}
.team-badge.mystic { background: linear-gradient(135deg, #3b82f6, var(--mystic)); }
.team-badge.valor { background: linear-gradient(135deg, #ef4444, var(--valor)); }
.team-badge.instinct { background: linear-gradient(135deg, #f59e0b, var(--instinct)); }
.cc-info { flex: 1; min-width: 0; }
.cc-info .cc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-info .trainer { font-weight: 700; font-size: 0.98rem; }
.mine-tag { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary-700); background: var(--primary-100); padding: 2px 7px; border-radius: 999px; }
.cc-info .code { font-family: 'SF Mono', ui-monospace, 'Cascadia Code', monospace; font-size: 0.92rem; color: var(--ink-2); letter-spacing: 0.04em; margin-top: 2px; }
.cc-info .cc-meta { font-size: 0.78rem; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.lvl-chip { font-weight: 600; color: var(--ink-2); }
.cc-action { flex: none; }
.bump-btn { display: inline-flex; align-items: center; gap: 6px; }
.cooldown { font-size: 0.72rem; color: var(--muted-2); text-align: center; margin-top: 4px; }

.empty { text-align: center; padding: 40px; color: var(--muted); }

/* ---------- Blog (changelog / docs feed) -------------------------------- */
.changelog-feed { display: grid; gap: 0; max-width: 860px; margin: 0 auto; }
.changelog-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.changelog-item:first-child { padding-top: 0; }
.changelog-item:last-child { border-bottom: none; }
.changelog-date {
  text-align: right;
  padding-top: 6px;
}
.changelog-date time {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.changelog-date .day { font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.changelog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.changelog-card:hover { box-shadow: var(--shadow); border-color: var(--primary-100); transform: translateY(-2px); }
.changelog-card-link { display: block; color: inherit; }
.changelog-card-inner { display: grid; grid-template-columns: 140px 1fr; gap: 0; }
.changelog-cover {
  background: var(--surface-2);
  display: grid; place-items: center;
  padding: 16px;
  border-right: 1px solid var(--line);
}
.changelog-cover img { width: 88px; height: 88px; object-fit: contain; }
.changelog-cover-empty {
  width: 100%; height: 100%; min-height: 120px;
  background: linear-gradient(135deg, var(--primary-50), #e0edff);
}
.changelog-body { padding: 24px 28px; }
.changelog-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--muted); margin-bottom: 10px;
}
.changelog-meta .cat {
  font-weight: 700; color: var(--primary-600);
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem;
}
.changelog-meta .read { font-weight: 500; }
.changelog-body h2 {
  font-size: 1.28rem; letter-spacing: -0.025em; margin-bottom: 10px;
  transition: color 0.15s ease;
}
.changelog-card:hover h2 { color: var(--primary-700); }
.changelog-excerpt { color: var(--muted); font-size: 0.94rem; line-height: 1.55; margin-bottom: 14px; }
.changelog-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  font-size: 0.7rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line);
}
.changelog-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600; color: var(--primary-600);
  margin-top: 14px;
}
.changelog-cta svg { transition: transform 0.15s ease; }
.changelog-card:hover .changelog-cta svg { transform: translateX(3px); }

.blog-empty {
  text-align: center; padding: 64px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.blog-empty h2 { font-size: 1.4rem; margin-bottom: 10px; }
.blog-empty p { color: var(--muted); max-width: 40ch; margin: 0 auto; }

/* ---------- Post detail ------------------------------------------------ */
.post-wrap { max-width: 760px; margin: 0 auto; }
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  margin-bottom: 28px;
  transition: color 0.15s ease;
}
.post-back:hover { color: var(--primary-600); }
.post-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.post-cover {
  background: linear-gradient(180deg, var(--primary-50), var(--surface));
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
  padding: 40px;
}
.post-cover img { width: 140px; height: 140px; object-fit: contain; }
.post-header { padding: 36px 40px 0; }
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--muted); margin-bottom: 14px;
}
.post-meta .cat {
  font-weight: 700; color: var(--primary-600);
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem;
}
.post-header h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; margin-bottom: 10px; }
.post-author { color: var(--muted); font-size: 0.9rem; font-weight: 500; margin-bottom: 0; }
.post-body {
  padding: 28px 40px 40px;
  color: var(--ink-2); font-size: 1rem; line-height: 1.7;
}
.post-body h2 { font-size: 1.2rem; margin: 28px 0 12px; color: var(--ink); }
.post-body p { margin-bottom: 16px; }
.post-body ul { margin: 0 0 16px; padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body p:last-child { margin-bottom: 0; }

/* ---------- Related articles ------------------------------------------- */
.related-section { margin-top: 56px; }
.related-head { margin-bottom: 24px; }
.related-head .kicker { margin-bottom: 8px; }
.related-head h2 { font-size: 1.4rem; }
.related-grid { display: grid; gap: 16px; }
.related-card {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.related-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary-100); transform: translateY(-1px); }
.related-card-link { display: contents; color: inherit; }
.related-thumb {
  width: 72px; height: 72px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.related-thumb img { width: 56px; height: 56px; object-fit: contain; }
.related-thumb-empty { background: linear-gradient(135deg, var(--primary-50), #e0edff); }
.related-info h3 { font-size: 0.98rem; margin-bottom: 4px; transition: color 0.15s ease; }
.related-card:hover h3 { color: var(--primary-700); }
.related-info .related-meta { font-size: 0.76rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.related-info .related-meta .cat { font-weight: 600; color: var(--primary-600); }

/* ---------- Blog (legacy, kept for compat) ----------------------------- */
.blog-list { display: grid; gap: 28px; max-width: 760px; margin: 0 auto; }
.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 40px;
  transition: box-shadow 0.18s ease;
}
.post:hover { box-shadow: var(--shadow); }
.post .meta { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; }
.post .cat { font-weight: 700; color: var(--primary-600); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; }
.post h2 { font-size: 1.55rem; letter-spacing: -0.03em; margin-bottom: 16px; }
.post p { color: var(--ink-2); margin-bottom: 14px; font-size: 1rem; }
.post p:last-child { margin-bottom: 0; }

/* ---------- Footer ----------------------------------------------------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 56px 0 32px;
  margin-top: 40px;
}
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: #94a3b8; font-size: 0.92rem; max-width: 34ch; }
.footer-col h5 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col a { display: block; color: #94a3b8; font-size: 0.9rem; padding: 5px 0; transition: color 0.15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 26px; display: grid; gap: 12px; }
.footer-bottom .disclaimer { font-size: 0.78rem; color: #64748b; line-height: 1.6; max-width: 80ch; }
.footer-bottom .frow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom .frow span { font-size: 0.82rem; color: #94a3b8; }
.level-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #cbd5e1; background: rgba(37,99,235,0.18); border: 1px solid rgba(37,99,235,0.3); padding: 5px 12px; border-radius: 999px; }

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

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 60px 0 68px; }
  .hero-sub { max-width: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .step:not(:last-child)::after { display: none; }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .testimonials { grid-template-columns: 1fr; }
  .raid-layout { grid-template-columns: 1fr; }
  .boss-list { position: static; grid-template-columns: repeat(2, 1fr); }
  .friends-layout { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-toggle {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  }
  .nav .brand-full { display: none; }
  .how { padding: 32px 24px; }
  .how-grid { grid-template-columns: 1fr; }
  .boss-list { grid-template-columns: 1fr; }
  .cp-head { flex-wrap: wrap; }
  .cp-head .cp-val { margin-left: 0; }
  .counter-table thead { display: none; }
  .counter-table tbody td { display: block; padding: 6px 20px; border: none; }
  .counter-table tbody tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .rating-cell { justify-content: flex-start; }
  .post { padding: 28px 22px; }
  .changelog-item { grid-template-columns: 1fr; gap: 12px; }
  .changelog-date { text-align: left; padding-top: 0; }
  .changelog-card-inner { grid-template-columns: 1fr; }
  .changelog-cover { border-right: none; border-bottom: 1px solid var(--line); min-height: 100px; }
  .post-header { padding: 28px 24px 0; }
  .post-body { padding: 20px 24px 32px; }
  .related-card { grid-template-columns: 56px 1fr; }
  .related-thumb { width: 56px; height: 56px; }
  .related-thumb img { width: 44px; height: 44px; }
  .cta-band { padding: 40px 24px; }
  section { padding: 60px 0; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .code-card { flex-wrap: wrap; }
  .cc-action { width: 100%; }
  .cc-action .btn { width: 100%; justify-content: center; }
}

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