/* =========================================================
   BallparkLP — marketing site styles
   Plain CSS, no preprocessor. Single-file by design.
   ========================================================= */

:root {
  --bg: #FAFAF6;
  --bg-elevated: #F4F1EA;
  --ink: #161311;
  --ink-muted: #6B6660;
  --ink-soft: #8A847C;
  --rule: #E8E4DC;
  --rule-strong: #D6D1C6;
  --accent: #2A3F35;
  --accent-hover: #1F302A;
  --flag-critical: #A03A2A;
  --flag-high: #B47A1E;

  --serif: 'Instrument Serif', 'Iowan Old Style', 'Georgia', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1120px;
  --pad-x: 32px;

  --rhythm: 144px;
}

@media (max-width: 720px) {
  :root {
    --pad-x: 20px;
    --rhythm: 96px;
  }
}

/* -------- reset / base -------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (max-width: 720px) {
  body { font-size: 16px; }
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg { display: block; max-width: 100%; }

ol, ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}

p { margin: 0; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

/* -------- layout primitives -------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section {
  padding-top: var(--rhythm);
  padding-bottom: var(--rhythm);
  border-top: 1px solid var(--rule);
}

/* -------- typography primitives -------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.section-headline {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 16ch;
}

.section-sub {
  font-family: var(--sans);
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 60ch;
  margin-top: 24px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* -------- header -------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-cta {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: border-color 160ms ease, color 160ms ease;
}

.header-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* -------- hero -------- */

.hero {
  padding-top: clamp(80px, 12vw, 168px);
  padding-bottom: clamp(80px, 10vw, 144px);
}

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(52px, 9.5vw, 120px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  max-width: 18ch;
}

.hero-headline br {
  /* allow line break only on wider viewports */
}

@media (max-width: 640px) {
  .hero-headline br { display: none; }
  .hero-headline { font-size: clamp(44px, 11vw, 60px); }
}

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--ink-muted);
  margin-top: 32px;
  max-width: 60ch;
}

/* -------- waitlist form -------- */

.waitlist-form {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 40px;
  max-width: 520px;
}

.waitlist-input {
  flex: 1 1 auto;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 14px 16px;
  min-width: 0;
  transition: border-color 160ms ease, background 160ms ease;
}

.waitlist-input::placeholder {
  color: var(--ink-soft);
}

.waitlist-input:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}

.waitlist-input:invalid:not(:placeholder-shown) {
  border-color: var(--flag-critical);
}

.waitlist-button {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  padding: 0 22px;
  height: auto;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: -0.005em;
  transition: background 160ms ease, transform 160ms ease;
}

.waitlist-button:hover {
  background: var(--accent);
}

.waitlist-button:active {
  transform: translateY(1px);
}

.waitlist-button span {
  display: inline-block;
  margin-left: 6px;
  transition: transform 160ms ease;
}

.waitlist-button:hover span {
  transform: translateX(3px);
}

.waitlist-note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 16px;
  letter-spacing: 0;
}

.waitlist-success,
.waitlist-error {
  font-family: var(--sans);
  font-size: 16px;
  margin-top: 40px;
  padding: 16px 18px;
  border-radius: 2px;
  max-width: 520px;
  line-height: 1.5;
}

.waitlist-success {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--rule));
  color: var(--accent);
}

.waitlist-success em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
}

.waitlist-error {
  background: color-mix(in srgb, var(--flag-critical) 6%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--flag-critical) 24%, var(--rule));
  color: var(--flag-critical);
}

@media (max-width: 520px) {
  .waitlist-form {
    flex-direction: column;
    gap: 10px;
  }
  .waitlist-button {
    padding: 14px 22px;
  }
}

/* -------- steps -------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px;
  margin-top: 72px;
}

@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 56px;
    margin-top: 56px;
  }
}

.step {
  display: flex;
  flex-direction: column;
}

.step-number {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.step-title {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 14px;
}

.step-body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* -------- surfaces / report -------- */

.surfaces {
  background: var(--bg);
}

.report {
  margin-top: 80px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  padding: clamp(28px, 4vw, 56px);
  max-width: 820px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 60px -32px rgba(22, 19, 17, 0.12);
}

.report-block + .report-block {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.report-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.report-label-aux {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  font-weight: 400;
}

.report-grade {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  color: var(--flag-high);
  letter-spacing: -0.02em;
  text-transform: none;
}

.report-rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label value"
    "note  note";
  column-gap: 24px;
  row-gap: 4px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--rule);
}

.report-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.report-row dt {
  grid-area: label;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.report-row dd {
  margin: 0;
}

.report-value {
  grid-area: value;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.report-note {
  grid-area: note;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.report-flags {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-flags li {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
}

.report-flags li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-muted);
}

.flag-dot {
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-muted);
  margin-right: 8px;
}

.flag-dot.flag-critical { background: var(--flag-critical); }
.flag-dot.flag-high { background: var(--flag-high); }

.report-flags li:has(.flag-dot)::before { display: none; }

/* -------- categories -------- */

.categories {
  background: var(--bg-elevated);
}

.category-list {
  margin-top: 72px;
  border-top: 1px solid var(--rule-strong);
}

.category-list li {
  display: grid;
  grid-template-columns: 64px minmax(220px, 1fr) 2fr;
  column-gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-strong);
  align-items: baseline;
}

@media (max-width: 720px) {
  .category-list li {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "num name"
      ".   desc";
    row-gap: 6px;
    padding: 22px 0;
  }
  .category-list .category-num { grid-area: num; }
  .category-list .category-name { grid-area: name; }
  .category-list .category-desc { grid-area: desc; }
}

.category-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.category-name {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.category-desc {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 56ch;
}

/* -------- final CTA -------- */

.final-cta {
  text-align: left;
  padding-top: clamp(96px, 12vw, 160px);
  padding-bottom: clamp(96px, 12vw, 160px);
}

.final-cta-inner {
  max-width: 720px;
}

.final-headline {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.final-sub {
  font-family: var(--sans);
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-muted);
  margin-top: 24px;
  max-width: 48ch;
}

.final-cta .waitlist-form {
  margin-top: 40px;
}

/* -------- footer -------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 56px;
  padding-bottom: 56px;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 64px;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-tag {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 56ch;
  text-align: left;
}

@media (min-width: 720px) {
  .footer-meta { text-align: right; }
}

.footer-legal {
  line-height: 1.55;
}

/* -------- reveal on scroll -------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 700ms ease, transform 700ms ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .waitlist-button span,
  .header-cta,
  .waitlist-button {
    transition: none;
  }
}
