/* ============================================================
   APIVAPT — Main stylesheet
   Design tokens extracted from live site CSS bundle.
   Dark-first. Tailwind-equivalent custom props.
   ============================================================ */

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

:root {
  /* Color tokens — exact values from live site :root */
  --background:         0 0% 2%;
  --foreground:         0 0% 95%;
  --card:               0 0% 5%;
  --card-foreground:    0 0% 95%;
  --primary:            160 84% 39%;
  --primary-foreground: 0 0% 2%;
  --secondary:          239 84% 67%;
  --secondary-foreground: 0 0% 98%;
  --muted:              0 0% 10%;
  --muted-foreground:   0 0% 55%;
  --accent:             239 84% 67%;
  --accent-foreground:  0 0% 98%;
  --destructive:        0 84% 60%;
  --destructive-foreground: 0 0% 98%;
  --border:             0 0% 12%;
  --input:              0 0% 12%;
  --ring:               160 84% 39%;
  --radius:             0.75rem;
  --emerald-glow:       160 84% 39%;
  --indigo-glow:        239 84% 67%;
  --glass:              0 0% 100% / .04;
  --glass-border:       0 0% 100% / .08;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* ── Layout helpers ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 6rem;
  position: relative;
}

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

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: hsl(var(--foreground));
}

.text-primary   { color: hsl(var(--primary)); }
.text-secondary { color: hsl(var(--secondary)); }
.text-foreground { color: hsl(var(--foreground)); }
.text-muted { color: hsl(var(--muted-foreground)); }

/* ── Glass effect ─────────────────────────────────────────── */
.glass {
  background: hsla(var(--glass));
  border: 1px solid hsla(var(--glass-border));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-strong {
  background: hsla(0 0% 100% / .06);
  border: 1px solid hsla(var(--glass-border));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.rounded-lg  { border-radius: var(--radius); }
.rounded-xl  { border-radius: calc(var(--radius) * 1.33); }
.rounded-2xl { border-radius: calc(var(--radius) * 1.67); }
.rounded-full { border-radius: 9999px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.5rem;
  border-radius: var(--radius);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 0 20px hsla(var(--emerald-glow) / 0.25);
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: scale(1.01);
}

.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.6;
  transform: none;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.5rem;
  border-radius: var(--radius);
  background: hsla(var(--glass));
  border: 1px solid hsla(var(--glass-border));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-glass:hover {
  background: hsla(0 0% 100% / .08);
}

.btn-sm  { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }
.btn-xs  { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.btn-cta { padding: 0.75rem 1.5rem; }

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius);
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-danger:hover { opacity: 0.85; }

.btn-submit, .btn-mobile-cta {
  width: 100%;
  justify-content: center;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid hsla(var(--glass-border));
}

.glass-nav {
  background: hsla(0 0% 5% / .85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.brand-icon { color: hsl(var(--primary)); flex-shrink: 0; }
.brand-name { color: hsl(var(--foreground)); }

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

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }
}

.nav-link {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s;
}

.nav-link:hover { color: hsl(var(--foreground)); }

.nav-hamburger {
  color: hsl(var(--foreground));
  padding: 0.25rem;
}

.nav-mobile {
  border-top: 1px solid hsla(var(--glass-border));
  background: hsla(0 0% 5% / .95);
}

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

/* ── Ticker ───────────────────────────────────────────────── */
.ticker-wrapper {
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
  overflow: hidden;
  padding-block: 0.375rem;
  margin-top: 4rem;   /* nav height offset */
}

.ticker-track {
  display: flex;
  animation: ticker-scroll 35s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 2rem;
  flex-shrink: 0;
}

.ticker-icon { color: hsl(var(--destructive) / .6); flex-shrink: 0; }

.ticker-item span {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
}

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

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, hsla(var(--primary) / .06) 0%, transparent 70%),
    hsl(var(--background));
}

.hero-glow {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  filter: blur(120px);
}

.hero-glow-tl {
  top: 25%; left: 25%;
  width: 24rem; height: 24rem;
  background: hsla(var(--primary) / .05);
}

.hero-glow-br {
  bottom: 25%; right: 25%;
  width: 20rem; height: 20rem;
  background: hsla(var(--secondary) / .05);
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
  padding-block: 6rem 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  background: hsla(var(--glass));
  border: 1px solid hsla(var(--glass-border));
}

.hero-badge-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

