/* BiRAGAS apex marketing — tokens from frontend/src/app/globals.css instrument palette */
:root {
  --instrument-slate: #0f1419;
  --instrument-primary: #4a5880;
  --instrument-primary-hover: #52668c;
  --readout-mist: #e8edf2;
  --phosphor-trace: #48c5d0;
  --phosphor-trace-accent: #50d0d8;
  --bio-bg: #e8edf2;
  --bio-bg-elevated: #f4f7fa;
  --bio-text: #1a2332;
  --bio-text-muted: #5a6570;
  --bio-text-muted-2: #7a8794;
  --bio-border: color-mix(in srgb, var(--instrument-slate) 12%, transparent);
  --bio-border-md: color-mix(in srgb, var(--instrument-slate) 20%, transparent);
  --qc-sage: #256048;
  --evidence-violet: #6b5b95;
  --downshift: #3d5a80;
  --radius: 0.625rem;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--bio-text);
  background: var(--bio-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 2px solid var(--phosphor-trace);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--instrument-slate);
  color: var(--readout-mist);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bio-bg) 88%, transparent);
  border-bottom: 1px solid var(--bio-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--instrument-slate);
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--bio-text-muted);
}

.nav__links a:hover {
  color: var(--instrument-slate);
}

.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--bio-border-md);
  border-radius: var(--radius);
  background: var(--bio-bg-elevated);
  cursor: pointer;
  color: var(--instrument-slate);
}

.nav__toggle[aria-expanded="true"] + .nav__panel,
.nav__panel.is-open {
  display: flex;
}

.nav__panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem var(--gutter) 1.25rem;
  background: var(--bio-bg-elevated);
  border-bottom: 1px solid var(--bio-border);
}

.nav__panel a {
  padding: 0.65rem 0.25rem;
  color: var(--bio-text);
  font-weight: 500;
}

@media (min-width: 768px) {
  .nav__toggle {
    display: none;
  }

  .nav__links {
    display: flex;
  }

  .nav__panel {
    display: none !important;
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.875rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--instrument-slate);
  color: var(--readout-mist);
}

.btn--primary:hover {
  background: #1a2332;
}

.btn--ghost {
  background: transparent;
  color: var(--instrument-slate);
  border-color: var(--bio-border-md);
}

.btn--ghost:hover {
  border-color: var(--phosphor-trace);
  color: var(--instrument-slate);
}

.btn--accent {
  background: var(--phosphor-trace);
  color: var(--instrument-slate);
}

.btn--accent:hover {
  background: var(--phosphor-trace-accent);
}

.btn--lg {
  min-height: 3.25rem;
  padding-inline: 1.6rem;
  font-size: 1rem;
}

/* —— Hero —— */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(4rem, 12vw, 8rem);
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, color-mix(in srgb, var(--phosphor-trace) 28%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 80%, color-mix(in srgb, var(--downshift) 18%, transparent), transparent 50%),
    linear-gradient(165deg, var(--bio-bg-elevated) 0%, var(--bio-bg) 45%, #dce4ec 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bio-border-md), transparent);
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 42rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bio-text-muted);
}

.hero__eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--phosphor-trace);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 6.5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--instrument-slate);
}

.hero h1 em {
  font-style: normal;
  color: var(--downshift);
  background: linear-gradient(120deg, var(--downshift), var(--phosphor-trace));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--bio-text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* —— Sections —— */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section--alt {
  background: var(--bio-bg-elevated);
  border-block: 1px solid var(--bio-border);
}

.section__head {
  max-width: 36rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section__head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--instrument-slate);
}

.section__head p {
  margin: 0;
  color: var(--bio-text-muted);
}

/* Feature grid — interaction containers, not decorative cards */
.features {
  display: grid;
  gap: 1px;
  background: var(--bio-border);
  border: 1px solid var(--bio-border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}

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

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

.feature {
  background: var(--bio-bg-elevated);
  padding: 1.5rem 1.35rem 1.65rem;
}

.feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--phosphor-trace) 16%, var(--bio-bg));
  color: var(--downshift);
}

.feature__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--instrument-slate);
}

.feature p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--bio-text-muted);
  line-height: 1.5;
}

/* How it works */
.steps {
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

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

.step {
  position: relative;
  padding-top: 0.25rem;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--phosphor-trace);
}

.step h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--bio-text-muted);
  font-size: 0.975rem;
}

/* Final CTA */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 5.5rem) 0;
  background:
    radial-gradient(ellipse 60% 80% at 100% 50%, color-mix(in srgb, var(--phosphor-trace) 22%, transparent), transparent 60%),
    var(--instrument-slate);
  color: var(--readout-mist);
}

.cta__inner {
  max-width: 36rem;
}

.cta h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.cta p {
  margin: 0 0 1.75rem;
  color: color-mix(in srgb, var(--readout-mist) 72%, transparent);
}

.cta .btn--accent {
  color: var(--instrument-slate);
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--bio-border);
  background: var(--bio-bg);
}

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

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__brand img {
  height: 2.25rem;
  width: auto;
}

.footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--bio-text-muted-2);
}

.footer__meta {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--bio-text-muted-2);
}
