/* =========================================================
   3A Outsourcing Advisors — Static HTML/CSS/JS version
   Palette: Navy (#0B1120) + Sand/Gold (#D4AF37)
   Type: DM Sans (body) + Playfair Display (headings)
   ========================================================= */

:root {
  --navy: rgb(69, 78, 166);
  --navy-2: rgb(54, 62, 140);
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-muted: #f4f6fa;
  --border: #e3e8ef;
  --border-strong: #cdd5e0;
  --text: #0b1120;
  --muted: #5b6675;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.12);
  --shadow-sm: 0 1px 2px rgba(11, 17, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(11, 17, 32, 0.08);
  --shadow-lg: 0 16px 40px rgba(11, 17, 32, 0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --container: 1200px;
  --header-h: 80px;
  --ease: cubic-bezier(0.21, 0.47, 0.32, 0.98);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--navy);
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

input, textarea {
  font: inherit;
  color: inherit;
}

[hidden] { display: none !important; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 880px; }
.center { text-align: center; }

.section { padding: 96px 0; }
.section-light { background: var(--bg); }
.section-muted { background: var(--surface-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.section-dark::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at bottom left, rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
}

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head-row {
  max-width: 100%;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}
.section-lead {
  color: var(--muted);
  font-size: 1.125rem;
  margin-top: 16px;
  margin-bottom: 64px;
}
.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--navy-2); box-shadow: var(--shadow-md); }
.btn-outline {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border-strong);
  color: var(--navy);
  backdrop-filter: blur(4px);
}
.btn-outline:hover { background: #fff; border-color: var(--navy); }
.hero .btn-outline {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.hero .btn-outline:hover { background: rgba(255,255,255,0.22); border-color: #fff; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-pill { border-radius: var(--radius-pill); }
.btn-block { width: 100%; }
.btn i { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(227, 232, 239, 0.6);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.1rem;
}
.brand-name { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }

.nav-desktop { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-size: 0.9rem; font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--navy); }

.menu-toggle { display: none; padding: 8px; }
.menu-toggle i { width: 24px; height: 24px; }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--bg);
  background-color: #fafafa;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  z-index: 40;
  z-index: 45;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.menu-open .site-header {
  background: var(--bg);
  background-color: #fafafa;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: var(--border);
}
.mobile-link {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
}

main { padding-top: var(--header-h); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex; align-items: center;
  padding: 80px 0;
  overflow: hidden;
  color: #fff;
}
.hero-slider {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s var(--ease), transform 8s linear;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, rgba(11, 17, 32, 0.78) 0%, rgba(69, 78, 166, 0.45) 55%, rgba(11, 17, 32, 0.55) 100%),
    radial-gradient(ellipse at bottom left, rgba(0,0,0,0.45), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; }

.hero-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;
  z-index: 2;
  display: inline-flex;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
}
.hero-dot {
  width: 28px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.35);
  padding: 0;
  transition: background 0.3s, width 0.3s;
}
.hero-dot:hover { background: rgba(255,255,255,0.6); }
.hero-dot.is-active {
  background: #fff;
  width: 44px;
}

.eyebrow-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 500;
  color: #fff;
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}
.eyebrow-badge i { width: 14px; height: 14px; }

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero-title .accent { color: var(--gold); font-style: italic; }

/* ---------- Hero text rotator ---------- */
.rotator {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  min-width: 6ch;
  height: 1.05em;
  line-height: 1;
}
.rotator-word {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  pointer-events: none;
}
.rotator-word.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.rotator-word.is-leaving {
  opacity: 0;
  transform: translateY(-0.35em);
}
@media (prefers-reduced-motion: reduce) {
  .rotator-word { transition: opacity 0.2s linear; transform: none !important; }
}

.hero-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin-bottom: 36px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Intro ---------- */
.intro {
  background: var(--navy);
  color: #fff;
  padding: 96px 0;
  text-align: center;
}
.intro-inner { max-width: 920px; margin: 0 auto; }
.intro h2 {
  color: #fff;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 24px;
}
.intro p {
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  color: rgba(255,255,255,0.8);
  font-weight: 300;
  line-height: 1.6;
}

/* ---------- Pillars ---------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.pillar {
  display: flex; gap: 20px;
  background: var(--surface-muted);
  padding: 36px;
  border-radius: var(--radius-lg);
  transition: background 0.2s;
}
.pillar:hover { background: #ecf0f6; }
.pillar-icon {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.pillar:hover .pillar-icon { transform: scale(1.1); }
.pillar-icon i { width: 24px; height: 24px; }
.pillar h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.pillar p { color: var(--muted); }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.service-card .service-icon {
  color: var(--gold);
  width: 28px; height: 28px;
  margin-bottom: 16px;
  stroke-width: 1.5;
}
.service-card h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.service-card:hover h4 { color: var(--gold); }
.service-card p { font-size: 0.92rem; color: var(--muted); line-height: 1.55; }

/* ---------- Countries ---------- */
.countries {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
}
.country {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.country:hover { border-color: var(--navy); }
.country-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a6d1c;
  background: var(--gold-soft);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ---------- Testimonials ---------- */
.dark-title {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 56px;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  position: relative; z-index: 1;
}
.testimonial {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex; flex-direction: column;
  height: 100%;
}
.stars {
  display: inline-flex; gap: 4px;
  color: var(--gold);
  margin-bottom: 20px;
}
.stars i { width: 16px; height: 16px; fill: currentColor; }
.quote {
  color: rgba(255,255,255,0.9);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 28px;
}
.who-name { font-weight: 700; }
.who-role { color: rgba(255,255,255,0.6); font-size: 0.875rem; }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}
.trust-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 16px 48px;
  color: var(--muted);
  font-weight: 500; font-size: 0.9rem;
}
.trust-item { display: inline-flex; align-items: center; gap: 8px; }
.trust-item i { width: 16px; height: 16px; color: var(--gold); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
}
.contact-list { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-direction: column; gap: 28px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 999px;
  background: var(--surface-muted);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy);
}
.contact-icon i { width: 20px; height: 20px; }
.contact-label { font-size: 0.85rem; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.contact-value { font-size: 1.05rem; font-weight: 500; transition: color 0.2s; }
a.contact-value:hover { color: var(--gold); }
.contact-address { line-height: 1.55; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 16px 40px rgba(11, 17, 32, 0.05);
  display: flex; flex-direction: column; gap: 22px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.field input, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  resize: vertical;
}
.field textarea { min-height: 150px; }
.field input:focus, .field textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11,17,32,0.08);
}
.field .error {
  color: #b42318;
  font-size: 0.8rem;
  min-height: 1em;
}
.field.invalid input, .field.invalid textarea { border-color: #b42318; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 48px 0;
}
.brand-inverse .brand-name { color: #fff; }
.brand-mark-inverse { background: #fff; color: var(--navy); }
.footer-top {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-title { font-weight: 700; margin-bottom: 4px; }
.toast-body { color: rgba(255,255,255,0.75); font-size: 0.9rem; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .pillars-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .intro { padding: 72px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .pillar { flex-direction: column; padding: 28px; }
  .contact-card { padding: 28px; }
  .hide-sm { display: none; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
