/* GT AFRIK — section patterns shared by the marketing pages
   (hero, cards, chips, buttons, image slots, closing CTA). */

.page-alt {
  background: var(--color-bg-page);
  overflow: clip;
}

.shell {
  max-width: var(--chrome-max);
  margin: 0 auto;
}

.shell--wide {
  max-width: 1200px;
}

.shell--mid {
  max-width: 1000px;
}

.shell--prose {
  max-width: 820px;
}

.shell--narrow {
  max-width: 760px;
}

/* ── on-load rise, used for above-the-fold blocks ── */
@keyframes gtFadeUp {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.js .fade-up {
  animation: gtFadeUp 1s var(--ease-out-expo) both;
}

.js .fade-up--late {
  animation-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  .js .fade-up {
    animation: none;
  }
}

/* ── page hero ── */
.page-hero {
  position: relative;
  padding: 180px 32px 70px;
  background: radial-gradient(
      ellipse 70% 55% at 50% 0%,
      rgba(56, 102, 255, 0.07) 0%,
      transparent 70%
    ),
    var(--color-bg-page);
}

.page-hero--tall {
  padding: 190px 32px 100px;
}

.page-hero--split {
  padding: 170px 32px 120px;
  background: radial-gradient(
      ellipse 65% 55% at 25% 15%,
      rgba(56, 102, 255, 0.08) 0%,
      transparent 70%
    ),
    var(--color-bg-page);
}

.page-hero--plain {
  padding: 170px 32px 120px;
  background: var(--color-bg-page);
}

/* Telemetry words run as a right-hand gutter beside the copy, never across it.
   Page heroes are left-aligned and narrower than the home hero, so the ramp
   starts earlier. See .hero-full__words in home.css for the reasoning. */
.page-hero__float {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  --hero-gutter: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.1) 52%,
    rgba(0, 0, 0, 1) 78%
  );
  mask-image: var(--hero-gutter);
  -webkit-mask-image: var(--hero-gutter);
}

/* Centred heroes have copy in the middle, so the words take both margins. */
.page-hero--center .page-hero__float {
  --hero-gutter: linear-gradient(
    90deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.1) 22%,
    rgba(0, 0, 0, 0.1) 78%,
    rgba(0, 0, 0, 1) 100%
  );
}

@media (max-width: 900px) {
  .page-hero__float,
  .page-hero--center .page-hero__float {
    --hero-gutter: var(--hero-gutter-flat);
  }
}

.page-hero__inner {
  position: relative;
}

.page-hero--center .page-hero__inner {
  text-align: center;
}

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0;
}

.kicker--green {
  color: var(--color-running);
}

.page-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin: 20px 0 0;
  color: var(--color-text);
}

.page-title--xl {
  font-size: clamp(44px, 5.2vw, 80px);
  margin: 22px 0 26px;
}

.page-title--lg {
  font-size: clamp(40px, 4.4vw, 64px);
  margin: 20px 0 24px;
}

.page-title--sm {
  font-size: clamp(36px, 4vw, 56px);
  margin: 20px 0 36px;
}

.page-title em {
  font-style: normal;
  color: var(--color-running);
}

.tint-blue {
  font-style: normal;
  color: var(--color-accent);
}

.page-sub {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text-body);
  max-width: 600px;
  margin: 0;
}

.page-hero--center .page-sub {
  margin-inline: auto;
}

/* ── surface card ──
   Lit from above: a top-edge hairline catches the light, a vertical wash runs
   down the face, and a contact shadow grounds it. On hover a cursor-tracked
   bloom rises through the surface — premium.js feeds --mx/--my; without JS
   the fallback centre keeps the hover state looking deliberate. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-lit), var(--color-surface);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--edge-top), var(--shadow-card);
  transition: border-color var(--duration-normal),
    box-shadow var(--duration-normal),
    transform var(--duration-normal) var(--ease-out-expo);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    var(--bloom-accent),
    transparent 62%
  );
  transition: opacity var(--duration-normal);
}

.card:hover,
.card:focus-within {
  border-color: rgba(56, 102, 255, 0.35);
  box-shadow: var(--edge-top-strong), var(--shadow-card-hover);
  transform: translateY(-4px);
}

.card:hover::after,
.card:focus-within::after {
  opacity: 1;
}

.card--green {
  --bloom-accent: var(--bloom-green);
}

.card--green:hover,
.card--green:focus-within {
  border-color: rgba(50, 201, 111, 0.4);
  box-shadow: var(--edge-top-strong), 0 2px 4px rgba(0, 0, 0, 0.45),
    0 24px 56px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(50, 201, 111, 0.18);
}

.card--blue:hover,
.card--blue:focus-within {
  border-color: rgba(56, 102, 255, 0.4);
}

.card__glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(56, 102, 255, 0.12);
  filter: blur(60px);
  pointer-events: none;
}

.card--green .card__glow {
  background: rgba(50, 201, 111, 0.12);
}

.card__body {
  position: relative;
  z-index: 1; /* above the hover bloom, which paints as the card's ::after */
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  flex: 1;
}

.card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.card__tag--green {
  color: var(--color-running);
}

.card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--color-text);
}

.card__text {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text-body);
  margin: 0;
}

/* ── numbered feature card (about advantages, solution features) ── */
/* num-card is a .card with its content as direct children rather than in a
   .card__body, so the stacking has to be re-established here. */
.num-card {
  padding: 32px;
  gap: 14px;
  border-radius: 18px;
}

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

.num-card__num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

.num-card--green .num-card__num {
  color: var(--color-running);
}

.num-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.num-card__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-body);
  margin: 0;
}

/* ── outline chips ── */
.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  box-shadow: var(--edge-top);
  transition: color var(--duration-fast), border-color var(--duration-fast),
    background var(--duration-fast);
}

.chip:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(56, 102, 255, 0.1);
  border-color: rgba(56, 102, 255, 0.35);
}

/* ── buttons (marketing dialect: 12px radius) ── */
.btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast), background var(--duration-fast),
    border-color var(--duration-fast);
}

/* Specular sweep. Kept off the paint path until hover — the transform starts
   parked outside the button, so it costs one composited layer and nothing else. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 750ms var(--ease-out-expo);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateX(120%);
}

/* The accent reads as a lit surface: gradient face, bright top edge, and a
   contact shadow tinted with its own hue rather than neutral black. */
.btn--primary {
  color: var(--color-text);
  background: var(--grad-accent);
  padding: 18px 44px;
  box-shadow: var(--edge-top-strong), var(--shadow-btn);
}

.btn--primary:hover {
  color: var(--color-text);
  background: var(--grad-accent-hover);
  transform: translateY(-3px);
  box-shadow: var(--edge-top-strong), var(--shadow-btn-hover);
}

.btn--primary:active {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), var(--shadow-btn);
}

.btn--block {
  display: block;
  width: 100%;
  padding: 17px;
}

.btn--outline {
  color: var(--color-text);
  background: var(--surface-lit), rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 17px 40px;
  box-shadow: var(--edge-top);
}

.btn--outline:hover {
  color: var(--color-text);
  background: var(--surface-lit), rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

.btn--outline:active {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .btn::before {
    display: none;
  }
}

.link-more {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  transition: color var(--duration-fast),
    transform var(--duration-fast) var(--ease-out-expo);
}

/* The whole card is the affordance, so its link leans forward with it. */
.card:hover .link-more,
.card:focus-within .link-more {
  color: var(--color-accent-soft);
  transform: translateX(4px);
}

.card--green:hover .link-more,
.card--green:focus-within .link-more {
  color: var(--color-running);
}

/* ── documentary image frame ── */
.img-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(
      135deg,
      rgba(56, 102, 255, 0.08),
      rgba(50, 201, 111, 0.05)
    ),
    #080c17;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.img-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 7, 13, 0.02) 42%,
    rgba(5, 7, 13, 0.58) 100%
  );
}

.img-slot__hint {
  position: relative;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.32);
  max-width: 220px;
}

.img-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06) brightness(0.9);
  transform: scale(1.015);
  transition: transform 900ms var(--ease-out-expo),
    filter 700ms var(--ease-out-expo);
}

.card:hover .img-slot img,
.card:focus-within .img-slot img,
.sol-media:hover img,
.about-story__media:hover img {
  filter: saturate(0.96) contrast(1.04) brightness(0.98);
  transform: scale(1.045);
}

@media (prefers-reduced-motion: reduce) {
  .img-slot img {
    transform: none;
    transition: none;
  }
}

/* ── closing CTA band ── */
.closing {
  position: relative;
  padding: 130px 32px;
  overflow: hidden;
}

/* Light seam rather than a flat rule: the divider brightens toward the centre,
   which reads as the section glow bleeding through the edge. */
.closing::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 22%,
    rgba(56, 102, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.06) 78%,
    transparent 100%
  );
}

.closing__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 70% at 50% 100%,
    rgba(56, 102, 255, 0.14) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.closing__inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.closing__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin: 0;
  color: var(--color-text);
}

.closing__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-body);
  max-width: 500px;
  margin: 0;
}

/* ── grids ── */
.grid {
  display: grid;
  gap: 20px;
}

.grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}

.grid--split {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.grid--halves {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

.grid--bento {
  grid-template-columns: repeat(12, 1fr);
}

.span-4 {
  grid-column: span 4;
}
.span-5 {
  grid-column: span 5;
}
.span-6 {
  grid-column: span 6;
}
.span-7 {
  grid-column: span 7;
}

@media (max-width: 980px) {
  .grid--bento {
    grid-template-columns: 1fr;
  }

  .grid--bento > * {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

/* ── section heading used mid-page ── */
.section-head {
  margin-bottom: 48px;
}

.section-head__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 16px 0 0;
  color: var(--color-text);
}

@media (max-width: 640px) {
  .page-hero,
  .page-hero--tall,
  .page-hero--split,
  .page-hero--plain {
    padding-top: 132px;
  }

  .closing {
    padding: 90px 24px;
  }
}
