/* ═══ Untapped Agents — resources.html ═══ */
/* Premium Editorial Magazine Experience */

/* ═══ HERO ═══ */
.rhero {
  padding: 10rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg0);
}

/* Gradient mesh background with layered radials */
.rhero::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at 30% 40%, rgba(0, 0, 0, 0.03), transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.02), transparent 50%);
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

/* Subtle noise texture overlay */
.rhero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='2' /%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  opacity: 0.5;
}

.rhero > * {
  position: relative;
  z-index: 2;
}

.rhero h1 {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--tbr);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.rhero h1 em {
  font-style: normal;
  color: var(--cy);
  font-weight: 600;
}

/* Decorative thin rule line under subtitle */
.rhero p {
  font-size: 1.05rem;
  color: var(--tmd);
  max-width: 580px;
  margin: 0 auto 1.5rem;
  font-weight: 400;
  line-height: 1.8;
  position: relative;
  padding-bottom: 1.5rem;
}

.rhero p::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bdrh), transparent);
}

/* ═══ FILTER TABS ═══ */
.filters {
  /* Symmetric 4rem so the centered pills sit on the true page center
     (right 4rem clears the .hh-burger, left 4rem balances it). */
  padding: 0.5rem 4rem;
  border-bottom: 1px solid var(--bdr);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.filters-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-inner::-webkit-scrollbar {
  display: none;
}

/* Center the filter pills under the centered hero. Auto-margins center the
   group when it fits, and collapse to 0 when the row overflows on narrow
   screens — so it stays start-aligned and fully scrollable on mobile with no
   clipped first pill (which plain justify-content:center would cause). */
.filters-inner > .ftag:first-child { margin-left: auto; }
.filters-inner > .ftag:last-child  { margin-right: auto; }

.ftag {
  padding: 0.55rem 1.15rem;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tmd);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--bdr);
  background: var(--bg0);
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  white-space: nowrap;
  border-radius: 980px;
  position: relative;
  overflow: hidden;
}

.ftag::before {
  display: none;
}

.ftag:hover {
  border-color: var(--bdrh);
  color: var(--tl);
  background: var(--bg1);
}

.ftag:hover::before {
  display: none;
}

/* Active tab */
.ftag.act {
  background: var(--tl);
  border-color: var(--tl);
  color: var(--bg0);
}

.ftag.act::before {
  display: none;
}

/* ═══ BLOG GRID ═══ */
.blog-grid {
  padding: 3rem 2rem 4rem;
}

.bg-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* ═══ BLOG CARD ═══ */
.bc {
  border: 1px solid var(--bdr);
  background: var(--bg0);
  border-radius: 18px;
  transition: all 0.4s var(--ease-spring);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  box-shadow: var(--shadow-s, 0 1px 3px rgba(0, 0, 0, 0.08));
}

/* Top edge — clean subtle line */
.bc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--bdr);
  z-index: 2;
}

.bc:hover {
  border-color: var(--bdrh);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.bc-top {
  padding: 2rem 2rem 1.25rem;
  flex: 1;
}

.bc-tag {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tmd);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bc-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--tmd);
  border-radius: 50%;
  flex-shrink: 0;
}

.bc-num {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tmd);
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  opacity: 0.5;
}

/* h3 with Instrument Serif for personality + underline-draw animation */
.bc h3 {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--tbr);
  line-height: 1.4;
  margin-bottom: 0.65rem;
  transition: color 0.3s var(--ease-spring);
  position: relative;
  padding-bottom: 0.35rem;
}

.bc h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--tbr);
  transition: width 0.4s var(--ease-spring);
}

.bc:hover h3 {
  color: var(--tbr);
}

.bc:hover h3::after {
  width: 100%;
}

.bc p {
  font-size: 0.95rem;
  color: var(--tmd);
  line-height: 1.7;
}

.bc-bot {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--bdr);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Read more with animated arrow */
.bc-read {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tmd);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.3s var(--ease-spring);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.bc-read::after {
  content: '→';
  display: inline-block;
  transition: transform 0.3s var(--ease-spring);
}

.bc:hover .bc-read::after {
  transform: translateX(4px);
}

/* Reading time with subtle clock icon */
.bc-time {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tmd);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.bc-time::before {
  content: '🕐';
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ═══ FEATURED CARD ═══ */
.bc.ft {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-color: var(--bdrh, var(--bdr));
  background: var(--bg0);
  position: relative;
}

.bc.ft::before {
  display: none;
}

.bc.ft:hover {
  border-color: var(--bdrh);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .1);
}

.bc.ft .bc-top {
  padding: 3rem 3rem 1.5rem;
  position: relative;
  z-index: 2;
}

.bc.ft h3 {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 500;
}

/* FEATURED pill badge floating at top-left */
.bc.ft .bc-feat-label {
  position: absolute;
  top: -0.6rem;
  left: 2rem;
  background: var(--tl);
  color: var(--bg0);
  padding: 0.35rem 0.8rem;
  border-radius: 980px;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 3;
}

