/* =============================================================
   CERTUS CREDIT · Debt Advisory
   Layout mirrors the MENCZEL site structure (Blackstone pattern),
   rethemed to the Certus system: navy near mono, Cinzel display,
   Public Sans text, Jost labels. Retheme everything from tokens.
   ============================================================= */

:root {
  /* --- Palette (brand tokens.css) --- */
  --navy:        #0C2340;
  --navy-alt:    #071829;   /* abyss, for footer */
  --ivory:       #F7F5F0;
  --charcoal:    #0C2340;   /* light-section text is Certus navy */
  --steel:       #5E6E7E;   /* slate: labels and microtype */
  --off-white:   #F7F5F0;

  --ivory-70: rgba(247, 245, 240, 0.70);
  --ivory-55: rgba(247, 245, 240, 0.55);
  --ivory-16: rgba(247, 245, 240, 0.16);
  --ivory-08: rgba(247, 245, 240, 0.08);

  --line-light: rgba(12, 35, 64, 0.14);

  /* --- Type ---
     Display: Cinzel (the wordmark face; lowercase renders as small caps).
     Text: Public Sans. Labels: Jost, letterspaced caps. */
  --f-serif: "Cinzel", Georgia, "Times New Roman", serif;
  --f-sans:  "Public Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-label: "Jost", "Futura", "Century Gothic", sans-serif;

  /* --- Layout --- */
  --maxw: 1240px;
  --gutter: clamp(1.5rem, 5vw, 5.5rem);
  --section-y: clamp(5rem, 10vw, 9rem);
  --header-h: 5.5rem;

  /* --- Fluid type --- */
  --fs-eyebrow: 0.72rem;
  --fs-body:    1.0625rem;
  --fs-lede:    clamp(1.1rem, 1.6vw, 1.35rem);
  --fs-h3:      clamp(1.25rem, 2vw, 1.6rem);
  --fs-h2:      clamp(1.8rem, 3.8vw, 2.7rem);
  --fs-hero:    clamp(2.6rem, 7.2vw, 6.2rem);
  --fs-stat:    clamp(3.2rem, 9.5vw, 7rem);
  --fs-statement: clamp(2.2rem, 5.5vw, 4.5rem);
}

/* =============================================================
   Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 500;
  line-height: 1.14;
  margin: 0;
  letter-spacing: 0.03em;
}
p { margin: 0; }

/* =============================================================
   Helpers
   ============================================================= */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--light { background: var(--off-white); color: var(--charcoal); }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-family: var(--f-label);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 1.6rem;
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.6;
}
.eyebrow--left { justify-content: flex-start; }
.eyebrow--left::before { display: none; }

.h2 { font-size: var(--fs-h2); }
.center { text-align: center; }
.lede { font-size: var(--fs-lede); line-height: 1.55; color: var(--ivory-70); }
.section--light .lede { color: #3d4c5e; }

/* Legal pages (privacy / terms), for when counsel copy lands */
.legal { max-width: 760px; }
.legal h1 { margin-bottom: 0.6rem; }
.legal h2 { font-size: var(--fs-h3); margin: 2.6rem 0 0.9rem; }
.legal h3 { font-size: 1.15rem; margin: 1.7rem 0 0.5rem; }
.legal p, .legal li { font-size: 1rem; line-height: 1.75; margin-bottom: 1rem; color: #33465c; }
.legal ul { list-style: disc; margin: 0 0 1.2rem 1.3rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { text-decoration: underline; }
.legal .updated { font-size: 0.85rem; letter-spacing: 0.04em; color: var(--steel); margin-bottom: 2.4rem; }
.legal .note { font-size: 0.85rem; color: var(--steel); border-top: 1px solid var(--line-light); margin-top: 2.8rem; padding-top: 1.4rem; }

/* =============================================================
   Links & buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--f-sans); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.9rem 1.8rem; border: 1px solid var(--ivory);
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
  cursor: pointer;
}
.btn--solid { background: var(--ivory); color: var(--navy); }
.btn--solid:hover { background: transparent; color: var(--ivory); }
.btn--outline { background: transparent; color: var(--ivory); }
.btn--outline:hover { background: var(--ivory); color: var(--navy); }
.section--light .btn { border-color: var(--charcoal); }
.section--light .btn--solid { background: var(--charcoal); color: var(--off-white); }
.section--light .btn--solid:hover { background: transparent; color: var(--charcoal); }
.section--light .btn--outline { color: var(--charcoal); }
.section--light .btn--outline:hover { background: var(--charcoal); color: var(--off-white); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.85rem;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.link-arrow .circ {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid currentColor;
  font-size: 1rem; transition: background-color .3s ease, color .3s ease;
}
.section--light .link-arrow .circ { border-color: var(--charcoal); }
.link-arrow:hover .circ { background: var(--ivory); color: var(--navy); }
.section--light .link-arrow:hover .circ { background: var(--charcoal); color: var(--off-white); }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* =============================================================
   Header
   ============================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color .4s ease, border-color .4s ease;
}
.site-header.is-scrolled {
  background: rgba(12, 35, 64, 0.94);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--ivory-16);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 30px; width: auto; }

.nav { display: none; gap: 2.6rem; align-items: center; }
.nav a {
  font-family: var(--f-label);
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ivory-70); transition: color .3s ease;
}
.nav a:hover { color: var(--ivory); }

@media (min-width: 900px) { .nav { display: flex; } .nav-toggle { display: none; } }

.nav-toggle { background: none; border: 0; cursor: pointer; padding: .5rem; display: inline-flex; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--ivory); }

.drawer {
  position: fixed; inset: 0; z-index: 99; background: var(--navy);
  display: flex; flex-direction: column; justify-content: center; padding: var(--gutter);
  transform: translateY(-100%); transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.drawer.is-open { transform: translateY(0); }
.drawer a {
  font-family: var(--f-serif); font-size: clamp(1.6rem, 7vw, 2.4rem); color: var(--ivory);
  padding: 0.6rem 0; border-bottom: 1px solid var(--ivory-08);
}
.drawer a:hover { color: var(--steel); }

/* =============================================================
   Hero (headline + featured carousel)
   ============================================================= */
.hero { padding-top: var(--header-h); }
.hero__head { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.hero__title {
  font-size: var(--fs-hero); line-height: 1.08; max-width: 16ch; letter-spacing: 0.03em;
}
.hero__title strong { font-weight: 600; }
.hero__title .light { font-weight: 400; }
.hero__sub { margin-top: 1.6rem; max-width: 50ch; font-size: var(--fs-lede); color: var(--ivory-70); }

.hero__feature {
  border-top: 1px solid var(--ivory-16);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.slides { position: relative; }
.slide {
  display: none;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.slide.is-active { display: grid; animation: fade .8s ease; }
@media (min-width: 820px) { .slide { grid-template-columns: 1.2fr 1fr; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.slide__media {
  position: relative; aspect-ratio: 16 / 10; background: #112B4C;
  border: 1px solid var(--ivory-16);
  display: flex; align-items: center; justify-content: center;
}
.slide__mark { width: clamp(54px, 7vw, 86px); height: auto; opacity: 0.42; }
.slide__cap .eyebrow { margin-bottom: 1.1rem; }
.slide__cap h2 { font-size: var(--fs-h3); margin-bottom: 1rem; max-width: 24ch; }
.slide__cap p { color: var(--ivory-70); margin-bottom: 1.6rem; max-width: 44ch; }

.carousel-ctrl { display: flex; gap: 0.8rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); align-items: center; }
.carousel-ctrl button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ivory-16);
  background: transparent; color: var(--ivory); cursor: pointer; font-size: 1.1rem;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.carousel-ctrl button:hover { background: var(--ivory); color: var(--navy); border-color: var(--ivory); }
.carousel-ctrl .count { margin-left: 0.6rem; font-family: var(--f-label); font-size: 0.85rem; color: var(--ivory-55); letter-spacing: 0.1em; }

/* =============================================================
   About / Firm (light)
   ============================================================= */
.about__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.about__grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); }
@media (min-width: 820px) { .about__grid { grid-template-columns: 0.7fr 1.3fr; align-items: start; } }
.about__grid h3 { font-size: var(--fs-h3); margin-bottom: 1.2rem; }
.about__body p + p { margin-top: 1.3rem; }
.about__cta { margin-top: 2rem; }

/* Statement block (no fabricated metrics, ever) */
.statement { text-align: center; border-top: 1px solid var(--line-light); margin-top: clamp(3rem,6vw,5rem); padding-top: clamp(3rem,6vw,5rem); }
.statement__big { font-family: var(--f-serif); font-size: var(--fs-stat); line-height: 1.02; letter-spacing: 0.03em; }
.statement__label { font-family: var(--f-label); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: var(--steel); margin-top: 1.4rem; }
.statement__note { font-size: 0.82rem; color: var(--steel); margin-top: 1rem; }

/* =============================================================
   Financing / accordion (dark)
   ============================================================= */
.pw__intro { max-width: 52ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.pw__intro h2 { font-size: var(--fs-h2); margin-bottom: 1.4rem; max-width: 20ch; }
.pw__intro p { color: var(--ivory-70); margin-bottom: 1.8rem; }

.accordion { border-top: 1px solid var(--ivory-16); }
.acc__item { border-bottom: 1px solid var(--ivory-16); }
.acc__trigger {
  width: 100%; background: transparent; border: 0; color: var(--ivory); cursor: pointer;
  text-align: left; font-family: var(--f-serif); font-size: var(--fs-h3); letter-spacing: 0.03em;
  padding: clamp(1.3rem, 2.6vw, 1.9rem) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.acc__circ {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--ivory-16); position: relative; transition: background-color .3s ease;
}
.acc__circ::before, .acc__circ::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--ivory);
  transform: translate(-50%, -50%); transition: opacity .3s ease, transform .3s ease;
}
.acc__circ::before { width: 14px; height: 1.5px; }
.acc__circ::after  { width: 1.5px; height: 14px; }
.acc__item.is-open .acc__circ::after { opacity: 0; transform: translate(-50%,-50%) rotate(90deg); }
.acc__item.is-open .acc__circ { background: rgba(247,245,240,0.06); }
.acc__panel { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.acc__panel-inner { padding-bottom: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--ivory-55); max-width: 60ch; font-family: var(--f-sans); }

/* =============================================================
   Big statement band (dark)
   ============================================================= */
.band { padding-block: clamp(5rem, 11vw, 9rem); }
.band h2 { font-size: var(--fs-statement); line-height: 1.08; max-width: 18ch; }
.band h2 strong { font-weight: 600; }
.band p { color: var(--steel); margin-top: 1.8rem; font-size: 0.85rem; letter-spacing: 0.04em; max-width: 60ch; }

/* =============================================================
   Who we work with (light)
   ============================================================= */
.insights__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); flex-wrap: wrap; }
.insights__head h2 { font-size: var(--fs-h2); }
.stories { display: grid; gap: clamp(2rem, 4vw, 3rem); grid-template-columns: 1fr; }
@media (min-width: 720px) { .stories { grid-template-columns: repeat(3, 1fr); } }
.story__media { aspect-ratio: 4 / 3; background: #112B4C; margin-bottom: 1.4rem; display: flex; align-items: center; justify-content: center; }
.story:nth-child(2) .story__media { background: #16324F; }
.story:nth-child(3) .story__media { background: #1A3752; }
.story__media img { width: 44px; height: auto; opacity: 0.4; }
.story__cat { font-family: var(--f-label); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--steel); }
.story h3 { font-size: var(--fs-h3); margin: 0.7rem 0; }
.story__date { font-size: 0.85rem; color: var(--steel); }

/* =============================================================
   Contact (dark)
   ============================================================= */
.news__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 860px) { .news__grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.news__grid h2 { font-size: var(--fs-h2); max-width: 18ch; }
.form { display: grid; gap: 1.6rem; }
.form__row { display: grid; gap: 1.6rem; }
@media (min-width: 560px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-family: var(--f-label); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); margin-bottom: 0.6rem; }
.field input, .field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ivory-16);
  color: var(--ivory); font-family: var(--f-sans); font-size: 1rem; padding: 0.7rem 0;
}
.field input::placeholder { color: rgba(247,245,240,0.35); }
.field input:focus, .field select:focus { outline: 0; border-bottom-color: var(--steel); }
.field select option { color: var(--charcoal); }
.consent { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.8rem; color: var(--ivory-55); }
.consent a { color: var(--ivory); text-decoration: underline; }
.form__msg { font-size: 0.85rem; min-height: 1.2em; }

