/* ==========================================================================
   NetSmart nonprofit partners: Giving Tuesday links page
   Brand tokens and fonts match the NetSmart website (css/styles.css).
   Mobile first: 2 columns on phones, 3 from 720px (1 column under 300px).
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "GW Grack Condensed";
  src: url("fonts/GWGrack-Condensed.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --navy:      #32365e;
  --navy-deep: #23253f;
  --green:     #66bc46;
  --paper:     #f7f4ed;
  --ink:       #23252f;
  --ink-soft:  #565c70;
  --white:     #ffffff;
  --line:      rgba(50, 54, 94, 0.14);

  --font-display: "GW Grack Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --shadow: 0 2px 8px rgba(35, 37, 63, 0.06), 0 10px 24px -14px rgba(35, 37, 63, 0.35);
  --shadow-lift: 0 4px 10px rgba(35, 37, 63, 0.08), 0 24px 40px -22px rgba(35, 37, 63, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --cols: 2;
  --col-gap: 0.85rem;
  --row-gap: 1.4rem;
}

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  position: relative;
}

/* Subtle paper grain, as on the NetSmart site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--green); color: var(--navy-deep); }

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding:
    clamp(2rem, 6vw, 4.5rem)
    max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-right))
    0
    max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-left));
}

/* ---------- Heading ---------- */
.intro {
  text-align: center;
  margin-bottom: clamp(1.75rem, 5vw, 3.25rem);
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--navy);
  font-size: clamp(3rem, 1rem + 9vw, 6.75rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.lead {
  margin-top: clamp(0.6rem, 1.5vw, 1rem);
  font-weight: 500;
  font-size: clamp(1.1rem, 0.95rem + 1vw, 1.75rem);
  line-height: 1.35;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* ---------- Partner grid ---------- */
.partners {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* centers a short last row, like the graphic */
  gap: var(--row-gap) var(--col-gap);
}

.partners > li {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--col-gap)) / var(--cols));
  max-width: 100%;
}

@media (max-width: 299px) {
  :root { --cols: 1; }
}

@media (min-width: 720px) {
  :root {
    --cols: 3;
    --col-gap: 1.25rem;
    --row-gap: 1.75rem;
  }
}

/* One link per partner: the logo card and the name below it */
.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  height: 100%;
  border-radius: calc(var(--radius) + 4px);
  -webkit-tap-highlight-color: transparent;
}

.partner__card {
  --pad: clamp(0.65rem, 3vw, 1.4rem);
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

@media (min-width: 720px) {
  .partner__card { aspect-ratio: 2 / 1; }
}

.partner__card img {
  position: absolute;
  inset: var(--pad);
  width: calc(100% - 2 * var(--pad));
  height: calc(100% - 2 * var(--pad));
  object-fit: contain;
}

.partner__name {
  max-width: 22ch;
  font-weight: 600;
  font-size: clamp(0.92rem, 0.86rem + 0.3vw, 1.05rem);
  line-height: 1.3;
  color: var(--navy);
  text-align: center;
  text-wrap: balance;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.2s ease;
}

.partner:hover .partner__card,
.partner:focus-visible .partner__card {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.partner:hover .partner__name,
.partner:focus-visible .partner__name {
  text-decoration-color: var(--green);
}

.partner:active .partner__card { transform: translateY(-1px); }

.partner:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

/* ---------- NetSmart footer (styled after the Dubuque Shops footer) ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 8vw, 5.5rem);
  color: rgba(255, 255, 255, 0.86);
  background-color: var(--navy);
  /* faint contour lines */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480' viewBox='0 0 480 480' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1.5'%3E%3Cpath d='M0 40 C 80 22 160 22 240 40 S 400 58 480 40'/%3E%3Cpath d='M-160 110 C -80 84 0 84 80 110 S 240 136 320 110 C 400 84 480 84 560 110 S 720 136 800 110'/%3E%3Cpath d='M-60 185 C 20 171 100 171 180 185 S 340 199 420 185 C 500 171 580 171 660 185 S 820 199 900 185'/%3E%3Cpath d='M-220 255 C -140 225 -60 225 20 255 S 180 285 260 255 C 340 225 420 225 500 255 S 660 285 740 255'/%3E%3Cpath d='M-110 330 C -30 310 50 310 130 330 S 290 350 370 330 C 450 310 530 310 610 330 S 770 350 850 330'/%3E%3Cpath d='M-30 400 C 50 376 130 376 210 400 S 370 424 450 400 C 530 376 610 376 690 400 S 850 424 930 400'/%3E%3Cpath d='M-190 455 C -110 443 -30 443 50 455 S 210 467 290 455 C 370 443 450 443 530 455 S 690 467 770 455'/%3E%3C/svg%3E");
  background-size: 480px 480px;
}

.site-footer__wave {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  display: block;
  width: 100%;
  height: clamp(18px, 3vw, 40px);
  fill: var(--navy);
}

.site-footer__inner {
  max-width: 1100px;
  margin-inline: auto;
  padding:
    clamp(2.25rem, 6vw, 3.75rem)
    max(clamp(1.25rem, 5vw, 2.5rem), env(safe-area-inset-right))
    max(1.75rem, env(safe-area-inset-bottom))
    max(clamp(1.25rem, 5vw, 2.5rem), env(safe-area-inset-left));
}

.about { max-width: 46rem; }

.about__logo {
  width: clamp(230px, 64vw, 340px);
  margin-bottom: clamp(1.5rem, 3.5vw, 2rem);
}

.about h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--white);
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin-bottom: 1rem;
}

.about p {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
  line-height: 1.65;
  text-wrap: pretty;
}
.about p + p { margin-top: 0.85rem; }

.about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 4vw, 2rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s var(--ease);
}
.btn--green { background: var(--green); color: var(--navy-deep); }
.btn--green:hover { background: #76d152; transform: translateY(-1px); }
.btn--outline { color: var(--white); box-shadow: inset 0 0 0 2px var(--white); }
.btn--outline:hover { background: var(--white); color: var(--navy); }
.btn:focus-visible,
.site-footer__bottom a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.site-footer__bottom {
  margin-top: clamp(2.25rem, 6vw, 3.25rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.95rem;
}

.site-footer__bottom ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer__bottom a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: rgba(102, 188, 70, 0.8);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.site-footer__bottom a:hover { color: #a9dd92; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
}

@media (max-width: 479px) {
  .about__actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .partner__card,
  .partner__name { transition: none; }
  .partner:hover .partner__card,
  .partner:focus-visible .partner__card,
  .partner:active .partner__card { transform: none; }
  .btn { transition: none; }
  .btn--green:hover { transform: none; }
}
