/* ============================================
   TREEZ AFRICA SYSTEMS — Shared inner-page chrome
   (page-hero / breadcrumb) + About page sections.
   Loaded by about, services, portfolio, booking,
   and contact — so the dark theme reset here
   applies to all five.
   ============================================ */

body {
  background: var(--bg-0);
  color: var(--text-1);
}

h1, h2, h3, h4 {
  color: var(--text-0);
}

p {
  color: var(--text-1);
}

.section-gray {
  background: var(--bg-1);
}

/* ---- Page Hero ---- */
.page-hero {
  position: relative;
  background: var(--bg-0);
  overflow: hidden;
  padding-top: 156px;
  padding-bottom: 56px;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, black, transparent);
  mask-image: linear-gradient(180deg, black, transparent);
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  margin-bottom: 20px;
}

.page-hero .breadcrumb a {
  color: var(--text-2);
  transition: color var(--transition-base);
}

.page-hero .breadcrumb a:hover {
  color: var(--amber);
}

.page-hero .breadcrumb svg {
  width: 13px;
  height: 13px;
  color: var(--text-2);
}

.page-hero .breadcrumb span {
  color: var(--amber);
}

.page-hero h1 {
  color: var(--text-0);
  margin-bottom: 16px;
  max-width: 760px;
}

.page-hero p {
  color: var(--text-1);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0;
}

/* ---- Page-hero visual: a small live console beside the heading ---- */
.page-hero .container:has(.page-hero-visual) {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.page-hero-visual {
  position: relative;
  z-index: 2;
}

.hv-terminal {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(16, 21, 28, 0.85);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hv-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-0);
}

.hv-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hv-bar span:first-child {
  background: var(--amber);
}

.hv-bar em {
  margin-left: 8px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-2);
}

.hv-body.deploy-log {
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.78rem;
  min-height: 13.5em;
}

.hv-body b {
  color: var(--status-green);
  font-weight: 500;
}

.hv-body i {
  font-style: normal;
  color: var(--amber);
  margin-right: 8px;
}

/* Partners: hub-and-spoke graph (drawn by js/live-panels.js) */
.hv-graph {
  padding: 12px 10px 6px;
}

.hv-graph svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hv-graph ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-1);
}

.pg-link {
  stroke: rgba(255, 176, 32, 0.3);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.pg-packet {
  fill: var(--amber);
  filter: drop-shadow(0 0 4px rgba(255, 176, 32, 0.9));
}

.pg-packet-in {
  fill: var(--status-green);
  filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.9));
}

.pg-node {
  fill: var(--bg-0);
  stroke: var(--status-green);
  stroke-width: 1.5;
}

.pg-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--text-1);
}

.pg-hub {
  fill: var(--amber);
}

.pg-hub-ring {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: pgRing 2.6s ease-out infinite;
}

.pg-hub-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  fill: var(--ink);
}

@keyframes pgRing {
  from { transform: scale(0.8); opacity: 0.9; }
  to { transform: scale(2.2); opacity: 0; }
}

/* Contact: radar sweep pinned on Kampala + live readout */
.hv-radar-wrap {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  align-items: center;
  padding: 22px 20px;
}

.hv-radar {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background:
    radial-gradient(circle, transparent 32%, rgba(52, 211, 153, 0.18) 33%, transparent 34%),
    radial-gradient(circle, transparent 65%, rgba(52, 211, 153, 0.18) 66%, transparent 67%),
    linear-gradient(rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.15)) center / 1px 100% no-repeat,
    linear-gradient(rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.15)) center / 100% 1px no-repeat,
    rgba(10, 13, 17, 0.6);
  overflow: hidden;
}

.hv-radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(52, 211, 153, 0.45), transparent 70deg);
  animation: spin 3.2s linear infinite;
}

.hv-radar-blip {
  position: absolute;
  top: 40%;
  left: 58%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.6);
  animation: radarBlip 3.2s ease-out infinite;
}

@keyframes radarBlip {
  0% { box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.6); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(255, 176, 32, 0); }
}

.hv-readout {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.hv-readout div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.hv-readout div:last-child {
  border-bottom: 0;
}

.hv-readout dt {
  color: var(--text-2);
}

.hv-readout dd {
  margin: 0;
  color: var(--text-0);
  text-align: right;
}

/* ---- Terminal / deploy log lines (replayed by js/live-panels.js) ---- */
.deploy-log {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--text-2);
  overflow: hidden;
}

