/* ==========================================================================
   ACH Partners — "ACH Sky" design system
   Brand azure (#3B7FD9, sampled from the ACH logo) · white · sky tints.
   Libre Caslon display, Archivo body, Spline Sans Mono for figures.
   Signature motif: the double ledger rule, drawn in brand azure.
   ========================================================================== */

@import url('../fonts/fonts.css');

:root {
  /* Palette */
  --deep: #0C2D5E;          /* deep brand navy (dark sections) */
  --deep-2: #143C77;        /* raised panel on deep */
  --cloud: #F2F7FD;         /* sky-tinted white */
  --white: #FFFFFF;
  --azure: #3B7FD9;         /* ACH brand blue, from the logo */
  --azure-deep: #2B66B4;    /* hover / pressed */
  --sky: #8FBDF2;           /* light accent on dark */
  --slate: #44576F;         /* body text on light */
  --mist: #7E90A6;          /* muted labels */
  --star: #F6BC49;          /* review stars only */
  --line: rgba(12, 45, 94, 0.13);
  --line-dark: rgba(242, 247, 253, 0.20);
  --radius: 14px;
  --radius-sm: 8px;

  /* Type */
  --font-display: 'Libre Caslon Text', Georgia, serif;
  --font-body: 'Archivo', -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono: 'Spline Sans Mono', 'SF Mono', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  --text-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.625rem);
  --text-hero: clamp(2.375rem, 1.5rem + 4.2vw, 4.5rem);

  /* Layout */
  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4rem, 6vw + 2rem, 7.5rem);

  --shadow-card: 0 1px 2px rgba(12,45,94,.05), 0 14px 36px -14px rgba(12,45,94,.22);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--slate);
  background: var(--cloud);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--deep);
}
em.accent { font-style: italic; color: var(--sky); }

:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 3px;
  border-radius: 2px;
}

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); }
.section--dark { background: var(--deep); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--cloud); }
.section--dark p { color: rgba(242,247,253,.72); }
.section--white { background: var(--white); }

/* ---------- Signature: the double ledger rule ---------- */
.ledger-rule {
  border: 0;
  height: 7px;
  border-top: 1px solid var(--azure);
  border-bottom: 3px double var(--azure);
  width: 100%;
  max-width: 8.5rem;
  margin: 0 0 1.75rem;
  transform-origin: left center;
}
.reveal .ledger-rule { transform: scaleX(0); }
.reveal.is-visible .ledger-rule { animation: rule-draw .9s var(--ease-out) .15s forwards; }
@keyframes rule-draw { to { transform: scaleX(1); } }

/* Eyebrow: mono, tracked out, like an account code */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--azure);
  display: block;
  margin-bottom: 1rem;
}
.section--dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--sky); }

/* ---------- Header ---------- */
.topbar {
  background: var(--deep);
  color: rgba(242,247,253,.85);
  font-size: var(--text-sm);
  padding-block: .5rem;
}
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topbar a { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .04em; }
.topbar a:hover { color: var(--sky); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242,247,253,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgba(12,45,94,.35); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.5rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand-badge {
  background: var(--azure); color: var(--white);
  font-family: var(--font-body); font-weight: 700; font-size: 1.1rem;
  letter-spacing: .03em; line-height: 1;
  padding: .5rem .55rem; border-radius: var(--radius-sm);
}
.brand-word {
  font-family: var(--font-body); font-weight: 700; font-size: .68rem;
  line-height: 1.25; letter-spacing: .08em; text-transform: uppercase;
  color: var(--azure);
}

.nav { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); align-items: center; }
.nav a {
  font-size: var(--text-sm); font-weight: 500; color: var(--deep);
  padding-block: .5rem; position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  border-bottom: 3px double var(--azure);
  transition: right .35s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--deep); margin: 5px 0; transition: transform .3s, opacity .3s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: var(--text-sm); letter-spacing: .02em;
  padding: .95rem 1.9rem; border: 1px solid var(--azure);
  background: var(--azure); color: var(--white);
  border-radius: 999px;
  transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease-out);
  will-change: transform;
}
.btn:hover { background: var(--azure-deep); border-color: var(--azure-deep); color: var(--white); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--deep); border-color: var(--line); }
.btn--ghost:hover { background: var(--deep); border-color: var(--deep); color: var(--white); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--azure-deep); }
.btn--light:hover { background: var(--sky); border-color: var(--sky); color: var(--deep); }
.btn .arr { transition: transform .25s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(59,127,217,.55) 0%, rgba(59,127,217,0) 55%),
    radial-gradient(70% 60% at -10% 110%, rgba(20,60,119,.9) 0%, rgba(20,60,119,0) 60%),
    linear-gradient(155deg, #0C2D5E 10%, #16407E 62%, #2B66B4 125%);
  color: var(--cloud);
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 10vw, 9rem);
}
.hero::before {
  /* faint oversized ampersand — the 'partners' mark — parallax layer */
  content: '&';
  position: absolute;
  right: -4rem; top: 50%;
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(20rem, 42vw, 38rem);
  line-height: 0;
  color: rgba(255,255,255,.05);
  transform: translateY(calc(-50% + var(--parallax, 0px)));
  pointer-events: none;
}
.hero h1 { font-size: var(--text-hero); color: var(--cloud); max-width: 15ch; }
.hero p.lede { font-size: var(--text-lg); color: rgba(242,247,253,.75); max-width: 46ch; margin-top: 1.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; }

