/* ============================================================
   Meridian Capital — institutional brochure site
   Newsreader (display) + Inter (body). Ivory / navy / sky / sand.
   ============================================================ */

:root {
  /* palette */
  --ink-navy:    #10243E;
  --deep-navy:   #0B1A2E;
  --ivory:       #F4F1EA;
  --pure-paper:  #FBFAF6;
  --sky:         #5B8FB0;
  --sky-soft:    #87AEC6;
  --sand:        #C9B79C;
  --slate:       #3A4654;
  --mist:        #8A97A6;
  --hairline:    rgba(91, 143, 176, 0.34);
  --hairline-on-navy: rgba(135, 174, 198, 0.26);

  /* type */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* scale */
  --measure: 68ch;
  --pad-x: clamp(1.25rem, 5vw, 6rem);
  --band-y: clamp(4.5rem, 9vw, 8.5rem);

  /* shadow — layered, soft, institutional */
  --lift-1: 0 1px 2px rgba(16,36,62,.05), 0 6px 16px -8px rgba(16,36,62,.14);
  --lift-2: 0 2px 4px rgba(16,36,62,.06), 0 18px 40px -20px rgba(16,36,62,.30);
  --lift-3: 0 1px 2px rgba(16,36,62,.07), 0 10px 22px -10px rgba(16,36,62,.20),
            0 30px 60px -30px rgba(16,36,62,.34);

  /* faint paper grain — institutional surfaces carry texture, not flat fill */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ivory);
  background-image: var(--grain);
  background-blend-mode: multiply;
  color: var(--slate);
  line-height: 1.62;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---- typographic primitives ---- */
h1, h2, h3, h4 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  color: var(--ink-navy);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.012em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

p { max-width: var(--measure); }
strong { color: var(--ink-navy); font-weight: 600; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--sky);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--sand);
  display: inline-block;
}

/* ---- layout ---- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad-x); }

.band { padding: var(--band-y) 0; position: relative; }
.band--ivory { background: var(--ivory); }
.band--paper { background: var(--pure-paper); }
.band--navy {
  background: var(--ink-navy);
  color: #C3CDD8;
  background-image:
    radial-gradient(900px 360px at 88% -8%, rgba(91,143,176,.20), transparent 70%),
    radial-gradient(700px 320px at 4% 108%, rgba(201,183,156,.12), transparent 72%);
}
.band--navy h1, .band--navy h2, .band--navy h3 { color: #F4F1EA; }
.band--navy .eyebrow { color: var(--sky-soft); }
.band--navy strong { color: #fff; }

.rule {
  height: 1px;
  background: var(--hairline);
  border: 0;
}
.band--navy .rule { background: var(--hairline-on-navy); }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244,241,234,.86);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 8px 24px -16px rgba(16,36,62,.28);
}
.site-head__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex; align-items: center; gap: 0.66rem;
  text-decoration: none; color: var(--ink-navy);
}
.brand__mark {
  width: 32px; height: 32px; flex: none;
}
.brand__name {
  font-family: var(--display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__name small {
  display: block;
  font-family: var(--body);
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  margin-top: 1px;
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--slate);
  padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav a:hover { color: var(--ink-navy); border-bottom-color: var(--sky); }
.nav a[aria-current="page"] {
  color: var(--ink-navy);
  border-bottom-color: var(--sand);
}

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--hairline);
  background: var(--pure-paper);
  border-radius: 3px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; position: relative;
  width: 18px; height: 1.5px; background: var(--ink-navy);
  margin: 0 auto;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -5.5px; }
.nav-toggle span::after  { top:  5.5px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--deep-navy);
  color: #C3CDD8;
  overflow: hidden;
  isolation: isolate;
}
.hero__mesh {
  position: absolute; inset: 0;
  z-index: 0;
  width: 100%; height: 100%;
}
.hero::after {
  /* warm institutional vignette over the mesh */
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(1100px 520px at 78% 12%, rgba(91,143,176,.22), transparent 66%),
    radial-gradient(720px 420px at 6% 96%, rgba(201,183,156,.13), transparent 70%),
    linear-gradient(180deg, rgba(11,26,46,0) 55%, rgba(11,26,46,.55) 100%);
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 2;
  padding: clamp(5.5rem, 12vw, 9.5rem) 0 clamp(4.5rem, 9vw, 7rem);
}
.hero__inner .eyebrow { color: var(--sky-soft); }
.hero h1 {
  color: #F6F4EE;
  max-width: 17ch;
  margin: 1.4rem 0 0;
}
.hero h1 em {
  font-style: italic;
  color: var(--sand);
}
.hero__lead {
  margin-top: 1.6rem;
  max-width: 52ch;
  font-size: 1.18rem;
  color: #AEBAC8;
}
.hero__actions {
  margin-top: 2.4rem;
  display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;
}

