/* Kalvor brand: gunmetal + signal orange. Colors match brand/README.md. */
:root {
  --bg: #0F1215;
  --bg-alt: #141920;
  --surface: #1C2228;
  --border: #2E3740;
  --border-strong: #3A434D;
  --text: #E8EAED;
  --text-2: #B4BBC3;
  --text-3: #9AA3AD;
  --accent: #FF6B1A;
  --accent-hover: #FF8A47;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--text); text-decoration: none; }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 15px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-sm { padding: 12px 20px; font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--bg); transition: background-color 0.15s, transform 0.2s, box-shadow 0.2s; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 107, 26, 0.35); }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); font-weight: 500; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-hover); }
.btn:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 820px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero .container { position: relative; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Michroma, sans-serif;
  font-size: 18px;
  letter-spacing: 4px;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}
.nav-links a:not(.btn) { color: var(--text-2); }
.nav-links a:not(.btn):hover { color: var(--accent-hover); }

.hero-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 72px 0 96px;
}
.hero-copy {
  flex: 999 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-art {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
}

/* ---------- hero motion (from the "Animated" page of the design canvas) ---------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.blob-orange { width: 620px; height: 620px; left: -180px; top: 380px; background: var(--accent); opacity: 0.14; }
.blob-steel { width: 760px; height: 760px; right: -200px; top: -300px; background: #2A3A4A; opacity: 0.5; animation-duration: 18s; }
@keyframes drift { to { transform: translate(120px, -70px) scale(1.2); } }

.flow { stroke-dasharray: 200 1300; animation: flow 4.5s linear infinite; }
@keyframes flow { from { stroke-dashoffset: 1500; } to { stroke-dashoffset: 0; } }

.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.particles span {
  position: absolute;
  bottom: -10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  opacity: 0;
  animation: rise 10s linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  15% { opacity: 0.7; }
  100% { transform: translateY(-700px) rotate(200deg); opacity: 0; }
}

.emblem {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emblem svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.emblem img { position: relative; width: 62%; height: auto; }
.spin { animation: spin 28s linear infinite; }
.spin-reverse { animation: spin 40s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.breathe { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 16px rgba(255, 107, 26, 0.25)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 46px rgba(255, 107, 26, 0.55)); }
}

.up { animation: up 0.9s ease-out both; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--text-3);
}
.eyebrow span { color: var(--accent); }

h1, h2 {
  margin: 0;
  font-family: Michroma, sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.15;
}
h1 { font-size: clamp(34px, 4.6vw, 58px); }
h2 { font-size: clamp(26px, 3.2vw, 38px); }

.lead {
  margin: 0;
  font-size: 19px;
  color: var(--text-2);
  max-width: 560px;
}
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.fine { margin: 0; font-size: 14px; color: var(--text-3); }

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section .eyebrow { margin-bottom: 16px; }
.section-lead {
  margin: 16px 0 0;
  font-size: 18px;
  color: var(--text-2);
  max-width: 620px;
}

/* ---------- features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 56px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 600; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.icon {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
  align-items: stretch;
}
/* 4 plans → 2×2 on mid screens, so no plan ends up alone on its row */
@media (max-width: 1100px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } }
@media (max-width: 600px)  { .pricing-grid { grid-template-columns: 1fr; } }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
}
.plan-featured { border-color: var(--accent); }
.badge {
  position: absolute;
  top: -12px;
  left: 28px;
  margin: 0;
  background: var(--accent);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 4px 10px;
  border-radius: 4px;
}
.plan h3 {
  margin: 0;
  font-family: Michroma, sans-serif;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.price { margin: 12px 0 24px; color: var(--text-3); font-size: 15px; }
.price span { color: var(--text); font-size: 36px; font-weight: 600; margin-right: 4px; }
.plan ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.plan li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--text-2);
}
.plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}
.plan li.muted { color: var(--text-3); }
.plan li.muted::before { background: var(--border-strong); }
.plan .btn { width: 100%; }

/* ---------- support ---------- */
.support {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  align-items: start;
}
.support .btn { margin-top: 28px; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.faq summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-2); font-size: 15px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer .brand { font-size: 14px; }
.footer p { margin: 0; font-size: 14px; color: var(--text-3); }

/* ---------- motion below the hero ---------- */
.card, .plan { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.card:hover, .plan:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 26, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 107, 26, 0.12);
}
.plan-featured { box-shadow: 0 0 40px rgba(255, 107, 26, 0.12); }
.card:hover .icon { animation: nudge 0.5s ease; }
@keyframes nudge { 50% { transform: translateY(-3px) scale(1.08); } }

/* scroll reveal: only hidden when the script is running, so no-JS visitors see everything */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .reveal.in:hover { transform: translateY(-4px); transition-delay: 0s !important; }

/* a faint flowing line along the top of each section, echoing the hero */
.section { position: relative; overflow-x: clip; }
.section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 220px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
  animation: sweep 7s linear infinite;
}
@keyframes sweep { from { transform: translateX(-220px); } to { transform: translateX(100vw); } }

/* respect the visitor's "reduce motion" setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { min-height: 0; }
  .nav-links { gap: 18px; }
  .nav-links .btn { display: none; } /* the hero's own button sits right below */
  .hero-body { padding: 40px 0 72px; }
  .emblem { max-width: 260px; }
  .blob-orange { width: 360px; height: 360px; }
  .blob-steel { width: 420px; height: 420px; }
  .section { padding: 80px 0; }
  .feature-grid { grid-template-columns: 1fr; }
}
