/* ==========================================================================
   AGS Peak Consulting — Credit & Funding
   Design tokens
   ========================================================================== */

:root {
  /* Surfaces (deep forest greens) */
  --green-900: #0b120d;   /* footer / deepest */
  --green-850: #0f2316;   /* header */
  --green-800: #13291c;   /* page background */
  --green-750: #16321f;   /* raised band */
  --card:      #1b3b28;   /* cards */
  --card-hover:#20462f;

  /* Brand */
  --gold:        #c9a55f;
  --gold-bright: #dcbd80;
  --cream:       #f4f1e7;
  --muted:       #a3b8a6;
  --muted-dim:   #7f9583;

  --border: rgba(201, 165, 95, 0.16);
  --border-soft: rgba(244, 241, 231, 0.08);

  /* Type */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: 28px;
  --header-h: 84px;
  --radius: 14px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--green-800);
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Long citations and URLs must never force a horizontal scrollbar */
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: rgba(201, 165, 95, 0.18);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--cream);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Shared type pieces
   ========================================================================== */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}

.eyebrow-dash {
  width: 42px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

.section-title {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-bottom: 22px;
}

.section-lede {
  max-width: 44ch;
  font-size: 1.06rem;
  color: var(--muted);
}

.section {
  padding-block: clamp(80px, 10vw, 130px);
}

.section-alt { background: var(--green-850); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 6px;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background-color .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease), transform .25s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold);
  color: #17241a;
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-bright); }

.btn-outline {
  border: 1px solid rgba(244, 241, 231, 0.22);
  color: var(--cream);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(15, 35, 22, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: background-color .3s var(--ease);
}

.site-header.is-scrolled { background: rgba(11, 18, 13, 0.96); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  /* contain, not cover: the shield is portrait and must not be cropped */
  object-fit: contain;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.16rem;
  color: var(--cream);
}

.brand-tagline {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav {
  display: flex;
  gap: 42px;
  font-size: 15.5px;
  font-weight: 400;
  color: var(--cream);
}

.nav a {
  position: relative;
  padding-block: 6px;
  transition: color .22s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .28s var(--ease);
}

.nav a:hover { color: var(--gold); }
.nav a:hover::after { width: 100%; }

.btn-header { padding: 13px 26px; }

/* Mobile menu button */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--cream);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(72px, 9vw, 120px) clamp(80px, 10vw, 130px);
}

/* Faint mountain silhouettes in the background */
.hero-peaks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-peaks svg {
  width: 100%;
  height: 100%;
}

.hero-peaks path {
  fill: rgba(255, 255, 255, 0.016);
  stroke: rgba(201, 165, 95, 0.05);
  stroke-width: 1;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 60px;
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.02;
  margin-bottom: 20px;
}

.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--muted);
  margin-bottom: 38px;
}

.hero-body {
  max-width: 52ch;
  font-size: 1.08rem;
  line-height: 1.85;
  margin-bottom: 42px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  font-size: 14.5px;
  color: var(--muted);
}

.trust-row li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.trust-icon {
  width: 16px;
  height: 16px;
  fill: var(--gold);
  color: var(--gold);
  flex: none;
}

/* Hero emblem + glow */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.hero-glow {
  position: absolute;
  width: min(560px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
              rgba(201, 165, 95, 0.16) 0%,
              rgba(201, 165, 95, 0.06) 42%,
              transparent 68%);
}

.hero-glow::before,
.hero-glow::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(201, 165, 95, 0.14);
  border-radius: 50%;
}

.hero-glow::after { inset: 20%; border-color: rgba(201, 165, 95, 0.09); }

.hero-emblem {
  position: relative;
  width: min(300px, 66%);
  /* drop-shadow follows the alpha channel; box-shadow would draw the
     bounding rectangle around a transparent PNG */
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.5));
}

/* ==========================================================================
   Stats band
   ========================================================================== */

.stats {
  background: var(--green-750);
  border-block: 1px solid var(--border-soft);
  padding-block: 54px;
}

.stats-lead {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 38px;
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding-inline: 20px;
  border-left: 1px solid var(--border-soft);
}

.stat:first-child { border-left: 0; }

.stat-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

/* ==========================================================================
   Service cards
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 64px;
}

.card {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 44px 42px 38px;
  transition: background-color .3s var(--ease), border-color .3s var(--ease),
              transform .3s var(--ease);
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--border);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(201, 165, 95, 0.12);
  color: var(--gold);
  margin-bottom: 30px;
}

.card-icon svg { width: 24px; height: 24px; }

.card h3 {
  font-size: 1.55rem;
  margin-bottom: 16px;
}

.card p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 26px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gold);
}

.card-link span { transition: transform .25s var(--ease); }
.card-link:hover span { transform: translateX(5px); }

/* ==========================================================================
   How it works — three steps
   ========================================================================== */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 92px;
}

/* connecting hairline between the numerals */
.steps::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 16.6%;
  right: 16.6%;
  height: 1px;
  background: var(--border);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-num {
  position: relative;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--green-850);
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 34px;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}

