/* FudliCraft — Minecraft hosting on the homelab
   Design language matched to RouteBox / Archivista:
   near-black background, faint grid, cream text, lime accent, Inter display. */

:root {
  --bg: #0e100b;
  --bg-soft: #12150d;
  --panel: #14180f;
  --panel-2: #181d12;
  --line: rgba(245, 240, 222, 0.09);
  --line-strong: rgba(245, 240, 222, 0.16);

  --ink: #f5f0e1;
  --ink-soft: #b4b3a3;
  --ink-dim: #7f8073;

  --lime: #c4f53b;
  --lime-deep: #aee227;
  --lime-dim: #8fa83a;
  --orange: #f0883e;

  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Space Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01";
}

/* page-wide ambient: faint grid + top-left green glow */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(245, 240, 222, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 240, 222, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(1100px 720px at 12% -5%, #000 35%, transparent 78%);
}
.bg-glow {
  position: fixed; top: -240px; left: -180px; width: 760px; height: 620px; z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(150, 200, 40, 0.18), transparent 62%);
  filter: blur(8px);
}

.wrap { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

a { color: inherit; text-decoration: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(14, 16, 11, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 30px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 26px; margin-left: 6px; font-size: 14.5px; color: var(--ink-soft); }
.nav-links a { transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-right .txt-link { font-size: 14.5px; color: var(--ink-soft); }
.nav-right .txt-link:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 14.5px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.12s ease, background 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lime { background: var(--lime); color: #1a2305; box-shadow: 0 0 0 1px rgba(196, 245, 59, 0.3), 0 16px 40px -18px rgba(196, 245, 59, 0.7); }
.btn-lime:hover { background: var(--lime-deep); }
.btn-ghost { background: rgba(245, 240, 222, 0.02); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--lime-dim); }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-block { width: 100%; justify-content: center; }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- shared section bits ---------- */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); }
.section { padding: clamp(56px, 9vw, 110px) 0; position: relative; }
.section-head { max-width: 760px; }
.h-display {
  font-weight: 800; letter-spacing: -0.03em; line-height: 0.96;
  font-size: clamp(38px, 7.5vw, 84px);
}
.h-2 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.0; font-size: clamp(30px, 5vw, 56px); }
.lead { color: var(--ink-soft); font-size: clamp(15.5px, 1.8vw, 18px); max-width: 540px; }
.hl { color: var(--lime); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.hero .kicker { display: block; margin-bottom: 22px; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 38px; flex-wrap: wrap; }
.hstat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.hstat span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); }

/* floating window card */
.window-wrap { position: relative; }
.window-wrap::before {
  content: ""; position: absolute; inset: 18px -14px -16px 16px; border-radius: var(--radius-lg);
  background: rgba(150, 200, 40, 0.1); border: 1px solid rgba(196, 245, 59, 0.18);
}
.window {
  position: relative; background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3f30; display: inline-block; }
