/* Runrova marketing site — base styles
   Quiet, confident SaaS system — matches app.runrova.com's canonical tokens
   (see runrova-web/app/globals.css: canvas/surface/border/ink/accent). */

:root {
  --color-canvas: 255 255 255;        /* page background */
  --color-canvas-subtle: 250 250 250; /* alt panels */
  --color-surface: 255 255 255;       /* card surface */
  --color-surface-hover: 247 247 248;
  --color-border: 229 231 235;        /* gray-200 hairline */
  --color-border-subtle: 241 242 244; /* gray-100 */
  --color-ink: 10 10 10;              /* near-black primary text */
  --color-ink-muted: 107 114 128;     /* gray-500 */
  --color-ink-faint: 156 163 175;     /* gray-400 */
  --color-accent: 94 106 210;         /* refined indigo #5E6AD2 — used sparingly */
  --color-accent-hover: 75 87 192;    /* #4B57C0 */
  --color-accent-contrast: 255 255 255;
  --color-success: 22 130 90;

  --c-canvas: rgb(var(--color-canvas));
  --c-canvas-subtle: rgb(var(--color-canvas-subtle));
  --c-surface: rgb(var(--color-surface));
  --c-surface-hover: rgb(var(--color-surface-hover));
  --c-border: rgb(var(--color-border));
  --c-border-subtle: rgb(var(--color-border-subtle));
  --c-ink: rgb(var(--color-ink));
  --c-ink-muted: rgb(var(--color-ink-muted));
  --c-ink-faint: rgb(var(--color-ink-faint));
  --c-accent: rgb(var(--color-accent));
  --c-accent-hover: rgb(var(--color-accent-hover));
  --c-accent-contrast: rgb(var(--color-accent-contrast));
  --c-success: rgb(var(--color-success));

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.03), 0 1px 1px rgb(0 0 0 / 0.02);
  --shadow-popover: 0 12px 32px -8px rgb(0 0 0 / 0.12), 0 4px 10px -4px rgb(0 0 0 / 0.06);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;

  --max-width: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-canvas: 10 10 11;
    --color-canvas-subtle: 15 15 16;
    --color-surface: 18 18 20;
    --color-surface-hover: 26 26 29;
    --color-border: 38 38 41;
    --color-border-subtle: 28 28 31;
    --color-ink: 237 237 240;
    --color-ink-muted: 163 163 170;
    --color-ink-faint: 113 113 122;
    --color-accent: 125 136 230;
    --color-accent-hover: 150 160 235;
    --color-accent-contrast: 10 10 11;
    --color-success: 101 199 150;
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 1px 1px rgb(0 0 0 / 0.2);
    --shadow-popover: 0 12px 32px -8px rgb(0 0 0 / 0.55), 0 4px 10px -4px rgb(0 0 0 / 0.4);
  }
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--c-canvas);
  color: var(--c-ink);
  line-height: 1.55;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; margin: 0; }

p { margin: 0; color: var(--c-ink-muted); }

.mono {
  font-family: var(--font-mono);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--c-canvas) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  flex-shrink: 0;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--c-ink);
  display: inline-block;
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--c-canvas);
  border-top: 2px solid var(--c-canvas);
  transform: translate(6px, 7px) rotate(45deg);
}

.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-ink-muted);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--c-ink); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Buttons — color stays rare: primary is solid near-black, accent is for
   small/secondary marks only (links, focus rings, status dots). */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--c-ink);
  color: var(--c-canvas);
}

.btn-primary:hover { opacity: 0.85; }
.btn-primary:active { opacity: 0.72; }

.btn-ghost {
  color: var(--c-ink-muted);
}

.btn-ghost:hover { color: var(--c-ink); }

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-ink);
  border-color: var(--c-border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover { background: var(--c-surface-hover); }

.btn-lg { padding: 12px 22px; font-size: 1rem; }

.gh-icon { flex-shrink: 0; }

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:hover { background: var(--c-surface-hover); }

/* Hero */

.hero {
  position: relative;
  padding: 92px 0 64px;
  text-align: center;
  overflow: hidden;
}

.hero .container { position: relative; z-index: 1; }

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 740px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-ink-muted);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-success);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  color: var(--c-ink);
}

.text-accent { color: inherit; }

.hero-sub {
  font-size: 1.1rem;
  max-width: 600px;
  color: var(--c-ink-muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.hero-note {
  font-size: 0.84rem;
  color: var(--c-ink-faint);
}

/* Hero visual — a calm product-screenshot style deployments panel */

.hero-visual {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
}

.window {
  background: var(--c-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popover);
  overflow: hidden;
  border: 1px solid var(--c-border);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border-subtle);
}

.window-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--c-ink);
}

.window-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-success);
  font-size: 0.74rem;
  font-weight: 500;
}

.window-flag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-success);
}

.deploy-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.deploy-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--c-border-subtle);
}

.deploy-row:last-child { border-bottom: none; }

