/* ==========================================================================
   downloads.css – Downloads page (Figma frame "downloads" 1:4447, 1920 × 3440)
   1 Figma px = var(--u). Shared hero, .pill-tabs live in pages.css.
   ========================================================================== */

.resources { position: relative; padding-top: calc(96 * var(--u)); }
.resources__triangles { position: absolute; width: calc(224 * var(--u)); height: calc(588 * var(--u)); max-width: none; pointer-events: none; }
/* Figma 1:4448 (x -72, y 360) and 1:4474 (x 1699, y 2097) */
.resources__triangles--left { left: calc(-2 * var(--u)); top: calc(-228 * var(--u)); }
.resources__triangles--right { right: 0; top: calc(1509 * var(--u)); width: calc(221 * var(--u)); z-index: -1; }
.resources__head { position: relative; width: calc(1600 * var(--u)); margin-inline: auto; }
.resources__sub {
  width: calc(1054 * var(--u));
  margin: calc(16 * var(--u)) auto 0;
  color: var(--c-text);
  font-size: calc(24 * var(--u));
  line-height: calc(36 * var(--u));
  text-align: center;
}
.resources .pill-tabs { margin-top: calc(64 * var(--u)); }

/* ---------- Document cards (Figma 1:4518 – 376 × 512 white frame, 340 × 480 cover) ---------- */
.doc-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: calc(32 * var(--u));
  row-gap: calc(56 * var(--u));
  margin-top: calc(40 * var(--u));
}
.doc[hidden] { display: none; }
.doc__card {
  position: relative;
  height: calc(512 * var(--u));
  padding: calc(16 * var(--u)) calc(18 * var(--u));
  background: #fff;
  box-shadow: 0 0 calc(16 * var(--u)) rgba(0, 0, 0, 0.16);
}
.doc__cover { display: block; width: 100%; height: 100%; object-fit: cover; }
/* hover state (Figma card 1): #185697 fade, white corner cuts, Download button */
.doc__shade {
  position: absolute; inset: calc(16 * var(--u)) calc(18 * var(--u));
  background: linear-gradient(to bottom, rgba(24, 86, 151, 0) 0%, rgba(24, 86, 151, 0.6) 39%, #033160 94%);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}
.doc__shade::before, .doc__shade::after {
  content: ""; position: absolute;
  width: calc(40 * var(--u)); height: calc(40 * var(--u));
  background: #fff;
}
.doc__shade::before { left: calc(8 * var(--u)); top: calc(8 * var(--u)); clip-path: polygon(0 0, 100% 0, 0 100%); }
.doc__shade::after { right: calc(8 * var(--u)); bottom: calc(8 * var(--u)); clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* Download button – Figma component 1:169 (white / #0284c7), hover Variant2 (#0284c7 / white) */
.doc__btn {
  position: absolute; left: 50%; top: 50%;
  display: inline-flex; align-items: center; gap: calc(16 * var(--u));
  padding: calc(12 * var(--u)) calc(32 * var(--u));
  border-radius: calc(32 * var(--u));
  background: #fff;
  color: var(--c-blue);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
  text-transform: uppercase;
  width: max-content;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 12 * var(--u)));
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), background-color 0.3s, color 0.3s;
}
.doc__btn img { flex: none; width: calc(20 * var(--u)); height: calc(20 * var(--u)); transition: filter 0.3s; }
.doc__btn:hover, .doc__btn:focus-visible { background: var(--c-blue); color: #fff; }
.doc__btn:hover img, .doc__btn:focus-visible img { filter: brightness(0) invert(1); }

.doc__card:hover .doc__shade, .doc__card:focus-within .doc__shade { opacity: 1; }
.doc__card:hover .doc__btn, .doc__card:focus-within .doc__btn { opacity: 1; transform: translate(-50%, -50%); }

.doc__title {
  margin-top: calc(16 * var(--u));
  color: #000;
  font-weight: 600;
  font-size: calc(28 * var(--u));
  line-height: calc(40 * var(--u));
}
.doc-notice {
  margin-top: calc(32 * var(--u));
  color: var(--c-text);
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
  text-align: center;
}
.doc-notice:empty { display: none; }

/* touch screens have no hover: keep the Download button visible */
@media (hover: none) {
  .doc__shade { opacity: 1; }
  .doc__btn { opacity: 1; transform: translate(-50%, -50%); }
}

/* ==========================================================================
   TABLET + MOBILE (< 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .resources { padding-top: 64px; }
  .resources__triangles { display: none; }
  .resources__head { width: auto; padding-inline: var(--gutter); }
  .resources .section-title { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.25; }
  .resources__sub { width: auto; max-width: 640px; margin-top: 12px; font-size: 17px; line-height: 1.6; }
  .resources .pill-tabs { margin-top: 32px; }

  .doc-grid { grid-template-columns: repeat(3, 1fr); column-gap: 20px; row-gap: 32px; margin-top: 32px; }
  .doc__card { height: auto; aspect-ratio: 376 / 512; padding: 4.26% 4.79%; box-shadow: 0 0 12px rgba(0, 0, 0, 0.14); }
  .doc__shade { inset: 4.26% 4.79%; }
  .doc__shade::before, .doc__shade::after { width: 28px; height: 28px; }
  .doc__shade::before { left: 6px; top: 6px; }
  .doc__shade::after { right: 6px; bottom: 6px; }
  .doc__btn { gap: 10px; padding: 8px 20px; border-radius: 32px; font-size: 15px; line-height: 24px; }
  .doc__btn img { flex: none; width: 16px; height: 16px; }
  .doc__title { margin-top: 12px; font-size: 18px; line-height: 26px; }
  .doc__title br { display: none; }
  .doc-notice { margin-top: 24px; font-size: 16px; line-height: 24px; }
}

@media (max-width: 767.98px) {
  .doc-grid { grid-template-columns: repeat(2, 1fr); column-gap: 16px; row-gap: 28px; }
  .doc__btn { padding: 7px 16px; font-size: 13px; line-height: 20px; gap: 8px; }
  .doc__title { font-size: 16px; line-height: 24px; }
}
