/* ============================================================
   Automnus - design system
   Dark premium B2B · electric blue→violet accent
   ============================================================ */

:root {
  --bg: #07090f;
  --bg-alt: #0b0e17;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text: #e8ebf4;
  --text-muted: #9aa3b8;
  --accent-1: #5b8cff;
  --accent-2: #9b5bff;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --radius: 16px;
  --container: 1160px;
  --header-h: 68px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* ---------- typography ---------- */

h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); line-height: 1.15; font-weight: 750; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; font-weight: 650; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

.section-title { margin-bottom: 48px; max-width: 680px; }

.section-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 640px;
  margin: -32px 0 48px;
}

.footnote { font-size: 0.78rem; color: var(--text-muted); margin-top: 28px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 24px rgba(91, 140, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(123, 100, 255, 0.5); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn-sm { padding: 9px 20px; font-size: 0.85rem; }
.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled {
  background: rgba(7, 9, 15, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.01em; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: flex;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn.active { background: rgba(255, 255, 255, 0.12); color: var(--text); }

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* fallback background if WebGL is unavailable */
  background:
    radial-gradient(ellipse 70% 55% at 65% 35%, rgba(91, 140, 255, 0.16), transparent 60%),
    radial-gradient(ellipse 55% 45% at 30% 70%, rgba(155, 91, 255, 0.13), transparent 60%),
    var(--bg);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(7, 9, 15, 0.55), transparent 30%, transparent 62%, var(--bg) 100%),
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 55%, rgba(7, 9, 15, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 80px;
  max-width: 860px;
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 22px 0 34px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-note {
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.hero-note::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 9px;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}
.scroll-hint span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  animation: scrollhint 1.8s infinite ease-in-out;
}
@keyframes scrollhint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- sections ---------- */

.section { padding: 110px 0; position: relative; }
.section-alt {
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(91, 140, 255, 0.06), transparent 60%),
    var(--bg-alt);
}

/* ---------- form card (kept minimal - only the contact form is boxed) ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 30px 28px;
  backdrop-filter: blur(10px);
}

/* ---------- outcome pillars (open layout, no boxes) ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.pillar {
  position: relative;
  padding-left: 26px;
}
.pillar::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent-grad);
  border-radius: 2px;
  opacity: 0.85;
}

.pillar-stat { line-height: 1; }
.stat-num {
  font-size: clamp(3.2rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pillar-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 8px 0 20px;
  max-width: 260px;
}
.pillar h3 { margin-bottom: 10px; }
.pillar-body { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- capabilities marquee ---------- */

.cap-marquee {
  overflow: hidden;
  margin-top: 6px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.cap-track {
  display: flex;
  width: max-content;
  padding: 9px 0;
  animation: cap-scroll 48s linear infinite;
}
.cap-track.reverse { animation-direction: reverse; }
.cap-marquee:hover .cap-track { animation-play-state: paused; }

@keyframes cap-scroll {
  to { transform: translateX(-50%); }
}

.cap-group {
  display: flex;
  gap: 14px;
  padding-right: 14px;
  flex-shrink: 0;
}

.chip {
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 11px 20px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.chip:hover {
  border-color: rgba(139, 116, 255, 0.45);
  background: rgba(139, 116, 255, 0.08);
}

.cap-more {
  margin-top: 34px;
  color: var(--text-muted);
  font-size: 1rem;
}
.cap-more a {
  color: var(--text);
  font-weight: 650;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cap-more a:hover { text-decoration: underline; text-decoration-color: var(--accent-1); }

@media (prefers-reduced-motion: reduce) {
  .cap-track { animation: none; flex-wrap: wrap; width: auto; gap: 14px; }
  .cap-group { flex-wrap: wrap; padding-right: 0; }
  .cap-group[aria-hidden="true"] { display: none; }
  .cap-marquee {
    -webkit-mask-image: none;
    mask-image: none;
    padding: 0 24px;
  }
}

/* ---------- project rows (editorial layout) ---------- */

.project-list { border-top: 1px solid var(--surface-border); }

.project-row {
  display: grid;
  grid-template-columns: 110px 1.1fr 1.4fr;
  gap: 40px;
  padding: 52px 0;
  border-bottom: 1px solid var(--surface-border);
  position: relative;
  transition: background 0.3s ease;
}
.project-row::after {
  content: "";
  position: absolute;
  left: -24px; right: -24px; top: 0; bottom: 0;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(91, 140, 255, 0.05), rgba(155, 91, 255, 0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.project-row:hover::after { opacity: 1; }

.project-index {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(139, 116, 255, 0.55);
  transition: -webkit-text-stroke-color 0.3s ease;
}
.project-row:hover .project-index { -webkit-text-stroke-color: rgba(155, 140, 255, 0.95); }

.project-main h3 { font-size: 1.45rem; margin-bottom: 14px; letter-spacing: -0.01em; }

.project-problem {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid rgba(139, 116, 255, 0.5);
  padding-left: 12px;
}

.project-detail p { color: var(--text-muted); font-size: 0.96rem; }

.project-outcomes { list-style: none; margin-top: 18px; }
.project-outcomes li {
  font-size: 0.9rem;
  color: var(--text);
  padding: 6px 0 6px 26px;
  position: relative;
}
.project-outcomes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.live-badge {
  display: inline-block;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(123, 100, 255, 0.45);
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.live-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123, 100, 255, 0.6);
}

/* ---------- testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.quote { position: relative; padding-top: 44px; }
.quote::before {
  content: "\201C";
  position: absolute;
  top: -6px; left: -4px;
  font-size: 5rem;
  line-height: 1;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}

.quote blockquote {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 20px;
}

.quote figcaption {
  border-top: 1px solid var(--surface-border);
  padding-top: 14px;
}
.quote-name { display: block; font-weight: 650; font-size: 0.92rem; }
.quote-role { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 2px; }

/* ---------- process timeline ---------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
  padding-top: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 31px; left: 6px; right: 18%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), transparent);
  opacity: 0.5;
}

.tstep { position: relative; padding-top: 34px; }

.tstep-dot {
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 14px rgba(123, 100, 255, 0.9);
}

.tstep-ghost {
  position: absolute;
  top: -26px; right: 0;
  font-size: 4.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

.tstep h3 { margin-bottom: 10px; }
.tstep p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.about-visual { position: relative; aspect-ratio: 1; max-width: 460px; }
#about-canvas { width: 100%; height: 100%; }

.about-p { color: var(--text-muted); margin-bottom: 18px; max-width: 560px; }
.about-p:first-of-type { color: var(--text); font-size: 1.08rem; }

.about-facts {
  display: flex;
  gap: 48px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--surface-border);
  flex-wrap: wrap;
}
.fact-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact-label { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- contact / form ---------- */

.section-contact {
  background:
    radial-gradient(ellipse 65% 55% at 20% 20%, rgba(91, 140, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 45% at 85% 80%, rgba(155, 91, 255, 0.08), transparent 60%),
    var(--bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
/* grid items default to min-width:auto - intrinsic input widths would
   otherwise force the column wider than small viewports */
.contact-grid > * { min-width: 0; }

.contact-lead { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 26px; }

.contact-points { list-style: none; }
.contact-points li { padding: 8px 0; font-size: 0.98rem; }

.contact-form { padding: 34px 32px; }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  background: rgba(255, 255, 255, 0.07);
}
.form-field textarea { resize: vertical; min-height: 80px; }

.form-field select option { background: #12151f; color: var(--text); }

.phone-row { display: flex; gap: 10px; }
.phone-row select { width: 120px; flex-shrink: 0; }
.phone-row input { flex: 1; min-width: 0; }

.form-note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-privacy {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: center;
}

.form-status {
  margin-top: 16px;
  font-size: 0.92rem;
  text-align: center;
  min-height: 1.4em;
}
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--surface-border);
  padding: 56px 0 32px;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; max-width: 320px; margin-top: 8px; }
.footer-meta { text-align: right; }
.footer-meta p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; }
.footer-meta a:hover { color: var(--text); }
.footer-copy p { color: var(--text-muted); font-size: 0.8rem; }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */

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

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .pillars { grid-template-columns: 1fr; gap: 40px; max-width: 560px; }
  .quotes { grid-template-columns: 1fr; gap: 40px; max-width: 560px; }
  .timeline { grid-template-columns: 1fr; gap: 44px; padding-top: 0; }
  .timeline::before {
    top: 6px; bottom: 6px; left: 5px; right: auto;
    width: 2px; height: auto;
    background: linear-gradient(180deg, var(--accent-1), var(--accent-2), transparent);
  }
  .tstep { padding-top: 0; padding-left: 32px; }
  .tstep-dot { top: 6px; }
  .tstep-ghost { top: -10px; font-size: 3.4rem; }

  .project-row {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 40px 0;
  }
  .project-index { font-size: 2.2rem; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-visual { max-width: 320px; margin: 0 auto; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-meta { text-align: left; }
}

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 9, 15, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--surface-border);
    padding: 8px 24px 16px;
    transform: translateY(-130%);
    transition: transform 0.25s ease;
    z-index: 99;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 13px 0; font-size: 1rem; }

  .nav-burger { display: block; }
  .header-actions .btn { display: none; }

  .section { padding: 72px 0; }
  .hero-ctas .btn { width: 100%; }
}
