/* ==========================================================================
   Collita Labs — Design System & Styles
   Single-source design tokens, minimal specificity, zero duplication.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color palette */
  --c-bg:        #0a0a0f;
  --c-surface:   #12121a;
  --c-border:    #1e1e2a;
  --c-text:      #e4e4e7;
  --c-text-muted:#8888a0;
  --c-accent:    #6366f1;
  --c-accent-hover: #818cf8;
  --c-white:     #ffffff;

  /* Typography */
  --f-family: 'Inter', system-ui, -apple-system, sans-serif;
  --f-base:   1rem;
  --f-sm:     0.875rem;
  --f-lg:     1.125rem;
  --f-xl:     1.5rem;
  --f-2xl:    2rem;
  --f-3xl:    2.75rem;
  --f-4xl:    3.5rem;

  /* Spacing */
  --s-xs:  0.5rem;
  --s-sm:  0.75rem;
  --s-md:  1rem;
  --s-lg:  1.5rem;
  --s-xl:  2rem;
  --s-2xl: 3rem;
  --s-3xl: 4rem;
  --s-4xl: 6rem;
  --s-5xl: 8rem;

  /* Layout */
  --max-w: 72rem;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--f-family);
  font-size: var(--f-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s-lg);
}

.text-gradient {
  background: linear-gradient(135deg, var(--c-accent), #a78bfa, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Button system ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-xs);
  font-weight: 500;
  font-size: var(--f-sm);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--c-accent);
  color: var(--c-white);
}
.btn--primary:hover { background: var(--c-accent-hover); }

.btn--ghost {
  border: 1px solid var(--c-border);
  color: var(--c-text);
}
.btn--ghost:hover { border-color: var(--c-text-muted); color: var(--c-white); }

.btn--sm { padding: 0.5rem 1rem; font-size: var(--f-sm); }
.btn--lg { padding: 1rem 2rem; font-size: var(--f-lg); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: var(--s-md);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease);
}
.nav--scrolled { border-bottom-color: var(--c-border); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  font-weight: 600;
  font-size: var(--f-lg);
}
.nav__logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--c-accent);
  color: var(--c-white);
  font-size: var(--f-sm);
  font-weight: 700;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-xl);
}
.nav__links a:not(.btn) {
  font-size: var(--f-sm);
  color: var(--c-text-muted);
  transition: color var(--duration) var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--c-white); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; }
.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-text);
  border-radius: 1px;
  transition: all var(--duration) var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: 5rem;
  overflow: hidden;
}

.hero__inner { position: relative; z-index: 1; max-width: 48rem; }

.hero__tag {
  font-size: var(--f-sm);
  font-weight: 500;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-lg);
}

.hero__title {
  font-size: clamp(var(--f-3xl), 5vw, var(--f-4xl));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-xl);
}

.hero__subtitle {
  font-size: var(--f-lg);
  color: var(--c-text-muted);
  max-width: 36rem;
  margin-bottom: var(--s-2xl);
}

.hero__actions { display: flex; gap: var(--s-md); flex-wrap: wrap; }

.hero__glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--s-5xl);
}
.section--alt { background: var(--c-surface); }

.section__header {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
  margin-bottom: var(--s-3xl);
}
.section__tag {
  font-size: var(--f-sm);
  font-weight: 500;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-sm);
}
.section__title {
  font-size: clamp(var(--f-2xl), 3.5vw, var(--f-3xl));
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-md);
}
.section__subtitle {
  font-size: var(--f-lg);
  color: var(--c-text-muted);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: var(--s-lg);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Card ---------- */
.card {
  padding: var(--s-xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.card:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

.card__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--c-accent);
  margin-bottom: var(--s-lg);
}

.card__title {
  font-size: var(--f-lg);
  font-weight: 600;
  margin-bottom: var(--s-sm);
}
.card__text { color: var(--c-text-muted); font-size: var(--f-sm); line-height: 1.7; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  gap: var(--s-xl);
  max-width: 40rem;
  margin-inline: auto;
  counter-reset: step;
}

.step {
  display: flex;
  gap: var(--s-xl);
  align-items: flex-start;
}

.step__number {
  font-size: var(--f-2xl);
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
  flex-shrink: 0;
  width: 3rem;
}
.step__title {
  font-size: var(--f-lg);
  font-weight: 600;
  margin-bottom: var(--s-xs);
}
.step__text { color: var(--c-text-muted); font-size: var(--f-sm); }

/* ---------- Feature ---------- */
.feature {
  padding: var(--s-xl);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color var(--duration) var(--ease);
}
.feature:hover { border-color: var(--c-text-muted); }

.feature__title {
  font-size: var(--f-base);
  font-weight: 600;
  margin-bottom: var(--s-xs);
}
.feature__text { color: var(--c-text-muted); font-size: var(--f-sm); }

/* ---------- CTA ---------- */
.section--cta { padding-block: var(--s-4xl); }

.cta {
  text-align: center;
  padding: var(--s-3xl) var(--s-xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(99, 102, 241, 0.08), transparent 60%);
  pointer-events: none;
}

.cta__title {
  font-size: clamp(var(--f-xl), 3vw, var(--f-2xl));
  font-weight: 700;
  margin-bottom: var(--s-md);
  position: relative;
}
.cta__text {
  color: var(--c-text-muted);
  max-width: 28rem;
  margin-inline: auto;
  margin-bottom: var(--s-xl);
  position: relative;
}

/* ---------- Footer ---------- */
.footer {
  padding-block: var(--s-xl);
  border-top: 1px solid var(--c-border);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy { font-size: var(--f-sm); color: var(--c-text-muted); }
.footer__links {
  display: flex;
  gap: var(--s-lg);
}
.footer__links a {
  font-size: var(--f-sm);
  color: var(--c-text-muted);
  transition: color var(--duration) var(--ease);
}
.footer__links a:hover { color: var(--c-white); }

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }

  .nav__links { display: none; }
  .nav__links--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    padding: var(--s-lg);
    gap: var(--s-md);
  }
  .nav__toggle { display: flex; }

  .hero__title br { display: none; }

  .step { gap: var(--s-md); }
  .step__number { width: 2.5rem; font-size: var(--f-xl); }

  .footer__inner { flex-direction: column; gap: var(--s-md); text-align: center; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
