/*
 * Eagle Academy Foundation report gate.
 * Gate styles are scoped to .eaf-download-page (normally the body).
 * The final section styles only hooks added by report-download.js; enqueue this
 * stylesheet on both the standalone gate and the static report.
 * Fonts are intentionally not fetched here. Reuse or self-host the brand fonts.
 */
.eaf-download-page {
  --eaf-ink: #0d0d0d;
  --eaf-panel: #191817;
  --eaf-bone: #f5f0eb;
  --eaf-muted: #bdb6ae;
  --eaf-crimson: #c41e3a;
  --eaf-gold: #d4a843;
  --eaf-rule: #62584b;
  --eaf-display: "Oswald", "Arial Narrow", sans-serif;
  --eaf-body: "Source Serif 4", Georgia, serif;
  --eaf-mono: "Space Mono", "Courier New", monospace;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--eaf-ink);
  color: var(--eaf-bone);
  font-family: var(--eaf-body);
  font-size: 1rem;
  line-height: 1.65;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

.eaf-download-page,
.eaf-download-page *,
.eaf-download-page *::before,
.eaf-download-page *::after {
  box-sizing: border-box;
}

.eaf-download-page [hidden] {
  display: none !important;
}

.eaf-download-page ::selection {
  background: var(--eaf-gold);
  color: var(--eaf-ink);
}

.eaf-download-page a {
  color: var(--eaf-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.eaf-download-page a:hover {
  color: var(--eaf-bone);
}

.eaf-download-page :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--eaf-gold);
  outline-offset: 4px;
}

