/* Direction B — Geometric Atlas styles */

.page-b {
  background: var(--ink-950);
  color: #fff;
  min-height: 100vh;
}

/* ── NAV B ── */
.nav-b { position: sticky; top: 0; z-index: 50; background: rgba(7,13,24,0.78); backdrop-filter: blur(24px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-b__rail {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4);
  font-size: 10.5px;
}
.nav-b__main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; padding: 18px 40px; }
.nav-b__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.nav-b__brand img { height: 34px; }
.nav-b__links { display: flex; justify-content: center; gap: 0; }
.nav-b__links a {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 10px 14px;
  text-decoration: none; color: rgba(255,255,255,0.6);
  font-weight: 450; font-size: 14px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-b__links a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.nav-b__links a.is-active { color: var(--jade); }
.nav-b__num { font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.35); letter-spacing: 0.06em; }
.nav-b__links a.is-active .nav-b__num { color: var(--jade); }
.nav-b__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--jade);
  color: var(--jade);
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.nav-b__cta:hover { background: var(--jade); color: var(--ink-950); }

/* ── HERO B ── */
.hero-b {
  position: relative;
  padding: 80px 40px 100px;
  overflow: hidden;
  isolation: isolate;
}
.hero-b__pattern {
  position: absolute; inset: 0;
  background-image: var(--omani-pattern, none);
  background-size: 120px 120px;
  opacity: 0.5;
  z-index: -2;
}
.hero-b__grade {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 70% 50%, rgba(61,217,182,0.10) 0%, transparent 60%),
    radial-gradient(50% 60% at 20% 30%, rgba(212,145,90,0.07) 0%, transparent 60%),
    linear-gradient(180deg, transparent 0%, var(--ink-950) 100%);
  z-index: -1;
}

.hero-b__inner {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 78vh;
}
.hero-b__copy { padding: 40px 0; }
.hero-b__tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 36px;
  color: rgba(255,255,255,0.7);
}
.hero-b__tag-dot { width: 6px; height: 6px; background: var(--jade); border-radius: 50%; box-shadow: 0 0 12px var(--jade); }

