/* Routix Flow — process automation agency
   Pure static, no framework. */

:root {
  --bg: #0b0d12;
  --bg-alt: #0f1219;
  --surface: #141823;
  --surface-2: #1a1f2c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e7eaf0;
  --text-dim: #9aa3b2;
  --text-mute: #6b7384;
  --accent: #7c8aff;
  --accent-2: #34d3c2;
  --accent-soft: rgba(124, 138, 255, 0.12);
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --maxw: 1180px;
  --pad: clamp(20px, 4vw, 40px);
  --font: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

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

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: "Manrope", var(--font);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.028em; }
h3 { font-size: 1.15rem; }

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0d12;
  box-shadow: 0 8px 22px -8px rgba(124, 138, 255, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(124, 138, 255, 0.7); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--accent); }

.btn-arrow::after {
  content: "→";
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", var(--font);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: #0b0d12;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 14px -4px rgba(124, 138, 255, 0.6);
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(60px, 9vw, 110px) 0 clamp(50px, 8vw, 100px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 600px;
  background:
    radial-gradient(ellipse 50% 60% at 30% 30%, rgba(124, 138, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 50% at 75% 40%, rgba(52, 211, 194, 0.14), transparent 70%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 138, 255, 0.25);
  font-size: 0.82rem;
  color: #c2c8ff;
  font-weight: 500;
  margin-bottom: 24px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(52, 211, 194, 0.18);
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(115deg, #a8b1ff 0%, #5fe6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  font-size: 1.12rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 520px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--text-mute);
  font-size: 0.88rem;
}
.hero-meta strong { color: var(--text); font-size: 1.05rem; display: block; font-weight: 700; }

/* Hero visual: animated workflow card */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin-left: auto;
}
.workflow-card {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.workflow-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
}
.wf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.wf-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-2);
}
.wf-status::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(52, 211, 194, 0.18);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.wf-node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  position: relative;
}
.wf-node .ico {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.wf-node.n1 .ico { background: rgba(124, 138, 255, 0.18); color: var(--accent); }
.wf-node.n2 .ico { background: rgba(52, 211, 194, 0.16); color: var(--accent-2); }
.wf-node.n3 .ico { background: rgba(255, 184, 84, 0.15); color: #ffb854; }
.wf-node.n4 .ico { background: rgba(180, 130, 255, 0.16); color: #b482ff; }
.wf-node .label { font-weight: 600; color: var(--text); }
.wf-node .sub { color: var(--text-mute); font-size: 0.78rem; margin-top: 1px; }
.wf-node .ok {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--accent-2);
  background: rgba(52, 211, 194, 0.1);
  padding: 3px 8px;
  border-radius: 5px;
}
.wf-arrow {
  width: 1px;
  height: 14px;
  background: var(--border-strong);
  margin-left: 29px;
}
.wf-stats {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-mute);
}
.wf-stats span strong { color: var(--text); font-weight: 600; }

/* ---------- Section structure ---------- */
section { padding: clamp(60px, 8vw, 110px) 0; position: relative; }
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head p {
  color: var(--text-dim);
  margin-top: 16px;
  font-size: 1.05rem;
}

/* ---------- Logos strip ---------- */
.logos {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.logos-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 36px;
  color: var(--text-mute);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.logos-row .lg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
  font-family: "Manrope", var(--font);
}
.logos-row .lg:hover { opacity: 1; }
.logos-label {
  text-align: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  margin-bottom: 18px;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.service-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 138, 255, 0.22);
}
.service-icon svg { width: 22px; height: 22px; stroke: var(--accent); }
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--text-dim); font-size: 0.95rem; }
.service-card ul {
  list-style: none;
  padding: 18px 0 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-mute);
  display: grid;
  gap: 7px;
}
.service-card li::before {
  content: "▸ ";
  color: var(--accent-2);
  margin-right: 4px;
}

/* ---------- Process timeline ---------- */
.process { background: var(--bg-alt); }
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.tl-step {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.tl-step:hover { border-color: var(--accent); }
.tl-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0d12;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.tl-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.tl-step p { color: var(--text-dim); font-size: 0.9rem; }
.tl-step .week {
  display: block;
  font-size: 0.78rem;
  color: var(--text-mute);
  margin-top: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Metrics / Cases ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.metric {
  padding: 32px 26px;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}
.metric .num {
  font-family: "Manrope", var(--font);
  font-size: clamp(2.2rem, 4.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(115deg, #a8b1ff, #5fe6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  line-height: 1;
}
.metric .lbl {
  display: block;
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease;
}
.case:hover { border-color: var(--border-strong); }
.case-tag {
  display: inline-block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  font-weight: 600;
}
.case h3 { font-size: 1.05rem; }
.case p { color: var(--text-dim); font-size: 0.92rem; }
.case .result {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-mute);
}
.case .result strong { color: var(--text); }

/* ---------- Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}
.stack-pill {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  text-align: center;
  color: var(--text-dim);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.stack-pill:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

/* ---------- FAQ ---------- */
.faq { background: var(--bg-alt); }
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-weight: 600;
  font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .ans {
  padding: 0 24px 22px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- CTA / Contact ---------- */
.cta-block {
  position: relative;
  padding: clamp(48px, 6vw, 80px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 80% 80% at 20% 0%, rgba(124, 138, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 80% 80% at 100% 100%, rgba(52, 211, 194, 0.14), transparent 60%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-strong);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  overflow: hidden;
}
@media (max-width: 820px) {
  .cta-block { grid-template-columns: 1fr; gap: 36px; }
}
.cta-block h2 { margin-bottom: 16px; }
.cta-block p { color: var(--text-dim); margin-bottom: 24px; }
.cta-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cta-list li {
  font-size: 0.92rem;
  color: var(--text-dim);
  display: flex;
  gap: 10px;
}
.cta-list li::before {
  content: "✓";
  color: var(--accent-2);
  font-weight: 700;
}
.contact-form {
  display: grid;
  gap: 14px;
}
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--accent);
  background: rgba(124, 138, 255, 0.06);
}
.contact-form textarea { min-height: 90px; resize: vertical; }
.contact-form .btn { justify-content: center; }
.form-note {
  font-size: 0.78rem;
  color: var(--text-mute);
  margin-top: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
.footer-grid h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-dim); font-size: 0.92rem; transition: color 0.15s ease; }
.footer-grid a:hover { color: var(--text); }
.footer-about p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-top: 14px;
  max-width: 320px;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-mute);
  font-size: 0.85rem;
}

/* ---------- Reveal on scroll (subtle) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
