/* ==========================================================================
   Royalty Technology — Homepage
   ========================================================================== */

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(720px, 88vh);
  padding-block: var(--space-20) var(--space-24);
  color: var(--text-on-inverse);
  background: var(--ink-950);
  overflow: hidden;
}

/* Still frame: paints immediately, and is what shows while the video is idle. */
.hero__media {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    url("../images/locations/dodoma-connected-hero.webp") center 42% / cover no-repeat;
}

/* Motion layer: sits above the still, below the gradient. Fades in on play. */
.hero__video {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
  pointer-events: none;
}
.hero__video.is-playing { opacity: 1; }

/* Play/pause control — the accessible route for keyboard and touch,
   since hover alone reaches neither. */
.hero__motion {
  position: absolute;
  z-index: var(--z-raised);
  right: var(--gutter);
  bottom: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-inverse-strong);
  border-radius: var(--radius-pill);
  background: rgba(3, 12, 20, .55);
  backdrop-filter: blur(8px);
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-xs);
  font-weight: 500;
  transition:
    color var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}
.hero__motion:hover {
  color: var(--n-000);
  background: rgba(3, 12, 20, .78);
  border-color: var(--brand-on-dark);
}
.hero__motion-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--brand-on-dark);
}
.hero__motion-icon .icon { width: 16px; height: 16px; }

/* No JS: the control can do nothing, so don't advertise it. */
.no-js .hero__motion { display: none; }

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(100deg,
      rgba(3, 12, 20, .97) 0%,
      rgba(3, 12, 20, .92) 32%,
      rgba(3, 12, 20, .62) 58%,
      rgba(3, 12, 20, .28) 82%,
      rgba(3, 12, 20, .18) 100%),
    linear-gradient(180deg, rgba(3, 12, 20, .5), rgba(3, 12, 20, .1) 40%, rgba(3, 12, 20, .7));
}

.hero__content { max-width: 42rem; }

.hero h1 {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
}
.hero h1 span { color: var(--brand-on-dark); }

.hero__intro {
  max-width: 36rem;
  margin-top: var(--space-6);
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.hero__capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-10);
  padding: 0;
  list-style: none;
}
.hero__capabilities li {
  padding: 7px 14px;
  border: 1px solid var(--border-inverse-strong);
  border-radius: var(--radius-pill);
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-xs);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ---- Credibility strip --------------------------------------------------- */

.credibility {
  color: var(--text-on-inverse);
  background: var(--ink-900);
  border-top: 1px solid var(--border-inverse);
}
.credibility__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.credibility__item {
  padding: var(--space-10) var(--space-8) var(--space-10) 0;
  border-left: 1px solid var(--border-inverse);
  padding-left: var(--space-8);
}
.credibility__item:first-child { padding-left: 0; border-left: 0; }
.credibility__item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-on-dark);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.credibility__item span {
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

/* ---- Services ------------------------------------------------------------ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.service-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.service-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}
.service-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--brand-on-light);
  background: var(--brand-050);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
}
.service-card__icon .icon { width: 22px; height: 22px; }
.service-card__number {
  color: var(--text-subtle);
  font-family: var(--font-mono), monospace;
  font-size: var(--fs-xs);
  letter-spacing: .08em;
}
.service-card h3 {
  /* Reserve two lines so descriptions align across the row. */
  min-height: calc(var(--fs-h4) * var(--lh-heading) * 2);
  margin-bottom: var(--space-3);
  font-size: var(--fs-h4);
  font-weight: 600;
}
.service-card p {
  margin-bottom: var(--space-6);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}
.service-card .text-link { margin-top: auto; }

/* ---- Systems ------------------------------------------------------------- */

.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.system-card {
  padding: var(--space-8);
  background: var(--surface);
  transition: background-color var(--dur-base) var(--ease-out);
}
.system-card:hover { background: var(--brand-050); }
.system-card h3 {
  margin-bottom: var(--space-3);
  font-size: 1.0625rem;
  font-weight: 600;
}
.system-card p { color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-snug); }

/* ---- Intelligence -------------------------------------------------------- */

.intelligence__lead { max-width: 46rem; margin-bottom: var(--space-16); }
.intelligence__lead h2 { font-size: var(--fs-h2); }
.intelligence__lead > p {
  margin-top: var(--space-5);
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
}

.intelligence__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--space-16);
  align-items: center;
}

.intelligence__visual {
  padding: var(--space-6);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border-inverse);
  border-radius: var(--radius-lg);
}
.visual { width: 100%; height: auto; }

