/* =========================================================
   AAPG Foundation — Donation Page
   donate.aapgfoundation.org
   ========================================================= */

/* ----- Custom Properties ----- */
:root {
  --color-primary:       #4b7d9b;
  --color-primary-dark:  #3a6278;
  --color-secondary:     #a6bbcc;
  --color-bg:            #f4f4f4;
  --color-white:         #ffffff;
  --color-text:          #2d2d2d;
  --color-text-muted:    #5f6b72;
  --color-border:        #d9e3ea;

  --font-heading:        'Poppins', system-ui, sans-serif;
  --font-body:           'Inter', system-ui, sans-serif;

  --container-max:       1200px;
  --container-padding:   1.5rem;
  --section-padding:     4rem;
  --column-gap:          3rem;
  --border-radius:       8px;

  --header-height:       94px;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--color-primary-dark);
}

/* Keyboard focus ring — visible only for keyboard users */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* ----- Skip Link (accessibility) ----- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ----- Container ----- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  width: 100%;
}

/* ----- Header ----- */
.site-header {
  background-color: var(--color-primary);
  border-bottom: 3px solid var(--color-primary-dark);
  padding-block: 0.875rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-link {
  display: inline-flex;
  text-decoration: none;
}

.logo {
  height: 70px; /* renders at ~182px wide given 260x100 source ratio */
  width: auto;
}

/* ----- Main ----- */
main {
  flex: 1;
}

.hero {
  padding-block: var(--section-padding);
}

/* ----- Two-Column Grid ----- */
.content-grid {
  display: flex;
  gap: var(--column-gap);
  align-items: flex-start;
}

.copy-column {
  flex: 1 1 45%;
  min-width: 0;
}

.form-column {
  flex: 1 1 50%;
  min-width: 0;
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}

.form-column dbox-widget {
  display: block;
  margin: 0 auto;
}

/* ----- Copy Column — Typography ----- */
.copy-column h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.625rem, 4vw, 2.375rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.copy-column .lead {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.copy-column p {
  margin-bottom: 1.25rem;
}

/* ----- Impact Stats ----- */
.impact-highlights {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-border);
}

.impact-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 80px;
}

.impact-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.impact-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ----- Donorbox iframe ----- */
.form-column iframe {
  width: 100%;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 24px rgb(0 0 0 / 0.1);
  display: block;
}

/* Placeholder — remove once Donorbox embed is in place */
.form-placeholder {
  background-color: var(--color-white);
  border: 2px dashed var(--color-secondary);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-text-muted);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

/* Noscript fallback notice */
.noscript-notice {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: #fff8e1;
  border: 1px solid #f0c040;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  text-align: center;
}

/* ----- Footer ----- */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-org a {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.075rem;
  text-decoration: none;
}

.footer-org a:hover,
.footer-org a:focus {
  color: var(--color-secondary);
}

.footer-legal {
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.8);
  max-width: 580px;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgb(255 255 255 / 0.75);
  font-size: 0.875rem;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-white);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgb(255 255 255 / 0.15);
  color: var(--color-white);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus {
  background-color: rgb(255 255 255 / 0.3);
}

.footer-social svg {
  fill: currentColor;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgb(255 255 255 / 0.55);
}

/* ----- Responsive: Tablet / Mobile ----- */
@media (max-width: 768px) {
  :root {
    --section-padding: 2.5rem;
    --column-gap: 2rem;
  }

  .content-grid {
    flex-direction: column;
  }

  /* Form comes first on mobile */
  .form-column {
    order: -1;
    position: static; /* disable sticky on mobile */
    width: 100%;
  }

  .copy-column {
    order: 1;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .impact-highlights {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ----- Print ----- */
@media print {
  .site-header {
    position: static;
    box-shadow: none;
  }

  .form-column {
    position: static;
  }

  .site-footer {
    background-color: transparent;
    color: var(--color-text);
  }
}
