:root {
  --bg: #050508;
  --text: #e8e8ec;
  --text-dim: rgba(232, 232, 236, 0.3);
  --accent: #8b9cf7;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* ===========================
   Navigation
   =========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.25rem 2rem;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(232, 232, 236, 0.55);
  transition: color 0.2s ease;
}

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

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(232, 232, 236, 0.55);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

.nav-dropdown-btn:hover {
  color: var(--text);
}

.nav-dropdown-btn svg {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-btn svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px;
  background: rgba(16, 16, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 300;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(232, 232, 236, 0.55);
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-menu a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Contact CTA button */
.nav-cta {
  color: var(--bg) !important;
  background: var(--accent);
  padding: 0.6rem 1.4rem;
  border-radius: 10px;
  font-weight: 600 !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease !important;
  box-shadow: 0 4px 16px rgba(139, 156, 247, 0.25);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 156, 247, 0.35);
}

/* Hamburger */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-menu-btn.active span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-menu-btn.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(5, 5, 8, 0.97);
  backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--accent);
}

.mobile-menu .nav-cta {
  font-size: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-menu-btn {
    display: flex;
  }
}

/* ===========================
   Canvas
   =========================== */
#cube-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ===========================
   Hero Text — top left
   =========================== */
.hero-text {
  position: fixed;
  top: 6rem;
  left: 4rem;
  z-index: 10;
  pointer-events: none;
  max-width: 600px;
}

.hero-heading {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-heading .line {
  display: block;
  opacity: 0;
}

.hero-heading .accent {
  color: var(--accent);
}

.hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(232, 232, 236, 0.85);
  max-width: 440px;
  margin-top: 1.2rem;
  opacity: 0;
}

@media (max-width: 768px) {
  .hero-text {
    top: 2.5rem;
    left: 1.5rem;
    right: 1.5rem;
  }

  .hero-heading .line {
    white-space: normal;
  }
}

/* ===========================
   Grain
   =========================== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

/* ===========================
   Scroll Content — feature sections
   =========================== */
.scroll-content {
  position: relative;
  z-index: 10;
  margin-top: 100vh;
}

.feature-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 4rem;
}

.feature-section:nth-child(odd) {
  justify-content: flex-start;
}

.feature-section:nth-child(even) {
  justify-content: flex-end;
}

.feature-inner {
  max-width: 480px;
}

.feature-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(15px);
}

.feature-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(15px);
}

.feature-body {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(232, 232, 236, 0.85);
  max-width: 440px;
  opacity: 0;
  transform: translateY(15px);
}

@media (max-width: 768px) {
  .feature-section {
    padding: 4rem 1.5rem;
    justify-content: flex-start !important;
  }
}

/* ===========================
   CTA / Contact Section
   =========================== */
.cta-section {
  position: relative;
  z-index: 10;
  padding: 8rem 4rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-split {
  display: flex;
  gap: 5rem;
  align-items: flex-start;
  max-width: 1100px;
  width: 100%;
}

.cta-left {
  flex: 1;
  min-width: 0;
}

.cta-heading {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.cta-heading .line {
  display: block;
}

.cta-heading .accent {
  color: var(--accent);
}

.cta-body {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(232, 232, 236, 0.85);
  max-width: 440px;
  opacity: 0;
  transform: translateY(20px);
}

/* Form */
.cta-form {
  flex: 1;
  min-width: 0;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  opacity: 0;
  transform: translateY(20px);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 232, 236, 0.85);
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(232, 232, 236, 0.65);
}

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

.form-submit-btn {
  margin-top: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--text);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.form-submit-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139, 156, 247, 0.2);
}

@media (max-width: 768px) {
  .cta-section {
    padding: 4rem 1.5rem;
  }

  .cta-split {
    flex-direction: column;
    gap: 3rem;
  }

  .cta-form {
    max-width: 100%;
  }

  .form-row {
    flex-direction: column;
  }
}