/* =============================================================
   Footer
   ============================================================= */
.site-footer { background: var(--navy-alt); border-top: 1px solid var(--ivory-16); padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem; }
.footer__top { display: grid; gap: 2.5rem; }
@media (min-width: 760px) { .footer__top { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer__brand img { height: 44px; width: auto; margin-bottom: 1.2rem; }
.footer__brand p { font-family: var(--f-label); color: var(--steel); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; }
.footer__col h4 { font-family: var(--f-label); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--steel); margin-bottom: 1.2rem; }
.footer__col li { margin-bottom: 0.7rem; }
.footer__col a { color: var(--ivory-70); font-size: 0.92rem; }
.footer__col a:hover { color: var(--ivory); }
.footer__bottom {
  margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid var(--ivory-08);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  font-size: 0.76rem; color: var(--ivory-55);
}
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer__bottom a:hover { color: var(--ivory); }

/* =============================================================
   Photography (near mono: grayscale under a navy scrim)
   ============================================================= */
/* Full-viewport photo hero, Spike pattern: grey image under a vertical navy gradient */
.hero--full {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--header-h); overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1) contrast(0.98) brightness(0.8);
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(12,35,64,0.82) 0%, rgba(12,35,64,0.55) 30%,
    rgba(12,35,64,0.55) 55%, rgba(12,35,64,0.92) 100%);
}
.hero__inner { position: relative; padding-block: clamp(4rem, 10vh, 7rem); }
.hero__inner .eyebrow { color: var(--ivory-70); }

