/* BPC-157 Source — Vaporwave 45 aesthetic */

:root {
  --primary: #FF71CE;
  --primary-50: #FBE3F4;
  --primary-900: #5A1E45;
  --secondary: #01CDFE;
  --accent: #05FFA1;
  --violet: #B967FF;
  --neutral-50: #ECEAFF;
  --neutral-200: #C8C2EC;
  --neutral-500: #8A82B8;
  --neutral-900: #0B0518;
  --bg: #120A24;
  --bg-panel: #1A0F33;
  --surface: #211544;
  --surface-elevated: #2A1A55;
  --text: #ECEAFF;
  --text-muted: #A89FD6;
  --border-glow: #3D2A6B;
  --success: #05FFA1;
  --warning: #FFD166;
  --danger: #FF5C8A;
  --max-width: 70rem;
  --container-px: clamp(1rem, 3vw, 2rem);
  --font-heading: 'Orbitron', 'Arial Black', 'Helvetica Neue', sans-serif;
  --font-display: 'Sora', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --radius-button: 0.375rem;
  --radius-card: 0.5rem;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--scale-body, 1.0625rem);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--secondary); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  color: var(--text);
  font-weight: 800;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; font-weight: 700; }
p { margin-bottom: 1.25em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; color: var(--neutral-50); }
code, .mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--neutral-900);
  border: 1px solid var(--border-glow);
  padding: 0.1em 0.4em;
  border-radius: 0.25rem;
  color: var(--secondary);
}
sup { font-size: 0.7em; line-height: 0; position: relative; top: -0.4em; }
sup a {
  color: var(--secondary);
  font-family: var(--font-mono);
  font-size: 0.75em;
  background: transparent;
  border: 1px solid var(--border-glow);
  padding: 0.05em 0.3em;
  border-radius: 0.25rem;
  text-decoration: none;
}
sup a:hover { border-color: var(--secondary); color: var(--primary); box-shadow: 0 0 6px rgba(1,205,254,0.4); }

/* Orbitron for eyebrow/kickers */
.eyebrow, .kicker, .stat-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* === CONTAINER === */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 10, 36, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--secondary);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.875rem;
  gap: 1.5rem;
}
.site-brand {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(255,113,206,0.6);
  white-space: nowrap;
  flex-shrink: 0;
}
.site-brand:hover { color: var(--primary); text-shadow: 0 0 20px rgba(255,113,206,0.9); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  align-items: center;
}
.site-nav a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 180ms ease-out;
}
.site-nav a:hover { color: var(--secondary); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-glow);
  color: var(--text-muted);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-button);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.nav-toggle:hover { border-color: var(--secondary); color: var(--secondary); }

/* === HERO === */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-block: 5rem 4rem;
}
.hero-inner-page {
  min-height: 52vh;
  padding-block: 3.5rem 3rem;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    #120A24 0%,
    #1A0A2E 20%,
    #2D1050 38%,
    #B967FF 60%,
    #FF71CE 78%,
    #01CDFE 95%,
    #120A24 100%
  );
  opacity: 0.35;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(1,205,254,0.04) 2px,
    rgba(1,205,254,0.04) 3px
  );
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.rec-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--secondary);
  text-shadow: 0 0 8px rgba(1,205,254,0.7);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.rec-chip .rec-dot {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
  vertical-align: middle;
  margin-right: 0.3em;
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--secondary);
  text-shadow: 0 0 10px rgba(1,205,254,0.6);
  margin-bottom: 1.25rem;
}

.hero-col {
  max-width: 50ch;
}
.hero h1 {
  color: var(--neutral-50);
  text-shadow: 0 0 24px rgba(255,113,206,0.55);
  margin-bottom: 1.25rem;
}
.hero-lede {
  font-size: 1.1875rem;
  color: var(--text-muted);
  max-width: 62ch;
  margin-bottom: 2rem;
}

