/* =====================================================================
   Upya Group — shared stylesheet
   Flat design. No shadows anywhere.
   ===================================================================== */

/* ---------- Design tokens (§4) ---------- */
:root {
  /* Color */
  --color-brand:        #1D9E75; /* primary CTA, accents, links */
  --color-brand-light:  #E1F5EE; /* pill + icon-badge backgrounds */
  --color-brand-dark:   #0F6E56; /* tag text, initials, icon color, hover */
  --color-surface:      #F5F5F3; /* stat cards, team cards, page bg */
  --color-border:       #DDDDDA; /* all borders, dividers */
  --color-text-primary: #000000; /* headings, body */
  --color-text-muted:   #666662; /* supporting copy, labels */

  /* Layout */
  --max-width:          1100px;
  --page-padding:       3rem;
  --section-padding-y:  4rem;
  --radius:             8px;
  --radius-card:        12px;
  --gap-grid:           12px;
  --nav-height:         70px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: var(--color-brand); }

[id] { scroll-margin-top: calc(var(--nav-height) + 16px); }

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

main { display: block; }

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--color-brand-dark);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-brand-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Typography helpers (§5) ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  margin-bottom: 1.25rem;
}

.section__title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 2rem;
}

.muted { color: var(--color-text-muted); }
.text-brand { color: var(--color-brand); }

/* ---------- Logo ---------- */
.logo {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--color-text-primary);
  text-decoration: none;
}
.logo__dot { color: var(--color-brand); }

/* ---------- Navigation — dropdown menu (everywhere) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 0.5px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.menu { position: relative; }

.menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: transparent;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 9px 16px;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.menu__btn:hover { background: var(--color-surface); }
.menu__chevron { width: 16px; height: 16px; transition: transform 200ms ease; }
.menu.is-open .menu__chevron { transform: rotate(180deg); }

.menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 6px;
  display: none;
  z-index: 120;
}
.menu.is-open .menu__list { display: block; }

.menu__item {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}
.menu__item:hover { background: var(--color-surface); color: var(--color-text-primary); }
.menu__item[aria-current="page"] {
  background: var(--color-brand-light);
  color: var(--color-brand-dark);
  font-weight: 500;
}

/* ---------- Buttons (§7.3) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 11px 24px;
  border-radius: var(--radius);
  border: 0.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, filter 150ms ease;
}
.btn svg { width: 16px; height: 16px; }

.btn--primary {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}
.btn--primary:hover { filter: brightness(0.93); }

.btn--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-primary);
}
.btn--outline:hover { background: var(--color-surface); }

/* White button for use on the brand CTA band */
.btn--on-brand {
  background: #fff;
  border-color: #fff;
  color: var(--color-brand-dark);
}
.btn--on-brand:hover { filter: brightness(0.94); }

/* ---------- Cards (§7.4) ---------- */
.card {
  background: #fff;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.card__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.card__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* ---------- Icon badge (§7.5) ---------- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--color-brand-light);
  color: var(--color-brand-dark);
  margin-bottom: 1rem;
}
.icon-badge svg { width: 18px; height: 18px; }

/* ---------- Tags (§8.3) ---------- */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-brand-dark);
  background: var(--color-brand-light);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

/* ---------- Sections ---------- */
.section { padding: var(--section-padding-y) 0; }
.section--tight { padding-top: 0; }

/* =====================================================================
   HOME — hero (§8.1)
   ===================================================================== */
.hero { padding: 5rem 0 4rem; }
.hero__inner { max-width: 860px; }
.hero__title {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero__sub {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 2.5rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Credibility strip ---------- */
.cred {
  background: #fff;
  border-top: 0.5px solid var(--color-border);
  border-bottom: 0.5px solid var(--color-border);
}
.cred__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 2.75rem;
  padding: 1.1rem 0;
}
.cred__item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 13px;
  color: var(--color-text-muted);
}
.cred__item svg { width: 16px; height: 16px; color: var(--color-brand-dark); flex: none; }
.cred__item strong { color: var(--color-text-primary); font-weight: 500; }

/* ---------- "What we do" hairline grid (§8.2, §7.3) ---------- */
.hairline-grid {
  display: grid;
  gap: 1px;
  background: var(--color-border);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.hairline-grid--4 { grid-template-columns: repeat(4, 1fr); }
.service-card { background: #fff; padding: 1.75rem 1.5rem; }

/* ---------- Materials strip ---------- */
.materials__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-grid);
}
.material {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.material__label { font-size: 14px; font-weight: 500; margin-top: 0.85rem; }
.material__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: 0.25rem;
}