/* staged text reveal */
.hero .stage { opacity: 0; transform: translateY(24px); animation: stage-in .8s var(--ease-out) forwards; }
.hero .stage:nth-child(2) { animation-delay: .12s; }
.hero .stage:nth-child(3) { animation-delay: .24s; }
.hero .stage:nth-child(4) { animation-delay: .36s; }
@keyframes stage-in { to { opacity: 1; transform: none; } }

/* Ledger strip: stats as account entries */
.ledger-strip {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-dark);
  border-bottom: 3px double var(--line-dark);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.ledger-strip .entry {
  padding: 1.5rem 1rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.ledger-strip .entry + .entry { border-left: 1px solid var(--line-dark); }
.ledger-strip .figure {
  font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 500;
  color: var(--white); font-variant-numeric: tabular-nums;
}
.ledger-strip .label { font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: rgba(242,247,253,.55); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex; flex-direction: column; gap: .85rem;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.card h3 { font-size: var(--text-lg); }
.card .idx { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--azure); letter-spacing: .18em; }
.card .more { margin-top: auto; font-weight: 600; font-size: var(--text-sm); color: var(--deep); display: inline-flex; gap: .5rem; align-items: center; }
.card:hover .more .arr { transform: translateX(4px); }
.card .more .arr { transition: transform .25s var(--ease-out); }

/* Pillars */
.pillar { text-align: left; padding: 0 1.5rem 0 0; }
.pillar h3 { font-size: var(--text-xl); margin-top: .75rem; }
.pillar p { margin-top: .6rem; }

/* ---------- Section headers ---------- */
.section-head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: var(--text-2xl); }
.section-head p { margin-top: 1rem; }
.section-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; max-width: none; }

/* ---------- Quote ---------- */
.quote { text-align: center; max-width: 52rem; margin-inline: auto; }
.quote blockquote {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-xl); line-height: 1.4; color: var(--cloud);
}
.quote cite { display: block; margin-top: 2rem; font-style: normal; }
.quote cite .name { font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--sky); }
.quote blockquote { color: var(--white); }
.quote cite .role { display: block; font-size: var(--text-xs); color: rgba(242,247,253,.55); margin-top: .3rem; letter-spacing: .08em; }

/* ---------- CEO feature (about) ---------- */
.ceo-feature {
  display: grid; grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  max-width: 62rem; margin-inline: auto;
}
.ceo-photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 48px -20px rgba(0,0,0,.5); }
.ceo-photo img { width: 100%; height: 100%; object-fit: cover; }
.ceo-feature .quote { max-width: none; margin: 0; }
@media (max-width: 720px) {
  .ceo-feature { grid-template-columns: 1fr; }
  .ceo-photo { max-width: 260px; }
}

/* ---------- Team ---------- */
.person { text-align: left; }
.person .avatar {
  aspect-ratio: 1; width: 100%;
  background: linear-gradient(150deg, var(--azure) 0%, var(--deep) 110%);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.5rem; color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.person .avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: var(--text-lg); margin-top: 1.1rem; }
.person .role { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--azure); margin-top: .3rem; }
.person .bio { font-size: var(--text-sm); margin-top: .6rem; }

