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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Vignette overlay like Trisun */
.body-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: var(--overlay-vignette);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  background: var(--gradient-brand);
  transform-origin: left;
  transform: scaleX(0);
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 640px;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .section-desc {
  margin: 0 auto;
}

/* Header — Trisun pill nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  isolation: isolate;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
  overflow: visible;
}

.site-header.scrolled {
  background: rgba(3, 6, 9, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Slash Brain logo — matches slashbrain.com */
.brand-logo {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-logo--sm {
  width: 28px;
  height: 28px;
}

.logo-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(45deg, #0ea5e9, #8b5cf6, #10b981);
  filter: blur(8px);
  opacity: 0.7;
  animation: logo-pulse 2.5s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

.logo-main {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo--sm .logo-main {
  border-width: 1.5px;
}

.brain-icon {
  width: 55%;
  height: 55%;
  color: #0ea5e9;
  filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.45));
}

.slash-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(45deg, #10b981, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo--sm .slash-badge {
  width: 10px;
  height: 10px;
  top: -1px;
  right: -1px;
}

.slash-badge svg {
  width: 7px;
  height: 7px;
  color: #0f172a;
}

.brand-logo--sm .slash-badge svg {
  width: 5px;
  height: 5px;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav-pill-wrap {
  display: none;
  align-items: center;
  background: rgba(18, 23, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.375rem;
  overflow: visible;
}

@media (min-width: 1024px) {
  .nav-pill-wrap {
    display: flex;
  }
}

.nav-pill-wrap > a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.nav-pill-wrap > a:hover,
.nav-pill-wrap > a.active {
  color: var(--foreground);
  background: rgba(18, 23, 26, 0.8);
}

.nav-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown-toggle.active {
  color: var(--foreground);
  background: rgba(18, 23, 26, 0.8);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 16.5rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: #0c1014;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1100;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu > li {
  margin: 0;
  padding: 0;
}

.nav-dropdown-menu .nav-dropdown-item,
.nav-dropdown-menu .nav-dropdown-footer-link {
  display: block !important;
  align-items: unset !important;
  gap: 0 !important;
  white-space: normal;
  border-radius: 0.5rem;
}

.nav-dropdown-item {
  padding: 0.625rem 0.75rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.nav-dropdown-item-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.nav-dropdown-item-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.nav-dropdown-divider {
  height: 1px;
  margin: 0.375rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  list-style: none;
}

.nav-dropdown-footer-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-cyan) !important;
  background: transparent !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-footer-link:hover {
  background: rgba(0, 180, 216, 0.1) !important;
  color: #5eead4 !important;
}

.mobile-nav-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.mobile-nav-sub {
  padding-left: 1rem !important;
  font-size: 0.9rem !important;
  color: var(--muted-foreground) !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-actions .btn-contact {
  display: none;
}

@media (min-width: 1024px) {
  .nav-actions .btn-contact {
    display: inline-flex;
  }
}

.mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 1024px) {
  .mobile-toggle {
    display: none;
  }
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--foreground);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 99;
}

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

.mobile-nav a {
  padding: 0.75rem;
  color: var(--muted-foreground);
  border-radius: 8px;
}

.mobile-nav a:hover {
  background: var(--secondary);
  color: var(--foreground);
}

/* Footer — Trisun two-row */
.site-footer {
  position: relative;
  z-index: 10;
  background: transparent;
}

.footer-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-row-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-row-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2rem);
  padding-right: clamp(1.25rem, 4vw, 2rem);
  box-sizing: border-box;
}

.footer-row-top .footer-row-inner {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.footer-row-bottom .footer-row-inner {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.footer-row-bottom p {
  margin: 0;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.footer-logo-link .brand-logo {
  flex-shrink: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-dot {
  color: rgba(255, 255, 255, 0.15);
  margin: 0 0.75rem;
  user-select: none;
}

.footer-row-bottom p,
.footer-legal a {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
}

.footer-legal {
  display: flex;
  align-items: center;
}

.footer-legal a:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .footer-nav {
    width: 100%;
  }
}

.page-hero {
  padding: calc(var(--header-h) + 4rem) 0 4rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  position: relative;
  z-index: 2;
}

.legal-content h1 { font-size: 2rem; margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.25rem; margin: 2rem 0 1rem; }
.legal-content p, .legal-content li {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}