.window-bar i:nth-child(2) { background: #4a4f3a; }
.window-bar i:nth-child(3) { background: #5a6044; }
.window-bar .wtitle { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); margin-left: 8px; letter-spacing: 0.04em; }
.window-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.wrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 11px; border: 1px solid var(--line); background: rgba(245, 240, 222, 0.015); }
.wrow.active { border-color: rgba(196, 245, 59, 0.4); background: rgba(196, 245, 59, 0.05); }
.wrow .wname { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.wrow .wval { font-family: var(--mono); font-size: 13px; color: var(--lime); }
.wrow .wval.dim { color: var(--ink-dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.on { background: var(--lime); box-shadow: 0 0 9px var(--lime); }
.dot.off { background: var(--ink-dim); }
.dot.warm { background: var(--orange); box-shadow: 0 0 8px rgba(240, 136, 62, 0.7); }

/* ---------- marquee ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 16px 0; background: var(--bg-soft); position: relative; z-index: 2; }
.marquee-track { display: inline-flex; gap: 44px; white-space: nowrap; animation: scroll 28s linear infinite; font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); }
.marquee-track b { color: var(--ink-soft); font-weight: 500; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- feature grid ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 52px; }
.feat { padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; transition: background 0.2s; }
.feat:hover { background: rgba(196, 245, 59, 0.03); }
.feat:nth-child(3n) { border-right: none; }
.feat:nth-last-child(-n+3) { border-bottom: none; }
.feat .ico { width: 26px; height: 26px; color: var(--lime); margin-bottom: 20px; }
.feat h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 9px; }
.feat p { color: var(--ink-soft); font-size: 14.5px; max-width: 34ch; }

/* ---------- split (setup / why) ---------- */
.split { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.split .kicker { display: block; margin-bottom: 18px; }
.split-left .lead { margin-top: 22px; }

.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: border-color 0.18s; }
.step:hover { border-color: var(--line-strong); }
.step .num { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--lime); color: #1a2305; font-weight: 800; font-size: 14px; }
.step .txt b { display: block; font-size: 15.5px; font-weight: 600; }
.step .txt span { font-size: 13.5px; color: var(--ink-dim); }

/* template / why cards 2x2 */
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: border-color 0.18s, transform 0.18s; }
.mini:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.mini .tag { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lime); }
.mini h3 { font-size: 16.5px; font-weight: 700; margin: 12px 0 7px; }
.mini p { font-size: 13.5px; color: var(--ink-soft); }

/* node strip */
.node-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 50px; }
.ncard { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--panel), var(--bg-soft)); }
.ncard.live { border-color: rgba(196, 245, 59, 0.22); }
.ncard .ntop { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 16px; }
.ncard h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.ncard p { font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.ncard ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.ncard li { font-size: 13.5px; color: var(--ink-dim); font-family: var(--mono); }
.ncard li::before { content: "› "; color: var(--lime); }

/* ---------- CTA band ---------- */
.cta-band { border: 1px solid rgba(196, 245, 59, 0.25); border-radius: var(--radius-lg); padding: clamp(34px, 5vw, 60px); background: linear-gradient(120deg, rgba(150, 200, 40, 0.08), rgba(14, 16, 11, 0.2)); position: relative; overflow: hidden; }
.cta-band .h-2 { margin-bottom: 14px; }
.cta-band p { color: var(--ink-soft); margin-bottom: 28px; max-width: 480px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 30px; position: relative; z-index: 2; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; }
.footer .brand { font-size: 15px; }
.footer-note { color: var(--ink-dim); font-size: 13px; flex: 1; min-width: 220px; }
.footer-links { display: flex; gap: 20px; font-size: 13.5px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--lime); }

/* ===================== APP / DASHBOARD ===================== */
.app-shell { padding: 30px 0 80px; }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.app-head .kicker { display: block; margin-bottom: 10px; }
.app-head h1 { font-weight: 800; letter-spacing: -0.025em; font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.app-head p { color: var(--ink-soft); font-size: 14.5px; margin-top: 8px; }
.conn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat-card .label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); }
.stat-card .big { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px; }
.stat-card .big.lime { color: var(--lime); }

.app-section { margin-top: 34px; }
.app-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.app-section-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.app-section-head .hint { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); }

