/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  will-change: transform;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
  background-size: 160% 160%;
}
.btn-primary:hover { box-shadow: 0 24px 50px rgba(15, 164, 175, 0.32); background-position: 100% 0; }

.btn-outline {
  border: 1.5px solid var(--border-strong);
  color: var(--ink-900);
  background: transparent;
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* On the transparent header over the dark hero (Home), .btn-outline would
   otherwise inherit --ink-900 (near-black in light mode) — invisible against
   a dark background. */
.on-dark .btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.on-dark .btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-ghost {
  color: var(--ink-900);
  padding-inline: 0.5rem;
}
.btn-ghost .icon { transition: transform var(--dur-fast) var(--ease-out); }
.btn-ghost:hover .icon { transform: translateX(4px); }

.btn-light {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}
.btn-light:hover { background: rgba(255, 255, 255, 0.16); }

.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ==========================================================================
   Glass / cards
   ========================================================================== */
.glass {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
[data-theme='dark'] .glass, .on-dark .glass, .hero .glass {
  background: rgba(19, 26, 44, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

.card {
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* ==========================================================================
   Badges / chips
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-700);
  border: 1px solid var(--border-subtle);
}

.badge-accent { background: rgba(15, 164, 175, 0.12); color: var(--color-accent); border-color: rgba(15, 164, 175, 0.24); }
.badge-unicorn { background: linear-gradient(135deg, #a855f7, #ec4899); color: #fff; border: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--ink-700);
  background: var(--surface-0);
  transition: all var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--color-accent); color: var(--color-accent); }
.chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
[data-theme='dark'] .chip.is-active, .on-dark .chip.is-active { background: var(--gradient-accent); border-color: transparent; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), height var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header--solid {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border-subtle);
}
[data-theme='dark'] .site-header--solid { background: rgba(5, 8, 22, 0.85); }

.site-header.is-scrolled {
  background: rgba(248, 250, 252, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border-subtle);
  height: 72px;
}
[data-theme='dark'] .site-header.is-scrolled {
  background: rgba(5, 8, 22, 0.7);
}
/* .on-dark pages (e.g. the video hero on Home) keep white nav text even after
   scrolling, so the scrolled header must stay dark or that text disappears. */
.on-dark.site-header.is-scrolled {
  background: rgba(5, 8, 22, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
}

.site-header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-900);
}
.on-dark .brand, [data-theme='dark'] .brand { color: #fff; }

.brand__logo {
  height: 46px;
  width: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand__word {
  line-height: 1.15;
  letter-spacing: -0.01em;
}

@media (max-width: 420px) {
  .brand__word { display: none; }
}

.main-nav { display: flex; align-items: center; gap: var(--space-lg); }

.main-nav__list { display: flex; align-items: center; gap: var(--space-md); }

.has-mega { position: relative; }
.mega-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: 420px;
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.mega-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--ink-900) !important;
}
.mega-menu__item:hover { background: var(--surface-2); }
.mega-menu__item .icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--color-accent);
  flex-shrink: 0;
}
.mega-menu__item strong { display: block; font-size: 0.875rem; }
.mega-menu__item span.desc { display: block; font-size: 0.75rem; color: var(--ink-300); }

.main-nav__link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-700);
  padding: 0.5rem 0;
}
.on-dark .main-nav__link { color: rgba(255,255,255,0.85); }

