/* ==========================================================================
   Altigo Partners — site-wide layout, navigation, sections, footer, forms.
   Built on top of tokens/*.css and components.css.
   ========================================================================== */

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brand-navy);
  margin: 0;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); }
a:hover { color: var(--link-hover); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-navy);
  color: #fff;
  padding: 14px 20px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* ---- Layout helpers ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--space-10) 0; }
.section--tight { padding: var(--space-8) 0; }
.section--alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.measure { max-width: var(--measure); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .section { padding: var(--space-8) 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: var(--space-7) 0; }
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  gap: 24px;
}
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav__links { display: flex; gap: 28px; align-items: center; list-style: none; margin: 0; padding: 0; }
.site-nav__links li { display: block; }
.site-nav__links a {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.site-nav__links a:hover {
  color: var(--brand-navy);
  border-bottom-color: var(--brand-blue);
}
.site-nav__links a[aria-current="page"] {
  color: var(--brand-navy);
  border-bottom-color: var(--brand-gold);
  font-weight: 600;
}
.site-nav__links a.btn {
  color: #fff;
  border-bottom: none;
  padding: 8px 16px;
}
.site-nav__links a.btn:hover { color: #fff; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--brand-navy);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: static; }
  .site-nav__links {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    height: calc(100vh - 65px);
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
  }
  .site-nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .site-nav__links a {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 17px;
  }
  .site-nav__links a:hover { background: var(--surface-alt); }
  .site-nav__links .btn { margin: 12px 20px 4px; border-radius: var(--radius-sm); }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--grad-cover);
  color: #fff;
  overflow: hidden;
}
.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-10) var(--gutter) 140px;
  position: relative;
  z-index: 2;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #9FC1EE;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}
.hero__eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-gold);
}
.hero h1 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 17ch;
}
.hero__lede {
  color: #C7D4E8;
  font-size: 20px;
  line-height: 1.55;
  max-width: 36rem;
  margin-top: var(--space-5);
}
.hero__actions { display: flex; gap: 14px; margin-top: var(--space-6); flex-wrap: wrap; }
/* Absolutely positioned replaced elements don't auto-derive height from a
   percentage width the way normal-flow <img>s do — without this, height
   stays pinned to the literal HTML height attribute regardless of the
   resolved width, so the ridge (and the gold summit dot baked into it)
   visibly stretches on every resize. aspect-ratio forces correct
   proportional scaling regardless of position scheme. */
.hero__ridge { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: auto; aspect-ratio: 1400 / 220; z-index: 1; }

.page-hero {
  position: relative;
  background: var(--grad-cover);
  color: #fff;
}
.page-hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px var(--gutter) 88px;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-top: var(--space-4);
}
.page-hero__lede { color: #C7D4E8; font-size: 18px; max-width: 40rem; margin-top: var(--space-4); }
.breadcrumb { font-size: 13px; color: #8FA3C4; }
.breadcrumb a { color: #C7D4E8; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* ---- Section heading pattern ---- */
.section-head { max-width: 44rem; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  margin-top: var(--space-4);
}
.section-head p { font-size: 18px; color: var(--text-soft); margin-top: var(--space-4); }
.section-head--center { max-width: 44rem; margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }

/* ---- Grids ---- */
.grid { display: grid; gap: var(--space-6); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---- Process steps ---- */
.step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand-gold-deep);
  letter-spacing: 0.1em;
}
.step__rule {
  height: 2px;
  background: var(--border);
  margin: 12px 0 16px;
  position: relative;
}
.step__rule::after {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 28px; height: 2px;
  background: var(--brand-gold);
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: 15px; }

/* ---- Team ---- */
.team-card { text-align: left; }
.team-card__avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
/* Photos are pre-composited onto a matching neutral studio backdrop (real
   background removal, not a color filter), so no CSS treatment needed here
   beyond a plain cover fit. */
.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-card__initials {
  font-family: var(--font-wordmark);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.02em;
}
.team-card h3 { font-size: 21px; }
.team-card__role { color: var(--brand-blue-deep); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin: 4px 0 12px; }
.team-card p { color: var(--text-soft); font-size: 15px; }

/* ---- Values / advantages list ---- */
.advantage { display: flex; gap: var(--space-4); }
.advantage__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--brand-gold-deep);
  flex-shrink: 0;
  width: 2.2ch;
}
.advantage h3 { font-size: 18px; margin-bottom: 6px; }
.advantage p { color: var(--text-soft); font-size: 15px; }

/* ---- FAQ ---- */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--brand-navy);
}
.faq-item__icon { flex-shrink: 0; width: 20px; height: 20px; position: relative; }
.faq-item__icon::before, .faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--brand-blue-deep);
  transition: transform var(--dur) var(--ease-out);
}
.faq-item__icon::before { left: 0; top: 9px; width: 20px; height: 2px; }
.faq-item__icon::after { left: 9px; top: 0; width: 2px; height: 20px; }
.faq-item__q[aria-expanded="true"] .faq-item__icon::after { transform: scaleY(0); }
.faq-item__a { padding: 0 4px 20px; color: var(--text-soft); font-size: 16px; max-width: 42rem; }
.faq-item__a[hidden] { display: none; }

/* ---- CTA / contact section ---- */
.cta-band { background: var(--grad-diag); color: #fff; }
.cta-band .kicker { color: var(--brand-gold); }
.cta-band h2 { color: #fff; }
.contact-details { display: flex; gap: 28px; margin-top: var(--space-6); flex-wrap: wrap; font-size: 14px; color: #8FA3C4; }
.contact-details a { color: #C7D4E8; text-decoration: none; }
.contact-details a:hover { color: #fff; }

/* ---- Form status ---- */
.form-status {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 15px;
  margin-bottom: var(--space-4);
}
.form-status--success { background: rgba(46, 139, 95, 0.12); color: #1E5E41; }
.form-status--error { background: rgba(180, 72, 63, 0.12); color: var(--danger); }
.form-status[hidden] { display: none; }

.thank-you { text-align: center; padding: 32px 8px; }
.thank-you h3 { font-size: 22px; margin: 18px 0 8px; }
.thank-you p { color: var(--text-soft); }

/* ---- Footer ---- */
.site-footer { background: var(--brand-navy); color: #8FA3C4; font-size: 14px; }
.site-footer__top {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-8) var(--gutter) var(--space-7);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-6);
}
.site-footer__brand p { color: #8FA3C4; margin-top: var(--space-4); max-width: 30ch; }
.site-footer__heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C7D4E8;
  margin-bottom: var(--space-3);
}
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer__links a { color: #8FA3C4; text-decoration: none; }
.site-footer__links a:hover { color: #fff; }
.site-footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}
.site-footer__social { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.site-footer__social a { color: #8FA3C4; text-decoration: none; }
.site-footer__social a:hover { color: #fff; }
.site-footer__foot-bar { height: var(--footbar); background: var(--brand-navy-deep); }

@media (max-width: 780px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer__top { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---- Two-column content/media split ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; }
.split--wide-right { grid-template-columns: 1fr 1.1fr; }
@media (max-width: 860px) {
  .split, .split--wide-right { grid-template-columns: 1fr; }
}

/* ---- Mid-page CTA prompt (reused a couple of times per page) ---- */
.inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding: var(--space-6) var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.inline-cta p { margin: 0; font-size: 17px; color: var(--text-soft); max-width: 34rem; }
.inline-cta strong { color: var(--brand-navy); }