.eaf-download-page .eaf-layout {
  width: min(100% - 3rem, 1160px);
  margin-inline: auto;
  padding-block: clamp(2rem, 6vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.eaf-download-page .eaf-intro {
  min-width: 0;
  padding-block: 0.5rem 1rem;
}

.eaf-download-page .eaf-eyebrow {
  margin: 0 0 1.5rem;
  color: var(--eaf-gold);
  font-family: var(--eaf-mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eaf-download-page .eaf-title {
  margin: 0 0 1.75rem;
  font-family: var(--eaf-display);
  font-size: clamp(3rem, 6.8vw, 5.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.eaf-download-page .eaf-title::after {
  content: "";
  display: block;
  width: 5rem;
  height: 4px;
  margin-top: 1.75rem;
  background: var(--eaf-crimson);
}

.eaf-download-page .eaf-title span {
  color: var(--eaf-gold);
}

.eaf-download-page .eaf-description {
  max-width: 42ch;
  margin: 0 0 1.5rem;
  color: var(--eaf-bone);
  font-size: clamp(1.125rem, 1.8vw, 1.35rem);
  line-height: 1.65;
}

.eaf-download-page .eaf-meta {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-block: 1px solid var(--eaf-rule);
  color: var(--eaf-muted);
  font-family: var(--eaf-mono);
  font-size: 0.75rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.eaf-download-page .eaf-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.75rem;
  padding-block: 0.5rem;
  font-family: var(--eaf-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eaf-download-page .eaf-card {
  min-width: 0;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--eaf-rule);
  border-top: 4px solid var(--eaf-crimson);
  background: var(--eaf-panel);
}

.eaf-download-page .eaf-card :where(h2, h3) {
  margin: 0 0 0.75rem;
  font-family: var(--eaf-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.eaf-download-page .eaf-card > p {
  margin: 0 0 1.5rem;
  color: var(--eaf-muted);
}

.eaf-download-page .eaf-field {
  min-width: 0;
  margin-bottom: 1.25rem;
}

.eaf-download-page .eaf-field label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--eaf-bone);
  font-family: var(--eaf-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.04em;
}

.eaf-download-page .eaf-field label :where(span, small) {
  color: var(--eaf-muted);
  font-weight: 400;
}

.eaf-download-page .eaf-field :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0.8rem 0.875rem;
  border: 1px solid #928574;
  border-radius: 0;
  background: var(--eaf-bone);
  color: var(--eaf-ink);
  font-family: var(--eaf-body);
  font-size: 1rem;
  line-height: 1.5;
  color-scheme: light;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.eaf-download-page .eaf-field :where(input, textarea)::placeholder {
  color: #675f57;
  opacity: 1;
}

.eaf-download-page .eaf-field :where(input, select, textarea):focus {
  border-color: var(--eaf-gold);
  box-shadow: 0 0 0 1px var(--eaf-gold);
}

.eaf-download-page .eaf-field :where(input, select, textarea)[aria-invalid="true"] {
  border: 2px solid var(--eaf-crimson);
}

/* Native validation is preserved; no script intercepts the form submission. */
@supports selector(input:user-invalid) {
  .eaf-download-page .eaf-field input:user-invalid {
    border: 2px solid var(--eaf-crimson);
  }
}

.eaf-download-page .eaf-field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 1rem;
}

.eaf-download-page .eaf-field :where(small, .eaf-hint) {
  display: block;
  margin-top: 0.375rem;
  color: var(--eaf-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.eaf-download-page :where(.eaf-error, .eaf-success) {
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--eaf-rule);
  border-left: 4px solid var(--eaf-crimson);
  background: var(--eaf-ink);
  color: var(--eaf-bone);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.eaf-download-page .eaf-success {
  border-left-color: var(--eaf-gold);
}

.eaf-download-page :where(.eaf-error, .eaf-success) > :first-child {
  margin-top: 0;
}

.eaf-download-page :where(.eaf-error, .eaf-success) > :last-child {
  margin-bottom: 0;
}

.eaf-download-page .eaf-field .eaf-error {
  margin: 0.5rem 0 0;
  padding: 0.25rem 0 0.25rem 0.625rem;
  border-width: 0 0 0 3px;
  background: transparent;
  font-size: 0.875rem;
}

.eaf-download-page .eaf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 54px;
  margin: 0.25rem 0 0;
  padding: 1rem 1.25rem;
  border: 2px solid var(--eaf-gold);
  border-radius: 0;
  background: var(--eaf-gold);
  color: var(--eaf-ink);
  font-family: var(--eaf-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.eaf-download-page .eaf-submit:hover:not(:disabled) {
  border-color: #e5b85c;
  background: #e5b85c;
  color: var(--eaf-ink);
}

.eaf-download-page .eaf-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.eaf-download-page .eaf-privacy {
  margin: 1.25rem 0 0;
  color: var(--eaf-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.eaf-download-page .eaf-privacy a {
  display: inline-block;
  min-height: 44px;
  padding-block: 0.5rem;
}

/* Honeypot: parent must set aria-hidden="true" on its wrapper and tabindex="-1"
 * plus autocomplete="off" on the input. CSS alone cannot remove keyboard focus.
 */
.eaf-download-page .eaf-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) {
  .eaf-download-page .eaf-layout {
    width: min(100% - 2.5rem, 640px);
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .eaf-download-page .eaf-description {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .eaf-download-page .eaf-layout {
    width: calc(100% - 2rem);
    padding-block: 1.75rem 2.5rem;
  }

  .eaf-download-page .eaf-card {
    padding: 1.25rem;
  }

  .eaf-download-page .eaf-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .eaf-download-page .eaf-title {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
}

/* Static-report hooks: no general nav, hero, footer, body or anchor overrides. */
.eaf-report-download-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0.625rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 0;
  font-family: "Space Mono", "Courier New", monospace;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.eaf-report-download-link:focus-visible {
  outline: 3px solid #d4a843;
  outline-offset: 3px;
}

.eaf-report-download-link--desktop {
  padding: 0.5rem 0.75rem;
  color: #d4a843;
  font-size: 10px;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.eaf-report-download-link--desktop:hover {
  background: #0d0d0d;
  color: #f5f0eb;
}

/* The existing desktop list is absolutely centered and has nine links. Keep
 * the additional tenth link reachable at narrow desktop widths and zoom.
 */
.eaf-report-download-nav-group {
  max-width: calc(100% - 2rem);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #d4a843 #0d0d0d;
}

.eaf-report-download-nav-group > a {
  flex-shrink: 0;
  white-space: nowrap;
}

.eaf-report-download-link--mobile {
  justify-content: flex-start;
  padding: 0.75rem 1rem;
  border-left: 2px solid #d4a843;
  background: #d4a8430d;
  color: #d4a843;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

.eaf-report-download-link--mobile:hover {
  background: #d4a8431a;
  color: #f5f0eb;
}

.eaf-report-download-link--hero,
.eaf-report-download-link--footer {
  min-height: 54px;
  padding: 1rem 1.75rem;
  border: 2px solid #f5f0eb;
  background: #0d0d0d;
  color: #f5f0eb;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-align: center;
}

.eaf-report-download-link--hero:hover,
.eaf-report-download-link--footer:hover {
  border-color: #d4a843;
  background: #d4a843;
  color: #0d0d0d;
}

.eaf-report-download-link--footer {
  border-color: #0d0d0d;
  background: #f5f0eb;
  color: #0d0d0d;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
}

.eaf-report-download-link--footer:focus-visible {
  outline-color: #0d0d0d;
}

@media (max-width: 639px) {
  .eaf-report-download-link--footer {
    width: min(100%, 20rem);
  }
}

@media (max-width: 380px) {
  .eaf-report-download-link--hero {
    width: 100%;
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eaf-download-page *,
  .eaf-download-page *::before,
  .eaf-download-page *::after,
  .eaf-report-download-link {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Homepage action group: desktop row, mobile primary row plus two side-by-side actions. */
.eaf-report-hero-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem;
  max-width: 100%;
}
.eaf-report-hero-actions > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  white-space: nowrap;
}
.eaf-report-donate-link {
  border-color: #c41e3a;
  background: #c41e3a;
  color: #f5f0eb;
}
.eaf-report-donate-link:hover {
  border-color: #a71931;
  background: #a71931;
  color: #f5f0eb;
}
@media (max-width: 639px) {
  .eaf-report-hero-actions {
    gap: 0.75rem;
  }
  .eaf-report-hero-actions > a:first-child {
    flex: 1 0 100%;
    width: 100%;
  }
  .eaf-report-hero-actions > .eaf-report-download-link--hero {
    flex: 1 1 calc(50% - 0.375rem);
    width: auto;
    min-width: 0;
    padding-inline: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.07em;
  }
}

@media (max-width: 639px) {
  #hero > .absolute.bottom-8 {
    bottom: 0.75rem;
    gap: 0;
    pointer-events: none;
  }
}