/* Stat readout */
.stat-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 2.5rem;
}
.stat-item {
  padding: 0.75rem 1.5rem;
  border-right: 1px solid var(--border-glow);
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }
.stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(5,255,161,0.5);
  display: block;
  line-height: 1.1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-top: 0.2rem;
}

/* CTA row */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.875rem 1.6rem;
  border-radius: var(--radius-button);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: box-shadow 180ms ease-out, color 180ms ease-out;
  line-height: 1.3;
}
.btn-primary {
  background: var(--primary);
  color: var(--neutral-900);
  box-shadow: 0 0 0 rgba(255,113,206,0);
}
.btn-primary:hover {
  background: var(--primary);
  color: var(--neutral-900);
  box-shadow: 0 0 20px rgba(255,113,206,0.7);
}
.btn-secondary {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
  box-shadow: 0 0 0 rgba(1,205,254,0);
}
.btn-secondary:hover {
  color: var(--secondary);
  box-shadow: 0 0 14px rgba(1,205,254,0.5);
}

/* Horizon hairline */
.horizon-line {
  width: 100%;
  height: 2px;
  background: var(--secondary);
  box-shadow: 0 0 10px rgba(1,205,254,0.6);
  margin: 0;
}

/* Hero figure plate */
.hero-figure {
  margin: 3rem 0 0;
  position: relative;
}
.hero-figure figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.fig-kicker {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

/* === MAIN CONTENT === */
main { padding-block: 4rem; }
.page-main { padding-block: 3rem 5rem; }

article > section,
.content-section {
  margin-bottom: 3.5rem;
}
article > section:last-child,
.content-section:last-child {
  margin-bottom: 0;
}

article h2 {
  color: var(--neutral-50);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glow);
}
article h3 {
  color: var(--primary);
  margin-bottom: 0.875rem;
  margin-top: 1.75rem;
}
article h3:first-child { margin-top: 0; }

/* === CARDS === */
.card {
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(1,205,254,0.12);
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}
.card:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 16px rgba(1,205,254,0.2), inset 0 1px 0 rgba(1,205,254,0.2);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* === CALLOUT === */
.callout {
  background: var(--surface-elevated);
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--primary), var(--secondary)) 1;
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  margin: 1.5rem 0;
}
.callout-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}

/* === SECTION FIGURE === */
.section-figure {
  margin: 2rem 0;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.section-figure img { width: 100%; }
.section-figure figcaption {
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface);
}

/* === REFERENCES === */
.references-list {
  list-style: none;
  counter-reset: ref-counter;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.references-list li {
  counter-increment: ref-counter;
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem 1rem 3.5rem;
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.references-list li::before {
  content: counter(ref-counter);
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-elevated);
  border-right: 1px solid var(--border-glow);
  border-radius: var(--radius-card) 0 0 var(--radius-card);
}
.ref-links {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ref-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--secondary);
  background: var(--surface-elevated);
  border: 1px solid var(--border-glow);
  padding: 0.15em 0.5em;
  border-radius: 0.25rem;
  text-decoration: none;
}
.ref-link:hover { border-color: var(--secondary); box-shadow: 0 0 6px rgba(1,205,254,0.3); color: var(--secondary); }

/* === FAQ === */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--neutral-50);
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--secondary);
  flex-shrink: 0;
  transition: transform 180ms ease-out;
}
details[open] .faq-question::after {
  content: '−';
}
details[open] { border-color: var(--secondary); }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* === PAGE INTRO === */
.page-intro {
  max-width: 66ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 2.5rem;
}

/* === BREADCRUMB === */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { margin-inline: 0.5rem; opacity: 0.5; }

/* === INNER PAGE HERO === */
.page-hero {
  padding-block: 3.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(185,103,255,0.12) 0%, rgba(255,113,206,0.08) 50%, transparent 100%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  text-shadow: 0 0 20px rgba(255,113,206,0.4);
  margin-top: 0.75rem;
}

