/* ============================================
   VISARI — Shared Foundation
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
}

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

input, button, textarea, select {
  font: inherit;
}

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

ul, ol {
  list-style: none;
}

/* --- Local Fonts --- */
@font-face {
  font-family: 'AncizarSerif';
  src: url('../fonts/AncizarSerif-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSans';
  src: url('../fonts/NotoSans-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSans';
  src: url('../fonts/NotoSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSans';
  src: url('../fonts/NotoSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSans';
  src: url('../fonts/NotoSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSans';
  src: url('../fonts/NotoSans-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* --- Custom Properties --- */
:root {
  /* Typography — AncizarSerif for titles, NotoSans for body */
  --font-display: 'AncizarSerif', 'Georgia', serif;
  --font-body: 'NotoSans', 'Noto Sans', sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;

  /* Layout */
  --container-max: 1280px;
  --container-padding: 2rem;

  /* Radius */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 600ms ease;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.2;
}

body, p, span, a, li, input, textarea, button {
  font-family: var(--font-body);
}

.text-display-xl {
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.text-display-lg {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
}

.text-display-md {
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.1;
}

.text-body-lg {
  font-size: clamp(1.05rem, 1.2vw, 1.25rem);
  line-height: 1.7;
}

.text-body {
  font-size: 1rem;
  line-height: 1.7;
}

.text-body-sm {
  font-size: 0.875rem;
  line-height: 1.6;
}

.text-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

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

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
}

.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--text-primary);
}

.btn-arrow::after {
  content: '\2192';
  transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* --- Tags / Badges --- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
}

.badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}

/* --- Cards --- */
.card {
  padding: var(--space-lg);
  border-radius: var(--radius-sm);
  transition: transform var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
}

/* --- Ticker Band --- */
.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ticker {
  display: inline-flex;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-item::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Navigation — transparent, fade-in background on scroll --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-logo .dot {
  color: #3B82F6;
  position: relative;
  top: -0.15em;
  margin-left: 0.08em;
}

.nav-byline {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: #fff;
  opacity: 0.5;
  margin-left: 0.625rem;
}

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

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

.nav-link {
  font-size: 0.9375rem;
  font-weight: 400;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.nav-link:hover {
  opacity: 1;
}

.nav-link.subtle {
  opacity: 0.4;
  font-size: 0.8125rem;
}

.nav-link.subtle:hover {
  opacity: 0.7;
}

.nav-cta {
  padding: 0.625rem 1.5rem;
  font-size: 0.8125rem;
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 10001;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  position: absolute;
  left: 6px;
  transition: all var(--transition-fast);
}

.nav-toggle span:nth-child(1) { top: 9px; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 21px; }

.nav-toggle.active span:nth-child(1) {
  top: 15px;
  transform: rotate(45deg);
  background: #fff;
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  top: 15px;
  transform: rotate(-45deg);
  background: #fff;
}

/* Mobile menu overlay — injected by JS at body level */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0A0A0F;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem var(--container-padding);
}

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

.mobile-menu a {
  color: #fff;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.75rem 0;
  display: block;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.mobile-menu a:hover,
.mobile-menu a:active {
  opacity: 1;
}

.mobile-menu .mobile-menu-cta {
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  background: #fff;
  color: #0A0A0F;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-block;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-desc {
  font-size: 0.8125rem;
  opacity: 0.5;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  font-size: 0.8125rem;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.footer-link:hover {
  opacity: 1;
}

.footer-legal {
  font-size: 0.75rem;
  opacity: 0.35;
  line-height: 1.7;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* --- Step Numbers --- */
.step-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0.15;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  gap: var(--space-sm);
}

.faq-icon {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text-secondary);
  transition: transform var(--transition-base);
}

.faq-icon::before {
  width: 14px;
  height: 1.5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 1.5px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item.open .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: var(--space-md);
}

.faq-answer p {
  font-size: 0.9375rem;
  line-height: 1.8;
  opacity: 0.7;
}

/* --- Stat Item --- */
.stat {
  text-align: left;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8125rem;
  opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  :root {
    --container-padding: 1.25rem;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Nav mobile */
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .text-display-xl {
    font-size: 2.5rem;
  }

  .text-display-lg {
    font-size: 2rem;
  }

  .section {
    padding: var(--space-xl) 0;
  }
}