.creator-shell { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr); gap: 14px; align-items: stretch; }
.create-form, .creator-card { border: 1px solid rgba(196, 245, 59, 0.18); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(24,29,18,0.92), rgba(20,24,15,0.96)); box-shadow: var(--shadow); }
.create-form { padding: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.create-form .field { margin-bottom: 0; }
.creator-vars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 2px; }
.creator-vars:empty { display: none; }
.creator-var-note { grid-column: 1 / -1; color: var(--ink-dim); font-size: 13px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; background: rgba(245, 240, 222, 0.015); }
.creator-checks { grid-column: 1 / -1; display: grid; gap: 9px; padding: 4px 0; }
.checkline { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: 13.5px; }
.checkline input { appearance: none; margin-top: 2px; flex: none; width: 17px; height: 17px; border-radius: 5px; border: 1px solid var(--line-strong); background: rgba(245, 240, 222, 0.02); display: grid; place-items: center; }
.checkline input:checked { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 18px -8px var(--lime); }
.checkline input:checked::after { content: ""; width: 8px; height: 5px; border-left: 2px solid #1a2305; border-bottom: 2px solid #1a2305; transform: rotate(-45deg) translateY(-1px); }
.creator-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.creator-card { padding: 20px; position: relative; overflow: hidden; }
.creator-card::before { content: ""; position: absolute; inset: -40px -70px auto auto; width: 160px; height: 160px; border-radius: 999px; background: rgba(196,245,59,0.08); filter: blur(4px); }
.creator-card .kicker { display: block; margin-bottom: 12px; }
.creator-card h3 { font-size: 21px; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 10px; position: relative; }
.creator-card p { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; position: relative; }
.template-tags { display: flex; flex-wrap: wrap; gap: 7px; position: relative; }
.template-tags span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; padding: 4px 8px; border-radius: 999px; color: var(--lime); border: 1px solid rgba(196,245,59,0.26); background: rgba(196,245,59,0.045); }
.creator-card .template-meta { display: grid; gap: 8px; margin: 16px 0; }
.creator-card .template-meta div { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.creator-card .template-meta b { color: var(--ink-soft); font-weight: 500; }

.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.srv { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: border-color 0.18s, transform 0.18s; }
.srv:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.srv-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.state { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.state.on { color: var(--lime); border-color: rgba(196, 245, 59, 0.4); }
.state.off { color: var(--ink-dim); }
.state.warm { color: var(--orange); border-color: rgba(240, 136, 62, 0.4); }
.srv h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.srv .srv-sub { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); margin-bottom: 16px; }
.srv .srv-specs { display: flex; gap: 16px; margin-bottom: 16px; }
.srv .spec span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); display: block; }
.srv .spec b { font-size: 14px; font-weight: 600; }
.srv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-family: var(--sans); font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: rgba(245, 240, 222, 0.02); color: var(--ink); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.chip:hover:not([disabled]) { border-color: var(--lime-dim); color: var(--lime); }
.chip[disabled] { opacity: 0.4; cursor: not-allowed; }

.empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 44px 24px; text-align: center; color: var(--ink-dim); }
.empty .ei { width: 34px; height: 34px; color: var(--lime); opacity: 0.7; margin: 0 auto 14px; }
.empty b { color: var(--ink); font-size: 16px; display: block; margin-bottom: 6px; font-weight: 600; }
.empty p { font-size: 14px; max-width: 44ch; margin: 0 auto 18px; }

.node-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.nl { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: flex; align-items: center; gap: 14px; }
.nl .nl-main { flex: 1; }
.nl b { font-size: 15px; }
.nl span { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }

.banner { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 28px; }
.banner.warn { background: rgba(240, 136, 62, 0.07); border: 1px solid rgba(240, 136, 62, 0.3); color: var(--ink-soft); }
.banner.err { background: rgba(224, 86, 74, 0.08); border: 1px solid rgba(224, 86, 74, 0.35); color: #f0c0bb; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner a { color: var(--lime); text-decoration: underline; }

.skeleton { background: linear-gradient(90deg, rgba(245,240,222,0.04), rgba(245,240,222,0.09), rgba(245,240,222,0.04)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 6px; color: transparent !important; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(18px); background: var(--panel-2); border: 1px solid var(--lime-dim); color: var(--ink); padding: 12px 18px; border-radius: 11px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.22s, transform 0.22s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== AUTH PAGES ===================== */
.auth-body { min-height: 100vh; display: flex; }
.auth-wrap { position: relative; z-index: 2; margin: auto; width: 100%; max-width: 420px; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.auth-brand { font-size: 18px; }
.auth-card { width: 100%; }
.auth-card-body { padding: 26px 24px 28px; gap: 0; }
.auth-card-body .kicker { display: block; margin-bottom: 12px; }
.auth-title { font-weight: 800; letter-spacing: -0.025em; font-size: 28px; line-height: 1.05; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin: 8px 0 22px; }
.auth-back { font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); }
.auth-back:hover { color: var(--lime); }
.central-login { display: flex; align-items: center; justify-content: center; text-decoration: none; margin: 0; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 16px; color: var(--ink-dim); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-note { margin: 14px 0 0; color: var(--ink-dim); font-size: 12px; line-height: 1.45; text-align: center; }
.local-login { width: 100%; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.local-login summary { cursor: pointer; color: var(--ink-dim); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; text-align: center; list-style-position: inside; }
.local-login[open] summary { margin-bottom: 16px; color: var(--ink-soft); }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 15px; }
.field > span { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: rgba(245, 240, 222, 0.02); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 12px 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--lime-dim); box-shadow: 0 0 0 3px rgba(196, 245, 59, 0.12); }
.field input::placeholder { color: var(--ink-dim); }
form .btn-block { margin-top: 6px; }

.form-err { background: rgba(224, 86, 74, 0.08); border: 1px solid rgba(224, 86, 74, 0.35); color: #f0c0bb; font-size: 13.5px; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; }
.form-ok { background: rgba(196, 245, 59, 0.07); border: 1px solid rgba(196, 245, 59, 0.32); color: var(--ink); font-size: 13.5px; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; }
.form-ok code { font-family: var(--mono); color: var(--lime); }

/* ---------- user menu (dashboard nav) ---------- */
.usermenu { display: inline-flex; align-items: center; gap: 10px; }
.usermenu .uname { font-size: 13.5px; color: var(--ink-soft); }
.usermenu .uname b { color: var(--ink); font-weight: 600; }

.badge { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
.badge.admin { color: var(--lime); border-color: rgba(196, 245, 59, 0.4); }
.badge.pending { color: var(--orange); border-color: rgba(240, 136, 62, 0.4); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .window-wrap { order: 2; }
  .split { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .feat:nth-child(3n) { border-right: 1px solid var(--line); }
  .feat:nth-child(2n) { border-right: none; }
  .node-row { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .creator-shell { grid-template-columns: 1fr; }
  .create-form, .creator-vars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat { border-right: none !important; }
  .mini-grid { grid-template-columns: 1fr; }
  .stat-row, .create-form, .creator-vars { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto; } }

/* ---------- pricing calculator (landing page) ---------- */
.calc {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px;
  margin-top: 52px; align-items: start;
}
.calc-controls {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  display: flex; flex-direction: column; gap: 26px;
}

.calc-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-tier {
  text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  padding: 16px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(245, 240, 222, 0.02);
  transition: border-color 0.18s, background 0.18s;
}
.calc-tier:hover { border-color: var(--line-strong); }
.calc-tier.is-active { border-color: rgba(196, 245, 59, 0.45); background: rgba(196, 245, 59, 0.06); }
.calc-tier b { display: block; font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.calc-tier.is-active b { color: var(--lime); }
.calc-tier span { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }

.calc-field { display: flex; flex-direction: column; gap: 9px; }
.calc-field[hidden] { display: none; }
.calc-field label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-soft);
}
.calc-val { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--lime); font-weight: 700; }
.calc-field small { font-size: 12.5px; color: var(--ink-dim); }

.calc-field input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px; outline: none;
  background: rgba(245, 240, 222, 0.13); cursor: pointer;
}
.calc-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--lime); border: 3px solid var(--panel);
  box-shadow: 0 0 0 1px rgba(196, 245, 59, 0.5);
}
.calc-field input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--panel);
  background: var(--lime); box-shadow: 0 0 0 1px rgba(196, 245, 59, 0.5);
}
.calc-field input[type="range"]:focus-visible { box-shadow: 0 0 0 3px rgba(196, 245, 59, 0.25); }

