/* ============================================================
   n8nGalaxy Premium Static Theme (Dark/Light)
   - Clean typography + spacing system
   - Better navbar, buttons, cards, callouts
   - Works with existing HTML + script.js theme toggle
   ============================================================ */

/* -------------------- Design Tokens -------------------- */
:root {
  /* Colors */
  --bg: #0b1020;
  --bg2: rgba(255, 255, 255, 0.02);
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.08);
  --text: #e8ecff;
  --muted: rgba(232, 236, 255, 0.72);
  --border: rgba(255, 255, 255, 0.12);
  --border2: rgba(255, 255, 255, 0.18);

  --accent: #64d2ff;
  --accent2: #d4af37;

  /* Shadows */
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.22);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.38);

  /* Radii */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Spacing */
  --s-1: 6px;
  --s-2: 10px;
  --s-3: 14px;
  --s-4: 18px;
  --s-5: 22px;
  --s-6: 28px;

  /* Typography */
  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-md: 15.5px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 32px;
  --fs-3xl: 42px;

  --lh: 1.7;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg2: rgba(0, 0, 0, 0.02);
  --card: rgba(0, 0, 0, 0.04);
  --card2: rgba(0, 0, 0, 0.06);
  --text: #0b1020;
  --muted: rgba(11, 16, 32, 0.72);
  --border: rgba(0, 0, 0, 0.12);
  --border2: rgba(0, 0, 0, 0.18);

  --accent: #0066ff;
  --accent2: #b68c1a;

  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.10);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
}

/* -------------------- Base -------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 18% 10%, rgba(100, 210, 255, 0.18), transparent 56%),
    radial-gradient(1000px 700px at 80% 18%, rgba(212, 175, 55, 0.12), transparent 58%),
    radial-gradient(900px 600px at 40% 110%, rgba(100, 210, 255, 0.10), transparent 60%),
    var(--bg);

  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--fs-md);
  line-height: var(--lh);
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.muted { color: var(--muted); }

/* -------------------- Headings & Text -------------------- */
h1, h2, h3 {
  letter-spacing: -0.3px;
  line-height: 1.2;
}

h1 {
  font-size: var(--fs-3xl);
  margin: 0 0 var(--s-2);
}

h2 {
  font-size: var(--fs-xl);
  margin: var(--s-4) 0 var(--s-2);
}

h3 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--s-2);
}

p { margin: 0 0 var(--s-3); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

/* -------------------- Header / Nav -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(12px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}

.brand {
  font-weight: 900;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(100,210,255,0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
}

.nav a.active {
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* -------------------- Main Layout -------------------- */
main {
  padding: 26px 0 62px;
}

/* -------------------- Cards -------------------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 16px 0;
}

.card.mini {
  padding: 16px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--border2);
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);

  background: linear-gradient(90deg, rgba(100,210,255,0.24), rgba(212,175,55,0.18));
  color: var(--text);
  cursor: pointer;
  user-select: none;

  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, border-color 120ms ease, filter 120ms ease;
}

.btn:hover {
  border-color: var(--border2);
  filter: brightness(1.05);
  text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: rgba(255,255,255,0.06);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: var(--fs-sm);
}

/* -------------------- Lists -------------------- */
.list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.list li { margin: 8px 0; }

/* -------------------- Footer -------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  background: rgba(0, 0, 0, 0.16);
}

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

/* -------------------- Legal Helpers -------------------- */
.note {
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.callout {
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(100, 210, 255, 0.16), rgba(212, 175, 55, 0.10));
}

/* -------------------- Home Enhanced Blocks (if you used the upgraded index.html) -------------------- */
.hero2 {
  position: relative;
  margin: 22px 0 16px;
  padding: 22px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero2-bg {
  position: absolute;
  inset: -140px -140px auto -140px;
  height: 460px;
  background:
    radial-gradient(560px 280px at 18% 28%, rgba(100,210,255,0.30), transparent 60%),
    radial-gradient(560px 280px at 74% 36%, rgba(212,175,55,0.22), transparent 60%);
  filter: blur(7px);
  pointer-events: none;
}

.hero2-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
  align-items: stretch;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: var(--fs-sm);
  letter-spacing: 0.2px;
}

.hero2-title {
  margin: 14px 0 10px;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.7px;
}

.hero2-sub {
  margin: 0 0 16px;
  max-width: 62ch;
  color: var(--muted);
}

.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero2-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}

.hero2-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.metric {
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-sm);
}

.metric-num {
  font-weight: 900;
  letter-spacing: 0.3px;
}

.metric-label {
  margin-top: 4px;
  font-size: var(--fs-sm);
}

.glass {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.minihead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.10);
}

.workflow {
  display: grid;
  gap: 12px;
  padding: 4px 2px 8px;
}

.wf-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.wf-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.wf-title { font-weight: 900; margin-bottom: 2px; }

.wf-desc { font-size: var(--fs-sm); line-height: 1.55; }

.wf-line {
  height: 1px;
  border-top: 1px dashed var(--border);
  margin: 6px 0 6px 52px;
}

.securebar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.badge {
  font-size: var(--fs-xs);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.section { padding: 22px; }

.section-head h2 { margin: 0 0 6px; }

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps { display: grid; gap: 12px; }

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(100,210,255,0.22), rgba(212,175,55,0.14));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
}

.step-title { font-weight: 900; margin-bottom: 4px; }

.cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 22px;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
  .hero2-grid { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .hero2 { padding: 16px; }
  .hero2-metrics { grid-template-columns: 1fr; }
}
