/* ============================================================
   TechMEPi Engineering — Design System
   Navy + Gold premium engineering aesthetic
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --navy: #13265c;
  --navy-700: #1b3378;
  --navy-deep: #0b1839;
  --navy-ink: #161d2e;
  --gold: #c79a2e;
  --gold-light: #e3b94d;
  --gold-pale: #f7edd4;
  --gold-ink: #8a6a15;   /* AA-legible gold for TEXT on light backgrounds (~5:1 on white); keep --gold/--gold-light for dark bands, fills, borders */
  --off-white: #f6f7fa;
  --white: #ffffff;
  --grey-100: #eef0f4;
  --grey-300: #d5dae3;
  --grey-500: #8a93a6;
  --grey-700: #4a5468;

  --font-display: "Sora", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(11, 24, 57, 0.07);
  --shadow-md: 0 10px 30px rgba(11, 24, 57, 0.12);
  --shadow-lg: 0 24px 60px rgba(11, 24, 57, 0.18);

  --container: 1180px;
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--navy-ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
::selection { background: var(--gold); color: var(--navy-deep); }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--tight { padding: clamp(44px, 6vw, 72px) 0; }
.section--dark { background: var(--navy-deep); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }
.section--dark p { color: rgba(255, 255, 255, 0.78); }
.section--grey { background: var(--off-white); }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Kicker / section headings ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 34px; height: 2px; background: var(--gold); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }
.section-head p { color: var(--grey-700); font-size: 1.06rem; }
.section--dark .section-head p { color: rgba(255, 255, 255, 0.72); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--navy-deep); box-shadow: 0 8px 24px rgba(199, 154, 46, 0.35); }
.btn--gold:hover { background: var(--gold-light); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-700); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.55); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--navy-deep); border-color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.0);
  transition: background 0.3s, box-shadow 0.3s, height 0.3s;
}
.site-header.is-solid,
.site-header.is-open {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(11, 24, 57, 0.08), var(--shadow-sm);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo svg { height: 44px; width: auto; display: block; }
/* On transparent header over dark hero, use white logotype */
.header-on-dark:not(.is-solid):not(.is-open) .logo .logo-word { fill: #ffffff; }
.header-on-dark:not(.is-solid):not(.is-open) .logo .logo-sub { fill: var(--gold-light); }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-ink);
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--navy); }
.header-on-dark:not(.is-solid):not(.is-open) .nav a { color: rgba(255, 255, 255, 0.92); }
.nav .btn { padding: 11px 24px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 0; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: var(--navy); transition: 0.3s var(--ease); }
.header-on-dark:not(.is-solid):not(.is-open) .nav-toggle span { background: #fff; }
.is-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    padding: 10px 24px 24px;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s var(--ease);
  }
  .is-open .nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { width: 100%; padding: 13px 0; border-bottom: 1px solid var(--grey-100); color: var(--navy-ink) !important; }
  .nav .btn { margin-top: 16px; width: 100%; }
  .nav-toggle { display: flex; }
}

/* Pages with light tops need header offset */
.page-offset { padding-top: var(--header-h); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  background: var(--navy-deep);
  padding: calc(var(--header-h) + clamp(48px, 8vw, 90px)) 0 clamp(48px, 7vw, 80px);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 340px at 85% -10%, rgba(199, 154, 46, 0.18), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(27, 51, 120, 0.55), transparent 60%);
}
.page-hero .container { position: relative; }
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.page-hero p { color: rgba(255, 255, 255, 0.75); max-width: 640px; font-size: 1.08rem; margin: 0; }
.crumbs { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 18px; display: inline-flex; gap: 10px; align-items: center; }
.crumbs a { color: rgba(255, 255, 255, 0.65); }
.crumbs a:hover { color: var(--white); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: var(--card-bd);                                              /* navy hairline, not the near-invisible grey-100 */
  border-radius: var(--radius) var(--arc) var(--radius) var(--radius); /* signature top-right arc-bite */
  padding: 32px;                                                       /* unified rhythm (--pad-3) */
  box-shadow: var(--card-shadow), var(--card-hi);                      /* grounded two-layer depth + glass highlight */
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--grey-300); }
.card .icon-badge { margin-bottom: 20px; }
.icon-badge {
  width: 58px; height: 58px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-700));
  color: var(--gold-light);
  flex: 0 0 auto;
}
.icon-badge svg { width: 28px; height: 28px; }
.icon-badge--gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy-deep); }

/* ---------- Media / images ---------- */
.media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 10px; }
.stat .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat .label { display: block; font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-700); margin-top: 10px; font-weight: 600; }
.section--dark .stat .label { color: rgba(255, 255, 255, 0.72); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.75); }
.site-footer .footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
  gap: 44px;
  padding: clamp(52px, 7vw, 80px) 0 44px;
}
@media (max-width: 960px) { .site-footer .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .site-footer .footer-top { grid-template-columns: 1fr; } }
.site-footer h3 { color: var(--white); font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); transition: color 0.2s; }
.site-footer a:hover { color: var(--gold-light); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer-brand .logo svg { height: 46px; }
.footer-brand p { font-size: 0.95rem; margin-top: 18px; max-width: 300px; }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 0.95rem; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; color: var(--gold); flex: 0 0 auto; margin-top: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: rgba(255, 255, 255, 0.5);
}
.footer-bottom a { color: rgba(255, 255, 255, 0.5); }
.footer-bottom a:hover { color: var(--gold-light); }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 950;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.field input, .field select, .field textarea {
  font: inherit;
  padding: 14px 16px;
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(199, 154, 46, 0.15);
}

/* ---------- Misc ---------- */
.gold-rule { width: 56px; height: 3px; background: var(--gold); border: 0; margin: 0 0 22px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list svg { width: 20px; height: 20px; color: var(--gold); flex: 0 0 auto; margin-top: 4px; }
.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy);
  background: var(--gold-pale);
  border: 1px solid rgba(199, 154, 46, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--navy-deep);
  padding: 10px 18px; z-index: 2000; border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }
