/* ==========================================================================
   InsightBridge Global Lab — layout.css (2026-10-16)
   Top-of-page re-grid: slim launch bar, hero first, featured essays as a
   2-card row, one launch grid. Phone-first spacing for the ~50 % mobile audience.
   Loaded after the inline stylesheet; uses the page's own tokens.
   ========================================================================== */

/* ---- slim launch bar (replaces the 72vh video) ---- */
.ibn-bar { display: block; text-decoration: none; background: #060d16; color: #F5F1E8; border-bottom: 2px solid var(--gold); }
.ibn-bar__in { display: flex; align-items: center; gap: 14px; min-height: 42px; padding-block: 7px; }
.ibn-bar__badge { flex: none; background: var(--gold); color: #0a1b33; border-radius: 3px; font: 800 11px/1 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 6px 9px; }
.ibn-bar__txt { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.35; color: #d7dbe3; }
.ibn-bar__txt strong { color: #F5F1E8; font-weight: 600; }
.ibn-bar__cta { flex: none; color: #E8C87A; font: 600 12.5px/1 'Inter', sans-serif; letter-spacing: .05em; white-space: nowrap; }
.ibn-bar:hover .ibn-bar__cta { text-decoration: underline; }
@media (max-width: 640px) {
  .ibn-bar__txt { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ibn-bar__cta { display: none; }
}

/* ---- hero: tighter now that it is the first thing visitors see ---- */
header#top .hero { padding-top: clamp(40px, 6vw, 72px) !important; padding-bottom: clamp(36px, 5vw, 60px) !important; }
header#top .hero-stats { margin-top: clamp(32px, 5vw, 56px) !important; }
@media (max-width: 640px) {
  header#top .hero-stats { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0; }
  header#top .hero-stats .stat { padding: 14px 8px !important; border-right: 0 !important; }
  header#top .hero-stats .stat:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  header#top .hero-stats .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line) !important; }
  header#top .hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  header#top .hero-cta .btn { text-align: center; padding-inline: 12px; }
}

/* ---- shared heads ---- */
.ib-sec-head { text-align: center; max-width: 720px; margin: 0 auto clamp(24px, 3vw, 36px); }
.ib-sec-head .eyebrow { margin-bottom: 12px; }
.ib-sec-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 2vw + 14px, 38px); line-height: 1.15; color: #F5F1E8; }
.ib-sec-lede { margin: 0 auto; font-size: 15px; line-height: 1.6; color: #B9C4D6; }

/* ---- featured essays: two equal cards instead of two full-screen bands ---- */
.ib-featured-pair { background: var(--cream); border-bottom: 1px solid var(--line); padding: clamp(36px, 5vw, 56px) 0; }
.ib-pair-eyebrow { text-align: center; margin-bottom: 20px !important; }
.ib-featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.featured-pub.featured-pub--card { padding: 0 !important; border: 1px solid var(--line) !important; border-radius: 6px; overflow: hidden; box-shadow: 0 14px 40px rgba(10,22,40,.10); }
.featured-pub--card .wrap { display: grid !important; grid-template-columns: minmax(0, 1fr) 200px !important; gap: 22px !important; align-items: start !important; padding: 26px 26px 26px 28px !important; max-width: none !important; width: auto !important; }
.featured-pub--card h2 { font-size: clamp(19px, 1.2vw + 10px, 25px) !important; line-height: 1.22 !important; margin: 0 0 10px !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.featured-pub--card p { font-size: 14.5px !important; line-height: 1.6 !important; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; max-width: none !important; }
.featured-pub--card .eyebrow { margin-bottom: 10px !important; font-size: 11px !important; letter-spacing: .24em !important; }
.featured-pub--card .btn-gold { margin-top: 16px !important; padding: 11px 20px !important; font-size: 13px !important; }
.featured-pub--card img { width: 100%; height: auto; margin: 0 !important; box-shadow: 0 12px 30px rgba(0,0,0,.25) !important; }
@media (max-width: 960px) { .ib-featured-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .featured-pub--card .wrap { grid-template-columns: minmax(0, 1fr) 96px !important; gap: 14px !important; padding: 18px !important; }
  .featured-pub--card h2 { font-size: 17px !important; }
  .featured-pub--card p { -webkit-line-clamp: 3; }
}

/* ---- launches: one dark band, one grid ---- */
.ib-launches { background: var(--navy); padding: clamp(44px, 6vw, 72px) 0; border-bottom: 4px solid var(--gold); }
.ib-launch-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.ib-launch { grid-column: span 2; display: flex; flex-direction: column; background: #0d1a2b; border: 1px solid rgba(197,163,90,.35); border-radius: 12px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.35); color: #F5F1E8; }
.ib-launch--wide { grid-column: span 3; }
.ib-launch > video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #060c18; object-fit: cover; }
.ib-launch__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ib-launch__body .eyebrow { color: var(--gold); margin-bottom: 2px; font-size: 11px; letter-spacing: .22em; }
.ib-launch__title { margin: 0; font-family: var(--serif); font-weight: 600; color: #F5F1E8; font-size: clamp(18px, 1vw + 10px, 24px); line-height: 1.2; }
.ib-launch--wide .ib-launch__title { font-size: clamp(22px, 1.2vw + 12px, 30px); }
.ib-launch__desc { margin: 0; color: #B9C4D6; font-size: 14.5px; line-height: 1.6; }
.ib-launch__metrics { list-style: none; margin: 4px 0 2px; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid rgba(197,163,90,.2); border-bottom: 1px solid rgba(197,163,90,.2); }
.ib-launch__metrics li { font: 600 12.5px/1.3 'Inter', sans-serif; color: var(--gold); }
.ib-launch .btn { margin-top: auto; align-self: flex-start; padding: 12px 22px; font-size: 13px; }
.ib-launch__more { margin-top: auto; font: 600 13px/1 'Inter', sans-serif; color: var(--gold); text-decoration: none; }
.ib-launch__more:hover { text-decoration: underline; }
.ib-launch--banner { grid-column: span 2; display: block; border: 1px solid rgba(197,163,90,.35); }
.ib-launch--banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) {
  .ib-launch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ib-launch, .ib-launch--wide { grid-column: span 1; }
  .ib-launch--banner { grid-column: 1 / -1; }
  .ib-launch--banner img { height: auto; }
}
@media (max-width: 640px) {
  .ib-launch-grid { grid-template-columns: 1fr; gap: 14px; }
  .ib-launch--banner { grid-column: auto; }
  .ib-launch__body { padding: 14px 16px 16px; }
  .ib-launch .btn { align-self: stretch; text-align: center; }
}

/* ---- phones: tighter section rhythm & 2-up stats elsewhere on the page ---- */
@media (max-width: 640px) {
  section { padding-top: clamp(36px, 9vw, 56px) !important; padding-bottom: clamp(36px, 9vw, 56px) !important; }
  .grid-3, .grid-2 { gap: 14px !important; }
  .card { padding: 22px 20px !important; }
}

/* ---- /products: nav and tables on phones ---- */
body[data-layout="products"] table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 640px) {
  body[data-layout="products"] .navlinks { flex-wrap: wrap; row-gap: 6px; justify-content: flex-end; max-width: 100%; }
  body[data-layout="products"] .navlinks a { white-space: nowrap; }
  body[data-layout="products"] .ib-search-nav { display: none; }
}

/* ---- banner card: image at natural ratio + text, not a cropped poster ---- */
.ib-launch--banner { text-decoration: none; color: #F5F1E8; }
.ib-launch--banner img { display: block; width: 100%; height: auto; aspect-ratio: 2048 / 720; object-fit: cover; }
.ib-launch--banner:hover .ib-launch__more { text-decoration: underline; }

/* ---- nav: brand and links must never collide (pre-existing wrap at 1280–1500px) ---- */
nav .nav-in { gap: 20px; }
nav .brand { flex: none; }
nav .nav-links { flex: 1 1 auto; justify-content: flex-end; flex-wrap: nowrap; min-width: 0; }
nav .nav-links a { white-space: nowrap; }
@media (max-width: 1500px) and (min-width: 1024px) {
  nav .nav-links { gap: 18px; font-size: 13px; }
  nav .ib-search-nav { flex-basis: 200px; min-width: 160px; }
}

/* ---- phones: the 2026-10-13 ".hero{padding:64px 0 48px}" rule zeroed the side
   padding of .wrap.hero, so hero text and buttons touched the screen edges ---- */
@media (max-width: 760px) {
  header#top .wrap.hero { padding-left: 20px !important; padding-right: 20px !important; }
}

/* Global 50 — full-width lead launch card */
.ib-launch-grid > .ib-launch--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.ib-launch--feature > video { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #060c18; }
.ib-launch--feature .ib-launch__body { padding: 26px 28px; justify-content: center; }
@media (max-width: 900px) { .ib-launch-grid > .ib-launch--feature { grid-template-columns: 1fr; } .ib-launch--feature .ib-launch__body { padding: 16px 18px 18px; } }
