:root {
  --bg-base: #08090b;
  --bg-ink: #0d0f14;
  --bg-panel: rgba(255, 255, 255, 0.045);
  --bg-panel-strong: rgba(255, 255, 255, 0.075);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f8fafc;
  --text-secondary: #a1a8b5;
  --text-muted: #6f7785;
  --accent: #5b8cff;
  --accent-strong: #8ab4ff;
  --success: #55d38a;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-glow: 0 0 72px rgba(91, 140, 255, 0.18);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-base);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background:
    radial-gradient(circle at 50% -10%, rgba(91, 140, 255, 0.16), transparent 34rem),
    linear-gradient(180deg, #090a0d 0%, #07080a 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

body.contact-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

.site-nav,
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 18px 24px;
  transition: padding 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease);
}

.site-nav.scrolled,
.nav.scrolled {
  padding-block: 10px;
  background: rgba(8, 9, 11, 0.78);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.nav-shell,
.nav-inner {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.brand,
.nav-logo,
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 600;
}

.brand-mark,
.nav-logo-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.04)),
    linear-gradient(135deg, #2f6dff, #7aa7ff);
  box-shadow: var(--shadow-glow);
}

.brand strong,
.nav-logo-text {
  display: block;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand small,
.nav-logo-sub {
  display: block;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.68);
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.is-active {
  color: #fff;
  background: rgba(91, 140, 255, 0.12);
}

.nav-cta,
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}

.nav-cta,
.btn-primary {
  border-color: rgba(91, 140, 255, 0.42);
  background: linear-gradient(135deg, #3e72f4, #6f9cff);
  box-shadow: 0 16px 40px rgba(91, 140, 255, 0.2);
}

.btn-secondary,
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.nav-toggle,
.hamburger {
  display: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.nav-toggle span,
.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  visibility: hidden;
  background: rgba(4, 5, 7, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 240ms var(--ease), visibility 240ms var(--ease);
}

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

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 88px 24px 32px;
  overflow-y: auto;
  border-left: 1px solid var(--border-subtle);
  background: rgba(8, 9, 11, 0.97);
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 280ms var(--ease);
}

.mobile-menu.open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-menu-label {
  margin: 18px 0 8px;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mobile-menu-label:first-child {
  margin-top: 0;
}

.mobile-link {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  color: rgba(248, 250, 252, 0.82);
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.mobile-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-link.is-active {
  color: #fff;
  background: rgba(91, 140, 255, 0.12);
}

.mobile-menu-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.mobile-link--cta {
  text-align: center;
  border: 1px solid rgba(91, 140, 255, 0.42);
  background: linear-gradient(135deg, rgba(62, 114, 244, 0.18), rgba(111, 156, 255, 0.12));
}

.page-subnav {
  position: sticky;
  top: 64px;
  z-index: 90;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 9, 11, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-subnav-shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.page-subnav-shell::-webkit-scrollbar {
  display: none;
}

.page-subnav-link {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.62);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.page-subnav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.page-subnav-link.is-active {
  color: #fff;
  background: rgba(91, 140, 255, 0.14);
}

main section[id] {
  scroll-margin-top: 120px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 90ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 230ms; }
.reveal-d4 { transition-delay: 300ms; }

.site-footer,
footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 6, 8, 0.9);
}

.footer-shell,
.footer-inner {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle,
  .hamburger {
    display: block;
  }

  .page-subnav {
    top: 58px;
  }

  main section[id] {
    scroll-margin-top: 108px;
  }

  .site-nav,
  .nav {
    padding-inline: 0;
  }

  .footer-shell,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Contact modal ─────────────────────────────────────────────────────────── */

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  pointer-events: none;
  visibility: hidden;
}

.contact-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 320ms var(--ease);
}

.contact-modal.is-open .contact-modal__backdrop {
  opacity: 1;
}

.contact-modal__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  padding: 20px 22px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(138, 180, 255, 0.22);
  background:
    radial-gradient(circle at 50% -20%, rgba(91, 140, 255, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(18, 21, 28, 0.98) 0%, rgba(10, 12, 16, 0.98) 100%);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    var(--shadow-glow);
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.contact-modal.is-open .contact-modal__panel {
  opacity: 1;
  transform: none;
}

.contact-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.contact-modal__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}

.contact-modal__intro .eyebrow {
  font-size: 0.68rem;
}

.contact-modal__intro h2 {
  margin: 4px 0 6px;
  padding-right: 28px;
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.contact-modal__lede {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.4;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.contact-form__group {
  margin-bottom: 10px;
}

.contact-form__row .contact-form__group {
  margin-bottom: 10px;
}

.contact-form__label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 0.88rem;
  transition: border-color 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: rgba(91, 140, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.14);
}

.contact-form__textarea {
  resize: none;
  min-height: 72px;
  max-height: 72px;
}

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  opacity: 0;
}

.contact-form__submit {
  width: 100%;
  margin-top: 2px;
  min-height: 40px;
  padding-block: 0;
  cursor: pointer;
}

.contact-form__error {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(220, 60, 60, 0.12);
  border: 1px solid rgba(220, 60, 60, 0.32);
  color: #ffb4b4;
  font-size: 0.88rem;
  line-height: 1.45;
}

.contact-form__success {
  text-align: center;
  padding: 16px 8px 4px;
}

.contact-form__success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(85, 211, 138, 0.14);
  border: 1px solid rgba(85, 211, 138, 0.35);
  color: var(--success);
  font-size: 1.5rem;
  font-weight: 700;
}

.contact-form__success h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.contact-form__success p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .contact-modal {
    padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
  }

  .contact-modal__panel {
    padding: 18px 16px 18px;
    border-radius: var(--radius-md);
  }

  .contact-form__row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .contact-form__group {
    margin-bottom: 8px;
  }

  .contact-form__row .contact-form__group {
    margin-bottom: 8px;
  }

  .contact-modal__intro h2 {
    font-size: 1.1rem;
  }

  .contact-modal__lede {
    margin-bottom: 12px;
    font-size: 0.8rem;
  }
}