.calc-out {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(196, 245, 59, 0.22); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(196, 245, 59, 0.05), var(--bg-soft));
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 96px;
}
.calc-price { display: flex; align-items: baseline; gap: 8px; }
.calc-price b { font-size: clamp(32px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.calc-price span { font-size: 14px; color: var(--ink-soft); }
.calc-rate { font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); }

.calc-break { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.calc-break li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; color: var(--ink-soft);
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.calc-break li:last-child { border-bottom: none; padding-bottom: 0; }
.calc-break b { color: var(--ink); font-family: var(--mono); font-size: 13px; }

.calc-hint {
  font-size: 13px; line-height: 1.5; color: var(--ink-soft);
  padding: 12px 14px; border-radius: 10px;
  background: rgba(240, 136, 62, 0.08); border: 1px solid rgba(240, 136, 62, 0.22);
}
.calc-hint:empty { display: none; }

.calc-compare { display: flex; flex-direction: column; gap: 9px; }
.calc-compare-title {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-dim);
}
.calc-compare ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.calc-compare li { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-soft); }
.calc-compare b { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.calc-compare .is-us span, .calc-compare .is-us b { color: var(--lime); font-weight: 700; }
.calc-compare small { font-size: 11.5px; color: var(--ink-dim); line-height: 1.45; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .calc-out { position: static; }
  .calc-tiers { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Motion layer — 3D voxel scene, scroll reveals, tilt.

   Everything here is progressive enhancement. The page is fully readable with
   no JavaScript: `fx-armed` is set by a tiny inline script and removed again
   either by motion-fx.js once it has taken over, or by its own failsafe timer
   if the animation bundle never loads. Nothing is hidden unless something is
   alive to bring it back.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  html.fx-armed [data-reveal] { opacity: 0; }
}

/* scroll progress rail under the sticky nav */
.scroll-rail {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--lime), var(--orange));
  pointer-events: none;
}

.nav { transition: height 0.25s ease, background 0.25s ease, border-color 0.25s ease; }
.nav.is-condensed { background: rgba(14, 16, 11, 0.9); border-bottom-color: var(--line-strong); }
.nav.is-condensed .nav-inner { height: 56px; }

/* ---------- 3D voxel scene ---------- */
.voxel-scene {
  position: absolute; top: -58px; right: -18px; z-index: 3;
  width: 190px; height: 190px;
  perspective: 620px; pointer-events: none;
}
/* Four nested layers, because four different things want to write a transform
   here and a single element can only have one. Outer to inner: scroll parallax,
   entrance pop, idle float, pointer tilt. Collapsing any two of these makes the
   later one silently cancel the earlier one. */
.voxel-enter, .voxel-float, .voxel-orbit {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}
.voxel-float { animation: voxel-float 9s ease-in-out infinite; }
.cube { position: absolute; transform-style: preserve-3d; }
.cube .face { position: absolute; display: block; }

/* main grass block */
.cube-main { width: 96px; height: 96px; top: 46px; left: 46px; animation: voxel-spin 18s linear infinite; }
.cube-main .face { width: 96px; height: 96px; }
.cube-main .face-front  { transform: translateZ(48px); }
.cube-main .face-back   { transform: rotateY(180deg) translateZ(48px); }
.cube-main .face-right  { transform: rotateY(90deg) translateZ(48px); }
.cube-main .face-left   { transform: rotateY(-90deg) translateZ(48px); }
.cube-main .face-top    { transform: rotateX(90deg) translateZ(48px); }
.cube-main .face-bottom { transform: rotateX(-90deg) translateZ(48px); }

