/* ===================================================================
   Martin Billing Solutions — Sub-page layout (pages.css)
   Loaded AFTER home.css. Reuses all tokens/components from home.css;
   only adds layout specific to Services / Team / FAQs / Contact.
   Same breakpoints as home.css: 1080 / 760 / 460.
   ================================================================= */

/* ---------- active nav state ---------- */
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { width: 100%; }
.mobilemenu a.is-active:not(.btn) { color: var(--brand-deep); }

/* ===================================================================
   PAGE HEAD (sub-page hero band)
   ================================================================= */
.pagehead { position: relative; overflow: hidden; padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.pagehead__bg { position: absolute; inset: 0; pointer-events: none; }
.pagehead__bg::before {
  content: ""; position: absolute; top: -40%; right: -8%;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46,146,221,.16), rgba(46,146,221,0) 62%);
  filter: blur(8px);
}
.pagehead .contour { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(22,104,176,.14); }
.pagehead__inner { position: relative; max-width: 760px; }
.pagehead__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.04; letter-spacing: -.005em;
  margin-bottom: 18px; text-wrap: balance;
}
.pagehead__title em { font-style: italic; color: var(--brand); }
.pagehead__sub { font-size: clamp(1.02rem, 1.4vw, 1.16rem); color: var(--slate); max-width: 56ch; }

/* jump-nav chips (services page) */
.jumpnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; position: relative; }
.jumpnav a {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  color: var(--ink-2); background: var(--paper-card); border: 1px solid var(--line-strong);
  padding: 9px 16px; border-radius: 100px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.jumpnav a:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }

/* ===================================================================
   GENERIC SUB-PAGE SECTION
   ================================================================= */
.band { padding: 88px 0; }
.band--alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.band--tight { padding: 64px 0; }

/* lead / intro paragraph block */
.lead { max-width: 760px; }
.lead p { font-size: 1.08rem; color: var(--slate); }
.lead p + p { margin-top: 16px; }
.lead strong { color: var(--ink); }

/* ===================================================================
   SERVICES
   ================================================================= */
.svc { padding: 84px 0; scroll-margin-top: 90px; }
.anchor { display: block; height: 0; scroll-margin-top: 90px; }
.svc--alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.svc__head { max-width: 720px; margin-bottom: 40px; }
.svc__head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -.005em; margin-bottom: 14px;
}
.svc__intro { color: var(--slate); font-size: 1.06rem; max-width: 60ch; }

.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.svc-item {
  position: relative; padding: 18px 20px 18px 50px;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.svc-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.svc-item::before {
  content: ""; position: absolute; left: 18px; top: 21px; width: 20px; height: 20px;
  border-radius: 6px; background: var(--brand-tint) no-repeat center/13px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F4E88' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12l5 6L21 5'/%3E%3C/svg%3E");
}
.svc-item h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; letter-spacing: -.005em; margin-bottom: 4px; }
.svc-item p { font-size: .9rem; color: var(--slate); line-height: 1.5; }

