/* ============================================================
   Ubangui Consulting Inc. — Design System v2
   One palette, one type system, no stacked overrides.
   ============================================================ */

:root {
  /* Brand palette (single source of truth) */
  --navy: #1A1A2E;
  --navy-2: #142744;
  --teal: #1A6B72;
  --ocean: #2E86AB;
  --corporate-blue: #2F67AE;
  --cyan: #16A8D4;
  --slate: #6F7F9D;
  --ice: #D9ECF7;
  --pale-teal: #E8F4F5;
  --orange: #F47A2A;
  --white: #FFFFFF;
  --offwhite: #F5F5F5;
  --gray: #666666;
  --charcoal: #333333;
  --line: #DDE5ED;

  --navy-soft: #20263f;
  --border-soft: rgba(255, 255, 255, 0.14);
  --shadow-card: 0 4px 20px rgba(20, 30, 60, 0.08);
  --shadow-card-hover: 0 14px 34px rgba(20, 30, 60, 0.16);
  --shadow-nav: 0 18px 45px rgba(15, 25, 55, 0.14);

  --font-display: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.62;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-weight: 700; }
h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.005em;
}

p { margin: 0 0 1em; color: var(--charcoal); }
a { color: var(--corporate-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75em;
  display: inline-block;
}
.eyebrow.eyebrow-xl {
  font-size: 1.4rem;
  letter-spacing: 0.06em;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 13px 28px;
  border-radius: 100px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn span { font-size: 1.1em; transition: transform 0.2s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:hover span { transform: translateX(3px); }

.btn-primary { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn-primary:hover { background: var(--corporate-blue); box-shadow: var(--shadow-card-hover); }

.btn-accent { background: #00A6D6; color: var(--white); border-color: #00A6D6; }
.btn-accent:hover { background: #0089B3; box-shadow: var(--shadow-card-hover); }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-outline-dark { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline-dark:hover { background: var(--pale-teal); }

.btn-light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-light:hover { background: var(--ice); }

/* ---------------- Header / Nav (floating pill) ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.25s ease;
}
.site-header.scrolled { padding: 10px 0; }

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 110px;
  padding: 0 12px 0 20px;
  background: var(--navy);
  border-radius: 100px;
  box-shadow: var(--shadow-nav);
  transition: border-radius 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 90px; height: 90px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  opacity: 0.85;
  white-space: nowrap;
}
.nav-links a:hover { opacity: 1; text-decoration: none; color: var(--cyan); }
.nav-links a.active { color: var(--cyan); opacity: 1; }

.nav-cta { display: none; white-space: nowrap; }
@media (min-width: 1080px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; padding: 0; position: relative;
}
.nav-toggle span {
  position: absolute; left: 6px; right: 6px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 18px; }
.nav-toggle span:nth-child(3) { top: 24px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 18px; transform: rotate(-45deg); }

@media (max-width: 1079px) {
  .nav-shell { border-radius: 24px; }
  .nav-links {
    position: absolute; top: 84px; left: 12px; right: 12px; z-index: 60;
    background: var(--navy); border-radius: 18px;
    flex-direction: column; align-items: flex-start; gap: 0;
    box-shadow: var(--shadow-nav);
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 480px; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; width: 100%; padding: 16px 22px;
    border-bottom: 1px solid var(--border-soft);
    white-space: normal;
  }
  .nav-toggle { display: block; }
}

/* ---------------- Hero (home) ---------------- */
.hero {
  padding: 76px 0 100px;
  background: radial-gradient(circle at 80% 20%, rgba(22,168,212,0.12), transparent 32%),
              linear-gradient(180deg, #fbfdff 0%, #f4f8fb 72%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(47,103,174,.05) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(47,103,174,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to left, #000, transparent 72%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 60px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { font-size: clamp(2.9rem, 6vw, 4.8rem); }
.hero-copy .lead { font-size: 1.2rem; color: #45536b; max-width: 560px; margin-top: 20px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }
.proof-row { display: flex; gap: 0; margin-top: 44px; color: #52657d; font-size: 0.9rem; flex-wrap: wrap; }
.proof-item { display: flex; align-items: center; gap: 11px; padding: 0 26px; border-right: 1px solid #d4dde6; }
.proof-item:first-child { padding-left: 0; }
.proof-item:last-child { border-right: 0; }
.proof-icon {
  width: 34px; height: 34px; border: 2px solid var(--cyan); border-radius: 50%;
  display: grid; place-items: center; color: var(--cyan); font-weight: 700; flex-shrink: 0;
}

.hero-visual { position: relative; z-index: 1; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 70px rgba(20,30,60,0.18); }
.hero-geo-img { width: 100%; height: auto; display: block; object-fit: cover; }
/* gradient shown while hero-geo.jpg is absent */
.hero-visual { background: linear-gradient(135deg, #142744 0%, #1A6B72 55%, #0f1b30 100%); min-height: 360px; }
.hero-callout {
  position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 3px;
  color: #eaf3fb; font-size: 0.72rem; max-width: 165px; padding-left: 16px;
}
.hero-callout:before {
  content: ""; position: absolute; left: 0; top: 3px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(22,168,212,.25);
}
.hero-callout strong { text-transform: uppercase; font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.02em; color: #fff; }
.hero-callout span { color: #bcd3e6; }
.callout-a { left: 6%; top: 10%; }
.callout-b { right: 6%; top: 18%; }
.callout-c { left: 6%; bottom: 22%; }
.callout-d { right: 6%; bottom: 10%; }

.hero-sm { padding: 56px 0 60px; }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; }
}
@media (max-width: 620px) {
  .hero { padding: 56px 0 70px; }
  .hero-callout { display: none; }
  .proof-row { gap: 18px; }
  .proof-item { padding: 0; border-right: 0; width: 100%; }
}
.hero-sm h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }

/* ---------------- Sections ---------------- */
section { padding: 100px 0; }
section.tight { padding: 60px 0; }
.section-alt { background: var(--offwhite); }
.section-navy {
  background: linear-gradient(135deg, var(--navy) 0%, #16233f 100%);
  color: var(--white);
  position: relative; overflow: hidden;
}
.section-navy:before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 0%, rgba(22,168,212,.14), transparent 32%);
  pointer-events: none;
}
.section-navy .container { position: relative; z-index: 1; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy p { color: rgba(255,255,255,0.78); }
.section-navy .eyebrow { color: var(--cyan); }
.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-sub { font-size: 1.05rem; color: var(--gray); margin: 6px 0 0; font-style: italic; }

/* ---------------- Grids & Cards ---------------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(22,168,212,0.4); }
.card-soft { background: var(--pale-teal); border: none; }

.card-dark {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(134,199,238,0.18);
  color: rgba(255,255,255,0.85);
  position: relative;
}
.card-dark:before { content: ""; position: absolute; top: 0; left: 28px; width: 60px; height: 2px; background: linear-gradient(90deg, var(--teal), var(--cyan)); }
.card-dark:hover { border-color: rgba(22,168,212,0.55); background: rgba(255,255,255,0.07); }
.card-dark h3 { color: var(--cyan); }
.card-dark .card-number { color: var(--cyan); font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; display: block; margin-bottom: 18px; }

.card .icon-num {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  color: var(--ocean); letter-spacing: 0.08em; margin-bottom: 14px; display: block;
}

/* Service cards: number merged into heading, button pinned to bottom */
.svc-cards .card { display: flex; flex-direction: column; }
.svc-cards .card > p { flex: 1; }
.svc-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.svc-num {
  font-family: var(--font-display); font-weight: 800; font-size: 1em;
  color: var(--ocean); letter-spacing: 0.04em; flex-shrink: 0; line-height: 1;
}

.stat-strip { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; color: var(--teal); display: block; }
.section-navy .stat .num { color: var(--cyan); }
.stat .label { font-size: 0.85rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.05em; }
.section-navy .stat .label { color: rgba(255,255,255,0.7); }

.pill {
  display: inline-block; background: var(--pale-teal); color: var(--teal);
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px;
  border-radius: 100px; margin-bottom: 10px;
}

.quote-block {
  background: var(--pale-teal); border-left: 4px solid var(--teal);
  padding: 28px 32px; border-radius: 8px; font-size: 1.1rem;
  color: var(--charcoal); font-style: italic;
}
.quote-block p:last-child { margin-bottom: 0; }

/* ---------------- Story / flow ---------------- */
.story-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; align-items: center; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.flow div {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px;
  background: linear-gradient(180deg, #fff, #f6f9fc);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; overflow: hidden;
  box-shadow: 0 10px 26px rgba(8,38,77,.06); transition: 0.25s;
}
.flow div:hover { border-color: var(--cyan); transform: translateY(-4px); }
.flow span { font-weight: 700; color: var(--cyan); font-size: 1.5rem; font-family: var(--font-display); line-height: 1; }
.flow strong { font-family: var(--font-serif); font-size: 0.92rem; color: var(--navy); line-height: 1.25; }
.flow i { align-self: center; font-style: normal; color: var(--cyan); font-size: 1.6rem; }
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 700px) { .flow { grid-template-columns: 1fr; } .flow i { transform: rotate(90deg); justify-self: center; } }

/* ---------------- Case study list ---------------- */
.case-list { display: grid; gap: 20px; }
.case-item { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.case-item:last-child { border-bottom: none; }
.case-item .sector { font-family: var(--font-display); font-weight: 800; color: var(--teal); font-size: 1.05rem; }
@media (max-width: 700px) { .case-item { grid-template-columns: 1fr; gap: 6px; } }

.filter-bar-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: nowrap; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; flex: 1; padding: 4px 2px; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-arrow {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--white);
  border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--charcoal);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.filter-arrow:hover { border-color: var(--teal); color: var(--teal); }
.filter-arrow[hidden] { visibility: hidden; pointer-events: none; }
.filter-pill {
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem; padding: 8px 16px;
  border-radius: 100px; border: 1.5px solid var(--line); background: var(--white);
  color: var(--charcoal); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.filter-pill:hover { border-color: var(--teal); color: var(--teal); }
.filter-pill.active { background: var(--teal); border-color: var(--teal); color: var(--white); }
.case-item.is-hidden { display: none; }

/* ---------------- Team ---------------- */
.team-card { text-align: center; padding: 36px 24px; }
.team-avatar {
  width: 84px; height: 84px; border-radius: 50%; background: var(--teal); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; margin: 0 auto 18px;
}
.team-role { color: var(--gray); font-size: 0.92rem; }

/* ---------------- Latest News ---------------- */
.news-section { position: relative; overflow: hidden; }
.news-section:before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  right: -250px; top: 30px;
  background: radial-gradient(circle, rgba(217,236,247,.85) 0, rgba(232,244,245,.2) 45%, transparent 70%);
  pointer-events: none;
}
.news-heading { display: grid; grid-template-columns: 1fr 0.7fr; gap: 60px; align-items: end; margin-bottom: 48px; position: relative; z-index: 1; }
.news-heading > p { font-size: 1.02rem; line-height: 1.75; color: var(--slate); max-width: 560px; justify-self: end; }
.news-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px; position: relative; z-index: 1; }
.news-card {
  --mx: 50%; --my: 50%;
  min-height: 440px; border: 1px solid var(--line); background: var(--offwhite);
  display: flex; flex-direction: column; overflow: hidden; position: relative; isolation: isolate;
  border-radius: 14px;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), border-color 0.35s, box-shadow 0.35s, background-color 0.35s;
  color: var(--charcoal);
}
.news-card:before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(22,168,212,.15), transparent 58%);
  opacity: 0; transition: opacity 0.3s; z-index: 2; pointer-events: none;
}
.news-card:after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--corporate-blue), var(--cyan));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; z-index: 4;
}
.news-card:hover, .news-card:focus-visible {
  transform: translateY(-8px); border-color: rgba(47,103,174,.5);
  box-shadow: 0 24px 60px rgba(20,30,60,.14);
  background: linear-gradient(150deg, var(--ice), var(--pale-teal));
  outline: none;
}
.news-card:hover:before, .news-card:focus-visible:before { opacity: 1; }
.news-card:hover:after, .news-card:focus-visible:after { transform: scaleX(1); }
.news-card-featured { min-height: 480px; }
.news-visual { height: 190px; position: relative; overflow: hidden; background: var(--navy); transition: filter 0.35s ease; }
.news-visual-ai, .news-visual-territory, .news-visual-network { position: absolute; inset: 0; }
/* real og:image fades in over the CSS visual fallback */
.news-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; z-index: 2; }
.news-thumb.loaded { opacity: 1; }
.news-card-featured .news-visual { height: 230px; }
.news-card:hover .news-visual { filter: saturate(1.15) brightness(1.04); }
.news-card-body { padding: 24px 24px 22px; display: flex; flex: 1; flex-direction: column; position: relative; z-index: 3; }
.news-card-featured .news-card-body { padding: 28px 30px 24px; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 13px; margin-bottom: 16px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); font-family: var(--font-display); font-weight: 700; }
.news-source { color: var(--corporate-blue); }
.news-meta span + span:before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); margin-right: 13px; vertical-align: middle; }
.news-card h3 { font-family: var(--font-serif); font-size: clamp(1.3rem, 1.8vw, 1.7rem); line-height: 1.2; color: var(--navy); transition: color 0.3s; }
.news-card-featured h3 { font-size: clamp(1.5rem, 2.1vw, 2.05rem); }
.news-card p { margin-top: 13px; color: var(--gray); line-height: 1.68; font-size: 0.94rem; transition: color 0.3s; }
.news-card:hover h3 { color: var(--teal); }
.news-card:hover p { color: var(--charcoal); }
.news-card-footer {
  margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(20,30,60,.12); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 800; color: var(--navy); font-family: var(--font-display);
}
.news-arrow {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid rgba(20,30,60,.22); border-radius: 50%; font-size: 1.1rem;
  transition: transform 0.3s, background-color 0.3s, color 0.3s, border-color 0.3s;
}
.news-card:hover .news-arrow { transform: translate(3px, -3px); background: var(--corporate-blue); color: var(--white); border-color: var(--corporate-blue); }

.news-visual-ai { background: radial-gradient(circle at 50% 45%, var(--cyan) 0, var(--ocean) 24%, var(--corporate-blue) 46%, var(--navy) 78%); }
.ai-ring { position: absolute; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.ai-ring.r1 { width: 110px; height: 110px; }
.ai-ring.r2 { width: 170px; height: 170px; border-style: dashed; }
.ai-core { position: absolute; width: 38px; height: 38px; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #fff; box-shadow: 0 0 32px rgba(255,255,255,.55); }
.ai-line { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, #fff, transparent); width: 88%; left: 6%; top: 50%; }
.ai-line.l1 { transform: rotate(28deg); }
.ai-line.l2 { transform: rotate(-28deg); }
.news-card:hover .ai-ring.r2 { animation: newsSpin 9s linear infinite; }

.news-visual-territory { background: linear-gradient(145deg, var(--ice) 0%, var(--ocean) 100%); }
.news-visual-territory:before {
  content: ""; position: absolute; inset: 10% 12%; background: var(--teal);
  clip-path: polygon(12% 29%,37% 14%,57% 24%,81% 13%,93% 37%,82% 62%,95% 78%,61% 90%,34% 77%,13% 86%,5% 55%);
  opacity: 0.92; box-shadow: inset 0 0 40px rgba(20,30,60,.22);
}
.terrain-line { position: absolute; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; transform: rotate(-14deg); }
.terrain-line.t1 { width: 150px; height: 68px; left: 9%; top: 22%; }
.terrain-line.t2 { width: 200px; height: 90px; left: 4%; top: 34%; }
.terrain-pin {
  position: absolute; width: 18px; height: 18px; border-radius: 50% 50% 50% 0;
  background: #fff; border: 4px solid var(--cyan); transform: rotate(-45deg);
  right: 25%; top: 35%; box-shadow: 0 0 0 7px rgba(255,255,255,.25);
}
.news-card:hover .terrain-pin { animation: pinPulse 1.8s ease-in-out infinite; }

.news-visual-network { background: linear-gradient(145deg, var(--navy) 0%, #24365e 50%, var(--corporate-blue) 100%); }
.network-path {
  position: absolute; height: 2px; border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 14px rgba(22,168,212,.6);
}
.network-path.p1 { width: 72%; left: 10%; top: 42%; transform: rotate(13deg); }
.network-path.p2 { width: 64%; left: 18%; top: 64%; transform: rotate(-18deg); }
.network-dot {
  position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan);
  border: 3px solid rgba(255,255,255,.9); box-shadow: 0 0 0 6px rgba(22,168,212,.15), 0 0 20px rgba(22,168,212,.85);
}
.network-dot.d1 { left: 16%; top: 48%; } .network-dot.d2 { left: 44%; top: 30%; }
.network-dot.d3 { right: 27%; top: 57%; } .network-dot.d4 { right: 11%; top: 32%; }
.news-card:hover .network-dot { animation: networkPulse 1.8s ease-in-out infinite alternate; }

.news-bottom { margin-top: 24px; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.ubangui-announcement-slot { display: flex; align-items: center; gap: 16px; border-left: 3px solid var(--orange); padding-left: 16px; }
.announcement-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--navy); color: #fff; border: 2px solid var(--cyan);
  font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem;
}
.ubangui-announcement-slot > div { display: flex; flex-direction: column; gap: 2px; }
.announcement-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 800; color: var(--teal); font-family: var(--font-display); }
.announcement-label:after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--orange); vertical-align: middle; }
.ubangui-announcement-slot strong { font-size: 0.9rem; color: var(--charcoal); }
.news-refresh-note {
  font-family: var(--font-display); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 700; color: var(--slate); padding: 9px 14px; border: 1px solid var(--ice);
  background: var(--offwhite); border-radius: 100px;
}

@keyframes newsSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes pinPulse { 0%, 100% { box-shadow: 0 0 0 7px rgba(255,255,255,.25); } 50% { box-shadow: 0 0 0 13px rgba(255,255,255,.08); } }
@keyframes networkPulse { to { transform: scale(1.25); box-shadow: 0 0 0 9px rgba(22,168,212,.12), 0 0 24px rgba(22,168,212,.95); } }

@media (max-width: 1050px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card-featured { grid-column: 1 / -1; min-height: 420px; display: grid; grid-template-columns: 1.05fr .95fr; }
  .news-card-featured .news-visual { height: 100%; min-height: 300px; }
  .news-heading { grid-template-columns: 1fr; gap: 20px; }
  .news-heading > p { justify-self: start; }
}
@media (max-width: 720px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card, .news-card-featured { grid-column: auto; display: flex; }
  .news-card-featured .news-visual, .news-visual { height: 190px; min-height: 0; }
  .news-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------------- Contact form ---------------- */
.page-hero {
  padding: 56px 0 68px;
  background: linear-gradient(125deg, var(--navy) 0%, #223d67 55%, var(--corporate-blue) 100%);
  position: relative; overflow: hidden; color: #fff;
}
.page-hero:before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 20%, rgba(22,168,212,.3), transparent 26%),
              linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
              linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 820px; font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.page-hero .eyebrow { color: var(--cyan); }
.page-hero .lede { color: #d5e4ef; font-size: 1.15rem; max-width: 640px; margin-top: 18px; }
.page-hero.contact-hero { padding-bottom: 90px; }
.contact-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.contact-meta span { font-size: 0.76rem; font-family: var(--font-display); font-weight: 600; border: 1px solid rgba(255,255,255,.2); border-radius: 100px; padding: 8px 14px; color: #d9e9f4; background: rgba(255,255,255,.05); }

.contact-form-layout { display: grid; grid-template-columns: 0.66fr 1.34fr; gap: 50px; align-items: start; }
.contact-side { position: sticky; top: 130px; padding: 20px 10px 0 0; }
.contact-side p:not(.eyebrow) { color: var(--gray); font-size: 1.02rem; margin-top: 16px; max-width: 480px; }
.direct-contact { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; display: flex; flex-direction: column; gap: 5px; }
.direct-contact span { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--slate); font-weight: 700; font-family: var(--font-display); }
.direct-contact a { font-size: 1.05rem; color: var(--navy); font-weight: 600; }
.direct-contact a:hover { color: var(--corporate-blue); }
.privacy-note { margin-top: 32px; padding: 22px; border-radius: 14px; background: var(--pale-teal); border: 1px solid var(--ice); }
.privacy-note strong { color: var(--navy); }
.privacy-note p { margin-top: 6px; color: #5b6c7f; font-size: 0.88rem; line-height: 1.6; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px rgba(20,30,60,.1); padding: 44px; }
.form-card-header { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.form-card-header > p:last-child { color: var(--slate); margin-top: 10px; }
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.field-grid { display: grid; gap: 22px; }
.field-grid.two-col { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 8px; position: relative; }
.field label { font-size: 0.82rem; font-weight: 700; color: var(--navy); font-family: var(--font-display); }
.field label span { color: var(--corporate-blue); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid #cfd8e2; border-radius: 8px; background: #fbfdff;
  padding: 12px 14px; color: var(--charcoal); font: inherit; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field select { cursor: pointer; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--ice); }
.field input::placeholder, .field textarea::placeholder { color: #96a2af; }
.field-error { display: none; color: #B3261E; font-size: 0.78rem; margin-top: 2px; font-weight: 600; }
.has-error input, .has-error textarea, .has-error select { border-color: #B3261E; }
.has-error .field-error { display: block; }
.consent-row { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; color: var(--gray); font-size: 0.88rem; line-height: 1.6; cursor: pointer; }
.consent-row input { margin-top: 3px; accent-color: var(--teal); }
.consent-row strong { color: var(--corporate-blue); }
.form-submit { align-self: flex-start; min-width: 200px; }
.form-honeypot { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 0 !important; width: 0 !important; }
.form-success { display: none; background: var(--pale-teal); color: var(--teal); padding: 14px 18px; border-radius: 8px; font-weight: 600; }
.btn[data-state="loading"] { opacity: 0.75; cursor: default; pointer-events: none; }

@media (max-width: 1000px) {
  .contact-form-layout { grid-template-columns: 1fr; gap: 40px; }
  .contact-side { position: static; padding-right: 0; }
}
@media (max-width: 620px) {
  .form-grid, .field-grid.two-col { grid-template-columns: 1fr; }
  .form-card { padding: 28px 22px; border-radius: 16px; }
}

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 48px 0 28px; }
.footer-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px;
  padding-bottom: 24px; border-bottom: 1px solid var(--border-soft); margin-bottom: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-family: var(--font-display); font-weight: 800; }
.footer-brand img { width: 30px; height: 30px; }
.footer-nav { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-nav a { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--white); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; }

/* ---------------- Misc ---------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------------- Scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .news-card, .news-arrow, .terrain-pin, .ai-ring, .network-dot { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------------- Back to top ---------------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--teal); color: var(--white); border: none; display: flex; align-items: center;
  justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(20,30,60,0.25);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease; z-index: 90;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--corporate-blue); }
.back-to-top svg { width: 18px; height: 18px; }

/* ---------------- Technology stack display ---------------- */
.tech-stack { display: flex; flex-direction: column; }
.tech-category {
  display: grid;
  grid-template-columns: 148px 1fr;
  align-items: center;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tech-category:last-child { border-bottom: none; }
.tech-cat-label {
  font-family: var(--font-display); font-size: 0.64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--cyan);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* pills scroll horizontally — never wrap to a second line */
.tech-pills {
  display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.tech-pills::-webkit-scrollbar { display: none; }
.tech-pill {
  font-family: var(--font-display); font-size: 0.76rem; font-weight: 600;
  padding: 5px 13px; border-radius: 100px; white-space: nowrap;
  border: 1px solid rgba(22,168,212,0.28);
  background: rgba(22,168,212,0.07);
  color: rgba(255,255,255,0.82);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: default; flex-shrink: 0;
}
.tech-pill:hover { background: rgba(22,168,212,0.18); border-color: rgba(22,168,212,0.65); color: #fff; }
@media (max-width: 680px) {
  .tech-category { grid-template-columns: 1fr; gap: 8px; padding: 14px 0; }
}
.cap-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cap-modal[hidden] { display: none; }

.cap-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 45, 0.74);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.cap-modal-box {
  position: relative;
  background: var(--white);
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 48px 44px 40px;
  box-shadow: 0 28px 72px rgba(15, 20, 45, 0.36);
  animation: modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.cap-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gray);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.cap-modal-close:hover { color: var(--navy); background: var(--offwhite); }

.cap-modal-box .eyebrow { margin-bottom: 6px; }
.cap-modal-box h2 {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  color: var(--navy);
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--pale-teal);
}

.cap-modal-items {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 34px;
}

.cap-modal-item h3 {
  font-family: var(--font-display);
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 5px;
}
.cap-modal-item p { margin: 0; font-size: 0.93rem; color: var(--gray); line-height: 1.6; }

.cap-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--cyan);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.cap-more-btn:hover { color: var(--white); }

@media (max-width: 640px) {
  .cap-modal-box { padding: 36px 22px 28px; }
}