/* the two satellites, deliberately smaller and slower so the eye keeps a focus */
.cube-sm { width: 34px; height: 34px; }
.cube-sm .face { width: 34px; height: 34px; }
.cube-sm .face-front  { transform: translateZ(17px); }
.cube-sm .face-back   { transform: rotateY(180deg) translateZ(17px); }
.cube-sm .face-right  { transform: rotateY(90deg) translateZ(17px); }
.cube-sm .face-left   { transform: rotateY(-90deg) translateZ(17px); }
.cube-sm .face-top    { transform: rotateX(90deg) translateZ(17px); }
.cube-sm .face-bottom { transform: rotateX(-90deg) translateZ(17px); }
.cube-a { top: 6px; left: 12px; animation: voxel-spin 13s linear infinite reverse; }
.cube-b { top: 128px; left: 148px; animation: voxel-spin 22s linear infinite; }

/* Minecraft-ish material: flat colour plus a pixel speckle, no images. The
   4px grid matches the blocky look without needing a texture download. */
.face-top {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.10) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 4px, transparent 4px 8px),
    linear-gradient(150deg, #b7ea36, #8bbf27);
}
.cube-main .face-front,
.cube-main .face-back,
.cube-main .face-left,
.cube-main .face-right {
  background:
    linear-gradient(180deg, #7ea82a 0 13%, rgba(0,0,0,0) 13%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 4px, transparent 4px 8px),
    linear-gradient(180deg, #6b4b2f, #4e361f);
}
.face-bottom {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.14) 0 4px, transparent 4px 8px),
    linear-gradient(180deg, #4a331d, #38260f);
}
/* satellites read as "energy", tying the scene to the lime accent */
.cube-a .face, .cube-b .face {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 3px, transparent 3px 6px),
    linear-gradient(160deg, rgba(196,245,59,.85), rgba(143,168,58,.7));
  box-shadow: inset 0 0 12px rgba(196,245,59,.5);
}
.cube-b .face {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 3px, transparent 3px 6px),
    linear-gradient(160deg, rgba(240,136,62,.85), rgba(170,90,35,.7));
  box-shadow: inset 0 0 12px rgba(240,136,62,.45);
}
.cube .face { border: 1px solid rgba(0, 0, 0, 0.35); }

@keyframes voxel-spin { to { transform: rotateX(-24deg) rotateY(360deg); } }
@keyframes voxel-float {
  0%, 100% { transform: translateY(-8px); }
  50%      { transform: translateY(10px); }
}

/* the window card becomes a 3D surface the pointer can tip */
.window-wrap { perspective: 1100px; }
.window { transform-style: preserve-3d; will-change: transform; }
.window .window-body { transform: translateZ(24px); }
.window .window-bar { transform: translateZ(12px); }

/* pointer-tilt targets get a soft lift; the transform itself is set in JS */
[data-tilt] { will-change: transform; }

/* the price is a number that changes, so it deserves a beat when it does */
.calc-price b { display: inline-block; will-change: transform; }
.calc-price.is-bumped b { animation: price-bump 0.42s cubic-bezier(.34,1.56,.64,1); }
@keyframes price-bump {
  0%   { transform: scale(1); }
  38%  { transform: scale(1.075); }
  100% { transform: scale(1); }
}

@media (max-width: 900px) {
  .voxel-scene { width: 128px; height: 128px; top: -40px; right: -6px; }
  .cube-main { width: 68px; height: 68px; top: 32px; left: 30px; }
  .cube-main .face { width: 68px; height: 68px; }
  .cube-main .face-front  { transform: translateZ(34px); }
  .cube-main .face-back   { transform: rotateY(180deg) translateZ(34px); }
  .cube-main .face-right  { transform: rotateY(90deg) translateZ(34px); }
  .cube-main .face-left   { transform: rotateY(-90deg) translateZ(34px); }
  .cube-main .face-top    { transform: rotateX(90deg) translateZ(34px); }
  .cube-main .face-bottom { transform: rotateX(-90deg) translateZ(34px); }
  .cube-b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .voxel-float, .cube-main, .cube-a, .cube-b { animation: none !important; }
  .marquee-track { animation: none !important; }
  .calc-price.is-bumped b { animation: none !important; }
  .scroll-rail { display: none; }
  html.fx-armed [data-reveal] { opacity: 1 !important; }
}