/* Equal two-column split with wide gutter (Spike: 544/544, 96px gap) */
.split {
  display: grid; gap: clamp(3rem, 7vw, 6rem); align-items: center;
}
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split .photo { aspect-ratio: 6 / 5; }
.split .photo img { height: 100%; }
.firm__lanes {
  margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line-light);
  font-family: var(--f-label); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel);
}
.photo { position: relative; margin: 0; overflow: hidden; background: var(--navy); }
.photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.9);
}
.photo::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(12,35,64,0.32); mix-blend-mode: multiply;
}
.photo--tall { min-height: 340px; }

/* Numbered steps (Spike-pattern process grid) */
.steps {
  display: grid; gap: clamp(2rem, 4vw, 3rem);
  margin: clamp(2.8rem, 6vw, 4.5rem) 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--ivory-16); padding-top: clamp(2.2rem, 4vw, 3rem);
}
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps__num {
  font-family: var(--f-label); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.22em; color: var(--steel); display: block; margin-bottom: 1rem;
}
.steps h3 { font-size: var(--fs-h3); margin-bottom: 0.8rem; }
.steps p { color: var(--ivory-55); font-size: 0.95rem; max-width: 34ch; }

/* Contact: short, generous, no form */
.contact__inner { max-width: 880px; }
.contact__legal {
  margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--ivory-08);
  font-size: 0.8rem; color: var(--ivory-55); max-width: 56ch;
}

/* Hide hamburger on desktop (base rule below the earlier media query used to win) */
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* Slim footer row */
.footer__slim { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; justify-content: space-between; }
.footer__mail { color: var(--ivory-70); font-size: 0.92rem; }
.footer__mail:hover { color: var(--ivory); }

/* =============================================================
   Reveal animation
   ============================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
