/*
 * /tools/ hub.
 *
 * Every text element inside the link cards is a <span>, so each one is
 * explicitly set to display:block — inline spans would run the eyebrow, title
 * and body together on one line at three different sizes.
 */

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hub-hero {
  display: grid; gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center; margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 900px) {
  .hub-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
.hub-hero-copy { min-width: 0; }

.hub-hero-proof {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem;
  margin-top: 1.4rem; font-size: 0.86rem; color: var(--bpt-subtle); font-weight: 600;
}
.hub-hero-proof strong { color: var(--bpt-ink); font-weight: 800; }
.hub-dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }

/* Two overlapping device shots — depth without a stock photo.
   The source images are full-length phone screenshots, so each frame fixes a
   phone aspect ratio and crops to the top of the screen. Without that the tall
   images size themselves off their own height and spill over the page. */
.hub-hero-media { position: relative; height: 24rem; display: none; }
@media (min-width: 900px) { .hub-hero-media { display: block; } }

/* Below 900px the device shots are hidden and the grid drops to one column, but the
   shared heading and standfirst keep the reading measures they were given for a
   two-column hero (20ch / 60ch). The result was a hero with nothing on the right and
   copy that refused to grow into it. When the artwork is gone the copy takes the width
   back; above 900px nothing here applies and the two-column composition is untouched. */
@media (max-width: 899px) {
  .hub-hero-copy .bpt-h1 { max-width: 26ch; }
  .hub-hero-copy .bpt-standfirst { max-width: none; }
}
.hub-device {
  position: absolute;
  width: 10.5rem; aspect-ratio: 9 / 19.5;
  border-radius: 1.4rem; overflow: hidden;
  background: #0a1220; border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.65);
}
.hub-device img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}
.hub-device--back { top: 0; right: 1.5rem; transform: rotate(5deg); opacity: 0.92; }
.hub-device--front { bottom: 0; left: 1.5rem; transform: rotate(-4deg); }

/* ── Featured ───────────────────────────────────────────────────────────── */
.hub-featured {
  display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: 1.5rem; text-decoration: none; overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0) 55%),
    linear-gradient(150deg, #0b1220 0%, #17233d 100%);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 22px 55px -34px rgba(15, 23, 42, 0.85);
}
.hub-featured:hover { transform: translateY(-3px); box-shadow: 0 30px 70px -34px rgba(15, 23, 42, 0.95); }
@media (min-width: 780px) {
  .hub-featured { grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr); }
}
.hub-featured-copy { min-width: 0; }

/* display:block on each — this is what stops the three lines merging. */
.hub-featured-eyebrow {
  display: block;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: #93c5fd;
}
.hub-featured-title {
  display: block; margin: 0.6rem 0 0;
  font-family: "Sora", "Manrope", sans-serif; font-weight: 800;
  font-size: clamp(1.4rem, 3.2vw, 2rem); letter-spacing: -0.03em;
  line-height: 1.15; color: #fff; max-width: 18ch;
}
.hub-featured-sub {
  display: block; margin: 0.75rem 0 0;
  font-size: clamp(0.92rem, 0.4vw + 0.85rem, 1rem); line-height: 1.6;
  color: #cbd5e1; max-width: 46ch;
}
.hub-featured-go {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1.35rem;
  padding: 0.8rem 1.5rem; border-radius: 0.75rem;
  background: #fff; color: #0b1220; font-weight: 800; font-size: 0.95rem;
}
.hub-featured-go svg { width: 0.95rem; height: 0.95rem; }
.hub-featured:hover .hub-featured-go { background: #eff6ff; }

.hub-featured-media { display: none; }
@media (min-width: 780px) {
  .hub-featured-media {
    display: block; margin-left: auto;
    width: 11rem; aspect-ratio: 9 / 19.5;
    border-radius: 1.4rem; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.85);
    transform: rotate(3deg);
  }
}
.hub-featured-media img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}

/* ── Tool cards ─────────────────────────────────────────────────────────── */
.hub-grid {
  display: grid; gap: 1rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.hub-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 1.1rem; border: 1px solid var(--bpt-border);
  background: #fff; text-decoration: none; color: var(--bpt-ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.hub-card:hover {
  transform: translateY(-3px); border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 20px 44px -30px rgba(15, 23, 42, 0.6);
}

/* Screenshot crops to the top of the shot — the interesting part of a phone
   screen — rather than letterboxing a tall image into a short slot. */
.hub-card-shot {
  display: block; height: 10rem; overflow: hidden;
  background: linear-gradient(160deg, #0b1220 0%, #1b2a47 100%);
  border-bottom: 1px solid var(--bpt-border);
}
.hub-card-shot img {
  display: block; width: 8.5rem; height: 100%;
  margin: 1.1rem auto 0;
  object-fit: cover; object-position: top center;
  border-radius: 0.7rem 0.7rem 0 0;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.9);
}

.hub-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
.hub-card-name { display: block; font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; }
.hub-card-sub {
  display: block; margin-top: 0.35rem; flex: 1;
  font-size: 0.87rem; line-height: 1.55; color: var(--bpt-subtle);
}
.hub-card-go {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.9rem;
  font-size: 0.83rem; font-weight: 700; color: var(--bpt-accent-strong);
}
.hub-card-go svg { width: 0.85rem; height: 0.85rem; transition: transform 0.18s ease; }
.hub-card:hover .hub-card-go svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .hub-featured, .hub-card, .hub-card-go svg { transition: none; }
  .hub-featured:hover, .hub-card:hover { transform: none; }
}