/* dark variant of svc-grid (for sections on --ink background) */
.svc--dark { background: var(--ink); color: #fff; border-block: 1px solid rgba(255,255,255,.08); }
.svc--dark .svc__head h2 { color: #fff; }
.svc--dark .svc__intro { color: rgba(255,255,255,.74); }
.svc--dark .svc-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); box-shadow: none; }
.svc--dark .svc-item:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
.svc--dark .svc-item h3 { color: #fff; }
.svc--dark .svc-item p { color: rgba(255,255,255,.66); }
.svc--dark .svc-item::before { background-color: rgba(46,146,221,.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E92DD' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12l5 6L21 5'/%3E%3C/svg%3E"); }

/* ===================================================================
   TEAM
   ================================================================= */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.member {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.member__photo { aspect-ratio: 4 / 4.4; width: 100%; object-fit: cover; object-position: center top; background: var(--paper-2); }
.member__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.member__role {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-deep); margin-bottom: 10px;
}
.member__name { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin-bottom: 12px; }
.member__bio { font-size: .92rem; color: var(--slate); line-height: 1.6; }

.team-note {
  margin-top: 36px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 24px; font-size: .96rem; color: var(--slate);
}
.team-note svg { color: var(--brand); flex: none; }
.team-note a { color: var(--brand); font-weight: 600; }
.team-note a:hover { color: var(--brand-deep); }

/* ===================================================================
   FAQ (native <details> accordion)
   ================================================================= */
.faq { max-width: 860px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.faq__item {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq__item[open] { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.faq__q {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 18px;
  padding: 22px 26px; font-family: var(--serif); font-size: clamp(1.16rem, 1.8vw, 1.4rem);
  color: var(--ink); line-height: 1.25;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: ""; flex: none; margin-left: auto; width: 26px; height: 26px;
  background: var(--brand-tint) no-repeat center/15px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F4E88' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  border-radius: 50%; transition: transform .25s ease;
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 26px 24px; }
.faq__a p { color: var(--slate); font-size: 1rem; line-height: 1.65; max-width: 64ch; }

/* ===================================================================
   CONTACT
   ================================================================= */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }

.cform {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 34px 34px 38px; box-shadow: var(--shadow-sm);
}
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 8px;
}
.field input, .field textarea {
  font-family: var(--sans); font-size: .98rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 13px 15px; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,146,221,.18);
}
.field textarea { resize: vertical; min-height: 130px; }
.cform .btn { width: 100%; margin-top: 6px; }
.cform__note { font-size: .8rem; color: var(--slate-2); margin-top: 14px; text-align: center; }
.cform__ok {
  display: none; margin-top: 18px; padding: 14px 18px; border-radius: var(--r-sm);
  background: rgba(62,126,114,.12); border: 1px solid rgba(62,126,114,.4);
  color: var(--sage); font-size: .92rem; font-weight: 500;
}
.cform__ok.show { display: block; }

/* contact info column */
.cinfo { display: flex; flex-direction: column; gap: 4px; }
.cinfo__block { padding: 20px 0; border-bottom: 1px solid var(--line); }
.cinfo__block:first-child { padding-top: 0; }
.cinfo__block:last-child { border-bottom: 0; }
.cinfo__label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-deep); margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.cinfo__block a, .cinfo__block p { display: block; font-size: 1.02rem; color: var(--ink); }
.cinfo__block a:hover { color: var(--brand); }
.cinfo__block p { color: var(--slate); font-size: .96rem; line-height: 1.55; }
.cinfo__block .muted { color: var(--slate-2); font-size: .9rem; }

/* ===================================================================
   RESPONSIVE — within existing 1080 / 760 / 460 breakpoints
   ================================================================= */
@media (max-width: 1080px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  .pagehead { padding: 48px 0 44px; }
  .svc, .band { padding: 64px 0; }
  .svc-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .cform__row { grid-template-columns: 1fr; gap: 0; }
  .faq__q { padding: 18px 20px; }
  .faq__a { padding: 0 20px 20px; }
  .cform { padding: 26px 22px 30px; }
}

@media (max-width: 460px) {
  .jumpnav a { font-size: .72rem; padding: 8px 13px; }
  .member__name { font-size: 1.44rem; }
}

/* ===================================================================
   REFINEMENTS — Team v2, About, Why MBS
   Loaded after the base sub-page styles above. Reuses home.css tokens
   and components (.sec-head, .tile, .mission, .statement, .ph, .cta).
   ================================================================= */

/* ---------- page-head meta chips (Team / About / Why) ---------- */
.headmeta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; position: relative; }
.headmeta span {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--ink-2); background: var(--paper-card); border: 1px solid var(--line-strong);
  padding: 8px 15px; border-radius: 100px; display: inline-flex; align-items: center; gap: .55em;
}
.headmeta span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none;
}

/* ---------- generic card grid (reused with home's .tile) ---------- */
.cardgrid { display: grid; gap: 18px; }
.cardgrid--3 { grid-template-columns: repeat(3, 1fr); }
.cardgrid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===================================================================
   TEAM v2 — featured founder + refined member cards
   ================================================================= */