.step:hover .step-num {
  border-color: var(--gold);
  background: rgba(201, 165, 95, 0.1);
}

.step h3 {
  font-size: 1.45rem;
  margin-bottom: 16px;
}

.step p {
  max-width: 38ch;
  font-size: 1rem;
  line-height: 1.8;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 64px;
}

.testimonial {
  margin: 0;
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 40px 38px;
  display: flex;
  flex-direction: column;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.testimonial:hover {
  border-color: var(--border);
  transform: translateY(-4px);
}

.stars {
  color: var(--cream);
  font-size: 15px;
  letter-spacing: 3px;
  margin-bottom: 26px;
}

.testimonial-metric {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.testimonial blockquote {
  margin: 0 0 30px;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(201, 165, 95, 0.14);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
}

.testimonial-author strong {
  display: block;
  color: var(--cream);
  font-weight: 500;
  font-size: 15px;
}

.testimonial-author em {
  font-style: normal;
  font-size: 14px;
  color: var(--muted-dim);
}

/* ==========================================================================
   Final CTA
   ========================================================================== */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(90px, 11vw, 150px);
  background: var(--green-850);
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 130%);
  aspect-ratio: 2 / 1;
  background: radial-gradient(ellipse,
              rgba(201, 165, 95, 0.09) 0%,
              rgba(201, 165, 95, 0.03) 45%,
              transparent 72%);
  pointer-events: none;
}

.cta-inner { position: relative; }

.cta-title {
  font-size: clamp(2.3rem, 5.6vw, 4.2rem);
  margin-bottom: 24px;
}

.cta-title em {
  font-style: italic;
  color: var(--gold);
}

.cta-sub {
  max-width: 46ch;
  margin-inline: auto;
  font-size: 1.1rem;
  margin-bottom: 42px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 22px;
}

.cta-note {
  font-size: 15px;
  color: var(--muted-dim);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--green-900);
  padding-block: clamp(64px, 8vw, 96px) 40px;
  font-size: 15.5px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer-mark {
  width: 62px;
  height: 62px;
  object-fit: contain;
  object-position: left;
  margin-bottom: 30px;
}

.footer-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 10px;
}

.footer-motto {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}

.footer-blurb {
  max-width: 34ch;
  line-height: 1.8;
  color: var(--muted-dim);
}

.footer-col { display: flex; flex-direction: column; }

.footer-col h4 {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 30px;
}

.footer-col a {
  color: var(--muted);
  padding-block: 11px;
  transition: color .22s var(--ease);
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 34px;
  border-top: 1px solid rgba(244, 241, 231, 0.09);
  font-size: 14.5px;
  color: var(--muted-dim);
}

.footer-sign em {
  font-style: normal;
  color: var(--gold);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .nav { gap: 30px; }
  .card { padding: 38px 32px 32px; }
}

@media (max-width: 960px) {
  :root { --gutter: 22px; }

  /* Collapse nav into a slide-down panel */
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 10px var(--gutter) 22px;
    background: rgba(11, 18, 13, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path .35s var(--ease), opacity .25s var(--ease);
  }

  .nav.is-open {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a { padding-block: 15px; border-bottom: 1px solid var(--border-soft); }
  .nav a::after { display: none; }

  .btn-header { display: none; }

  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; min-height: 280px; }
  .hero-emblem { width: min(250px, 58%); }
  .hero-body { max-width: none; }

  /* Three short stats still fit across a tablet */
  .stats-inner { gap: 0; }
  .stat { padding-inline: 14px; }

  .card-grid,
  .testimonial-grid { grid-template-columns: 1fr; gap: 20px; }

  .steps { grid-template-columns: 1fr; gap: 56px; margin-top: 64px; }
  .steps::before { display: none; }

  .section-lede { max-width: none; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 44px 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  /* Shorter bar reclaims vertical space; the nav panel tracks it automatically */
  :root { --header-h: 70px; }

  body { font-size: 16px; }

  .brand-name { font-size: 1rem; }
  .brand-tagline { font-size: 9.5px; letter-spacing: 0.16em; }
  .brand-mark { width: 40px; height: 40px; }

  .hero-actions .btn,
  .cta-actions .btn { width: 100%; }

  .hero-actions,
  .cta-actions { gap: 12px; }

  .trust-row { gap: 10px 20px; font-size: 13.5px; }

  .card { padding: 32px 26px 28px; }
  .testimonial { padding: 32px 26px; }

  /* Single column reads better than two cramped ones */
  .stats { padding-block: 42px; }
  .stats-lead { font-size: 11.5px; letter-spacing: 0.16em; margin-bottom: 28px; }
  .stats-inner { grid-template-columns: 1fr; gap: 34px; }
  .stat { border-left: 0; }

  .footer-inner { grid-template-columns: 1fr; gap: 38px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Comfortable thumb targets */
  .footer-col a { padding-block: 13px; }
  .eyebrow { margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
