/* Homepage */

/* Hero */
/* fills the first screen below the sticky header; content centred vertically */
.hero {
  --hero-pad: clamp(28px, 4vw, 56px);
  min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
  padding-block: var(--hero-pad); overflow: hidden;
}
/* The hero sits in its own centred frame (equal margins left and right at every width), wider than the page
   container so the ring has room. Copy on the left (heading tops out at --fs-display's 4.2rem); the ring takes
   the right half. The frame is centred, so splitting it at 50% puts the ring's box, and so its left edge, on
   or right of the middle of the page at every width. */
.hero__grid {
  display: grid; grid-template-columns: 50% minmax(0, 1fr); gap: 0; align-items: center;
  width: min(100% - 2 * var(--gutter), 1676px);
}
.hero__copy { position: relative; z-index: 1; max-width: 610px; margin-right: clamp(16px, 2vw, 32px); }
.hero__u { position: relative; display: inline-block; }
.hero__u::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -0.12em; height: 2px; background: var(--orange); transform-origin: left; }
.js-motion .hero__u::after { animation: hero-underline 900ms var(--ease-out) 250ms both; }
@keyframes hero-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__lead { margin-top: clamp(32px, 4vw, 52px); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.22rem); line-height: 1.55; color: var(--text-2); }
.hero__copy .link-arrow { margin-top: clamp(28px, 3vw, 44px); }
/* the ring keeps 76px clear for its labels; pull the box into the margin so the ribbon itself, not that
   clearance, meets the frame's right edge (labels may pass it briefly as they turn) */
.hero__art { position: relative; margin-right: calc(-1 * min(60px, var(--gutter) * 0.75)); }
.hero__art .ring { height: clamp(380px, min(40vw, 100svh - var(--header-h) - 2 * var(--hero-pad)), 880px); background: radial-gradient(closest-side at 50% 50%, rgba(253, 241, 230, 0.9), rgba(253, 241, 230, 0)); }
.hero__art .ring__pills { list-style: none; margin: 0; padding: 0; }
/* Narrow or portrait windows stack the copy above the ring, which is then centred on the page */
@media (max-width: 899px), (orientation: portrait) {
  .hero__grid { grid-template-columns: 1fr; width: min(100% - 2 * var(--gutter), var(--container)); }
  .hero__copy { max-width: none; margin-right: 0; }
  .hero__art { margin: 8px calc(var(--gutter) * -1) 0; }  /* phones: the ring runs edge to edge */
  .hero__art .ring { height: clamp(340px, 80vw, 520px); }
}

/* Governed loop */
.loop { padding-block: clamp(64px, 7.7vw, 105px) clamp(64px, 7vw, 96px); }
.loop__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 352px); gap: 32px 64px; align-items: start; margin-bottom: clamp(32px, 3vw, 40px); }
.loop__head .h2 { max-width: 15em; font-weight: 300; }
.loop__aside { padding-top: 8px; }
.loop__aside-title { font-size: 1.35rem; line-height: 1.38; color: #fff; }

.loop__diagram { position: relative; --card-gap: clamp(20px, 2.9vw, 40px); --line: #4a4a4a; }
.loop__model {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  min-height: 102px; padding: 18px 40px 18px 28px;
  background: var(--ink-2); border: 1px solid #3a3a3a;
  transition: border-color 300ms, background-color 300ms;
}
.loop__model img { width: 44px; height: 44px; filter: brightness(1.15); }
.loop__model-title { font-size: 1.4rem; color: #fff; line-height: 1.3; }
.loop__model-text { font-size: 0.95rem; color: var(--text-on-dark-2); }
.loop__model-tag { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--text-on-dark-2); line-height: 1.4; }
.loop__model.is-lit { border-color: var(--orange); }

.loop__bus { position: relative; height: 58px; }
.loop__trunk { position: absolute; left: 50%; top: 0; width: 1px; height: 30px; background: var(--line); }
.loop__rail {
  position: absolute; top: 30px; height: 1px; background: var(--line);
  left: calc((100% - 5 * var(--card-gap)) / 12); right: calc((100% - 5 * var(--card-gap)) / 12);
}

.loop__stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--card-gap); list-style: none; padding: 0; margin: 0; position: relative; z-index: 1; }
.loop__stage { position: relative; }
.loop__stage::before { /* stub from rail with orange node */
  content: ""; position: absolute; left: 50%; top: -28px; width: 1px; height: 28px; background: var(--line);
}
.loop__stage::after {
  content: ""; position: absolute; left: calc(50% - 3px); top: -31px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange);
}
.loop__stage a {
  position: relative; display: flex; flex-direction: column; height: 100%; min-height: 200px;
  padding: 18px 14px 40px; text-decoration: none; color: #fff;
  background: var(--ink-2); border: 1px solid #3a3a3a; border-top: 1px solid var(--orange);
  transition: border-color 300ms, background-color 200ms;
}
.loop__stage a:hover { background: #2b2b2b; }
.loop__stage img { width: 44px; height: 44px; margin: 0 0 16px -6px; }
.loop__stage-title { font-size: 1.4rem; line-height: 1.2; margin-bottom: 10px; }
.loop__stage-text { font-size: 0.85rem; color: var(--text-on-dark-2); line-height: 1.45; }
.loop__stage .arw { position: absolute; right: 14px; bottom: 14px; width: 11px; height: 11px; color: var(--text-on-dark-2); }
.loop__stage a:hover .arw { transform: translate(2px, -2px); color: #fff; }
.loop__stage.is-lit a { border-color: var(--orange); background: #2a2725; }

.gate {
  position: absolute; z-index: 2; width: 21px; height: 21px; display: grid; place-items: center;
  background: #2b2d28; border: 1px solid #50554c;
}
.gate::after {
  content: ""; width: 8px; height: 4.5px; margin-top: -3px;
  border-left: 1.6px solid var(--orange); border-bottom: 1.6px solid var(--orange); transform: rotate(-45deg);
}
.loop__stage .gate { right: calc(var(--card-gap) / -2 - 10.5px); top: 50%; margin-top: -10.5px; }
.loop__stage:not(:last-child) a::after { /* connector through the gate to the next card */
  content: ""; position: absolute; left: 100%; top: 50%; width: var(--card-gap); height: 1px; background: var(--line);
}
.gate.is-lit { border-color: var(--orange); background: #3a2a22; }

.loop__return {
  position: absolute; left: calc(var(--card-gap) * -0.6); right: calc(var(--card-gap) * -0.6);
  top: 50%; height: calc(50% + 57px);
  border: 1px solid var(--line); border-top: 0; pointer-events: none;
}
.loop__return::before, .loop__return::after { content: ""; position: absolute; top: -1px; width: calc(var(--card-gap) * 0.6); height: 1px; background: var(--line); }
.loop__return::before { left: 0; }
.loop__return::after { right: 0; }
.loop__return .gate { left: 50%; bottom: -11px; margin-left: -10.5px; }
.loop__track { position: relative; }
.loop__return-trace { position: absolute; left: -1px; top: 0; width: calc(100% + 2px); height: calc(100% + 1px); pointer-events: none; overflow: visible; }

.loop__foot { position: relative; text-align: center; margin-top: 92px; display: grid; gap: 4px; }
.loop__foot-title { font-size: 1.4rem; color: #fff; }
.loop__foot-text { font-size: 0.95rem; color: var(--text-on-dark-2); }

@media (max-width: 1099px) {
  .loop__head { grid-template-columns: 1fr; }
  .loop__bus, .loop__return, .loop__stage::before, .loop__stage::after, .loop__stage .gate, .loop__stage:not(:last-child) a::after { display: none; }
  .loop__model { margin-bottom: 24px; }
  .loop__stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .loop__foot { margin-top: 40px; }
}
@media (max-width: 640px) {
  .loop__stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .loop__model { grid-template-columns: auto 1fr; padding: 18px; }
  .loop__model-tag { display: none; }
  .loop__stage a { min-height: 0; padding-bottom: 36px; }
}

/* Services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 30px); list-style: none; padding: 0; margin: clamp(40px, 4vw, 58px) 0 0; }
.services li { display: flex; border: 1px solid #dedede; border-top: 2px solid var(--orange); background: var(--bg); }
/* Shared card lift: the service links and the (non-clickable) engagement cards */
.services li, .engage__card { box-shadow: 0 0 0 rgba(17, 17, 17, 0); transition: border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out), translate 300ms var(--ease-out); }
.services li:hover, .services li:focus-within, .engage__card:hover { border-color: #c8c8c8; border-top-color: var(--orange); box-shadow: 0 14px 32px -12px rgba(17, 17, 17, 0.18), 0 4px 10px -4px rgba(17, 17, 17, 0.08); translate: 0 -3px; } /* translate, not transform: the reveal leaves an inline transform */
@media (prefers-reduced-motion: reduce) { .services li, .engage__card, .services__name .arw { transition: none; } .services li:hover, .services li:focus-within, .engage__card:hover { translate: none; } }
.services a { display: block; width: 100%; padding: 30px 28px; text-decoration: none; color: inherit; }
.services__name { display: flex; align-items: center; gap: 12px; font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.95rem); font-weight: 300; margin-bottom: 18px; transition: color var(--dur-fast); }
.services__name .arw { width: 14px; height: 14px; opacity: 0; transform: translate(-6px, 6px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.services a:hover .services__name .arw, .services a:focus-visible .services__name .arw { opacity: 1; transform: none; }
@media (hover: none) { .services__name .arw { opacity: 1; transform: none; } }
.services__text { display: block; font-size: 1.12rem; color: var(--text-2); line-height: 1.5; }
@media (max-width: 899px) {
  .services { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .services a { padding: 24px 22px; }
}

/* Engagement */
/* Domains */
.domains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 30px; margin-top: clamp(32px, 3.5vw, 48px); }
.domains .media-card__title { margin-top: clamp(18px, 1.8vw, 24px); font-size: clamp(1.3rem, 1.2rem + 0.4vw, 1.58rem); line-height: 1.3; }
.domains .media-card__text { margin-top: 10px; font-size: clamp(0.95rem, 0.92rem + 0.15vw, 1.06rem); line-height: 1.5; }
@media (max-width: 899px) { .domains { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .domains { grid-template-columns: 1fr; } }

/* Engagement. Top gap is half the old gap between the services and engagement sections (two section paddings). */
.engage__title { margin-top: clamp(64px, 8vw, 120px); }
.engage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; list-style: none; padding: 0; margin: clamp(40px, 4vw, 58px) 0 0; }
.engage__card { border: 1px solid #dedede; border-top: 2px solid var(--orange); padding: 30px 28px 30px; background: var(--bg); }
.engage__card > img { width: 56px; height: 56px; margin: 0 0 22px -6px; }
.engage__name { font-size: clamp(1.45rem, 1.25rem + 0.5vw, 1.75rem); font-weight: 350; line-height: 1.25; }
.engage__model { color: var(--text-2); font-size: 1.12rem; margin-top: 8px; padding-bottom: 20px; border-bottom: 1px solid #dedede; }
.engage__list { list-style: disc; margin: 18px 0 0; padding-left: 20px; display: grid; gap: 10px; color: var(--text-2); font-size: 1.1rem; }
.engage__list li::marker { color: #8a8a8a; font-size: 0.8em; }
.engage__foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: clamp(40px, 4vw, 60px); }
.engage__foot p { display: grid; gap: 2px; font-size: 1.15rem; }
.engage__pay { color: var(--ink); }
@media (max-width: 899px) {
  .engage { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 1099px) { .br-wide { display: none; } }
@media (max-width: 560px) { .br-sm-hide { display: none; } }
