/* ========================================================================
   StackWorks / FinOps — Design tokens
   ======================================================================== */
:root {
  --bg: #0a0e1a;
  --surface: #10152633;
  --surface-solid: #12172a;
  --surface-raised: #171d34;
  --border: #232b46;
  --text: #eef1f8;
  --text-dim: #9aa3c0;
  --text-faint: #616b8c;

  --cyan: #00d4e0;
  --blue: #2f6bff;
  --purple: #8a5cf6;

  --grad-signature: linear-gradient(115deg, #00f4f5 0%, #00b8fc 22%, #2f6bff 52%, #6b4ce6 78%, #b056fc 100%);
  --grad-subtle: linear-gradient(180deg, rgba(0,212,224,0.08), rgba(138,92,246,0.05));

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Ambient backdrop: faint layered diagonal bands echoing the logo motif */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0%, transparent 38%, rgba(47,107,255,0.05) 39%, rgba(47,107,255,0.05) 41%, transparent 42%),
    linear-gradient(115deg, transparent 60%, transparent 63%, rgba(0,212,224,0.04) 64%, rgba(0,212,224,0.04) 65.5%, transparent 66.5%),
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(47,107,255,0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(138,92,246,0.10), transparent 60%);
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--cyan);
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn-primary {
  background: var(--grad-signature);
  color: #061018;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(47,107,255,0.55); }
.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------------- Header ---------------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,14,26,0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { height: 28px; width: auto; }
.brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14.5px;
  color: var(--text-dim);
}
.nav-links a { text-decoration: none; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-domains {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

.menu-toggle { display: none; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 92px 0 60px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.08;
  margin: 18px 0 20px;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad-signature);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  color: var(--text-dim);
  font-size: 17.5px;
  max-width: 46ch;
  margin: 0 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.hero-meta strong { color: var(--text-dim); font-weight: 500; }

/* Signature visual: translation layers converging into FOCUS */
.flow-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.flow-card .flow-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.flow-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flow-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  opacity: 0;
  transform: translateX(-10px);
  animation: chip-in 0.5s ease forwards;
}
.flow-chip span.tag { color: var(--text-faint); font-size: 10.5px; }
.flow-chip:nth-child(1) { animation-delay: 0.1s; }
.flow-chip:nth-child(2) { animation-delay: 0.22s; }
.flow-chip:nth-child(3) { animation-delay: 0.34s; }
.flow-chip:nth-child(4) { animation-delay: 0.46s; }
@keyframes chip-in { to { opacity: 1; transform: translateX(0); } }

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}
.flow-arrow .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

.flow-focus {
  background: var(--grad-subtle);
  border: 1px solid rgba(0,212,224,0.35);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.flow-focus .name { font-family: var(--font-mono); font-size: 13px; color: var(--cyan); font-weight: 600; }
.flow-focus .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--bg);
  background: var(--cyan);
  padding: 3px 8px;
  border-radius: 999px;
}

.flow-units {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.flow-unit {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.flow-unit .val { font-family: var(--font-mono); font-size: 13px; color: var(--text); display: block; }
.flow-unit .lbl { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; display: block; }

/* ---------------- Section shell ---------------- */
section { padding: 84px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin-top: 14px; line-height: 1.15; }
.section-head p { color: var(--text-dim); font-size: 16px; margin-top: 14px; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
}

/* ---------------- Problem ---------------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.problem-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.problem-card .glyph {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.problem-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.problem-card p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

/* ---------------- How it works (layered steps) ---------------- */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.step:last-child { border-bottom: 1px solid var(--border); }
.step-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  padding-top: 3px;
}
.step-body h3 { font-size: 19px; margin-bottom: 8px; }
.step-body p { color: var(--text-dim); margin: 0; max-width: 62ch; }
.step-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

/* ---------------- Hosting comparison ---------------- */
.hosting-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.hosting-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
  overflow: hidden;
}
.hosting-card.featured { border-color: rgba(0,212,224,0.4); }
.hosting-card.featured::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-signature);
}
.hosting-card h3 { font-size: 20px; margin-bottom: 6px; }
.hosting-card .sub { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; margin-bottom: 22px; }
.hosting-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hosting-list li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-dim);
  align-items: flex-start;
}
.hosting-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: 7px;
  flex-shrink: 0;
}

/* ---------------- CTA ---------------- */
.cta-band {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 260px; height: 260px;
  background: var(--grad-signature);
  opacity: 0.14;
  filter: blur(40px);
  border-radius: 50%;
}
.cta-band h2 { font-size: 28px; margin-bottom: 10px; max-width: 30ch; }
.cta-band p { color: var(--text-dim); margin: 0; max-width: 42ch; }
.cta-actions { display: flex; gap: 14px; flex-shrink: 0; flex-wrap: wrap; }

/* ---------------- Footer ---------------- */
footer { padding: 46px 0 40px; border-top: 1px solid var(--border); }
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 20px; }
.footer-brand span { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--text-faint); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text-dim); }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
  .hosting-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .flow-units { grid-template-columns: 1fr; }
  .nav-domains { display: none; }
}