.leadcard {
  display: grid; grid-template-columns: minmax(260px, .82fr) 1.18fr; gap: 46px;
  align-items: center; background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-sm);
}
.leadcard__media { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.leadcard__media img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: center top; background: var(--paper-2); }
.leadcard__badge {
  position: absolute; left: 16px; bottom: 16px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 100px;
}
.leadcard__body { padding: 6px 18px 6px 0; }
.leadcard__name { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.85rem); line-height: 1.04; margin: 6px 0 6px; }
.leadcard__role { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-deep); margin-bottom: 20px; }
.leadcard__bio { color: var(--slate); font-size: 1.04rem; line-height: 1.72; margin-bottom: 24px; }
.leadcard__facts { display: flex; flex-wrap: wrap; gap: 10px; }
.leadcard__facts span {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 100px;
}

/* refined member cards (extends base .member) */
.member__media { position: relative; }
.member__badge {
  position: absolute; left: 14px; top: 14px;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: rgba(12,30,46,.6); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  padding: 6px 12px; border-radius: 100px;
}
.member__extra { margin-top: auto; padding-top: 16px; }
.member__extralabel {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--slate-2); margin-bottom: 10px;
}
.member__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: .74rem; color: var(--slate); background: var(--paper-2); border: 1px solid var(--line); padding: 5px 11px; border-radius: 100px; }
.member__bio { margin-bottom: 16px; }

/* ===================================================================
   FACT STRIP (About)
   ================================================================= */
.factstrip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--ink); color: #fff; border-radius: var(--r-xl);
  padding: 46px 24px; box-shadow: var(--shadow-md);
}
.fact { text-align: center; padding: 4px 18px; }
.fact + .fact { border-left: 1px solid rgba(255,255,255,.12); }
.fact b { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 3.4vw, 3rem); line-height: 1; color: #fff; display: block; }
.fact span { display: block; margin-top: 12px; font-size: .82rem; color: rgba(255,255,255,.66); line-height: 1.4; }

/* ===================================================================
   ABOUT STORY (image + narrative)
   ================================================================= */
.about-story { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.about-story__media { aspect-ratio: 5 / 5.4; }
.about-story__body h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.1; letter-spacing: -.005em; margin-bottom: 20px; text-wrap: balance;
}
.about-story__body p { color: var(--slate); font-size: 1.04rem; line-height: 1.72; }
.about-story__body p + p { margin-top: 16px; }
.about-story__body strong { color: var(--ink); }

/* ===================================================================
   REASONS (Why MBS) — two-column icon rows
   ================================================================= */
.reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 44px; }
.reason { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.reason__num { display: none; }
.reason__icon { width: 50px; height: 50px; border-radius: 14px; background: var(--brand-tint); color: var(--brand-deep); display: grid; place-items: center; flex: none; }
.reason__icon svg { width: 25px; height: 25px; }
.reason h3 { font-family: var(--serif); font-weight: 400; font-size: 1.42rem; margin-bottom: 8px; line-height: 1.15; }
.reason p { color: var(--slate); font-size: .98rem; line-height: 1.6; }

/* ===================================================================
   RESPONSIVE — refinements (1080 / 760 / 460)
   ================================================================= */
@media (max-width: 1080px) {
  .cardgrid--3, .cardgrid--4 { grid-template-columns: repeat(2, 1fr); }
  .leadcard { grid-template-columns: 1fr; gap: 28px; }
  .leadcard__media { max-width: 360px; }
  .leadcard__body { padding: 0; }
  .factstrip { grid-template-columns: repeat(2, 1fr); gap: 30px 0; padding: 38px 16px; }
  .fact:nth-child(3) { border-left: 0; }
  .about-story { grid-template-columns: 1fr; gap: 36px; }
  .about-story__media { max-width: 520px; }
}

@media (max-width: 760px) {
  .cardgrid--3, .cardgrid--4 { grid-template-columns: 1fr; }
  .reasons { grid-template-columns: 1fr; gap: 26px; }
  .reason { padding-bottom: 26px; }
}

@media (max-width: 460px) {
  .factstrip { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
  .fact { padding-bottom: 4px; }
}
