/* ==========================================================================
   AutonomousDoc — Shared Design System
   Apple-inspired: generous whitespace, large type, subtle motion, restraint
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-dark: #0a0a0c;
  --bg-dark-secondary: #161618;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --text-light: #f5f5f7;
  --text-light-secondary: #a1a1a6;
  --accent: #0071e3;
  --accent-dark: #0058b0;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #0071e3 50%, #00c6fb 100%);
  --border: #d2d2d7;
  --border-dark: #2c2c2e;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --nav-height: 52px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s var(--ease);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-logo .logo-text {
  display: inline-flex;
}

.nav-logo .mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-gradient);
  display: inline-block;
}

.nav-logo .logo-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
  white-space: nowrap;
}

.nav-links a:hover { opacity: 1; }

.nav-links a.active {
  opacity: 1;
  font-weight: 600;
}

.nav-links a.nav-cta {
  font-size: 13px;
  font-weight: 600;
  background: var(--text-primary);
  color: #fff;
  opacity: 1;
  padding: 7px 16px;
  border-radius: 980px;
  transition: background 0.2s var(--ease);
}

.nav-links a.nav-cta:hover { background: #000; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: 0.2s var(--ease);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: calc(var(--nav-height) + 110px) 0 90px;
  text-align: center;
  background: var(--bg-secondary);
}

.hero.compact {
  padding: calc(var(--nav-height) + 80px) 0 70px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
}

h1 {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 24px;
}

h1 .gradient-text,
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 40px;
  font-weight: 400;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 980px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: rgba(0, 113, 227, 0.3);
}
.btn-secondary:hover {
  background: rgba(0, 113, 227, 0.06);
  border-color: var(--accent);
}

.btn-dark {
  background: var(--text-primary);
  color: #fff;
}
.btn-dark:hover { background: #000; }

.btn-light {
  background: #fff;
  color: var(--text-primary);
}
.btn-light:hover { background: var(--bg-secondary); }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-sm { font-size: 14px; padding: 9px 20px; }

/* ==========================================================================
   Sections / Layout
   ========================================================================== */

section { position: relative; }

.section {
  padding: 100px 0;
}

.section-tight { padding: 70px 0; }

.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

.section-dark .text-secondary { color: var(--text-light-secondary); }

.section-secondary { background: var(--bg-secondary); }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 18px;
}

.section-header p {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-secondary);
  line-height: 1.5;
}

.section-dark .section-header p { color: var(--text-light-secondary); }

h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; }
h3 { font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
p { color: var(--text-secondary); }
.section-dark p { color: var(--text-light-secondary); }

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.eyebrow-light { color: #6ec3ff; }

/* ==========================================================================
   Grids & Cards
   ========================================================================== */

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 36px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.card h3 { margin-bottom: 10px; }
.card p { font-size: 15px; line-height: 1.6; }

.card-dark {
  background: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 36px;
}

.card-dark h3 { color: #fff; margin-bottom: 10px; }
.card-dark p { color: var(--text-light-secondary); font-size: 15px; line-height: 1.6; }

/* Tag / pill */
.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 980px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent);
  margin-bottom: 14px;
}

.pill-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat .num {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 8px;
  line-height: 1;
}

.stat .label {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.section-dark .stat .label { color: var(--text-light-secondary); }

/* ==========================================================================
   Flow / Steps
   ========================================================================== */

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}

.flow-step {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 40px 32px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.flow-step .step-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.flow-step h3 { margin-bottom: 12px; }
.flow-step p { font-size: 15px; }

.flow-arrow {
  display: none;
}

/* ==========================================================================
   Mockup graphic (CSS-built "product" visual)
   ========================================================================== */

.mockup {
  max-width: 880px;
  margin: 64px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.12), 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #ececef;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.mockup-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d3d3d6;
}

.mockup-body {
  padding: 32px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  background: #fafafc;
  text-align: left;
}

.mockup-doc {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 24px;
}

.mockup-doc .doc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.mockup-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f2;
  font-size: 14px;
}

.mockup-row:last-child { border-bottom: none; }
.mockup-row .v { font-weight: 600; }
.mockup-row .v.flag { color: #ff9500; }
.mockup-row .v.ok { color: #30b94d; }

.mockup-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mockup-status {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 20px;
  font-size: 14px;
}

.mockup-status .status-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 980px;
}

.status-badge.green { background: rgba(48, 185, 77, 0.12); color: #1f8a37; }
.status-badge.amber { background: rgba(255, 149, 0, 0.12); color: #b3690a; }
.status-badge.blue { background: rgba(0, 113, 227, 0.1); color: var(--accent); }

.status-badge .dot2 {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* ==========================================================================
   Logos / ERP marquee
   ========================================================================== */

.erp-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.erp-row .erp-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}

.erp-row .erp-name:hover { color: var(--text-primary); }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  text-align: center;
  padding: 110px 0;
  background: var(--bg-dark);
  color: #fff;
}

.cta-band h2 { margin-bottom: 18px; }
.cta-band p { font-size: 19px; margin-bottom: 36px; color: var(--text-light-secondary); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--bg-secondary);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .nav-logo { margin-bottom: 14px; }

.footer-brand p {
  font-size: 14px;
  max-width: 280px;
  color: var(--text-secondary);
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 12px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Scroll reveal animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.visible > * {
  transition-delay: calc(var(--stagger-index, 0) * 90ms);
}

/* ==========================================================================
   Two-column feature rows
   ========================================================================== */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-row.reverse .feature-visual { order: 2; }
.feature-row.reverse .feature-text { order: 1; }

.feature-text .pill { margin-bottom: 16px; }
.feature-text h2 { margin-bottom: 18px; }
.feature-text p { font-size: 18px; margin-bottom: 16px; }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  font-size: 16px;
  color: var(--text-primary);
}

.section-dark .feature-list li { color: var(--text-light); }

.feature-list .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.feature-visual {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 40px;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 30px 80px rgba(0,0,0,0.06);
}

.form-row { margin-bottom: 22px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.form-row textarea { resize: vertical; min-height: 110px; }

.form-note {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 16px;
  text-align: center;
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.form-success .check-big {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 24px;
}

/* ==========================================================================
   Timeline (Company page)
   ========================================================================== */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-item .t-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.timeline-item h3 { margin-bottom: 8px; }
.timeline-item p { font-size: 16px; }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-tertiary);
  transition: transform 0.2s var(--ease);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-answer {
  padding: 0 0 22px;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 680px;
}

.faq-item .faq-answer p + p { margin-top: 12px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 40px; }
  .feature-row.reverse .feature-visual { order: 1; }
  .feature-row.reverse .feature-text { order: 2; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .mockup-body { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 17px; opacity: 1; }
  .nav-cta { order: -1; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .erp-row { gap: 28px; }
  .form-row.two { grid-template-columns: 1fr; }
  .form-card { padding: 28px; }
  .section { padding: 64px 0; }
  .hero { padding: calc(var(--nav-height) + 70px) 0 56px; }
}