/* link that reads as institutional, not an app pill */
.link-arrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  color: #F4F1EA;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding-bottom: 4px;
  border-bottom: 1.5px solid var(--sand);
  transition: gap .2s ease, border-color .2s ease;
}
.link-arrow::after { content: "\2192"; transition: transform .2s ease; }
.link-arrow:hover { border-bottom-color: var(--sky-soft); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow--dark { color: var(--ink-navy); }

/* =========================================================
   FIGURES (large display numbers)
   ========================================================= */
.figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--lift-3);
}
.figure {
  background: var(--pure-paper);
  padding: 2.4rem 1.7rem;
}
.figure__num {
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.4vw, 3.5rem);
  color: var(--ink-navy);
  line-height: 1;
  letter-spacing: -0.02em;
}
.figure__num span { color: var(--sky); }
.figure__label {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--mist);
  letter-spacing: 0.04em;
}
.figure__rule {
  width: 30px; height: 2px;
  background: var(--sand);
  margin-top: 1.1rem;
}
.band--navy .figures { background: var(--hairline-on-navy); border-color: var(--hairline-on-navy); }
.band--navy .figure { background: rgba(255,255,255,.025); }
.band--navy .figure__num { color: #F4F1EA; }
.band--navy .figure__num span { color: var(--sky-soft); }

/* =========================================================
   SECTION HEADER + lede grid
   ========================================================= */
.section-head { max-width: 760px; }
.section-head h2 { margin-top: 1.1rem; }
.section-head p { margin-top: 1.1rem; color: var(--slate); }
.band--navy .section-head p { color: #AEBAC8; }

.lede-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* =========================================================
   APPROACH / PRINCIPLE CARDS
   ========================================================= */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.2rem;
}
.principle {
  background: var(--pure-paper);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 2.1rem 1.9rem 2.3rem;
  position: relative;
  box-shadow: var(--lift-1);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.principle:hover {
  transform: translateY(-4px);
  box-shadow: var(--lift-2);
  border-color: var(--sky-soft);
}
.principle__index {
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--sky);
  letter-spacing: 0.08em;
}
.principle__index::before {
  content: ""; display: block;
  width: 38px; height: 2px; background: var(--sand);
  margin-bottom: 1.1rem;
}
.principle h3 { margin: 0.7rem 0 0.7rem; }
.principle p { font-size: 0.97rem; }

/* numbered editorial list (Approach page) */
.steps { margin-top: 2.6rem; border-top: 1px solid var(--hairline); }
.step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--hairline);
}
.step__num {
  font-family: var(--display);
  font-size: 2.3rem;
  color: var(--sky);
  line-height: 1;
}
.step h3 { margin-bottom: 0.55rem; }
.step p { font-size: 1rem; }

/* =========================================================
   LEADERSHIP (About)
   ========================================================= */
.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.person {
  background: var(--pure-paper);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1.9rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.person:hover { transform: translateY(-3px); box-shadow: var(--lift-1); }
.person__monogram {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink-navy);
  color: var(--sand);
  font-family: var(--display);
  font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
}
.person__name { font-family: var(--display); font-size: 1.3rem; color: var(--ink-navy); }
.person__role { font-size: 0.83rem; color: var(--sky); letter-spacing: 0.04em; margin-top: 0.2rem; }
.person__bio { font-size: 0.95rem; margin-top: 0.9rem; }

/* =========================================================
   MARQUEE — streaming partner logos
   ========================================================= */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 2.4rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #0B1A2E 9%, #0B1A2E 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #0B1A2E 9%, #0B1A2E 91%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 4.5rem;
  animation: slide 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__logo {
  flex: none;
  height: 30px;
  display: flex; align-items: center;
  color: var(--mist);
  opacity: 0.78;
  transition: opacity .2s ease, color .2s ease;
}
.marquee__logo:hover { opacity: 1; color: var(--ink-navy); }
.marquee__logo svg { height: 100%; width: auto; }
.band--navy .marquee__logo { color: var(--sky-soft); }
.band--navy .marquee__logo:hover { color: #fff; }

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   FAQ — native <details> accordion
   ========================================================= */
.faq { margin-top: 2.8rem; border-top: 1px solid var(--hairline); max-width: 880px; }
.faq details {
  border-bottom: 1px solid var(--hairline);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 3rem 1.5rem 0;
  position: relative;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ink-navy);
  transition: color .16s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--sky); }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 13px; height: 13px;
  margin-top: -6.5px;
  background:
    linear-gradient(var(--sky),var(--sky)) center/13px 1.6px no-repeat,
    linear-gradient(var(--sky),var(--sky)) center/1.6px 13px no-repeat;
  transition: transform .22s ease;
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq__answer { padding: 0 3rem 1.7rem 0; }
.faq__answer p { font-size: 1rem; }