.hero-heading {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 56rem;
  margin-inline: auto;
  background: linear-gradient(135deg,
    hsl(var(--foreground)) 0%,
    hsl(var(--primary))    50%,
    hsl(var(--foreground)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: hsl(var(--muted-foreground));
  max-width: 42rem;
  margin-inline: auto;
  line-height: 1.7;
}

.hero-ctas {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.icon-secondary { color: hsl(var(--secondary)); }

/* ── Services grid ────────────────────────────────────────── */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 64rem;
  margin-inline: auto;
}

.service-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  transition: background 0.2s;
}

.service-card:hover {
  background: hsla(0 0% 100% / .03);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) * .67);
  margin-bottom: 1rem;
}

.icon-primary   { background: hsla(var(--primary) / .1);   color: hsl(var(--primary)); }
.icon-secondary { background: hsla(var(--secondary) / .1); color: hsl(var(--secondary)); }

.service-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.service-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* ── Methodology timeline ─────────────────────────────────── */
.methodology-timeline {
  position: relative;
  max-width: 32rem;
  margin-inline: auto;
}

.timeline-line {
  position: absolute;
  left: 1.25rem;
  top: 0; bottom: 0;
  width: 1px;
  background: hsl(var(--border));
}

.timeline-steps { display: flex; flex-direction: column; gap: 2.5rem; }

.timeline-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding-left: 0.5rem;
}

.step-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--primary));
}

.step-content { padding-top: 0.25rem; }

.step-title {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.step-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* ── Why APIVAPT grid ─────────────────────────────────────── */
.why-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 62rem;
  margin-inline: auto;
}

.why-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  background: hsla(var(--glass));
  border: 1px solid hsla(var(--glass-border));
}

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: calc(var(--radius) * 1.33);
  background: hsla(var(--primary) / .1);
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}

.why-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.why-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* ── Blog preview ─────────────────────────────────────────── */
.blog-preview-grid,
.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  max-width: 75rem;
  margin-inline: auto;
}

.loading-placeholder,
.no-posts,
.empty-state {
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  padding: 2rem;
  grid-column: 1/-1;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: hsla(var(--glass));
  border: 1px solid hsla(var(--glass-border));
  border-radius: calc(var(--radius) * 1.33);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  border-color: hsla(var(--primary) / .3);
  box-shadow: 0 0 30px hsla(var(--primary) / .08);
}

.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.75rem;
}

.meta-dot {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: hsl(var(--muted-foreground) / .4);
  display: inline-block;
  flex-shrink: 0;
}

.blog-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
  flex: 1;
}

.blog-card-link:hover { color: hsl(var(--primary)); }

.blog-card-excerpt {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

.blog-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--primary));
  transition: gap 0.15s;
}

.blog-read-more:hover { gap: 0.625rem; }

.blog-view-all {
  text-align: center;
  margin-top: 3rem;
}

