/* ============================================
   SyncStay / VendorFormat — Design System
   ============================================ */

/* --- Reset & Foundation --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors — Light Theme */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-tertiary: #F1F3F5;
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --accent: #6366F1;
  --accent-hover: #4F46E5;
  --accent-subtle: #EEF2FF;
  --accent-text: #4338CA;
  --success: #059669;
  --success-subtle: #ECFDF5;
  --error: #DC2626;
  --error-subtle: #FEF2F2;
  --surface-glass: rgba(255, 255, 255, 0.85);

  /* Colors — Dark Sections */
  --dark-bg: #0F1117;
  --dark-surface: #1A1D27;
  --dark-border: rgba(255, 255, 255, 0.08);
  --dark-text: #E5E7EB;
  --dark-text-secondary: #9CA3AF;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-pad-y: 96px;
  --section-pad-y-mobile: 56px;
  --container-max: 1200px;
  --container-pad: 24px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--accent-hover);
}

/* --- Skip to main content (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: top var(--duration-fast) ease;
}

.skip-link:focus {
  top: 16px;
  color: white;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-tertiary);
  line-height: 1.5;
  max-width: 640px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
}

/* --- Section --- */
.section {
  padding: var(--section-pad-y) 0;
}

.section--alt {
  background-color: var(--bg-secondary);
}

.section--dark {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: white;
}

.section--dark .subtitle {
  color: var(--dark-text-secondary);
}

.section--dark .eyebrow {
  color: var(--accent);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .subtitle {
  margin: 16px auto 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--duration-normal) ease,
              box-shadow var(--duration-normal) ease;
}

.nav.scrolled {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.nav__logo-text {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
  white-space: nowrap;
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile nav menu */
.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 999;
  padding: 80px var(--container-pad) 40px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.nav__mobile-menu.open {
  display: flex;
}

.nav__mobile-link {
  display: block;
  padding: 16px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration-fast) ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.btn--dark {
  background: var(--text-primary);
  color: white;
}

.btn--dark:hover {
  background: #1F2937;
  color: white;
}

.btn__icon {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-fast) ease;
}

.btn:hover .btn__icon--arrow {
  transform: translateX(3px);
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent-text);
  letter-spacing: 0.02em;
}

.badge--dark {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Cards --- */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--duration-normal) ease,
              box-shadow var(--duration-normal) ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.card--flat {
  border: none;
  background: var(--bg-secondary);
}

.card--flat:hover {
  background: var(--bg-tertiary);
  box-shadow: none;
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent);
  margin-bottom: 20px;
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Step Cards (How It Works) --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  counter-reset: step-counter;
}

.step {
  text-align: center;
  counter-increment: step-counter;
}

.step__number {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.step__visual {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: var(--bg-secondary);
}

.step__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Comparison --- */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.comparison__col {
  border-radius: var(--radius-lg);
  padding: 32px;
}

.comparison__col--before {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.comparison__col--after {
  background: var(--accent-subtle);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.comparison__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comparison__icon {
  width: 24px;
  height: 24px;
}

.comparison__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comparison__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.comparison__check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.comparison__check--x { color: var(--error); }
.comparison__check--ok { color: var(--success); }

/* --- Product Showcase --- */
.showcase__img {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

/* --- Use Cases --- */
.use-cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- FAQ --- */
.faq-list {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  line-height: 1.4;
}

.faq-question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: transform var(--duration-normal) var(--ease-in-out);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-in-out),
              padding var(--duration-normal) var(--ease-in-out);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

.faq-answer p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- CTA Block --- */
.cta-block {
  text-align: center;
  padding: 80px 40px;
  border-radius: var(--radius-xl);
  background: var(--dark-bg);
  color: white;
}

.cta-block h2 {
  color: white;
  margin-bottom: 16px;
}

.cta-block p {
  color: var(--dark-text-secondary);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer__logo-img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.footer__logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.footer__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* --- Hero --- */
.hero {
  padding: 160px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero__content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero .subtitle {
  margin: 0 auto 40px;
  font-size: 1.25rem;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.hero__proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.hero__proof-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero__proof-icon {
  width: 16px;
  height: 16px;
  color: var(--success);
}

.hero__visual {
  margin-top: 64px;
  position: relative;
  z-index: 1;
}

.hero__visual img {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

/* Hero gradient bg */
.hero__bg-gradient {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
}

.hero__bg-gradient--1 {
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-subtle);
}

.hero__bg-gradient--2 {
  bottom: -100px;
  right: -200px;
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.05);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }

/* Accent Highlight Text */
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }

/* --- Form (Support Page) --- */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .use-cases { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-pad-y: 56px;
    --container-pad: 20px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.25rem; }
  .subtitle { font-size: 1rem; }

  .hero {
    padding: 120px 0 56px;
  }

  .hero .subtitle {
    font-size: 1.0625rem;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__proof {
    flex-direction: column;
    gap: 8px;
  }

  /* Nav mobile */
  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: block;
  }

  .nav__actions .btn--secondary {
    display: none;
  }

  /* Grids */
  .feature-grid,
  .steps,
  .comparison,
  .use-cases,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 40px;
  }

  /* Section header */
  .section-header {
    margin-bottom: 40px;
  }

  /* Cards */
  .card { padding: 24px; }
  .comparison__col { padding: 24px; }

  /* CTA Block */
  .cta-block {
    padding: 56px 24px;
  }

  /* FAQ */
  .faq-question {
    font-size: 1rem;
    padding: 16px 0;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .btn--lg {
    padding: 14px 24px;
  }
}
