/* Friends Group of Companies: page CSS on top of the design kit (system.css, layout.css).
   The client asked for fuller pages with less empty space, so sections here take the height of their
   content instead of the kit's one-screen box. */

:root { --pad-y: 112px; --pad-y-sm: 72px; }
@media (max-width: 1023px) { :root { --pad-y: 88px; } }
@media (max-width: 639px)  { :root { --pad-y: 64px; --pad-y-sm: 48px; } }

/* ---------------------------------------------------------------- section box: content height */
main > section.section:not(.hero):not([data-moment]),
footer.closing { height: auto !important; min-height: 0 !important; padding: var(--pad-y) 0 !important; }
main > section.section:not(.hero):not([data-moment]) > .wrap,
footer.closing > .wrap { height: auto !important; display: block; }
main > section.sec--band { padding: var(--pad-y-sm) 0 !important; }
main > section.sec--first { padding-top: calc(var(--nav) + 56px) !important; }

/* inner-page hero: shorter than the home page's full screen */
.hero--page { height: min(78svh, 760px) !important; min-height: 560px; }
@media (max-width: 1023px) { .hero--page { height: auto !important; min-height: 0; } }
.crumbs { font-size: var(--t-small); color: var(--muted); margin-bottom: var(--s-4); }
.crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.hero .crumbs { margin-bottom: var(--s-5); }

/* ---------------------------------------------------------------- type: easier reading */
.sec-head { max-width: 820px; margin-bottom: var(--s-8); }
.sec-head h2 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; }
.sec-lead { font-size: clamp(18px, 1.35vw, 20px); line-height: 1.6; color: var(--muted); margin-top: var(--s-4); max-width: 68ch; }
.kicker { font: 500 var(--t-label)/1.4 var(--font-text); color: var(--action); margin-bottom: var(--s-3); }
.ground-inverse .kicker { color: var(--p-inv-accent); }
.split__text p, .ceo__text p { font-size: 17px; line-height: 1.7; max-width: 62ch; }
.sec-foot { margin-top: var(--s-6); }

/* ---------------------------------------------------------------- the split: text and a photograph of the same height */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); align-items: stretch; }
.split__text { display: flex; flex-direction: column; gap: var(--s-5); justify-content: center; padding-block: var(--s-2); }
.split__text .sec-head { margin-bottom: 0; }
.split__text .rows { margin-top: var(--s-2); }
.split__text .btn-row { margin-top: var(--s-2); }
.split__text > .link { align-self: flex-start; }
.split__media { position: relative; min-height: var(--min-h, 420px); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.split__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) {
  .split { grid-template-columns: 1fr; gap: var(--s-6); }
  .split__media { min-height: 0; aspect-ratio: 4 / 3; }
}

/* rows that are read (not scanned): larger text */
.rows--read > li { padding-block: var(--s-4); }
.rows--read .rows__name { font-size: 17px; }
.rows--read > li > p { font-size: 16px; line-height: 1.6; color: var(--muted); margin-top: 2px; }
.ground-inverse .rows--read > li > p { color: var(--p-inv-muted); }
.rows--read > li:first-child { padding-top: 0; }

/* ---------------------------------------------------------------- photo cards */
.pcards { display: grid; gap: var(--s-5); }
.pcards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pcards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pcards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px)  { .pcards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .pcards--3, .pcards--4 { grid-template-columns: 1fr; } }
.pcard { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  color: var(--ink); text-decoration: none; transition: transform .25s ease, box-shadow .25s, border-color .25s; }
.ground-surface .pcard { background: var(--p-bg); }
a.pcard:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--action) 50%, var(--line)); box-shadow: 0 18px 40px -28px rgb(0 0 0 / .45); }
.pcard__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
a.pcard:hover .pcard__media img { transform: scale(1.03); }
.pcard__body { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-6); flex: 1; }
.pcard__body h3 { font: 500 20px/1.25 var(--font-display); letter-spacing: -0.01em; }
.pcard__body p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.pcard__more { margin-top: auto; padding-top: var(--s-2); font-weight: 500; color: var(--action); }
.pcard__more::after { content: " →"; }

/* ---------------------------------------------------------------- figures band */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); }
.stat { border-left: 2px solid rgb(255 255 255 / .22); padding-left: var(--s-5); }
.stat b { display: block; font: 400 clamp(40px, 4.4vw, 64px)/1 var(--font-display); letter-spacing: -0.03em; color: var(--p-inv-accent); }
.stat span { display: block; margin-top: var(--s-3); font-size: 15px; color: var(--p-inv-muted); }
@media (max-width: 767px) { .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-6); } }