/* === CONTACT FORM === */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 38rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-button);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 180ms ease-out;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 8px rgba(1,205,254,0.25);
}
.form-textarea { min-height: 7rem; resize: vertical; }
.form-select option { background: var(--surface); color: var(--text); }

/* === 404 === */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem var(--container-px);
}
.error-code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  color: var(--primary);
  text-shadow: 0 0 40px rgba(255,113,206,0.5);
  line-height: 1;
  display: block;
}

/* === FOOTER === */
.site-footer {
  background: var(--neutral-900);
  border-top: 1px solid var(--border-glow);
  padding-block: 3.5rem 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem 3rem;
  margin-bottom: 3rem;
}
.footer-brand-col {}
.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(255,113,206,0.5);
  display: block;
  margin-bottom: 0.875rem;
}
.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 28ch;
  line-height: 1.6;
}
.footer-col-heading {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 180ms ease-out;
}
.footer-links a:hover { color: var(--secondary); }
.footer-bottom {
  border-top: 1px solid var(--border-glow);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.6;
}
.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--border-glow);
  white-space: nowrap;
}

/* === RESPONSIVE === */
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand-col { grid-column: 1 / -1; }
  .stat-readout { gap: 0; }
  .stat-item { padding: 0.625rem 1rem; }
  .stat-item:first-child { padding-left: 0; }
}

@media (max-width: 767px) {
  h1 { font-size: clamp(1.85rem, 6vw, 2.6rem); }
  h2 { font-size: clamp(1.3rem, 4.5vw, 1.85rem); }

  .site-nav { display: none; }
  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-glow);
    padding: 1rem var(--container-px);
    z-index: 99;
  }
  .site-nav.is-open ul {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  .nav-toggle { display: block; }
  .site-header .container { position: relative; }

  .hero { min-height: 70vh; padding-block: 3.5rem 2.5rem; }
  .hero-col { max-width: 100%; }

  .stat-readout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-card);
    overflow: hidden;
  }
  .stat-item {
    border-right: 1px solid var(--border-glow);
    border-bottom: 1px solid var(--border-glow);
    padding: 0.75rem 1rem;
  }
  .stat-item:first-child { padding-left: 1rem; }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }

  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 479px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-readout { grid-template-columns: 1fr 1fr; }
}

/* === PAGE LAYOUT SPACING UTILITIES === */
.page-content-wrap { padding-top: 3rem; padding-bottom: 4rem; }
.page-content-wrap-sm { padding-top: 2rem; }
.page-content-wrap-md { padding-top: 2.5rem; padding-bottom: 4rem; }
.section-figure-wrap { padding-top: 2rem; }
.section-figure-wrap-lg { padding-top: 2.5rem; }
.cta-row-centered { justify-content: center; margin-top: 2rem; }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* === LIST STYLES IN CONTENT === */
article ul, article ol,
.content-body ul, .content-body ol {
  margin: 1em 0 1em 1.5rem;
}
article ul { list-style: disc; }
article ol { list-style: decimal; }
article li { margin-bottom: 0.4em; }

/* === INLINE CITATION CHIP === */
.citation-chip {
  font-family: var(--font-mono);
  font-size: 0.72em;
  color: var(--secondary);
  background: transparent;
  border: 1px solid var(--border-glow);
  border-radius: 0.25rem;
  padding: 0.05em 0.3em;
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  position: relative;
  top: -0.2em;
  transition: border-color 180ms ease-out;
}
.citation-chip:hover { border-color: var(--secondary); color: var(--secondary); }
.verified-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent);
  margin-right: 0.2em;
  vertical-align: middle;
}

/* === TIPPY OVERRIDE === */
.tippy-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border-glow);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  max-width: 28rem;
}
.tippy-box[data-theme~='light-border'] { background: var(--surface-elevated); color: var(--text); }
.tippy-arrow { color: var(--border-glow); }
