/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #0a0e1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ========== DESIGN TOKENS ========== */
:root {
  --bg-base: #ffffff;
  --bg-surface: #f8f9fc;
  --bg-elevated: #eef1f8;
  --bg-dark: #0a0e1a;
  --text-primary: #0a0e1a;
  --text-secondary: #5a6270;
  --text-inverse: #ffffff;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.12);
  --border-subtle: #e2e5ec;
  --radius: 12px;
  --max-width: 1280px;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.caption {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.caption-accent {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ========== LAYOUT ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-padding {
  padding: 6rem 0;
}

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

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

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

.btn-primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 0 40px var(--accent-glow);
}

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

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

.btn-ghost {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0;
}

.btn-ghost:hover {
  text-decoration: underline;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 72px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 32px;
  width: 32px;
}

.logo span {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-cta {
  display: none;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1.5rem;
}

.mobile-menu-links a {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

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

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
  pointer-events: none;
}

.hero-content h1 {
  margin-top: 1.5rem;
}

.hero-content p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  pointer-events: auto;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: bounce 2s ease-in-out infinite;
  color: var(--text-secondary);
  opacity: 0.4;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ========== SECTION HEADER ========== */
.section-header {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.section-header h2 {
  margin-top: 1rem;
}

.section-header p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* ========== CARDS ========== */
.card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(10, 14, 26, 0.04);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(10, 14, 26, 0.06);
  border-color: rgba(37, 99, 235, 0.2);
}

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  stroke-width: 1.5;
}

/* ========== GRIDS ========== */
.grid-2 {
  display: grid;
  gap: 3rem;
}

.grid-3 {
  display: grid;
  gap: 2rem;
}

.grid-4 {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ========== STAT BLOCK ========== */
.stat-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ========== DARK SECTIONS ========== */
.dark-section {
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.dark-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.dark-section .container {
  position: relative;
  z-index: 1;
}

.dark-section h2,
.dark-section h3 {
  color: #fff;
}

.dark-section p {
  color: rgba(255, 255, 255, 0.7);
}

/* ========== TAG / BADGE ========== */
.tag {
  display: inline-block;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.tag-blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

/* ========== ACCORDION ========== */
.accordion-item {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: background 0.2s;
}

.accordion-header:hover {
  background: var(--bg-surface);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-item.open .accordion-body {
  max-height: 200px;
}

.accordion-body p {
  padding: 0 1.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== TIMELINE ========== */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.timeline-content {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: 2rem;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 2rem;
  grid-column: 2;
}

@media (max-width: 767px) {
  .timeline::before {
    left: 0;
  }
  .timeline-dot {
    left: 0;
  }
  .timeline-item {
    grid-template-columns: 1fr;
  }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 2rem;
    margin-right: 0;
    grid-column: 1;
  }
}

/* ========== FORM ========== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #a0a8b8;
}

.form-error {
  border-color: #ef4444 !important;
}

.form-error-msg {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a6270' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-textarea {
  min-height: 100px;
  resize: none;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-dark);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.footer-brand a {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-size: 0.875rem;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

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

.footer-links h4 {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

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

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

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4rem;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-divider p,
.footer-divider a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

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

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  .footer-divider {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ========== SVG ICONS ========== */
.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}

/* ========== CODE BLOCK ========== */
.code-block {
  background: var(--bg-dark);
  border-radius: 0.5rem;
  padding: 1.5rem;
  overflow-x: auto;
}

.code-block pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.code-block .kw { color: #c084fc; }
.code-block .str { color: #4ade80; }
.code-block .fn { color: #38bdf8; }
.code-block .num { color: #fb923c; }

/* ========== SUCCESS STATE ========== */
.success-card {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #16a34a;
}

/* ========== MISC ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.max-w-lg { max-width: 520px; margin: 0 auto; }
.max-w-md { max-width: 640px; margin: 0 auto; }
.max-w-xl { max-width: 800px; margin: 0 auto; }
.max-w-2xl { max-width: 960px; margin: 0 auto; }
.max-w-3xl { max-width: 1100px; margin: 0 auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-16 { padding: 4rem 0; }
.py-20 { padding: 5rem 0; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.stretch > * { flex: 1; }
.w-full { width: 100%; }
.inline-block { display: inline-block; }
.hidden { display: none; }

@media (min-width: 640px) {
  .sm-flex-row { flex-direction: row; }
  .sm-inline-flex { display: inline-flex; }
}

@media (min-width: 768px) {
  .md-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .lg-items-start { align-items: flex-start; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
