/* ═══════════════════════════════════════════════════════════
   RY PDF DOWNLOAD CARD  —  glassmorphic / frosted
   Reusable across all Recover-You article pages.

   Usage: see the markup block in aces-high.html (#why section).
   Only two things change per page: the href and the meta chips.
   ═══════════════════════════════════════════════════════════ */

.ry-pdf-card {
  --ry-pink: #ff2f6e;
  --ry-violet: #7b5cff;
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 17px 20px;
  margin: 26px 0;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  /* frosted glass over a deep ink base */
  background:
    linear-gradient(135deg, rgba(255, 47, 110, 0.10) 0%, rgba(123, 92, 255, 0.10) 100%),
    linear-gradient(160deg, rgba(20, 20, 24, 0.94) 0%, rgba(12, 12, 15, 0.97) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
}

/* Gradient hairline border (drawn as a mask so corners stay crisp) */
.ry-pdf-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(255, 47, 110, 0.75) 0%,
    rgba(255, 255, 255, 0.16) 45%,
    rgba(123, 92, 255, 0.65) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Shimmer sweep on hover */
.ry-pdf-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.13) 50%,
    transparent 100%);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 1;
  transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.ry-pdf-card:hover,
.ry-pdf-card:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 47, 110, 0.20),
    0 0 32px rgba(255, 47, 110, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  text-decoration: none;
  color: inherit;
}

.ry-pdf-card:hover::after,
.ry-pdf-card:focus-visible::after {
  left: 115%;
}

.ry-pdf-card:focus-visible {
  outline: 2px solid var(--ry-pink);
  outline-offset: 3px;
}

/* ── Icon glyphs, self-contained ────────────────────────────
   Some pages load a subsetted Font Awesome build (toxic-stress.min.css,
   for example, ships the glyphs that page used and nothing more), so
   .fa-file-pdf / .fa-arrow-down may be undefined there. Declaring the
   family, weight and codepoints here means the card renders its icons
   on any page regardless of which CSS bundle is loaded.
   f1c1 = file-pdf, f063 = arrow-down.
   ────────────────────────────────────────────────────────── */
.ry-pdf-card .ry-pdf-icon i,
.ry-pdf-card .ry-pdf-action i {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
  font-weight: 900;
  font-style: normal;
  font-variant: normal;
  display: inline-block;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.ry-pdf-card .ry-pdf-icon i::before { content: "\f1c1"; }
.ry-pdf-card .ry-pdf-action i::before { content: "\f063"; }

/* ── Icon ───────────────────────────────────────────────── */
.ry-pdf-icon {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(145deg, var(--ry-pink) 0%, #d81b5c 100%);
  box-shadow: 0 6px 16px rgba(255, 47, 110, 0.34),
              inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ry-pdf-card:hover .ry-pdf-icon {
  transform: scale(1.06) rotate(-4deg);
}

/* ── Copy ───────────────────────────────────────────────── */
.ry-pdf-body {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-width: 0;
}

.ry-pdf-eyebrow {
  display: block;
  font-family: "Poppins", "Montserrat", system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ry-pink);
  margin-bottom: 3px;
}

.ry-pdf-title {
  font-family: "Poppins", "Montserrat", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  margin: 0 0 3px;
}

.ry-pdf-sub {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(225, 225, 232, 0.70);
  margin: 0;
}

/* Meta chips: PDF · 12 pages · 405 KB */
.ry-pdf-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding: 0;
  list-style: none;
}

.ry-pdf-meta li {
  font-family: "Poppins", "Montserrat", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(230, 230, 238, 0.80);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

/* ── Action ─────────────────────────────────────────────── */
.ry-pdf-action {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: "Poppins", "Montserrat", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.ry-pdf-card:hover .ry-pdf-action,
.ry-pdf-card:focus-visible .ry-pdf-action {
  background: var(--ry-pink);
  border-color: var(--ry-pink);
  box-shadow: 0 8px 20px rgba(255, 47, 110, 0.40);
}

.ry-pdf-action i {
  font-size: 11px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ry-pdf-card:hover .ry-pdf-action i {
  transform: translateY(3px);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991px) {
  .ry-pdf-card {
    gap: 15px;
    padding: 16px 18px;
  }
  .ry-pdf-title { font-size: 14.5px; }
}

@media (max-width: 767px) {
  .ry-pdf-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    padding: 18px 17px;
    border-radius: 13px;
  }
  .ry-pdf-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: 10px;
  }
  .ry-pdf-action {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }
}

/* ═══════════════════════════════════════════════════════════
   RY PDF PILL  —  small inline badge for index/roadmap lists
   Used on start-here.html to flag which roadmap entries have a
   printable PDF. Sits as the last flex child of the list row so
   it never interrupts the sentence and lines up in a right rail.
   ═══════════════════════════════════════════════════════════ */

.ry-pdf-pill {
  --ry-pink: #ff2f6e;
  flex: 0 0 auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0 0 14px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 47, 110, 0.45);
  background: rgba(255, 47, 110, 0.06);
  color: var(--ry-pink);
  font-family: "Poppins", "Montserrat", system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.6;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.22s ease;
}

.ry-pdf-pill::before {
  content: "\f1c1";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
  font-weight: 900;
  font-style: normal;
  font-size: 9px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.ry-pdf-pill:hover,
.ry-pdf-pill:focus-visible {
  background: var(--ry-pink);
  border-color: var(--ry-pink);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.ry-pdf-pill:focus-visible {
  outline: 2px solid var(--ry-pink);
  outline-offset: 2px;
}

/* Non-interactive copy of the pill, for use inside explanatory text */
.ry-pdf-pill--demo {
  margin: 0 2px;
  vertical-align: 1px;
  cursor: default;
  pointer-events: none;
}

/* Beat the list's own anchor styling on start-here */
#phases .page-list a.ry-pdf-pill {
  display: inline-flex;
  font-family: "Poppins", "Montserrat", system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--ry-pink);
  background-image: none;
  padding-bottom: 3px;
}

#phases .page-list a.ry-pdf-pill:hover,
#phases .page-list a.ry-pdf-pill:focus {
  color: #fff;
  background-image: none;
  background-size: 0 0;
}

@media (max-width: 575px) {
  .ry-pdf-pill {
    margin-left: 10px;
    padding: 2px 7px;
    font-size: 9px;
  }
}

/* ── Accessibility ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ry-pdf-card,
  .ry-pdf-card::after,
  .ry-pdf-icon,
  .ry-pdf-action,
  .ry-pdf-action i {
    transition: none;
  }
  .ry-pdf-card:hover { transform: none; }
  .ry-pdf-card:hover .ry-pdf-icon { transform: none; }
  .ry-pdf-card:hover .ry-pdf-action i { transform: none; }
}
