/* ═══════════════════════════════════════════════════════
   M1 Financial Solutions — static rebuild (shared styles)
   Two-column layouts + layered, textured section backgrounds.
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:          #f4f3ef;   /* warm off-white page base */
  --bg-warm:     #f7f6f2;
  --panel-cool:  #eef1f2;   /* cool light panel */
  --panel-cool2: #e6ebec;
  --surface:     #ffffff;
  --ink:         #1d1e20;   /* primary text */
  --muted:       #5f6268;   /* secondary text */
  --accent:      #38647a;   /* slate-teal brand */
  --accent-dark: #2d5061;   /* hover */
  --accent-deep: #223c49;   /* CTA band */
  --pill-grey:   #e6e6e4;
  --pill-grey-2: #dcdcd8;
  --panel:       #ffffff;   /* service feature card */
  --footer:      #161617;   /* dark footer */
  --line:        rgba(29,30,32,.09);
  --shadow:      0 18px 45px rgba(29,30,32,.10);
  --shadow-sm:   0 8px 24px rgba(29,30,32,.07);
  --radius-pill: 999px;
  --radius-lg:   26px;
  --radius-img:  22px;
  --wrap:        1240px;
  --gap:         clamp(40px, 5vw, 72px);
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; position: relative; z-index: 1; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 42px;
  font-weight: 700; font-size: 1.0625rem; line-height: 1;
  border-radius: var(--radius-pill);
  border: 0; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(56,100,122,.35); }
.btn--grey { background: var(--pill-grey); color: #141414; }
.btn--grey:hover { background: var(--pill-grey-2); transform: translateY(-2px); }
.btn--onDark { background: #ffffff; color: var(--accent); }
.btn--onDark:hover { background: #eef2f2; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.25); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,243,239,.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(29,30,32,.06); border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 24px; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; gap: 38px; }
.nav a { font-weight: 700; font-size: 1rem; color: var(--ink); position: relative; padding: 6px 0; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right .25s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 46px; height: 46px; padding: 12px; background: transparent; border: 0; cursor: pointer;
}
.menu-toggle span { height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; padding: 8px 24px 22px; border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav a { padding: 14px 4px; font-weight: 700; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------- section background helpers ---------- */
.glow { position: relative; overflow: hidden; }
.glow::before {
  content: ""; position: absolute; top: -180px; right: -140px;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56,100,122,.16), rgba(56,100,122,0) 68%);
  pointer-events: none; z-index: 0;
}
.glow--bl::before { top: auto; right: auto; bottom: -200px; left: -170px; background: radial-gradient(circle, rgba(56,100,122,.11), transparent 70%); }

.panel-section {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel-cool) 0%, var(--panel-cool2) 100%);
  border-top: 1px solid rgba(29,30,32,.06);
  border-bottom: 1px solid rgba(29,30,32,.06);
}
.panel-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(29,30,32,.05) 1px, transparent 1.4px);
  background-size: 24px 24px; opacity: .75;
}

/* ═══════════════ HERO ═══════════════ */
.hero { padding: clamp(48px, 6vw, 88px) 0; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--gap);
  align-items: center;
}
.hero__title { font-size: clamp(2.3rem, 4.4vw, 3.6rem); }
.hero__lede { margin-top: 22px; font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--muted); max-width: 42ch; }
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.trust { margin-top: 40px; display: flex; align-items: center; gap: 16px; }
.trust__flags { display: flex; }
.trust__flags img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); margin-left: -12px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.trust__flags img:first-child { margin-left: 0; }
.trust__label { font-weight: 700; color: var(--ink); line-height: 1.3; }

.checks { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.checks li { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.checks__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(56,100,122,.14); color: var(--accent); font-size: .9rem; font-weight: 800;
}

.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%; aspect-ratio: 5 / 5; object-fit: cover; object-position: center;
  border-radius: var(--radius-img); box-shadow: var(--shadow);
}
.hero__figure--wide img { aspect-ratio: 4 / 3.4; }

/* ═══════════════ SERVICES ═══════════════ */
.services { padding: clamp(56px, 6vw, 96px) 0; }
.services__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--gap);
  align-items: start;
}
.section-title { font-size: clamp(2rem, 3.6vw, 3rem); }
.services__figure { margin: 32px 0; }
.services__figure img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-img); box-shadow: var(--shadow-sm);
}
.services__intro .btn { margin-top: 4px; }