/* ---------------------------------------------------------------- steps */
.steps-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-5); margin: 0; padding: 0; list-style: none; }
.steps-list > li { border-top: 2px solid var(--action); padding-top: var(--s-5); }
.steps-list__n { display: block; font: 400 32px/1 var(--font-display); color: var(--action); margin-bottom: var(--s-4); }
.steps-list h3 { font: 500 19px/1.3 var(--font-display); margin-bottom: var(--s-2); }
.steps-list p { font-size: 16px; line-height: 1.6; color: var(--muted); }
@media (max-width: 1023px) { .steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-7); } }
@media (max-width: 599px)  { .steps-list { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- industry tiles */
.itiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
@media (max-width: 1023px) { .itiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px)  { .itiles { gap: var(--s-3); } }
.itile { display: block; position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; color: #fff; text-decoration: none; background: #222; transition: transform .25s; }
.itile__media, .itile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.itile__media img { transition: transform .6s ease; }
.itile:hover { transform: translateY(-2px); }
.itile:hover .itile__media img { transform: scale(1.03); }
.itile__body { position: absolute; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); background: var(--p-bg); color: var(--p-ink); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); }
.itile__body h3 { font: 500 16px/1.3 var(--font-display); }
.itile__body span { font-size: 13px; color: var(--p-muted); }
@media (max-width: 479px) { .itile { aspect-ratio: 3 / 4; } .itile__body { left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; } .itile__body h3 { font-size: 14px; } }

/* ---------------------------------------------------------------- memberships */
.members-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
@media (max-width: 1100px) { .members-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); } }
.members-grid > li { display: flex; flex-direction: column; gap: var(--s-1); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }
.members-grid__logo { height: 88px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--s-4); }
.members-grid__logo img { display: block; max-width: 88%; max-height: 72px; width: auto; height: auto; object-fit: contain; }
.members-grid__logo img[src$="sap.svg"] { max-height: 48px; }
.members-grid__logo img[src*="Toronto"], .members-grid__logo img[src*="SamGov"] { max-height: 40px; }
.members-grid b { font: 500 15px/1.35 var(--font-text); color: var(--p-ink); }
.members-grid span { font-size: 13px; color: var(--p-muted); }
@media (max-width: 599px) { .members-grid > li { padding: var(--s-4); } .members-grid__logo { height: 64px; } .members-grid__logo img { max-height: 64px; } }

/* ---------------------------------------------------------------- CEO */
.ceo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: stretch; }
.ceo__photo { margin: 0; border-radius: var(--r-lg); overflow: hidden; min-height: 460px; position: relative; background: var(--surface); }
.ceo__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.ceo__text { display: flex; flex-direction: column; gap: var(--s-5); justify-content: center; }
.ceo__text h2 { font-size: clamp(30px, 3vw, 44px); }
.ceo__text blockquote { margin: 0; font: 400 clamp(22px, 2vw, 28px)/1.4 var(--font-display); letter-spacing: -0.01em; color: var(--ink); border-left: 3px solid var(--action); padding-left: var(--s-5); }
.ceo__by b { display: block; font-weight: 500; }
.ceo__by span { color: var(--muted); font-size: 15px; }
@media (max-width: 899px) { .ceo { grid-template-columns: 1fr; } .ceo__photo { min-height: 0; aspect-ratio: 4 / 5; max-width: 420px; } }