.btn-view-all {
  padding: 0.75rem 1.5rem;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-wrapper {
  max-width: 32rem;
  margin-inline: auto;
}

.contact-form-wrap {
  border-radius: calc(var(--radius) * 1.67);
  padding: 2rem;
}

.contact-success {
  text-align: center;
  padding: 2rem 0;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: hsla(var(--primary) / .1);
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}

.success-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.success-body {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* ── Forms (shared) ───────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 1px hsl(var(--primary));
}

.form-textarea { resize: vertical; min-height: 6rem; }
.form-select   { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' 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; }

.field-error, .form-error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: hsl(var(--destructive));
}

.alert-error {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: hsla(var(--destructive) / .12);
  border: 1px solid hsla(var(--destructive) / .3);
  color: hsl(var(--destructive));
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid hsl(var(--border));
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

.footer-copy {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.footer-link {
  transition: color 0.15s;
}

.footer-link:hover { color: hsl(var(--foreground)); }

.footer-li:hover { color: hsl(var(--primary)); }

/* ── Blog pages ───────────────────────────────────────────── */
.blog-page-header {
  padding-top: 7rem;
  padding-bottom: 3rem;
  text-align: center;
}

.blog-page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  margin-block: 0.5rem;
}

.blog-page-sub {
  color: hsl(var(--muted-foreground));
  max-width: 32rem;
  margin-inline: auto;
  font-size: 0.9375rem;
}

.blog-list-section {
  padding-bottom: 6rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
  transition: color 0.15s;
}

.back-link:hover { color: hsl(var(--foreground)); }

/* ── Blog detail ──────────────────────────────────────────── */
.blog-detail-page { padding-top: 5rem; padding-bottom: 4rem; }

.blog-detail-container { max-width: 52rem; }

.blog-detail-header { padding-bottom: 2rem; }

.blog-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

.meta-date,
.meta-read { display: inline-flex; align-items: center; gap: 0.375rem; }

.meta-tag {
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  background: hsla(var(--secondary) / .12);
  color: hsl(var(--secondary));
  font-size: 0.75rem;
}

.blog-detail-title {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: hsl(var(--foreground));
  margin-bottom: 1.5rem;
}

.blog-detail-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: hsla(var(--primary) / .12);
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.author-role {
  display: block;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.blog-detail-divider {
  height: 1px;
  background: hsl(var(--border));
  margin-block: 2rem;
}

.blog-detail-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

/* ── Prose (blog content) ─────────────────────────────────── */
.prose {
  color: hsl(var(--foreground));
  line-height: 1.75;
  font-size: 1rem;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: hsl(var(--foreground));
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose h1 { font-size: 1.875rem; }
.prose h2 { font-size: 1.5rem;   border-bottom: 1px solid hsl(var(--border)); padding-bottom: 0.375rem; }
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 1.0625rem; }

.prose p { margin-bottom: 1.25em; }

.prose a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { opacity: 0.85; }

.prose strong { font-weight: 600; color: hsl(var(--foreground)); }
.prose em     { font-style: italic; }

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25em;
  list-style: revert;
}

.prose li { margin-bottom: 0.375em; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  background: hsl(var(--muted));
  color: hsl(var(--primary));
}

.prose pre {
  background: hsl(0 0% 7%);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5em;
  font-size: 0.875rem;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

.prose blockquote {
  border-left: 3px solid hsl(var(--primary));
  padding-left: 1.25rem;
  margin-left: 0;
  margin-bottom: 1.25em;
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.875rem;
}

.prose th, .prose td {
  padding: 0.625rem 0.875rem;
  border: 1px solid hsl(var(--border));
  text-align: left;
}

.prose th {
  background: hsl(var(--muted));
  font-weight: 600;
}

.prose hr {
  border: none;
  border-top: 1px solid hsl(var(--border));
  margin-block: 2em;
}

/* ── Legal pages ──────────────────────────────────────────── */
.legal-page { padding-top: 5rem; padding-bottom: 5rem; }

.legal-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .legal-layout { grid-template-columns: 12rem 1fr; }
}

.legal-toc {
  position: sticky;
  top: 5.5rem;
  align-self: start;
}

.toc-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.75rem;
}

.toc-list { display: flex; flex-direction: column; gap: 0.5rem; }

.toc-link {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s;
}

.toc-link:hover { color: hsl(var(--primary)); }

.legal-header { margin-bottom: 2rem; }

.legal-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  margin-block: 0.5rem;
}