/* ---------- Card grid (business case / why-PCR) ---------- */
.card-grid { display: grid; gap: var(--gap-grid); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Stat row (§8.3) ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-grid);
  margin-top: 2.5rem;
}
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.stat-card__num {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--color-brand);
}
.stat-card__label {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* =====================================================================
   Where we operate — interactive world map
   ===================================================================== */
.map__viz {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin-top: 1.75rem;
  aspect-ratio: 1000 / 389;
  background: #fff;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.map__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill; /* panel aspect == map viewBox aspect → no distortion */
}
.map__arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.arc {
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 3 7;
  opacity: 0.75;
  animation: arc-flow 1.5s linear infinite;
}
@keyframes arc-flow { to { stroke-dashoffset: -20; } }

.node {
  position: absolute;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
}
.node__dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-brand);
  border: 2px solid #fff;
}
.node__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--color-brand);
  animation: node-pulse 2.2s ease-out infinite;
}
@keyframes node-pulse {
  0%   { transform: scale(0.55); opacity: 0.75; }
  100% { transform: scale(1.7);  opacity: 0; }
}
.node__label {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: #fff;
  border: 0.5px solid var(--color-border);
  border-radius: 100px;
  padding: 2px 9px;
  white-space: nowrap;
}

/* ---------- Where-we-operate pills (kept as a small legend row) ---------- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.pill {
  font-size: 13px;
  line-height: 1;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--color-brand-light);
  border: 0.5px solid var(--color-brand);
  color: var(--color-brand-dark);
}

/* =====================================================================
   CTA band (above footer, every page except Contact)
   ===================================================================== */
.cta-band { background: var(--color-brand); color: #fff; }
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2.75rem 0;
}
.cta-band__title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.25;
  max-width: 620px;
}
.cta-band__text { font-size: 14px; opacity: 0.9; margin-top: 0.4rem; }

/* =====================================================================
   ABOUT (§9)
   ===================================================================== */
.about-hero {
  padding: 5rem 0 3rem;
  border-bottom: 0.5px solid var(--color-border);
}
.about-hero__title {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1.15;
  max-width: 620px;
  margin-bottom: 1.5rem;
}
.about-hero__sub {
  font-size: 17px;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 580px;
}

.about-body { padding: 3rem 0; }
.about-body__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.about-col__title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin-bottom: 1rem;
}
.about-col__body {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* =====================================================================
   TEAM page
   ===================================================================== */
.team2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-grid);
}
.member {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 2rem;
}
.member__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--color-brand-light);
  color: var(--color-brand-dark);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
}
.member__name { font-size: 18px; font-weight: 500; }
.member__role { font-size: 13px; color: var(--color-brand); margin-top: 3px; }
.member__bio {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-top: 1rem;
}
.member__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-brand-dark);
  text-decoration: none;
  margin-top: 1.25rem;
}
.member__link svg { width: 15px; height: 15px; }
.member__link:hover { text-decoration: underline; }

/* =====================================================================
   CONTACT page
   ===================================================================== */
.contact-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--color-brand-light);
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-top: 2rem;
}
.contact-primary__eyebrow {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand-dark);
  margin-bottom: 0.5rem;
}
.contact-primary__email {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.4px;
  color: var(--color-text-primary);
  text-decoration: none;
}
.contact-primary__email:hover { color: var(--color-brand-dark); }

.contact-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
}

/* =====================================================================
   Footer (§7.2)
   ===================================================================== */
.footer {
  background: #fff;
  border-top: 0.5px solid var(--color-border);
  padding: 2rem 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__copy { font-size: 13px; color: var(--color-text-muted); }
.footer__email { font-size: 13px; color: var(--color-brand); text-decoration: none; }
.footer__email:hover { text-decoration: underline; }

/* =====================================================================
   Scroll fade-in (§11) — progressive enhancement
   ===================================================================== */
.js .fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms ease, transform 300ms ease;
}
.js .fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* =====================================================================
   Responsive (§10)
   ===================================================================== */
@media (max-width: 768px) {
  :root { --page-padding: 1.5rem; }

  .hairline-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .materials__grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .team2-grid { grid-template-columns: 1fr; }
  .about-body__grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .hero { padding-top: 3.5rem; }
  .hero__title { font-size: 38px; }
  .about-hero__title { font-size: 32px; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hairline-grid--4 { grid-template-columns: 1fr; }
  .materials__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 32px; letter-spacing: -0.5px; }
  .section__title { font-size: 24px; }
  /* Keep map labels legible on small screens */
  .node__label { font-size: 11px; padding: 1px 7px; }
}

/* Respect reduced-motion (§11) */
@media (prefers-reduced-motion: reduce) {
  .js .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .arc { animation: none !important; }
  .node__dot::after { animation: none !important; }
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