.intelligence__pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8) var(--space-6);
  padding: 0;
  list-style: none;
}
.intelligence__pillars h3 {
  margin-bottom: var(--space-2);
  color: var(--text-on-inverse);
  font-size: 1.0625rem;
  font-weight: 600;
}
.intelligence__pillars p {
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

/* Channels */
.channels {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--space-12);
  margin-top: var(--space-20);
  padding-top: var(--space-12);
  border-top: 1px solid var(--border-inverse);
}
.channels__copy h3 {
  margin-bottom: var(--space-4);
  color: var(--text-on-inverse);
  font-size: var(--fs-h3);
}
.channels__copy p { color: var(--text-on-inverse-muted); font-size: var(--fs-sm); line-height: var(--lh-body); }
.channels__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-6);
  padding: 0;
  list-style: none;
}
.channels__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}
.channels__list .icon { width: 17px; height: 17px; margin-top: 3px; color: var(--brand-on-dark); }

/* ---- Spotlight ----------------------------------------------------------- */

.spotlight { background: var(--surface); }
.spotlight__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--space-20);
  align-items: center;
}
.spotlight__name {
  margin-bottom: var(--space-3);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -.02em;
}
.spotlight h2 { font-size: var(--fs-h2); }
.spotlight__intro {
  max-width: 44ch;
  margin-top: var(--space-5);
  color: var(--text-muted);
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
}
.spotlight__features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}
.spotlight__features h3 {
  margin-bottom: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.spotlight__features p { color: var(--text-muted); font-size: var(--fs-xs); line-height: var(--lh-snug); }

.spotlight__principle {
  margin: var(--space-10) 0 0;
  padding-left: var(--space-6);
  border-left: 3px solid var(--brand);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-style: normal;
  font-weight: 500;
  line-height: var(--lh-snug);
}

.spotlight__visual {
  padding: var(--space-8);
  background: var(--ink-950);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ---- Infrastructure ------------------------------------------------------ */

.infra__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-20);
  align-items: center;
}
.infra__media { margin: 0; }
.infra__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.infra__copy h2 { font-size: var(--fs-h2); }
.infra__copy > p {
  margin-top: var(--space-5);
  color: var(--text-muted);
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
}

/* ---- Industries ---------------------------------------------------------- */

.industries {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  padding: 0;
  list-style: none;
}
.industries li {
  padding: var(--space-5);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-200);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: border-left-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.industries li:hover { background: var(--brand-050); border-left-color: var(--brand); }

/* ---- Process ------------------------------------------------------------- */

.process__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--border-inverse);
  border: 1px solid var(--border-inverse);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.process__step {
  padding: var(--space-8);
  background: var(--ink-950);
  transition: background-color var(--dur-base) var(--ease-out);
}
.process__step:hover { background: var(--ink-800); }
.process__number {
  display: block;
  margin-bottom: var(--space-8);
  color: var(--brand-on-dark);
  font-family: var(--font-mono), monospace;
  font-size: var(--fs-xs);
  letter-spacing: .12em;
}
.process__step h3 {
  margin-bottom: var(--space-3);
  color: var(--text-on-inverse);
  font-size: var(--fs-h3);
}
.process__step p { color: var(--text-on-inverse-muted); font-size: var(--fs-sm); line-height: var(--lh-snug); }

/* ---- Why ----------------------------------------------------------------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
.why-card {
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.why-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.why-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-3);
  font-size: 1.0625rem;
  font-weight: 600;
}
.why-card h3 .icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  color: var(--text-on-brand);
  background: var(--brand-strong);
  border-radius: var(--radius-pill);
}
.why-card p { color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-snug); }

/* ---- Team ---------------------------------------------------------------- */

.team__layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: var(--space-20);
  align-items: center;
}
.team__copy h2 { font-size: var(--fs-h2); }
.team__copy > p {
  margin-top: var(--space-5);
  color: var(--text-muted);
  line-height: var(--lh-body);
}
.team__disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-8) 0;
  padding: 0;
  list-style: none;
}
.team__media { margin: 0; }
.team__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---- CTA band ------------------------------------------------------------ */

.cta-band {
  position: relative;
  isolation: isolate;
  padding-block: var(--section-y-tight);
  color: var(--text-on-inverse);
  background: var(--ink-950);
  overflow: hidden;
}
.cta-band::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(95deg, rgba(3, 12, 20, .97) 0%, rgba(3, 12, 20, .9) 45%, rgba(3, 12, 20, .62) 100%),
    url("../images/locations/dodoma-connected-hero.webp") center 62% / cover no-repeat;
}
.cta-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: var(--space-16);
  align-items: center;
}
.cta-band h2 { font-size: var(--fs-h2); }
.cta-band__copy > p {
  max-width: 52ch;
  margin-top: var(--space-5);
  color: var(--text-on-inverse-muted);
  line-height: var(--lh-snug);
}
.cta-band__actions { display: grid; gap: var(--space-3); }
.cta-band__actions .button { width: 100%; }
.cta-band__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: var(--space-2);
  color: var(--text-on-inverse-muted);
  font-size: var(--fs-sm);
  transition: color var(--dur-base) var(--ease-out);
}
.cta-band__phone:hover { color: var(--n-000); }
.cta-band__phone .icon { width: 16px; height: 16px; color: var(--brand-on-dark); }