/* Left panel */
.bc.ft .bc-feat {
  background: var(--bg1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--bdr);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.bc.ft .bc-feat::after {
  display: none;
}

.bc.ft .bc-feat .feat-icon {
  font-size: 4rem;
  position: relative;
  z-index: 1;
  opacity: 0.85;
  transition: transform 0.4s var(--ease-spring);
}

.bc.ft:hover .bc-feat .feat-icon {
  transform: scale(1.08) rotate(2deg);
}

.bc.ft .bc-right {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.bc.ft .bc-bot {
  margin-top: auto;
}

/* ═══ COLOR VARIANTS ═══ */
.t-cy {
  --bcc: var(--cy);
  --bcc-rgb: 0, 122, 110;
}

.t-gn {
  --bcc: var(--gn);
  --bcc-rgb: 52, 168, 92;
}

.t-or {
  --bcc: var(--or);
  --bcc-rgb: 255, 159, 64;
}

.t-bl {
  --bcc: var(--bl);
  --bcc-rgb: 54, 162, 235;
}

.t-pr {
  --bcc: var(--pr);
  --bcc-rgb: 155, 89, 182;
}

.t-pk {
  --bcc: var(--pk);
  --bcc-rgb: 233, 30, 99;
}

.t-yl {
  --bcc: var(--yl);
  --bcc-rgb: 255, 193, 7;
}

.t-rd {
  --bcc: var(--rd);
  --bcc-rgb: 244, 67, 54;
}

/* ═══ SUBSCRIBE SECTION ═══ */
.sub-sec {
  padding: 0 2rem 4rem;
}

.sub-box {
  max-width: 1140px;
  margin: 0 auto;
  border: 1px solid var(--bdr);
  background: var(--bg1);
  border-radius: 18px;
  padding: 3rem;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.sub-box::before {
  content: 'STAY INFORMED';
  position: absolute;
  top: -0.55rem;
  left: 2rem;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cy);
  background: var(--bg0);
  padding: 0 0.75rem;
  letter-spacing: 0.1em;
}

.sub-box h2 {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--tbr);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.sub-box > p {
  color: var(--tmd);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.75;
}

.sub-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.sub-form .sub-fields input {
  flex: 1;
  padding: 0.85rem 1.15rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--bdr);
  border-radius: 12px;
  color: var(--tbr);
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s var(--ease-spring);
  position: relative;
  z-index: 1;
}

/* Expanded mailing-list form: stacked fields, consents, turnstile */
.sub-form { flex-direction: column; }
.sub-fields { display: flex; flex-direction: column; gap: 0.5rem; }
.sub-form button { width: 100%; }
.sub-turnstile { display: flex; justify-content: center; }
.sub-turnstile iframe { margin-top: 0.5rem; }
.sub-consent {
  display: flex; gap: 0.6rem; align-items: flex-start;
  margin-top: 0.6rem; text-align: left;
  font-size: 0.72rem; line-height: 1.55; color: var(--tmd);
  cursor: pointer;
}
.sub-consent input {
  flex: 0 0 auto;
  width: 15px; height: 15px;
  margin-top: 2px; padding: 0;
  accent-color: var(--cy);
}
.sub-consent a { color: var(--cy); }
.sub-error { display: none; font-size: 0.8rem; color: #c0392b; margin-top: 0.35rem; }
.sub-error.visible { display: block; }

.sub-form .sub-fields input::placeholder {
  color: var(--tmd);
}

.sub-form .sub-fields input:focus {
  border-color: var(--tbr);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
  background: var(--bg0);
}

/* Floating label feel */
.sub-form .sub-fields input:focus::placeholder {
  color: transparent;
}

.sub-form button {
  padding: 0.85rem 1.75rem;
  background: var(--cy);
  color: var(--bg0);
  border: none;
  border-radius: 980px;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.25s var(--ease-spring);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.sub-form button:hover {
  background: #009b8f;
}

/* ═══ CTA SECTION ═══ */
.rcta {
  text-align: center;
  padding: 8rem 2rem;
  position: relative;
  overflow: visible;
  background: #1d1d1f;
  color: #f5f5f7;
}

.rcta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 200, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.rcta > * {
  position: relative;
  z-index: 1;
}

.rcta h2 {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.rcta h2 em {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-style: italic;
  font-weight: 400;
  color: var(--cy);
  -webkit-text-fill-color: var(--cy);
  padding-right: .12em;
  margin-right: -.02em;
}

.rcta p {
  font-size: 1rem;
  color: #a1a1a6;
  max-width: 460px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.8;
}

.rcta-acts {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: stagger-in 0.6s var(--ease-spring) 0.3s both;
}

/* Staggered entrance — initial page load only */
@keyframes stagger-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bc {
  animation: stagger-in 0.6s var(--ease-spring);
}

.bc:nth-child(1) { animation-delay: 0.1s; }
.bc:nth-child(2) { animation-delay: 0.2s; }
.bc:nth-child(3) { animation-delay: 0.3s; }
.bc:nth-child(4) { animation-delay: 0.4s; }
.bc:nth-child(5) { animation-delay: 0.5s; }
.bc:nth-child(6) { animation-delay: 0.6s; }

/* Kill ALL motion during filter switch */
.blog-grid.no-motion,
.blog-grid.no-motion *,
.blog-grid.no-motion *::before,
.blog-grid.no-motion *::after {
  animation: none !important;
  transition: none !important;
}

/* ═══ RESPONSIVE: 1024px ═══ */
@media (max-width: 1024px) {
  .bg-inner {
    grid-template-columns: 1fr;
  }

  .bc.ft {
    grid-template-columns: 1fr;
  }

  .bc.ft .bc-feat {
    border-right: none;
    border-bottom: 1px solid var(--bdr);
    padding: 2rem;
  }

  .sub-box {
    padding: 2.5rem 2rem;
  }
}

/* ═══ RESPONSIVE: 768px ═══ */
@media (max-width: 768px) {
  .rhero {
    padding: 7rem 1.5rem 3rem;
  }

  .rhero h1 {
    font-size: 1.8rem;
  }

  .rhero p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .filters {
    padding: 0.75rem 1rem;
  }

  .blog-grid {
    padding: 2rem 1rem 3rem;
  }

  .bg-inner {
    gap: 1.5rem;
  }

  .bc-top {
    padding: 1.5rem;
  }

  .bc h3 {
    font-size: 1.1rem;
  }

  .bc-bot {
    padding: 1rem 1.5rem;
  }

  .bc.ft .bc-top {
    padding: 2rem 1.5rem;
  }

  .bc.ft h3 {
    font-size: 1.3rem;
  }

  .bc.ft .bc-feat {
    padding: 1.5rem;
  }

  .sub-sec {
    padding: 0 1.5rem 3rem;
  }

  .sub-box {
    padding: 2rem 1.5rem;
  }

  .sub-box h2 {
    font-size: 1.4rem;
  }

  .sub-form {
    flex-direction: column;
    max-width: 100%;
  }

  .sub-form .sub-fields input {
    width: 100%;
  }

  .sub-form button {
    width: 100%;
  }

  .rcta {
    padding: 3.5rem 1.5rem 4rem;
  }

  .rcta h2 {
    font-size: 1.5rem;
  }

  .rcta p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .rcta-acts {
    gap: 0.75rem;
  }
}

/* ═══ RESPONSIVE: 480px ═══ */
@media (max-width: 480px) {
  .rhero {
    padding: 5rem 1rem 2rem;
  }

  .rhero h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    line-height: 1.25;
  }

  .rhero p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .rhero p::after {
    width: 40px;
  }

  .filters {
    padding: 0.6rem 0.75rem;
    /* No `top` override here — the bar inherits `top: 0` from the
       base .filters rule (line ~92). An earlier `top: 56px` was
       reserving space for a fixed <nav>, but on this page the nav
       is `position: relative` (see global.css `body:has(.filters)
       nav { position: relative }`) and scrolls away with the page.
       That left a 56px gap above the sticky filter bar where blog
       cards showed through as the user scrolled. */
  }

  .ftag {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  .blog-grid {
    padding: 1.5rem 1rem 2rem;
  }

  .bg-inner {
    gap: 1rem;
  }

  .bc {
    border-radius: 12px;
  }

  .bc::before {
    height: 2px;
  }

  .bc-top {
    padding: 1.25rem;
  }

  .bc-tag {
    font-size: 0.65rem;
    margin-bottom: 0.5rem;
  }

  .bc h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .bc p {
    font-size: 0.9rem;
  }

  .bc-bot {
    padding: 0.75rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .bc-read {
    font-size: 0.7rem;
  }

  .bc-time {
    font-size: 0.7rem;
  }

  .bc.ft {
    grid-template-columns: 1fr;
  }

  .bc.ft .bc-top {
    padding: 1.5rem 1.25rem;
  }

  .bc.ft h3 {
    font-size: 1.2rem;
  }

  .bc.ft .bc-feat {
    padding: 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--bdr);
  }

  .bc.ft .bc-feat .feat-icon {
    font-size: 3rem;
  }

  .bc.ft .bc-feat-label {
    top: -0.5rem;
    left: 1rem;
    font-size: 0.6rem;
    padding: 0.3rem 0.6rem;
  }

  .sub-sec {
    padding: 0 1rem 2rem;
  }

  .sub-box {
    padding: 1.5rem 1rem;
    border-radius: 12px;
  }

  .sub-box::before {
    font-size: 0.65rem;
    left: 1rem;
    top: -0.5rem;
  }

  .sub-box h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .sub-box > p {
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .sub-form {
    gap: 0.35rem;
  }

  .sub-form .sub-fields input {
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
  }

  .sub-form button {
    padding: 0.7rem 1.25rem;
    font-size: 0.8rem;
  }

  .rcta {
    padding: 2.5rem 1rem 3rem;
  }

  .rcta h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }

  .rcta p {
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
  }

  .rcta-acts {
    gap: 0.5rem;
  }
}
