/* Navigation */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-sticky);
  padding-block: var(--space-sm);
  transition: all var(--duration-slow) var(--ease-out-expo);
}

.nav--scrolled {
  background: oklch(0.095 0.006 280 / 0.8);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid oklch(1 0 0 / 0.04);
  padding-block: var(--space-xs);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.nav__logo {
  font-size: var(--text-lg);
  font-weight: 900;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  letter-spacing: -0.02em;
}

.nav__logo-mark {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  font-size: var(--text-xs);
  box-shadow: 0 2px 12px oklch(0.550 0.180 353.3 / 0.3);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__link {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out-quart);
}

.nav__link:hover {
  color: var(--ink-primary);
  background: oklch(1 0 0 / 0.05);
}

.nav__link--active {
  color: var(--ink-primary);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--brand-primary);
  color: white;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-out-quart);
  box-shadow: 0 2px 8px oklch(0.550 0.180 353.3 / 0.2);
}

.nav__cta:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px oklch(0.550 0.180 353.3 / 0.35);
}

/* Mobile menu */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out-quart);
}

.nav__toggle:hover {
  background: oklch(1 0 0 / 0.05);
}

.nav__toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 85vw);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3xl) var(--space-lg);
    background: var(--bg-base);
    border-left: 1px solid var(--border-subtle);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out-expo);
    z-index: var(--z-modal);
    backdrop-filter: blur(20px);
  }

  .nav__links--open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: var(--text-base);
    padding: var(--space-md);
  }

  .nav__cta {
    margin-top: var(--space-lg);
    justify-content: center;
    padding: var(--space-md);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out-quart);
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
  color: white;
  box-shadow: 0 2px 16px oklch(0.550 0.180 353.3 / 0.25),
              inset 0 1px 0 oklch(1 0 0 / 0.1);
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, oklch(1 0 0 / 0.1), transparent);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out-quart);
}

.btn--primary:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px oklch(0.550 0.180 353.3 / 0.4),
              inset 0 1px 0 oklch(1 0 0 / 0.15);
}

.btn--primary:hover::before {
  opacity: 1;
}

.btn--secondary {
  background: oklch(1 0 0 / 0.03);
  color: var(--ink-primary);
  border: 1px solid var(--border-default);
  backdrop-filter: blur(8px);
}

.btn--secondary:hover {
  color: var(--ink-primary);
  background: oklch(1 0 0 / 0.07);
  border-color: var(--ink-muted);
  transform: translateY(-1px);
}

.btn--large {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
  min-height: 52px;
}

/* Screenshot showcase */
.screenshot {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-slow) var(--ease-out-expo);
  background: var(--bg-surface);
}

.screenshot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.05);
  pointer-events: none;
}

.screenshot:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg), 0 20px 60px oklch(0 0 0 / 0.4);
  border-color: var(--border-glow);
}

.screenshot img {
  width: 100%;
  height: auto;
}

.screenshot--framed {
  background: var(--bg-elevated);
  padding: 2px;
}

.screenshot--framed::before {
  content: '';
  display: block;
  height: 1.75rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 12px;
  gap: 6px;
  margin-bottom: 2px;
}

.screenshot--framed::before {
  background-image:
    radial-gradient(circle at 14px 50%, oklch(0.600 0.150 25) 4px, transparent 4px),
    radial-gradient(circle at 28px 50%, oklch(0.700 0.130 85) 4px, transparent 4px),
    radial-gradient(circle at 42px 50%, oklch(0.600 0.150 145) 4px, transparent 4px);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Feature cards */
.feature-card {
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: all var(--duration-slow) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--brand-primary-ghost), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out-expo);
}

.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px oklch(0 0 0 / 0.3), 0 0 0 1px var(--border-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-primary-dim), var(--brand-primary-muted));
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  color: var(--brand-primary-light);
  box-shadow: 0 2px 8px oklch(0.550 0.180 353.3 / 0.15);
}

.feature-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--ink-primary);
}

.feature-card__text {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  line-height: 1.8;
}

/* Stats */
.stat {
  text-align: center;
  position: relative;
}

.stat__value {
  font-size: var(--text-4xl);
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-weight: 500;
}

/* Section headers */
.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brand-primary-light);
  margin-bottom: var(--space-md);
  padding: var(--space-2xs) var(--space-sm);
  background: oklch(0.550 0.180 353.3 / 0.08);
  border-radius: var(--radius-xl);
  border: 1px solid oklch(0.550 0.180 353.3 / 0.15);
  letter-spacing: 0.02em;
}

.section-header__title {
  margin-bottom: var(--space-md);
}

.section-header__desc {
  font-size: var(--text-lg);
  max-width: 55ch;
}

/* Footer */
.footer {
  padding-block: var(--space-2xl);
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-primary-dim), transparent);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer__brand {
  max-width: 28ch;
}

.footer__brand-name {
  font-size: var(--text-lg);
  font-weight: 900;
  margin-bottom: var(--space-sm);
  color: var(--ink-primary);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.8;
}

.footer__col-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: var(--space-md);
}

.footer__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  padding-block: var(--space-2xs);
  transition: all var(--duration-fast) var(--ease-out-quart);
}

.footer__link:hover {
  color: var(--brand-primary-light);
  transform: translateX(-2px);
}

.footer__bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

@media (max-width: 768px) {
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

/* Module page hero */
.module-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  position: relative;
  overflow: hidden;
}

.module-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 30%, oklch(0.550 0.180 353.3 / 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, oklch(0.400 0.130 280 / 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.module-hero__content {
  position: relative;
  z-index: 1;
  max-width: 55ch;
}

.module-hero__title {
  margin-bottom: var(--space-lg);
}

.module-hero__desc {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
}

/* Screenshot gallery */
.gallery {
  display: grid;
  gap: var(--space-lg);
}

.gallery--2col {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
}

.gallery--3col {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

/* Quote blocks */
.quote-block {
  padding: var(--space-xl);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border-right: 2px solid var(--brand-primary);
  position: relative;
  overflow: hidden;
}

.quote-block::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to left, oklch(0.550 0.180 353.3 / 0.03), transparent);
  pointer-events: none;
}

.quote-block__text {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

.quote-block__source {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-lg);
}

.breadcrumb a {
  color: var(--ink-muted);
}

.breadcrumb a:hover {
  color: var(--brand-primary-light);
}

.breadcrumb__separator {
  opacity: 0.3;
}