.legal-updated {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.legal-content.prose h2 { font-size: 1.25rem; }

/* ── Error pages ──────────────────────────────────────────── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-inner { max-width: 32rem; }

.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: hsl(var(--primary));
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
}

.error-body {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ── Misc ─────────────────────────────────────────────────── */
.form-hint {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.375rem;
}

.required { color: hsl(var(--destructive)); }

/* highlight.js dark override */
.hljs {
  background: transparent !important;
}

/* ── Responsive adjustments ───────────────────────────────── */
@media (max-width: 640px) {
  .section { padding-block: 4rem; }
  .contact-form-wrap { padding: 1.25rem; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

/* ============================================================
   SCROLL-SNAP + FULL-VIEWPORT SECTIONS
   ============================================================ */

/* Snap container on the homepage only — applied via JS/body class */
body.snap-enabled {
  overflow: hidden;
  height: 100dvh;
}

.snap-container {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  /* scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--border)) transparent;
}

.snap-section {
  scroll-snap-align: start;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* ticker sits inside the hero snap section, not its own */
.snap-section.hero-snap { padding-top: 4rem; /* nav clearance */ }

/* Footer snap section — don't enforce 100dvh on footer */
.snap-section.footer-snap {
  min-height: auto;
  justify-content: flex-end;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============================================================
   NAVIGATION — centered links + active state
   ============================================================ */
.nav-inner {
  justify-content: space-between;
}

/* On homepage with snap, center the links block */
.nav-links-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link.nav-active {
  color: hsl(var(--primary));
}

/* ============================================================
   HERO CANVAS BACKGROUND
   ============================================================ */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
}

/* ============================================================
   TYPEWRITER
   ============================================================ */
.typewriter-wrap {
  min-height: 1.2em;
  display: block;
}

.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: hsl(var(--primary));
  margin-left: 2px;
  vertical-align: middle;
  animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   SERVICES CARDS — hover lift + slide-up "Learn more"
   ============================================================ */
.service-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px hsla(var(--primary) / .12);
  background: hsla(0 0% 100% / .05);
}

.service-learn-more {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--primary));
  margin-top: 0.875rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.service-card:hover .service-learn-more {
  max-height: 2rem;
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   METHODOLOGY — HORIZONTAL STEPPER
   ============================================================ */
.methodology-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 72rem;
  margin-inline: auto;
  position: relative;
}

/* Connecting line between steps */
.stepper-connector {
  flex: 1;
  height: 1px;
  background: hsl(var(--border));
  align-self: 1.25rem;
  margin-top: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stepper-connector::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: hsl(var(--primary));
  transition: width 0.6s ease;
}

.stepper-connector.animated::after {
  width: 100%;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  width: 9rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stepper-step.step-visible {
  opacity: 1;
  transform: translateX(0);
}

.stepper-number {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--border));
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s, color 0.4s, background 0.4s, box-shadow 0.4s;
  position: relative;
  z-index: 1;
}

.stepper-step.step-visible .stepper-number {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  background: hsla(var(--primary) / .1);
  box-shadow: 0 0 16px hsla(var(--primary) / .25);
}

.stepper-icon {
  color: hsl(var(--primary));
  margin-top: 0.5rem;
  margin-bottom: 0.375rem;
}

.stepper-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.stepper-desc {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  max-width: 8rem;
}

/* Mobile: vertical fallback */
@media (max-width: 767px) {
  .methodology-stepper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 28rem;
  }
  .stepper-connector { display: none; }
  .stepper-step {
    flex-direction: row;
    width: 100%;
    text-align: left;
    align-items: flex-start;
    gap: 1rem;
  }
  .stepper-number { flex-shrink: 0; }
  .stepper-icon { display: none; }
  .stepper-title, .stepper-desc { max-width: none; }
  .stepper-step {
    transform: translateY(20px);
  }
  .stepper-step.step-visible {
    transform: translateY(0);
  }
}

/* ============================================================
   WHY US — STAT COUNTERS
   ============================================================ */
.why-stat {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--primary));
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 0.375rem;
}

.why-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.why-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px hsla(var(--primary) / .1);
}

/* ============================================================
   CTA STRIP SECTION
   ============================================================ */
.cta-strip-section {
  background: linear-gradient(
    135deg,
    hsla(var(--primary) / .06) 0%,
    hsla(var(--secondary) / .06) 100%
  );
  border-top: 1px solid hsla(var(--primary) / .12);
  border-bottom: 1px solid hsla(var(--secondary) / .12);
}

.cta-strip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
  padding-block: 4rem;
}

.cta-strip-headline {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  background: linear-gradient(135deg, hsl(var(--foreground)) 0%, hsl(var(--primary)) 60%, hsl(var(--secondary)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-strip-sub {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  max-width: 36rem;
  line-height: 1.65;
  margin-top: -1rem;
}

.cta-strip-btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 0 30px hsla(var(--primary) / .35);
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s;
  pointer-events: none;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  background: hsl(var(--muted-foreground) / .2);
}

/* ============================================================
   CURSOR TRAIL DOT
   ============================================================ */
#cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: hsl(var(--primary));
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  box-shadow: 0 0 6px hsl(var(--primary));
  filter: blur(1px);
}

body:hover #cursor-trail {
  opacity: 0.25;
}

/* ============================================================
   NAV ACTIVE LINK
   ============================================================ */
.nav-link.nav-active {
  color: hsl(var(--primary)) !important;
}

/* ============================================================
   INSIGHTS PAGE (blog_list.html rename)
   ============================================================ */
.insights-page-header {
  padding-top: 7rem;
  padding-bottom: 3rem;
  text-align: center;
}

.insights-page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  margin-block: 0.5rem;
}

.insights-page-sub {
  color: hsl(var(--muted-foreground));
  max-width: 32rem;
  margin-inline: auto;
  font-size: 0.9375rem;
}

.insights-list-section {
  padding-bottom: 6rem;
}