/* ---------- Carousel (reviews / team preview) ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-bottom: .5rem;
  cursor: grab;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel-track > * { flex: 0 0 min(21.5rem, 82vw); scroll-snap-align: start; }
.carousel-nav { display: flex; gap: .6rem; }
.carousel-btn {
  width: 2.75rem; height: 2.75rem; border: 1px solid var(--line);
  background: var(--white); color: var(--deep); display: grid; place-items: center;
  border-radius: 50%;
  transition: background .25s, color .25s, border-color .25s;
}
.carousel-btn:hover { background: var(--azure); border-color: var(--azure); color: var(--white); }
.section--dark .carousel-btn { background: transparent; border-color: var(--line-dark); color: var(--cloud); }
.section--dark .carousel-btn:hover { background: var(--azure); border-color: var(--azure); color: var(--white); }

/* Review card */
.review {
  background: var(--deep-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.review .head { display: flex; align-items: center; gap: .8rem; margin-bottom: .1rem; }
.review .r-avatar {
  width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem;
  border-radius: 50%; overflow: hidden;
  background: var(--azure); color: var(--white);
  display: grid; place-items: center;
  font-weight: 600; font-size: .95rem; letter-spacing: .02em;
}
.review .r-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review .who { color: var(--white); font-weight: 600; font-size: var(--text-sm); line-height: 1.3; }
.review .when { font-size: var(--text-xs); color: rgba(242,247,253,.5); }
.review .stars { color: var(--star); font-size: var(--text-sm); letter-spacing: .2em; }
.review p {
  font-size: var(--text-sm); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden;
}
/* Google rating summary badge */
.g-rating { display: inline-flex; align-items: center; gap: .55rem; margin-top: .8rem; font-size: var(--text-sm); color: rgba(242,247,253,.8); }
.g-rating .g { font-weight: 700; font-family: var(--font-body); color: var(--white); background: var(--white); border-radius: 50%; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; }
.g-rating .g span { background: linear-gradient(45deg, #4285F4, #EA4335, #FBBC05, #34A853); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: .95rem; }
.g-rating .score { color: var(--star); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--azure-deep) 0%, var(--azure) 60%, #5D97E3 120%); }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: clamp(2.5rem, 5vw, 4rem); }
.cta-band h2 { font-size: var(--text-2xl); color: var(--white); max-width: 22ch; }
.cta-band .btn { background: var(--white); border-color: var(--white); color: var(--azure-deep); }
.cta-band .btn:hover { background: var(--deep); border-color: var(--deep); color: var(--white); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(100% 120% at 90% -20%, rgba(59,127,217,.5) 0%, rgba(59,127,217,0) 55%),
    linear-gradient(150deg, #0C2D5E 20%, #1B4B8F 110%);
  color: var(--cloud); padding-block: clamp(3.5rem, 7vw, 6rem);
}
.page-hero h1 { font-size: var(--text-2xl); color: var(--cloud); }
.page-hero p { max-width: 56ch; margin-top: 1rem; color: rgba(242,247,253,.72); }

/* ---------- Prose / detail pages ---------- */
.prose { max-width: 62ch; }
.prose h2 { font-size: var(--text-xl); margin: 2.5rem 0 1rem; }
.prose p + p { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; margin-top: 1rem; }
.prose li + li { margin-top: .5rem; }
.prose li::marker { color: var(--azure); }

.detail-layout { display: grid; grid-template-columns: 1fr 20rem; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.side-panel { position: sticky; top: 6.5rem; border: 1px solid var(--line); background: var(--white); padding: 1.75rem; border-radius: var(--radius); }
.side-panel h3 { font-size: var(--text-base); }
.side-panel ul { list-style: none; padding: 0; margin-top: 1rem; }
.side-panel li { border-top: 1px solid var(--line); }
.side-panel li a { display: block; padding: .7rem .2rem; font-size: var(--text-sm); font-weight: 500; color: var(--slate); transition: color .2s, padding-left .25s var(--ease-out); }
.side-panel li a:hover, .side-panel li a[aria-current="page"] { color: var(--azure); padding-left: .6rem; }
.side-panel .btn { width: 100%; justify-content: center; margin-top: 1.25rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: var(--text-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--deep); margin-bottom: .45rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .85rem 1rem;
  border: 1px solid var(--line); background: var(--white);
  font: inherit; color: var(--deep);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--azure); box-shadow: 0 0 0 3px rgba(59,127,217,.18); }
.form-note { font-size: var(--text-xs); color: var(--mist); }
.form-status { padding: 1rem 1.25rem; font-size: var(--text-sm); display: none; }
.form-status.ok { display: block; background: #EAF3EC; color: #1E5631; border: 1px solid #BFDCC7; }
.form-status.err { display: block; background: #F8ECEA; color: #7A2E23; border: 1px solid #E3C3BC; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Contact info list ---------- */
.info-list { list-style: none; padding: 0; display: grid; gap: 1.5rem; }
.info-list .k { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--azure); display: block; margin-bottom: .3rem; }
.info-list a:hover { color: var(--azure); }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: rgba(242,247,253,.7); font-size: var(--text-sm); }
.site-footer .top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2.5rem;
  padding-block: clamp(3rem, 5vw, 4.5rem);
}
.site-footer h4 { color: var(--cloud); font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.site-footer a:hover { color: var(--sky); }
.site-footer .brand-word { color: var(--cloud); }
.site-footer .legal {
  border-top: 1px solid var(--line-dark);
  padding-block: 1.25rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: var(--text-xs); color: rgba(242,247,253,.45);
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .site-footer .top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid--3, .grid--2, .form-grid { grid-template-columns: 1fr; }
  .ledger-strip { grid-template-columns: 1fr; }
  .ledger-strip .entry + .entry { border-left: 0; border-top: 1px solid var(--line-dark); }
  .site-footer .top { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cloud); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .4s var(--ease-out);
  }
  .nav.is-open { max-height: 30rem; }
  .nav a { padding: 1rem var(--gutter); border-top: 1px solid var(--line); }
  .nav a::after { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .reveal, .hero .stage { opacity: 1; transform: none; }
  .reveal .ledger-rule { transform: none; }
  .hero::before { transform: translateY(-50%); }
}