.main-nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gradient-accent);
  transition: width var(--dur-fast) var(--ease-out);
}
.main-nav__link:hover::after, .main-nav__link.is-active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: var(--space-sm); }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  color: var(--ink-700);
}
.on-dark .theme-toggle { color: #fff; border-color: rgba(255,255,255,0.2); }
.theme-toggle .icon-moon { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.on-dark .nav-toggle { border-color: rgba(255,255,255,0.2); }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.on-dark .nav-toggle span { background: #fff; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   Mobile nav drawer
   ========================================================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--surface-0);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + var(--space-lg)) var(--space-lg) var(--space-lg);
  transform: translateY(-100%);
  transition: transform var(--dur-base) var(--ease-in-out);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav__list { display: flex; flex-direction: column; gap: var(--space-md); }
.mobile-nav__link { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; color: var(--ink-900); }
.mobile-nav__actions { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-sm); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.7);
  padding-block: var(--space-2xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  opacity: 0.6;
  pointer-events: none;
}
.site-footer .container { position: relative; }
.site-footer h4 { color: #fff; font-size: 0.9375rem; margin-bottom: var(--space-sm); }
.site-footer a { color: rgba(255,255,255,0.65); font-size: 0.9375rem; transition: color var(--dur-fast); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-2xs); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.social-row { display: flex; gap: var(--space-sm); }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  display: grid;
  place-items: center;
}
.social-row a:hover { background: rgba(255,255,255,0.08); }

.newsletter-form {
  display: flex;
  gap: var(--space-2xs);
  margin-top: var(--space-sm);
}
.newsletter-form input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.1rem;
  color: #fff;
  font-size: 0.875rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: var(--space-md); }
.field label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-900); }
.field .hint { font-size: 0.75rem; color: var(--ink-300); }
.field input, .field textarea, .field select {
  background: var(--surface-0);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.9375rem;
  color: var(--ink-900);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(15, 164, 175, 0.12);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }

.file-drop {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--color-accent); background: rgba(15,164,175,0.05); }
.file-drop .filename { font-size: 0.8125rem; color: var(--color-accent); margin-top: 0.35rem; }

.form-status {
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  margin-top: var(--space-sm);
  display: none;
}
.form-status.is-success { display: block; background: rgba(20,184,166,0.12); color: #0d9488; }
.form-status.is-error { display: block; background: rgba(239,68,68,0.1); color: #dc2626; }

/* ==========================================================================
   Misc UI: cursor, progress bar, pagination, modal, breadcrumbs
   ========================================================================== */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width var(--dur-fast) var(--ease-out), height var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  mix-blend-mode: difference;
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .custom-cursor { display: block; }
}
.custom-cursor.is-active { width: 44px; height: 44px; background: rgba(15,164,175,0.15); }

.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-accent);
  z-index: 200;
}

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-2xs); margin-top: var(--space-xl); }
.pagination a, .pagination span {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination .is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--ink-300); margin-bottom: var(--space-md); }
.breadcrumbs a:hover { color: var(--color-accent); }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 8, 22, 0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--surface-0);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close { position: absolute; top: var(--space-md); right: var(--space-md); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.modal-close:hover { background: var(--surface-2); }

.cookie-consent {
  position: fixed;
  left: var(--space-md); right: var(--space-md); bottom: var(--space-md);
  max-width: 480px;
  margin-inline: auto;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  z-index: 250;
  box-shadow: var(--shadow-lg);
  transform: translateY(140%);
  transition: transform var(--dur-base) var(--ease-out);
}
.cookie-consent.is-visible { transform: translateY(0); }
.cookie-consent p { color: rgba(255,255,255,0.7); font-size: 0.875rem; margin-bottom: var(--space-sm); }
.cookie-consent__actions { display: flex; gap: var(--space-2xs); }

/* ==========================================================================
   Flash messages (admin panel, founder/investor portals)
   ========================================================================== */
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.flash-success { background: rgba(20, 184, 166, 0.12); color: #0d9488; }
.flash-error { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

.share-row { display: flex; align-items: center; gap: var(--space-2xs); }
.share-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: grid; place-items: center;
  color: var(--ink-700);
}
.share-row a:hover { border-color: var(--color-accent); color: var(--color-accent); }

.back-to-top {
  position: fixed;
  right: var(--space-md); bottom: var(--space-md);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all var(--dur-fast) var(--ease-out);
  z-index: 80;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

.loading-bar {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: var(--gradient-accent);
  z-index: 999;
  transition: width var(--dur-base) var(--ease-out), opacity var(--dur-fast);
}