.services__list { display: flex; flex-direction: column; gap: 20px; }
.feature {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 32px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature__num {
  flex: none; font-weight: 800; font-size: 1.05rem; color: var(--accent);
  width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(56,100,122,.12);
}
.feature__title { font-size: 1.4rem; margin-bottom: 8px; }
.feature p { color: var(--muted); }

/* ═══════════════ ABOUT ═══════════════ */
.about { padding: clamp(48px, 6vw, 90px) 0; }
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: center;
}
.about__title { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
.about__prose { margin: 24px 0 32px; font-size: 1.12rem; color: var(--muted); }
.about__figure { margin: 0; }
.about__figure img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-img); box-shadow: var(--shadow);
}

/* ═══════════════ CTA BAND (teal, textured) ═══════════════ */
.cta { position: relative; overflow: hidden; padding: clamp(64px, 8vw, 112px) 0;
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 62%, #325b70 100%); }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.4px);
  background-size: 26px 26px;
}
.cta::after {
  content: ""; position: absolute; top: -160px; left: -120px; width: 520px; height: 520px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
  pointer-events: none; z-index: 0;
}
.cta__card { text-align: center; color: #fff; max-width: 760px; margin-inline: auto; }
.cta__title { font-size: clamp(2rem, 4.2vw, 3rem); color: #fff; }
.cta__text { margin: 22px auto 36px; max-width: 540px; font-size: 1.15rem; color: rgba(255,255,255,.82); }

/* ═══════════════ FOOTER ═══════════════ */
.footer { background: var(--footer); color: #fff; padding: clamp(56px, 6vw, 80px) 0; border-top: 3px solid var(--accent); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.footer__logo { width: 220px; height: auto; margin-bottom: 16px; }
.footer__tag { font-size: 1.3rem; font-weight: 700; max-width: 360px; line-height: 1.35; }
.footer__meta { text-align: right; }
.footer__contact { font-size: 1.15rem; font-weight: 700; display: inline-flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
.footer__contact a { transition: color .18s ease; }
.footer__contact a:hover { color: #9fc3d3; }
.footer__contact span { color: rgba(255,255,255,.35); }
.footer__copy { margin-top: 14px; color: rgba(255,255,255,.5); font-size: .95rem; }

/* ═══════════════ CONTACT PAGE ═══════════════ */
.contact-section { padding: clamp(56px, 6vw, 96px) 0; }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--gap); align-items: start;
}
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow);
}
.field { margin-bottom: 22px; }
.field:last-of-type { margin-bottom: 28px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; font-size: .98rem; }
.field label .req { color: var(--accent); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg-warm); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.field textarea { min-height: 148px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(56,100,122,.16);
}
.form-card .btn { width: 100%; }
.form-note { margin-top: 16px; font-size: .95rem; color: var(--muted); text-align: center; }
.form-note.is-success { color: var(--accent); font-weight: 700; }

.contact-aside { display: flex; flex-direction: column; gap: 22px; }
.info-card {
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 34px 32px; box-shadow: var(--shadow-sm);
}
.info-card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.info-card a, .info-card p { color: #fff; }
.info-card .info-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: 700; }
.info-card .info-row:last-child { margin-bottom: 0; }
.info-card .info-ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: inline-flex;
  align-items: center; justify-content: center; background: rgba(255,255,255,.16);
}
.info-card .info-ico svg { width: 20px; height: 20px; }
.office-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 32px; box-shadow: var(--shadow-sm);
}
.office-card h2 { font-size: 1.25rem; margin-bottom: 12px; }
.office-card p { color: var(--muted); font-weight: 700; }

/* ═══════════════ small-CTA row (subpage) ═══════════════ */
.mini-cta { text-align: center; color: #fff; max-width: 720px; margin-inline: auto; }
.mini-cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: #fff; }
.mini-cta p { margin: 16px auto 30px; font-size: 1.1rem; color: rgba(255,255,255,.82); }

/* ═══════════════ reveal on scroll ═══════════════ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ═══════════════ responsive ═══════════════ */
@media (max-width: 900px) {
  .hero__inner,
  .services__inner,
  .about__inner,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero__lede { max-width: none; }
  .services__figure { max-width: 520px; }
  .about__text { order: 1; }
  .about__figure { order: 2; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav.is-open { display: flex; }
  .header__inner { min-height: 72px; }
  .brand img { height: 40px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__meta { text-align: center; }
  .footer__contact { justify-content: center; }
}
@media (max-width: 480px) {
  .hero__actions .btn { flex: 1 1 auto; }
  .trust { flex-direction: column; align-items: flex-start; gap: 12px; }
  .feature { padding: 26px 22px; gap: 16px; }
  .footer__contact { flex-direction: column; gap: 6px; }
  .footer__contact span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .feature:hover { transform: none; }
}
