:root {
  --primary: #10B981;
  --bg-dark: #0B1134;
  --site-bg: var(--bg-dark);
  --header-height: var(--nav-height);
  --nav-height: 81px;
  --space-section: clamp(2.75rem, 4vw, 4.75rem);
  --space-section-tight: clamp(1.75rem, 3vw, 3rem);
  --space-hero-top: clamp(6rem, 10vw, 7.5rem);
  --space-hero-bottom: clamp(2.25rem, 4vw, 3.5rem);
  --radius-card: 18px;
  --surface-1: rgba(255, 255, 255, 0.04);
  --border-1: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

* {
  -webkit-tap-highlight-color: transparent;
}

a,
button {
  outline: none !important;
}

a:focus,
a:active,
button:focus,
button:active {
  outline: none !important;
  box-shadow: none !important;
}

a,
button,
nav a {
  transition: background-color 0.2s ease, color 0.2s ease;
}

a:hover,
a:active,
button:hover,
button:active,
nav a:hover,
nav a:active {
  opacity: 1;
  transform: none;
  animation: none !important;
}

html,
body {
  background-color: var(--site-bg);
  transition: none;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--site-bg);
  color: #fff;
  overflow-x: hidden;
}

.font-serif {
  font-family: 'Playfair Display', serif;
}

.site-header,
#navbar,
.hero,
.page-hero,
.hero-strip {
  will-change: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.site-header,
#navbar {
  min-height: var(--header-height);
  height: var(--header-height);
}

nav a {
  line-height: 1;
}

.brand-initial {
  width: 2.25rem;
  height: 2.25rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-initial + a {
  font-size: 1.7rem;
  line-height: 2.25rem;
}

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

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

.section-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-strip {
  padding-top: var(--space-hero-top);
  padding-bottom: var(--space-hero-bottom);
}

.hero-title {
  font-size: clamp(2.1rem, 3.4vw, 3.4rem);
  line-height: 1.1;
}

.hero-subhead {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.6;
}

.section-title {
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1.2;
}

.section-lede {
  font-size: 0.95rem;
  line-height: 1.6;
}

.ingestion-header {
  max-width: 46rem;
  margin: 0 auto;
}

.ingestion-panel {
  max-width: 52rem;
}

.ingestion-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ingestion-input {
  min-height: 44px;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.ingestion-input:focus {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: none;
}

.ingestion-input:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.5);
  outline-offset: 2px;
}

.ingestion-drop:active {
  transform: none;
  box-shadow: none;
}

.ingestion-drop:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.5);
  outline-offset: 2px;
}

.ingestion-hint {
  min-height: 1rem;
}

.nav-link {
  border-bottom: 1px solid transparent;
  padding-bottom: 0.25rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  outline: none;
  box-shadow: none;
}

.nav-link:focus {
  outline: none;
  box-shadow: none;
}

.nav-link:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.6);
  outline-offset: 4px;
  border-radius: 999px;
}

.nav-link:active {
  transform: none;
  box-shadow: none;
}

.nav-link.active {
  color: #fff;
  border-color: var(--primary);
}

.portal-link {
  transition: background-color 0.2s ease, color 0.2s ease;
}

.portal-link:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.6);
  outline-offset: 4px;
  border-radius: 999px;
}

/* HEADER CLIENT PORTAL PILL */
.portal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.portal-pill i {
  font-size: 0.85em;
}

.portal-pill--mobile {
  width: 100%;
  justify-content: center;
  padding: 0.65rem 1rem;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.96);
  backdrop-filter: blur(10px);
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms ease, opacity 260ms ease;
  z-index: 60;
}

.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 90vw);
  background: rgba(15, 23, 42, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-drawer,
.mobile-drawer,
.overlay,
.mobile-menu,
.modal-overlay {
  animation: none !important;
  transition: transform 0.25s ease;
}

.mobile-menu a,
.mobile-menu button {
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu .menu-link {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.mobile-menu .menu-link:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.6);
  outline-offset: 4px;
  border-radius: 10px;
}

body.menu-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(8px);
}

.fade-in {
  animation: none !important;
}

.scanner-line {
  width: 100%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: scan 2s infinite linear;
}

.drop-zone:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
}

.checkmark-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #fff;
  stroke-miterlimit: 10;
  margin: 10% auto;
  box-shadow: inset 0px 0px 0px #10B981;
  animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #10B981;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-circle path {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.fade-in,
.scanner-line,
.checkmark-circle,
.checkmark-circle circle,
.checkmark-circle path {
  animation-fill-mode: both;
}

@keyframes scan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(200px);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #10B981;
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .section-inner {
    padding: 0 1rem;
  }

  .mobile-card {
    background: var(--surface-1);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    margin-bottom: 1rem;
  }

  .mobile-card.tight {
    padding: 1rem;
  }

  .ingestion-controls {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