.hero-b__title {
  font-size: clamp(44px, 6.4vw, 96px);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: #fff;
}
.hero-b__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--jade);
}
.hero-b__title-accent {
  background: linear-gradient(90deg, var(--copper) 0%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 600;
}
.hero-b__lede {
  margin: 32px 0 0;
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
  max-width: 480px;
}
.hero-b__btns { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

.btn-jade-b {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px;
  background: var(--jade);
  color: var(--ink-950);
  font-weight: 600; font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn-jade-b:hover { background: #56e9c8; transform: translateY(-1px); }
.btn-jade-b span { transition: transform .2s; }
.btn-jade-b:hover span { transform: translateX(4px); }

.btn-ghost-b {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 500; font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.btn-ghost-b:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }

.hero-b__metrics {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 50px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  width: fit-content;
}
.hero-b__metrics > div { display: flex; flex-direction: column; gap: 6px; }
.hero-b__metrics .metric-num { font-size: 32px; color: #fff; }
.hero-b__metrics small { font-size: 14px; color: rgba(255,255,255,0.55); margin-left: 4px; font-weight: 400; }
.hero-b__metrics .eyebrow { color: rgba(255,255,255,0.45); font-size: 10.5px; }

/* Hero viz frame */
.hero-b__viz {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  /* Reserve a square area sized by the column. The orbit nodes are
     positioned in % within hero-b__viz-frame, so we want it to be
     a comfortable size at desktop (~520px) but shrink gracefully. */
  aspect-ratio: 1;
  min-height: 480px;
  margin: 20px 0;
}
.hero-b__viz-frame {
  position: relative;
  width: 92%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.hero-b__corner {
  position: absolute; width: 24px; height: 24px;
  border: 1px solid rgba(61,217,182,0.5);
}
.hero-b__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hero-b__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hero-b__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hero-b__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.hero-b__viz-rotate {
  position: absolute; inset: 18%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.hero-b__viz-rotate--cw  { animation: rotateSlow 90s linear infinite; }
.hero-b__viz-rotate--ccw { animation: rotateSlowRev 70s linear infinite; }
.hero-b__med-outer, .hero-b__med-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hero-b__med-inner { transform: scale(0.7); }
@keyframes rotateSlow { to { transform: rotate(360deg); } }
@keyframes rotateSlowRev { to { transform: rotate(-360deg); } }

/* Faint guide ring at the orbit radius */
.hero-b__orbit-ring {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero-b__orbit-ring::before {
  content: '';
  position: absolute; inset: 8%;
  border: 1px dashed rgba(255,255,255,0.06);
  border-radius: 50%;
}

/* ── Orbiting disciplines ── */
.hero-b__orbit {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero-b__orbit-spin {
  position: absolute; inset: 8%;
  border-radius: 50%;
  animation: rotateSlowRev 60s linear infinite;
  pointer-events: none;
}

/* ── Discipline PILLS ── */
.disc-pill {
  position: absolute;
  width: 0; height: 0;
  pointer-events: auto;
  text-decoration: none;
  z-index: 6;
}

/* Static centering — no animation, just translate */
.disc-pill__center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Counter-rotation lives only here, separate from the translate */
.disc-pill__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  cursor: pointer;
  /* counter-rotate: orbit spins CCW (–360°), we spin CW (+360°) = stays upright */
  animation: discPillCW 60s linear infinite;
  transition: color .2s;
}
.disc-pill:hover .disc-pill__label,
.disc-pill:focus-visible .disc-pill__label {
  color: var(--jade);
}

.disc-pill__num {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.04em;
  line-height: 1;
}
.disc-pill:hover .disc-pill__num { color: rgba(61, 217, 182, 0.5); }

/* Clockwise rotation to cancel the CCW orbit-spin */
@keyframes discPillCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Fixed tooltip — stays upright on screen ── */
.disc-tip {
  pointer-events: none;
  z-index: 9999;
  width: 260px;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, #0e1a30 0%, #07101e 100%);
  border: 1px solid rgba(61, 217, 182, 0.35);
  border-radius: 12px;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,0.75), 0 0 28px rgba(61,217,182,0.10);
}
/* Arrow pointing down (tooltip above pill) */
.disc-tip::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: #07101e;
  border-right: 1px solid rgba(61,217,182,0.35);
  border-bottom: 1px solid rgba(61,217,182,0.35);
}
/* Arrow pointing up (tooltip below pill) */
.disc-tip.tip-below::after {
  bottom: auto; top: -6px;
  border-right: none; border-bottom: none;
  border-left: 1px solid rgba(61,217,182,0.35);
  border-top: 1px solid rgba(61,217,182,0.35);
}
.disc-tip__num { color: var(--copper); font-size: 10px; display: block; margin-bottom: 6px; }
.disc-tip__title { margin: 0 0 8px; color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.disc-tip__body { margin: 0 0 12px; color: rgba(255,255,255,0.65); font-size: 12.5px; line-height: 1.5; }
.disc-tip__cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--jade); font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}

/* Center logo medallion */
.hero-b__viz-center {
  position: absolute;
  width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #142036 0%, #07101e 70%);
  border-radius: 50%;
  border: 1px solid rgba(61,217,182,0.4);
  box-shadow:
    0 0 60px rgba(61,217,182,0.25),
    inset 0 0 30px rgba(61,217,182,0.06),
    inset 0 1px 0 rgba(255,255,255,0.08);
  z-index: 5;
}
.hero-b__viz-center-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(61,217,182,0.18);
  animation: centerPulse 3.5s ease-in-out infinite;
}
@keyframes centerPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}
.hero-b__viz-label { position: absolute; color: rgba(255,255,255,0.4); font-size: 10px; letter-spacing: 0.08em; pointer-events: none; }
.hero-b__viz-label--tl { top: -18px; left: 0; }
.hero-b__viz-label--tr { top: -18px; right: 0; }
.hero-b__viz-label--bl { bottom: -22px; left: 0; }
.hero-b__viz-label--br { bottom: -22px; right: 0; text-align: right; }

.hero-b__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.35);
}
.hero-b__scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.5));
  position: relative; overflow: hidden;
}
.hero-b__scroll-line::after {
  content: ''; position: absolute; left: 0; top: -20px; width: 1px; height: 16px;
  background: var(--jade);
  animation: scrollDot 2.4s ease-in-out infinite;
}
@keyframes scrollDot { 0% { top: -20px; } 100% { top: 36px; } }

