@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=Outfit:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Slim custom scrollbars */
.sc-sidebar-scroll,
.sc-main {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sc-sidebar-scroll::-webkit-scrollbar,
.sc-main::-webkit-scrollbar {
  width: 4px;
}

.sc-sidebar-scroll::-webkit-scrollbar-track,
.sc-main::-webkit-scrollbar-track {
  background: transparent;
}

.sc-sidebar-scroll::-webkit-scrollbar-thumb,
.sc-main::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sc-sidebar-scroll::-webkit-scrollbar-thumb:hover,
.sc-main::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

/* Container */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* Sections */
.section {
  padding: var(--section-py) 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--sp-4);
}

.section-headline {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  margin-bottom: var(--sp-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--sp-12);
  max-width: 540px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--ease-base);
  border-radius: var(--radius-full);
}

.btn-sm {
  padding: 8px 18px;
  font-size: var(--text-sm);
}

.btn-md {
  padding: 10px 24px;
  font-size: var(--text-base);
}

.btn-lg {
  padding: 14px 32px;
  font-size: var(--text-base);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-dim);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-tertiary);
  color: var(--text);
  background: var(--bg-elevated);
}

/* Sticky Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(11, 11, 9, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease-base);
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: var(--sp-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  color: var(--text);
  flex-shrink: 0;
}

.nav-logo img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-left: auto;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  transition: color var(--ease-fast);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--ease-base), opacity var(--ease-base);
}

.nav-toggle.active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Footer */
.footer {
  padding: var(--sp-12) 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-6);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
}

.footer-links {
  display: flex;
  gap: var(--sp-6);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  transition: color var(--ease-fast);
}

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

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  :root {
    --section-py: var(--sp-16);
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: var(--sp-12);
    --container-px: var(--sp-4);
  }

  .section-headline {
    font-size: var(--text-2xl);
  }

  /* Mobile nav */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(11, 11, 9, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--sp-6);
    gap: var(--sp-4);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: var(--text-base);
    padding: var(--sp-2) 0;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
