/* ======================================================================
   FreeMCServers.org — Public marketing pages (light theme, line + vector)
   Reference design: uPhone.com (clean white, blue accents, rounded pills)
   ====================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tint: #eff6ff;
  --bg-warm: #fefbf6;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --line-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --brand: #1d4ed8;
  --brand-hover: #1e40af;
  --brand-soft: #eff6ff;
  --brand-line: #bfdbfe;
  --accent: #10b981;
  --accent-hover: #059669;
  --warn: #f59e0b;
  --danger: #ef4444;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg, video, canvas { max-width: 100%; height: auto; }
input, select, textarea, button { font: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], select, textarea {
  font-size: 16px; /* prevent iOS auto-zoom on focus */
}
button, a.btn, .btn { min-height: 44px; } /* WCAG tap target */
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--brand-soft); color: var(--brand); }

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.3s ease;
}
.nav.nav-hidden { transform: translateY(-100%); }
body { padding-top: 64px; }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.15rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em;
  display: inline-block;
}
.nav-logo .dot { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 0.9rem; color: var(--text-soft); font-weight: 500;
}
.nav-cta {
  background: var(--brand); color: #fff !important; font-weight: 600 !important;
  padding: 9px 18px; border-radius: 9999px; font-size: 0.875rem !important;
}
.nav-burger {
  display: none; width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-burger svg { width: 18px; height: 18px; color: var(--text); }
.nav-mobile {
  display: none; padding: 12px 24px 18px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.nav-mobile a { display: block; padding: 14px 0; color: var(--text-soft); font-weight: 500; min-height: 44px; }
.nav-mobile a.cta { color: var(--brand); font-weight: 700; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 9999px;
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  cursor: pointer; border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--brand); color: #fff;
}
.btn-ghost {
  background: var(--bg); color: var(--text); border-color: var(--line);
}
.btn-pill-soft {
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line);
  padding: 8px 16px; border-radius: 9999px; font-size: 0.85rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}

/* ── Layout helpers ──────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 24px; }
.section-tight { padding: 56px 24px; }
.eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
  display: inline-block;
}
.h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.1; color: var(--text);
}
.h1 .accent { color: var(--brand); }
.h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.15; color: var(--text);
}
.h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.005em;
}
.lead {
  font-size: 1.1rem; color: var(--muted); max-width: 600px;
  line-height: 1.6;
}
.muted { color: var(--muted); font-size: 0.9rem; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding: 90px 24px 70px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--brand-soft) 0%, transparent 60%),
    var(--bg);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) {
  .hero { padding: 48px 20px 40px; }
  .section { padding: 56px 20px; }
  .page-header { padding: 56px 20px 40px; }
  .h1 { font-size: 1.85rem !important; }
  .h2 { font-size: 1.5rem !important; }
  .lead { font-size: 0.95rem !important; }
}
.hero .h1 { max-width: 820px; margin: 0 auto 18px; }
.hero .lead { margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Stat strip ──────────────────────────────────────────────────── */
.stat-strip {
  background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat-strip-grid {
  max-width: 1180px; margin: 0 auto; padding: 28px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center;
}
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; }
.stat-lbl { font-size: 0.78rem; color: var(--muted); margin-top: 4px; font-weight: 500; }
@media (max-width: 640px) { .stat-strip-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Card grid ───────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px;
}
.card .icon-wrap {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--brand);
}
.card .icon-wrap svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 6px; }
.card p { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

/* ── Steps ───────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.step { text-align: center; padding: 0 12px; }
.step-num {
  width: 52px; height: 52px; border-radius: 9999px;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; margin-bottom: 18px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

/* ── Software cards ──────────────────────────────────────────────── */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 44px; }
.sw-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 18px; text-align: center;
}
.sw-card .sw-icon { width: 72px; height: 72px; margin: 0 auto 12px; color: var(--brand); object-fit: contain; display: block; }
.sw-card .sw-name { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.sw-card .sw-desc { font-size: 0.78rem; color: var(--muted); }

/* ── Two-column split ────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.95rem; color: var(--text-soft);
}
.check-list .check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 9999px;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand); margin-top: 2px;
}
.check-list .check svg { width: 12px; height: 12px; }

/* ── Console mockup ──────────────────────────────────────────────── */
.console {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.console-bar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px 16px; display: flex; align-items: center; gap: 8px;
}
.console-bar .dot { width: 11px; height: 11px; border-radius: 9999px; background: var(--line-strong); }
.console-bar .title { font-size: 0.78rem; color: var(--muted); margin-left: 12px; font-weight: 500; }
.console-body {
  padding: 18px 20px; font-family: 'Fira Mono', 'Menlo', monospace;
  font-size: 0.78rem; line-height: 1.85; color: var(--text);
}
.console-body .prm { color: var(--brand); font-weight: 600; }
.console-body .ok { color: var(--accent); }
.console-body .out { color: var(--muted); }
.console-body .br { display: block; height: 8px; }

/* ── Live server table ───────────────────────────────────────────── */
.table-wrap {
  margin-top: 32px; border: 1px solid var(--line); border-radius: 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--bg);
}
.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl thead tr { background: var(--bg-soft); }
.tbl th {
  text-align: left; font-size: 0.72rem; color: var(--muted);
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.tbl td { padding: 14px 18px; font-size: 0.9rem; border-bottom: 1px solid var(--line-soft); color: var(--text-soft); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl a { color: var(--brand); font-weight: 600; }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 9999px;
  background: var(--accent); margin-right: 6px;
  animation: livepulse 2s ease-in-out infinite;
}
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.tbl-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.9rem; }