/* =========================================================
   CONTACT FORM
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.field { margin-bottom: 1.5rem; }
.field label {
  display: block;
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.5rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink-navy);
  background: var(--pure-paper);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 0.85rem 0.95rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(91,143,176,.16);
}
.field input.invalid,
.field textarea.invalid { border-color: #B4543F; }
.field__error {
  display: none;
  font-size: 0.8rem;
  color: #B4543F;
  margin-top: 0.35rem;
}
.field__error.show { display: block; }

.btn-submit {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #F4F1EA;
  background: var(--ink-navy);
  border: 1px solid var(--ink-navy);
  border-radius: 3px;
  padding: 0.92rem 1.9rem;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}
.btn-submit:hover { background: var(--deep-navy); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

.form-note {
  font-size: 0.82rem;
  color: var(--mist);
  margin-top: 1rem;
}
.form-success {
  display: none;
  border: 1px solid var(--sky);
  background: rgba(91,143,176,.08);
  border-radius: 4px;
  padding: 1.6rem 1.7rem;
}
.form-success.show { display: block; }
.form-success h3 { font-size: 1.25rem; }
.form-success p { font-size: 0.96rem; margin-top: 0.4rem; }

.contact-aside dl { margin-top: 0.4rem; }
.contact-aside dt {
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sky);
  margin-top: 1.6rem;
}
.contact-aside dd {
  font-family: var(--display);
  font-size: 1.12rem;
  color: var(--ink-navy);
  margin-top: 0.3rem;
}

/* =========================================================
   GENERIC PAGE HEADER (inner pages)
   ========================================================= */
.page-head {
  background: var(--ink-navy);
  color: #C3CDD8;
  background-image:
    radial-gradient(800px 320px at 86% -20%, rgba(91,143,176,.22), transparent 68%),
    radial-gradient(620px 300px at 0% 120%, rgba(201,183,156,.12), transparent 72%);
}
.page-head__inner { padding: clamp(3.8rem, 8vw, 6rem) 0 clamp(3.2rem, 6vw, 4.6rem); }
.page-head h1 { color: #F6F4EE; max-width: 18ch; margin-top: 1.2rem; }
.page-head p { color: #AEBAC8; margin-top: 1.2rem; max-width: 54ch; }

/* call-to-action band */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin: 0 auto; }
.cta-band p { margin: 1.2rem auto 0; color: #AEBAC8; }
.cta-band .hero__actions { justify-content: center; margin-top: 2.2rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-foot {
  background: var(--deep-navy);
  color: #8595A6;
  padding: clamp(3.4rem, 6vw, 5rem) 0 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.foot__brand .brand__name { color: #F4F1EA; }
.foot__brand p { font-size: 0.92rem; margin-top: 1rem; max-width: 34ch; color: #8595A6; }
.foot-col h4 {
  font-family: var(--body);
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sky-soft);
  margin-bottom: 1rem;
}
.foot-col a {
  display: block;
  text-decoration: none;
  font-size: 0.94rem;
  color: #AAB7C5;
  padding: 0.32rem 0;
  transition: color .16s ease;
}
.foot-col a:hover { color: #fff; }
.foot__legal {
  border-top: 1px solid var(--hairline-on-navy);
  padding: 1.5rem 0;
  display: flex; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6A7889;
}

/* =========================================================
   SCROLL-REVEAL
   Progressive enhancement: content is visible by default.
   Only when JS is confirmed running (<html class="js">) does
   .reveal start hidden and animate in. If JS fails or is slow,
   nothing disappears — the reveal is decoration, not a gate.
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 940px) {
  .lede-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .principles,
  .people { grid-template-columns: 1fr 1fr; }
  .figures { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 74px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--hairline);
    padding: 0.5rem var(--pad-x) 1rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--hairline);
  }
  .nav a:hover,
  .nav a[aria-current="page"] { border-bottom-color: var(--hairline); }
  .principles,
  .people,
  .figures,
  .foot-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 0.5rem; }
  .step__num { font-size: 1.9rem; }
  .hero__actions { gap: 1.2rem; }
  .faq summary { font-size: 1.08rem; padding-right: 2.4rem; }
  .foot__legal { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .principle, .person, .btn-submit, .link-arrow::after { transition: none; }
}
