:root {
  --ink: #13201d;
  --muted: #5c6965;
  --paper: #fbfcf8;
  --soft: #edf2ed;
  --line: rgba(19, 32, 29, 0.14);
  --blue: #2563eb;
  --teal: #0f766e;
  --amber: #b7791f;
  --red: #b42318;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

.site-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  left: 0;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: absolute;
  right: 0;
  top: 0;
  z-index: 3;
}

.brand,
.site-header nav {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.brand,
.site-header a {
  color: #f7fbf7;
  font-weight: 850;
  text-decoration: none;
}

.brand span {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.45rem;
  display: inline-flex;
  height: 2.2rem;
  justify-content: center;
  width: 2.2rem;
}

.site-header nav {
  font-size: 0.92rem;
}

.hero {
  background: #0e1c19;
  color: #f7fbf7;
  min-height: 82vh;
  overflow: hidden;
  padding: 6.25rem clamp(1rem, 4vw, 3rem) 2rem;
  position: relative;
}

#signalCanvas {
  height: 100%;
  inset: 0;
  opacity: 0.96;
  position: absolute;
  width: 100%;
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(14, 28, 25, 0.98) 0%, rgba(14, 28, 25, 0.68) 48%, rgba(14, 28, 25, 0.34) 100%),
    linear-gradient(180deg, rgba(14, 28, 25, 0.08), rgba(14, 28, 25, 0.72));
  content: "";
  inset: 0;
  position: absolute;
}

.hero-inner {
  display: grid;
  gap: 1.25rem;
  max-width: 980px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: #6ee7d8;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  letter-spacing: 0;
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.7rem, 7.2vw, 5.8rem);
  line-height: 0.94;
  max-width: 12ch;
  overflow-wrap: break-word;
}

.lede {
  color: rgba(247, 251, 247, 0.8);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.62;
  margin: 0;
  max-width: 47rem;
}

.audit-bar {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.5rem;
  display: grid;
  gap: 0.7rem;
  margin-top: 0.35rem;
  max-width: 48rem;
  padding: 0.85rem;
}

.audit-bar label {
  color: rgba(247, 251, 247, 0.78);
  font-size: 0.78rem;
  font-weight: 850;
}

.audit-row {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.audit-row input,
.lead-form input,
.lead-form select,
.lead-form textarea {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  color: var(--ink);
  min-height: 3rem;
  min-width: 0;
  padding: 0.85rem 0.9rem;
}

.audit-row button,
.package-grid button,
.secondary-action,
.lead-form button {
  align-items: center;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 0.4rem;
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1rem;
}

.audit-row button:disabled,
.lead-form button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-error {
  color: #fecaca;
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0;
  min-height: 1.1rem;
}

.hero-stats {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 46rem;
  padding-top: 0.35rem;
}

.hero-stats p {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding-top: 0.75rem;
}

.hero-stats strong {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1;
}

.hero-stats span {
  color: rgba(247, 251, 247, 0.72);
  font-size: 0.88rem;
}

.band {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem);
}

.section-heading {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4.4vw, 3.5rem);
  line-height: 1.02;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.score-strip {
  align-items: center;
  background: #10231f;
  border-radius: 0.55rem;
  color: #f7fbf7;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
  margin-bottom: 1rem;
  padding: 1rem;
}

.score-strip p {
  margin: 0;
}

.score-strip p:first-child {
  align-items: baseline;
  display: flex;
  gap: 0.75rem;
}

#scoreValue {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 950;
  line-height: 0.9;
}

#gradeValue {
  color: #b8f3ec;
}

#primaryIssue {
  color: rgba(247, 251, 247, 0.78);
  line-height: 1.5;
}

.finding-grid,
.package-grid,
.market-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finding-card,
.package-grid article,
.market-grid article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
}

.finding-card[data-status="pass"] {
  border-top: 0.35rem solid var(--teal);
}

.finding-card[data-status="warning"],
.finding-card[data-status="info"] {
  border-top: 0.35rem solid var(--amber);
}

.finding-card[data-status="fail"] {
  border-top: 0.35rem solid var(--red);
}

.finding-card span,
.package-grid span {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.finding-card h3,
.package-grid h3,
.market-grid h3,
.next-steps h3 {
  font-size: 1.08rem;
  line-height: 1.15;
  margin: 0;
}

.finding-card p,
.package-grid p,
.market-grid p,
.workflow-list span {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.finding-card ul {
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.2rem;
}

.finding-card details {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.finding-card summary {
  cursor: pointer;
  font-weight: 850;
}

.finding-card pre {
  background: var(--soft);
  border-radius: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 100%;
  overflow: auto;
  padding: 0.7rem;
  white-space: pre-wrap;
}

.next-steps {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
}

.next-steps ol,
.workflow-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding-left: 1.25rem;
}

.next-steps li {
  color: var(--muted);
  line-height: 1.55;
}

.secondary-action {
  justify-self: start;
}

.packages {
  background: var(--paper);
}

.package-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.package-grid article {
  align-content: start;
  min-height: 18rem;
}

.package-grid button {
  align-self: end;
  background: var(--ink);
  border-color: var(--ink);
}

.workflow {
  background: #10231f;
  color: #f7fbf7;
  max-width: none;
}

.workflow .section-heading,
.workflow-list {
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
}

.workflow .section-heading p:not(.eyebrow),
.workflow-list span {
  color: rgba(247, 251, 247, 0.72);
}

.workflow-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  padding-left: 0;
}

.workflow-list li {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  gap: 0.45rem;
  padding-top: 1rem;
}

.request {
  border-top: 1px solid var(--line);
}

.lead-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
}

.lead-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 0.45rem;
}

.lead-form .full,
.lead-form button,
.lead-status {
  grid-column: 1 / -1;
}

.lead-form button {
  justify-self: start;
  min-width: 12rem;
}

.lead-status {
  color: var(--teal);
  font-weight: 850;
  margin: 0;
  min-height: 1.2rem;
}

.hidden {
  display: none;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-bottom: 1.75rem;
    padding-top: 6.75rem;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(14, 28, 25, 0.96) 0%, rgba(14, 28, 25, 0.78) 62%, rgba(14, 28, 25, 0.48) 100%);
  }

  .audit-row,
  .score-strip,
  .lead-form {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 10.5vw, 3.35rem);
    line-height: 0.96;
    max-width: 11ch;
  }

  .lede {
    font-size: 1rem;
    line-height: 1.5;
  }

  .audit-row button,
  .lead-form button,
  .secondary-action {
    width: 100%;
  }

  .finding-grid,
  .package-grid,
  .market-grid,
  .workflow-list {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 0.55rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-stats strong {
    font-size: 1.08rem;
  }

  .hero-stats span {
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .package-grid article {
    min-height: auto;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
  }
}