/* ── FAQ accordion ───────────────────────────────────────────────── */
.faqs { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq-item {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.faq-item.open { border-color: var(--brand-line); }
.faq-q {
  padding: 18px 22px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 600; color: var(--text); font-size: 0.95rem; user-select: none;
}
.faq-q .arrow { color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); color: var(--brand); }
.faq-a { display: none; padding: 0 22px 20px; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
.faq-item.open .faq-a { display: block; }
.faq-a a { color: var(--brand); }

/* ── CTA band ────────────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--brand-soft) 0%, #f0f9ff 100%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 80px 24px; text-align: center;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 60px 24px 28px; }
.footer-inner { max-width: 1180px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 32px;
  margin-bottom: 48px;
}
.footer-brand .ftr-logo { font-size: 1.15rem; font-weight: 800; color: var(--brand); }
.footer-brand p { font-size: 0.85rem; color: var(--muted); margin-top: 10px; max-width: 240px; line-height: 1.6; }
.footer-col h4 { font-size: 0.78rem; font-weight: 700; color: var(--text); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.85rem; color: var(--muted); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 0.78rem; color: var(--muted-2);
}
@media (max-width: 920px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Page header (used by FAQ, servers, legal) ───────────────────── */
.page-header {
  padding: 80px 24px 56px; text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, var(--brand-soft) 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--text); letter-spacing: -0.02em; margin-bottom: 14px; }
.page-header p { font-size: 1.05rem; color: var(--muted); max-width: 600px; margin: 0 auto; }

/* ── Article (FAQ item, privacy, terms) ──────────────────────────── */
.article {
  max-width: 760px; margin: 0 auto; padding: 60px 24px 80px;
  font-size: 1rem; color: var(--text-soft); line-height: 1.75;
}
.article h2 { font-size: 1.5rem; font-weight: 800; color: var(--text); margin: 36px 0 14px; letter-spacing: -0.01em; }
.article h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 28px 0 10px; }
.article p { margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }
.article a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; }
.article a.btn, .article a.related-card { text-decoration: none; }
.article a.related-card { color: var(--text); }
.article a.btn-primary { color: #fff !important; }
.article a.btn-ghost { color: var(--text); }
.article code { background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; font-size: 0.88em; }