.deploy-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.25s ease;
}

.deploy-line.is-pending {
  opacity: 0;
}

.deploy-cmd {
  color: var(--text-0);
}

.deploy-cmd.is-typing::after {
  content: '_';
  color: var(--amber);
  animation: blink 1s step-end infinite;
}

.deploy-ok {
  color: var(--status-green);
}

/* ---- Company History: changelog, not a zig-zag timeline ---- */
.changelog {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.changelog-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.changelog-year {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-0);
}

.changelog-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.changelog-body p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  max-width: 560px;
}

/* Commit-graph rail: a line threads the year dots and fills in amber as the
   history scrolls past; each dot lights up when it reaches mid-screen.
   Browsers without scroll-driven animations keep the static changelog. */
.changelog {
  position: relative;
}

.changelog::before,
.changelog::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 52px;
  bottom: 52px;
  width: 1px;
  background: var(--line-strong);
}

.changelog::after {
  background: linear-gradient(180deg, var(--amber), var(--status-green));
  transform-origin: top;
  transform: scaleY(0);
}

.changelog .status-dot {
  position: relative;
  z-index: 1;
}

@supports (animation-timeline: view()) {
  .changelog::after {
    animation: railDraw linear both;
    animation-timeline: view();
    animation-range: cover 15% cover 70%;
  }

  .changelog-entry .status-dot {
    animation: commitLight linear both;
    animation-timeline: view();
    animation-range: entry 100% cover 50%;
  }
}

@supports not (animation-timeline: view()) {
  .changelog::after {
    transform: none;
  }
}

@keyframes railDraw {
  to { transform: scaleY(1); }
}

@keyframes commitLight {
  from {
    background: var(--line-strong);
    box-shadow: 0 0 0 3px transparent;
  }
}

/* ---- Mission / Vision / Values: manifesto rows, not icon cards ---- */
.principles {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.principle {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.principle-index {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--line-strong);
  line-height: 1;
}

.principle-label {
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: var(--amber);
  margin-bottom: 10px;
}

.principle-body p {
  font-size: 1.1rem;
  color: var(--text-0);
  line-height: 1.65;
  margin: 0;
  max-width: 620px;
}

/* ---- Shared CTA banner (about / services / portfolio / booking / contact) ---- */
.cta-banner {
  position: relative;
  padding: 90px 0;
  background: var(--bg-0);
  border-top: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 176, 32, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner .container {
  position: relative;
}

.cta-banner h2 {
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--text-1);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- 404 page ---- */
.error-page {
  min-height: 68vh;
  display: flex;
  align-items: center;
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
  background: var(--bg-0);
}

.error-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black, transparent 70%);
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 70%);
}

.error-content {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.error-status {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 700;
  color: var(--line-strong);
  line-height: 1;
  margin-bottom: 8px;
}

.error-content h1 {
  margin-bottom: 16px;
}

.error-content > p {
  color: var(--text-1);
}

.error-path-line {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-2);
  margin: 18px 0 32px;
}

.error-path-line code {
  color: var(--amber);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.error-content .cta-actions {
  margin-bottom: 44px;
}

.error-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.error-links a {
  color: var(--text-2);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: all var(--transition-base);
}

.error-links a:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* ---- Team roster ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.team-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all var(--transition-base);
}

.team-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--amber);
  margin-bottom: 20px;
}

.team-info h4 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.team-info p {
  font-size: 0.82rem;
  color: var(--text-2);
  margin: 0 0 16px;
  font-family: var(--font-mono);
}

.team-social {
  display: flex;
  gap: 8px;
}

.team-social a {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--transition-base);
}

.team-social a:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Responsive */
@media (max-width: 1024px) {
  .page-hero {
    padding-top: 124px;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .page-hero .container:has(.page-hero-visual) {
    grid-template-columns: 1fr;
  }

  /* Decorative only — keep the hero short on phones and small tablets */
  .page-hero-visual {
    display: none;
  }
}

@media (max-width: 640px) {
  .changelog-entry,
  .principle {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .changelog::before,
  .changelog::after {
    display: none;
  }
}

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

  .page-hero {
    padding-top: 108px;
    padding-bottom: 40px;
  }
}