/* ── PILLARS B ── */
.pillars-b { padding: 140px 40px; background: var(--paper); color: var(--ink-950); }
.pillars-b__inner { max-width: 1320px; margin: 0 auto; }
.pillars-b__inner header { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: end; margin-bottom: 60px; }
.pillars-b__inner header h2 { margin: 16px 0 0; font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; }
.pillars-b__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillars-b__grid > :nth-child(4) { grid-column: 1 / span 1; }
.pillars-b__grid > :nth-child(5) { grid-column: 2 / span 2; }
.pillars-b__grid > :nth-child(5) { background: var(--ink-950); color: #fff; }
.pillars-b__grid > :nth-child(5) p { color: rgba(255,255,255,0.6); }
.pillars-b__grid > :nth-child(5) .pillar-b__num { color: var(--jade); }

.pillar-b {
  position: relative;
  padding: 36px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--ink-950);
  display: flex; flex-direction: column; gap: 16px;
  min-height: 280px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pillar-b:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.pillar-b__num { font-family: var(--font-mono); font-size: 28px; color: var(--jade-deep); font-weight: 500; letter-spacing: -0.01em; }
.pillar-b--copper .pillar-b__num { color: var(--copper-deep); }
.pillar-b h3 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.pillar-b p { margin: 0; color: rgba(11,20,38,0.6); font-size: 14px; line-height: 1.5; flex: 1; }
.pillar-b__arrow { position: absolute; top: 28px; right: 28px; font-size: 18px; color: rgba(11,20,38,0.4); transition: transform .25s, color .25s; }
.pillar-b:hover .pillar-b__arrow { color: var(--jade-deep); transform: translate(3px, -3px); }
.pillar-b__corner {
  position: absolute; bottom: 0; right: 0; width: 80px; height: 80px;
  background: linear-gradient(135deg, transparent 50%, rgba(61,217,182,0.18) 50%);
}
.pillar-b--copper .pillar-b__corner { background: linear-gradient(135deg, transparent 50%, rgba(212,145,90,0.18) 50%); }

/* ── APPROACH B ── */
.approach-b { padding: 140px 40px; background: var(--ink-950); }
.approach-b__inner {
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: center;
}
/* Image — right column, constrained height, portrait card */
.approach-b__media {
  position: relative;
  height: 420px;
  border-radius: var(--r-lg);
  overflow: hidden;
  align-self: center;
}
.approach-b__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.75) brightness(0.9);
}
.approach-b__media-grade {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(61,217,182,0.08) 0%,
    transparent 40%,
    rgba(7,13,24,0.55) 100%
  );
}
.approach-b__media-pattern {
  position: absolute; inset: 0;
  background-image: var(--omani-pattern);
  background-size: 80px 80px;
  opacity: 0.5;
  mix-blend-mode: overlay;
}
/* Copy — left column */
.approach-b__copy h2 { margin: 16px 0 24px; font-size: clamp(40px, 5vw, 64px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.0; }
.approach-b__copy h2 em { color: var(--copper); font-style: italic; font-weight: 300; }
.approach-b__copy p { color: rgba(255,255,255,0.65); font-size: 17px; line-height: 1.6; max-width: 460px; }
.approach-b__copy ul { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 16px; }
.approach-b__copy li { display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.08); align-items: baseline; }
.approach-b__copy li span { color: var(--copper); font-family: var(--font-mono); font-size: 13px; }
.approach-b__copy li strong { color: #fff; font-weight: 500; }
.approach-b__copy li div { color: rgba(255,255,255,0.6); font-size: 14.5px; line-height: 1.55; }

/* ── PROJECTS B ── */
.proj-b { padding: 140px 40px; background: var(--paper); color: var(--ink-950); }
.proj-b__inner { max-width: 1320px; margin: 0 auto; }
.proj-b__inner header { margin-bottom: 60px; max-width: 700px; }
.proj-b__inner header h2 { margin: 16px 0 0; font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; }
.proj-b__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start; /* cards keep natural height — no dead space in shorter body */
}
.proj-b__card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink-950); border-radius: var(--r-lg); overflow: hidden; background: #fff; transition: transform .3s ease, box-shadow .3s ease; }
.proj-b__card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -20px rgba(11,20,38,0.25); }
.proj-b__media { height: 280px; position: relative; overflow: hidden; background: var(--ink-950); }
.proj-b__media img { width: 100%; height: 100%; object-fit: cover; object-position: center center; transition: transform .8s ease; display: block; }
/* Rihla banner: text is baked into the left of the image — anchor there */
.proj-b__card--rihla .proj-b__media img { object-position: left center; }
.proj-b__card:hover img { transform: scale(1.05); }
.proj-b__media-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(7,13,24,0.25) 72%, rgba(7,13,24,0.55) 100%); pointer-events: none; }
.proj-b__body { padding: 22px 28px 24px; flex: 0 0 auto; }
.proj-b__body .eyebrow-num { color: var(--copper-deep); display: block; margin-bottom: 6px; }
.proj-b__body h3 { margin: 0 0 8px; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.proj-b__body p { margin: 0; color: rgba(11,20,38,0.65); font-size: 14.5px; line-height: 1.5; }
.proj-b__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.proj-b__tags span { padding: 4px 10px; background: var(--paper-2); border-radius: 4px; font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.04em; }

/* ── CTA B ── */
.cta-b { position: relative; padding: 140px 40px; background: var(--ink-950); overflow: hidden; }
.cta-b__pattern { position: absolute; inset: 0; background-image: var(--omani-pattern); background-size: 200px 200px; opacity: 0.45; mask-image: radial-gradient(50% 50% at 50% 50%, #000, transparent); }
.cta-b__inner { position: relative; max-width: 800px; margin: 0 auto; text-align: center; }
.cta-b__inner h2 { margin: 16px 0 32px; font-size: clamp(40px, 5vw, 72px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.0; color: #fff; }
.cta-b__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER B ── */
.footer-b { background: var(--ink-1000); padding: 80px 40px 32px; color: #fff; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-b__inner { max-width: 1320px; margin: 0 auto; }
.footer-b__cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-b__brand .stm-logo { margin-bottom: 16px; }
.footer-b__brand .footer-b__tag { color: rgba(255,255,255,0.4); font-family: var(--font-mono); letter-spacing: 0.06em; font-size: 11px; margin: 14px 0 0; }
.footer-b__h { color: rgba(255,255,255,0.4); margin: 0 0 16px; font-size: 11px; }
.footer-b ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-b li, .footer-b a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 14px; line-height: 1.55; }
.footer-b a:hover { color: var(--jade); }
.footer-b__base { display: flex; justify-content: space-between; padding-top: 32px; margin-top: 60px; border-top: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.3); font-family: var(--font-mono); font-size: 11px; flex-wrap: wrap; gap: 12px; }
.footer-b__base p { margin: 0; }

@media (max-width: 1100px) {
  .hero-b__inner { grid-template-columns: 1fr; }
  .hero-b__viz { max-width: 480px; margin: 40px auto 0; }
  .pillars-b__inner header { grid-template-columns: 1fr; }
  .pillars-b__grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-b__grid > :nth-child(5) { grid-column: 1 / -1; }
  .approach-b__inner { grid-template-columns: 1fr; gap: 40px; }
  .approach-b__media { height: 280px; }
  .proj-b__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-b__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hero-b { padding: 40px 20px 80px; }
  .nav-b__main { grid-template-columns: 1fr auto; gap: 16px; padding: 14px 20px; }
  .nav-b__rail { display: none; }
  .nav-b__links { display: none; }
  .pillars-b, .approach-b, .proj-b, .cta-b { padding-left: 20px; padding-right: 20px; padding-top: 80px; padding-bottom: 80px; }
  .pillars-b__grid { grid-template-columns: 1fr; }
  .footer-b__cols { grid-template-columns: 1fr; }
}