/* ---------------------------------------------------------------- closing band */
.cta-band { background: var(--p-accent) !important; color: #fff; }
.cta-band__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: var(--s-7); align-items: center; }
.cta-band h2 { font-size: clamp(30px, 3.2vw, 46px); color: #fff; }
.cta-band p { color: #fff; font-size: 18px; line-height: 1.6; margin-top: var(--s-3); max-width: 60ch; }
.cta-band .btn-row { justify-content: flex-end; }
.btn--light { background: #fff !important; color: #1e1e1e !important; border-color: #fff !important; }
.btn--wa { background: #1e1e1e !important; color: #fff !important; border-color: #1e1e1e !important; display: inline-flex; gap: 10px; align-items: center; }
.wa-icon { width: 20px; height: 20px; }
@media (max-width: 899px) { .cta-band__inner { grid-template-columns: 1fr; } .cta-band .btn-row { justify-content: flex-start; } }

/* ---------------------------------------------------------------- FAQ and chips */
.faq--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-8); }
.faq--two .faq__item h3 { font: 500 19px/1.35 var(--font-display); margin-bottom: var(--s-2); }
.faq--two .faq__item p { font-size: 16px; line-height: 1.65; color: var(--muted); }
@media (max-width: 767px) { .faq--two { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.chips li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }

/* ---------------------------------------------------------------- brand in the header and footer */
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.brand__mark { width: 44px; height: auto; }
.brand__name { display: flex; flex-direction: column; font: 500 18px/1.05 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.brand__name small { font: 400 12px/1.3 var(--font-text); letter-spacing: .02em; color: var(--muted); }
.nav__link { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav__links > .nav__item--plain:nth-child(2), .nav__links > .nav__item--plain:nth-child(3), .nav__links > .nav__item--plain:nth-child(4) { display: none; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--p-inv-bg); color: var(--p-inv-ink); --ink: var(--p-inv-ink); --muted: var(--p-inv-muted); --line: rgb(255 255 255 / .14); }
.site-footer .brand__name, .site-footer a { color: var(--p-inv-ink); }
.site-footer .footer__col h3 { color: var(--p-inv-muted); font-size: 13px; font-weight: 500; margin-bottom: var(--s-4); }
.site-footer .footer__col li { margin-bottom: var(--s-3); font-size: 15px; line-height: 1.5; }
.site-footer .footer__col a:hover { color: #fff; text-decoration: underline; }
.footer__lede { font-size: 16px !important; line-height: 1.6; color: var(--p-inv-muted); max-width: 36ch; }
.footer__tag { font-style: italic; color: #d7b36f; }
.site-footer .footer__legal { border-top: 1px solid var(--line); padding-top: var(--s-5); margin-top: var(--s-7); font-size: 13px; color: var(--p-inv-muted); }
.footer-grid { row-gap: var(--s-7); }
@media (max-width: 1023px) { .footer-grid > .span-4, .footer-grid > .span-2 { grid-column: span 6; } }
@media (max-width: 639px)  { .footer-grid > .span-4, .footer-grid > .span-2 { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- logo run (the slider the client asked for) */
.logo-run { position: relative; overflow: hidden; display: grid; gap: var(--s-4); padding-bottom: var(--s-6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.logo-run__row { display: flex; width: max-content; animation: logo-run 70s linear infinite; }
.logo-run__row--back { animation-direction: reverse; animation-duration: 80s; }
.logo-run__track { display: flex; gap: var(--s-4); margin: 0; padding: 0 var(--s-4) 0 0; list-style: none; }
.logo-run__track li { width: 220px; height: 120px; flex: none; display: flex; align-items: center; justify-content: center; padding: var(--s-4) var(--s-5); background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); }
.logo-run__track img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.logo-run.is-paused .logo-run__row, .logo-run:hover .logo-run__row { animation-play-state: paused; }
.logo-run__pause { right: 0; bottom: 0; }
@keyframes logo-run { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-run { -webkit-mask-image: none; mask-image: none; }
  .logo-run__row { animation: none; width: auto; }
  .logo-run__track { flex-wrap: wrap; }
  .logo-run__track[aria-hidden="true"] { display: none; }
}
@media (max-width: 639px) { .logo-run__track li { width: 168px; height: 96px; padding: var(--s-3) var(--s-4); } }

/* a still grid of the same logos (track record page) */
.logo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.logo-grid li { height: 120px; display: flex; align-items: center; justify-content: center; padding: var(--s-4) var(--s-5); background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); }
.logo-grid img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 1023px) { .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-grid li { height: 96px; } }

/* ---------------------------------------------------------------- track record list */
.filter-bar { display: grid; gap: var(--s-4); margin-bottom: var(--s-6); }
.show-search { width: min(100%, 440px); height: 48px; padding: 0 var(--s-4); border-radius: var(--r-sm); border: 1px solid var(--line-strong, var(--line)); background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.filters button { min-height: 44px; padding: 0 var(--s-4); border-radius: 999px; border: 1px solid var(--line-strong, var(--line)); background: transparent; color: var(--ink); font: 500 14px var(--font-text); cursor: pointer; }
.filters button:hover { border-color: var(--action); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.shows-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.shows-grid > li { display: flex; flex-direction: column; gap: 4px; padding: var(--s-4) var(--s-5); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.shows-grid > li[hidden] { display: none; }
.shows-grid b { font-weight: 500; font-size: 16px; line-height: 1.35; }
.shows-grid span { font-size: 14px; color: var(--muted); }
.shows-grid .show__ind { color: var(--action); font-size: 13px; margin-top: auto; padding-top: var(--s-2); }
@media (max-width: 1023px) { .shows-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .shows-grid { grid-template-columns: 1fr; } }
.note { margin-top: var(--s-6); font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.contact__text h1 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.04; }
.contact__text .rows { margin-top: var(--s-6); }
.form-card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-7); align-content: start; }
.form-card__title { grid-column: 1 / -1; font-size: 28px; margin-bottom: var(--s-2); }
.form textarea, .form select { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong, var(--line)); background: #fff; color: var(--ink); }
.form select { height: 48px; }
.contact-rows a.link { word-break: break-word; }
@media (max-width: 899px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .form-card { padding: var(--s-5); } .form { grid-template-columns: 1fr; } }

#how .mo-ph__head p { font-size: 18px; }
.credits-h2 { font-size: 24px; margin: var(--s-8) 0 var(--s-5); }

/* footer: less space under the copyright line */
footer.closing.site-footer { padding: 80px 0 32px !important; }
footer.closing.site-footer .closing__links { gap: var(--s-6); }
@media (max-width: 639px) { footer.closing.site-footer { padding: 56px 0 calc(24px + var(--bar, 0px)) !important; } }