.deploy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-success);
  flex-shrink: 0;
}

.deploy-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.deploy-commit {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deploy-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--c-ink-faint);
}

.deploy-env {
  font-size: 0.76rem;
  color: var(--c-ink-muted);
}

.deploy-time {
  font-size: 0.76rem;
  color: var(--c-ink-faint);
  text-align: right;
}

.panel { display: flex; flex-direction: column; }

.service-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--c-border-subtle);
  font-size: 0.86rem;
}

.service-list li:last-child { border-bottom: none; }

.service-list strong { font-weight: 600; color: var(--c-ink); min-width: 56px; }

.svc-type { color: var(--c-ink-faint); font-size: 0.78rem; flex: 1; }

.svc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-ink-muted);
  font-size: 0.78rem;
}

.svc-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-success);
  flex-shrink: 0;
}

/* Problem section */

.problem {
  background: var(--c-canvas-subtle);
  padding: 72px 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.problem-text h2 { font-size: 1.85rem; margin-bottom: 16px; }
.problem-text p { font-size: 1.02rem; }

.problem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.problem-list li {
  font-size: 0.96rem;
  color: var(--c-ink-muted);
  padding-left: 16px;
  border-left: 2px solid var(--c-border);
}

.problem-list strong { color: var(--c-ink); }

/* Section headings */

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  text-align: center;
  color: var(--c-ink);
}

.section-sub {
  text-align: center;
  font-size: 1.04rem;
  max-width: 560px;
  margin: 14px auto 0;
}

/* How it works */

.how-it-works { padding: 88px 0; }

.steps {
  list-style: none;
  margin: 52px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.step:hover {
  box-shadow: var(--shadow-popover);
  border-color: var(--c-border-subtle);
}

.step-num {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-ink-faint);
  margin-bottom: 14px;
}

.step h3 { font-size: 1.0rem; margin-bottom: 8px; color: var(--c-ink); }
.step p { font-size: 0.87rem; }

/* Features — a quiet manifest list with small monochrome icons */

.features {
  padding: 88px 0;
  background: var(--c-canvas-subtle);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.feature-manifest {
  margin-top: 48px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.feature-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--c-border-subtle);
  transition: background 0.15s ease;
}

.feature-row:last-child { border-bottom: none; }

.feature-row:hover { background: var(--c-canvas-subtle); }

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--c-ink-muted);
  flex-shrink: 0;
}

.feature-row h3 { font-size: 1.02rem; margin-bottom: 6px; color: var(--c-ink); }
.feature-row p { font-size: 0.92rem; }

/* Status */

.status-section { padding: 80px 0; }

.status-inner { max-width: 680px; }

.status-card {
  margin-top: 36px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--c-ink);
}

.status-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c-success) 14%, transparent);
  color: var(--c-success);
  font-weight: 700;
  font-size: 0.68rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.status-caveat {
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--c-ink-faint);
  border-top: 1px solid var(--c-border-subtle);
  padding-top: 20px;
}

/* CTA */

.cta-section {
  background: var(--c-ink);
  color: var(--c-canvas);
  padding: 80px 0;
}

.cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  color: var(--c-canvas);
}

.cta-section p { color: color-mix(in srgb, var(--c-canvas) 70%, transparent); }

.cta-section .btn-primary {
  background: var(--c-canvas);
  color: var(--c-ink);
  margin-top: 8px;
}

.cta-section .btn-primary:hover { opacity: 0.88; }

.cta-section .hero-note { color: color-mix(in srgb, var(--c-canvas) 52%, transparent); }

/* Footer */

.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--c-border);
}

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

.footer-brand p {
  margin-top: 6px;
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a {
  font-size: 0.88rem;
  color: var(--c-ink-muted);
}

.footer-nav a:hover { color: var(--c-ink); }

.footer-copy {
  font-size: 0.82rem;
  color: var(--c-ink-faint);
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* Responsive */

@media (max-width: 980px) {
  .hero-visual { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .problem-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-popover);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s var(--ease), opacity 0.2s var(--ease);
  }

  .main-nav.open {
    max-height: 320px;
    opacity: 1;
  }

  .main-nav a {
    padding: 14px 24px;
    border-top: 1px solid var(--c-border-subtle);
  }

  .main-nav a:first-child { border-top: none; }

  .hero { padding: 56px 0 40px; }
  .hero-inner { gap: 18px; margin-bottom: 40px; }
  .steps { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 28px 1fr; padding: 18px 20px; }
  .header-inner { height: 60px; position: relative; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-nav { justify-content: center; width: 100%; }
}

@media (max-width: 480px) {
  .btn-lg { width: 100%; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .header-cta .btn-ghost { display: none; }
  .header-cta .btn-primary span { display: none; }
  .header-cta .btn-primary { padding: 10px; }
  .status-card { padding: 24px 20px; }
  .deploy-row { grid-template-columns: auto 1fr; }
  .deploy-env, .deploy-time { display: none; }
}
