/* tpl_gystiq page-level CSS: the few things the section kit cannot express, for the rebuilt main pages.
   Loaded after kit.css. Every block is named for the page(s) that need it. gy-* only, no UIkit.
   Colours come from the live Builder custom CSS on those pages (see CHANGELOG 0.2.3 for what was ported and dropped). */

/* ---------- Spacing the Builder expressed as uk-margin-*: xsmall 5, small 10, default 20, xlarge 70 / 140 from 960 ---------- */
.gy-section .gy-mb-xs { margin-bottom: 5px; }
.gy-section .gy-mt-s { margin-top: 10px; }
.gy-section .gy-mt-m { margin-top: 20px; }
.gy-section .gy-mt-md { margin-top: 40px; }
.gy-section .gy-mb-md { margin-bottom: 40px; }
.gy-section .gy-mb-m { margin-bottom: 20px; }
.gy-section .gy-mt-xl { margin-top: 70px; }
.gy-section .gy-mb-xl { margin-bottom: 70px; }
@media (min-width: 960px) { .gy-section .gy-mt-xl { margin-top: 140px; } .gy-section .gy-mb-xl { margin-bottom: 140px; } }

/* ---------- Large cards (challenges-we-solve, who-we-serve): uk-card-large pads 40px, 70px from 1200 ---------- */
@media (min-width: 1200px) { .gy-card--l { --gy-card-pad: 70px; } }

/* ---------- challenges-we-solve: a lattice split 3-5 / 2-5; who-we-serve: tiles that reach a gutter past the container's left edge like the lattice ---------- */
@media (min-width: 960px) { .gy-lattice--3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
@media (min-width: 960px) { .gy-tile--bleed { margin-left: calc(var(--gy-gutter) * -1); } }

/* ---------- how-it-works, challenges-we-solve, who-we-serve: the orange strip under a hero ----------
   The Builder set line-orange-01.svg (5000x60) as a section background image, top-centre, size auto: the strip scales to the section width. */
.gy-strip::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 0; aspect-ratio: 5000 / 60; pointer-events: none;
  background: url("/images/asset-bank/line-orange-01.svg") top center / 100% 100% no-repeat;
}
.gy-strip > * { position: relative; z-index: 1; }

/* ---------- challenges-we-solve: a row divider (the Builder's divider on a two-column row), and the lighter rule inside dark sections ---------- */
@media (min-width: 960px) {
  .gy-split--divider { position: relative; }
  .gy-split--divider.gy-split--l { gap: calc(var(--gy-gutter-l) * 2); }
  .gy-split--divider > :nth-child(2)::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gy-gutter-l) * -1); border-left: 1px solid var(--gy-s-line); box-shadow: 1px 0 0 var(--gy-s-shadow); }
  .gy-split--divider > :nth-child(2) { position: relative; }
}
.gy-section hr.gy-rule--lite { border-top-color: rgba(255, 255, 255, .18); opacity: 1; }

/* ---------- about-gystiq: rounded team photos ---------- */
.gy-img-rounded { display: block; max-width: 100%; height: auto; border-radius: 5px; }

/* ---------- how-it-works: Rive placements inside the hatched card (rive-loader.js starts them; the poster shows until then, and always under reduced motion) ----------
   The wrapper is a div (it survives editor text filters); the loader adds the canvas, and once it is live the poster goes. */
.gy-rive { position: relative; display: block; width: 100%; margin: 0 auto; }
.gy-rive--350 { max-width: 350px; }
.gy-rive--300 { max-width: 300px; }
.gy-rive-poster { display: block; width: 100%; height: auto; }
.gy-rive canvas { display: block; width: 100%; height: auto; }
.gy-rive:not(.is-live) canvas { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; }
.gy-rive.is-live > .gy-rive-poster { display: none; }

/* ---------- who-we-serve ---------- */
/* Audience chips in the hatched card: the Builder's small secondary buttons, translucent white with a faint edge */
.gy-chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 15px; margin: 0; padding: 0; list-style: none; }
.gy-chips > li { margin: 0; }
.gy-chips .gy-eyebrow { margin: 0; background: rgba(255, 255, 255, .5); border-color: rgba(20, 20, 20, .16); }
/* "The operational reality" list: a 4px coloured pip per item, cycling yellow, red, purple, teal every four */
.gy-pips > li { padding-left: 20px; break-inside: avoid; }
.gy-pips > li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px; background: #2BB7B2; }
.gy-pips > li:nth-child(4n + 1)::before { background: #E4B64D; }
.gy-pips > li:nth-child(4n + 2)::before { background: #D64C1F; }
.gy-pips > li:nth-child(4n + 3)::before { background: #6D41B2; }
.gy-pips > li:nth-child(4n + 4)::before { background: #2BB7B2; }
.gy-tile--bordered { border: 1px solid rgba(20, 20, 20, .16); }
/* "The operational reality" tile: the default tile padding (40, 70 from 960) with the Builder's 110px sides */
.gy-tile--reality { padding: 40px 15px; }
@media (min-width: 960px) { .gy-tile--reality { padding: 70px 110px; } }
/* The navy "problems we hear most" tile: 110px sides from 960; 50px top for the first two audiences, 100px for the last two */
.gy-tile--wide, .gy-tile--wide-tall { padding: 40px 15px 70px; }
@media (min-width: 960px) {
  .gy-tile--wide { padding: 50px 110px 100px; }
  .gy-tile--wide-tall { padding: 100px 110px; }
}

/* ---------- contact-us: the intake form sits on the dark section; its markup and styling are the kit's forms block (kit.css) ---------- */
.gy-section .crm-intake-form { max-width: 100%; }

/* ---------- team member page (html/com_contact/contact/default.php): photo and name side by side from 960, the photo 3/5 wide on phones,
   1/3 from 960 ---------- */
.gy-contact__edit { text-align: right; }
.gy-contact__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gy-gutter-l); align-items: center; margin: 0 0 20px; }
.gy-contact__grid > * { min-width: 0; }
.gy-contact__photo { width: 60%; }
.gy-contact__img { display: block; width: 100%; height: auto; border-radius: 5px; }
@media (min-width: 960px) {
  .gy-contact__grid--photo { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .gy-contact__photo { width: auto; }
}
.gy-badge { display: inline-block; padding: 0 10px; border-radius: 2px; font: 400 .875rem/1.5 var(--gy-font-body); text-transform: uppercase; vertical-align: middle; }
.gy-badge--warning { background: #faa05a; color: #fff; }
.gy-icon { display: inline-block; margin-right: 5px; vertical-align: -4px; }
/* Core's contact form opens with its own "Send an Email" legend, which repeats the page's "Send <name> a message" heading */
#contact-form fieldset:first-of-type > legend { display: none; }

/* ---------- home + what-we-deliver: light surfaces and small utilities the Builder set per section ---------- */
/* #fdfdfd (services) and #fff (the "built for operations" intro) sections; both read the light scheme of the soft section they are paired with */
.gy-section--chalk { background: #fdfdfd; }
.gy-section--white { --gy-s-text: var(--gy-light-text); --gy-s-head: var(--gy-ink); --gy-s-muted: var(--gy-light-muted); --gy-s-link: var(--gy-ink); --gy-s-line: var(--gy-light-line); --gy-s-accent: var(--gy-light-accent); --gy-s-btn: var(--gy-ink); --gy-s-dark-btn: var(--gy-ink); background: #fff; }
.gy-accent-deep { color: #1F7A7E; }   /* the Builder's inline #1F7A7E on "complex" */
.gy-img-center { display: block; max-width: 100%; height: auto; margin: 0 auto; }
/* An h2 styled h3 on phones that becomes the h1 size from 960 (the Builder had two headings, uk-visible@m and uk-hidden@m) */
@media (min-width: 960px) { .gy-section .gy-h1-m { font-size: 44px; line-height: 1.2; } .gy-section .gy-text-lg-m { font-size: 18px; } }

/* ---------- home: hero ----------
   The header sits transparently over the hero (YOOtheme header_transparent): index.php adds body.gy-header-over when the home layout ran, the header keeps
   position: sticky but takes a negative bottom margin of its own height so the hero starts at y=0, and home.js sets html.gy-stuck after the first scroll,
   which gives the navbar its background back. Hero padding is the Builder's (large 70/140, xlarge 140 on phones) plus the header height. */
.gy-header-over .gy-header, .gy-header-over .gy-header-m { margin-bottom: calc(var(--gy-navbar-h) * -1 - 1px); }
html:not(.gy-stuck) .gy-header-over .gy-navbar { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.gy-hero-home { --gy-pt: calc(var(--gy-section-pad-xl) + var(--gy-navbar-h) + 1px); --gy-pb: 0px; overflow: hidden; }
@media (min-width: 960px) { .gy-hero-home { --gy-pt: calc(var(--gy-section-pad-l) + var(--gy-navbar-h) + 1px); } }
.gy-hero-home__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.gy-hero-home__text { box-sizing: border-box; padding: 0 var(--gy-container-pad) 30px; align-self: end; }
.gy-hero-home__title { margin: 0 0 20px; }
.gy-section .gy-hero-home__title { margin-top: 0; }
.gy-hero-home .gy-lead { font-size: 14px; line-height: 1.5; }
.gy-hero-home .gy-btn-row { margin: 40px 0; }
.gy-hero-home__trust { margin: 86px 0 36px; }
.gy-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; justify-items: center; gap: 15px; margin: 0; padding: 0; list-style: none; }
.gy-logos li { margin: 0; }
.gy-logos img { display: block; max-width: 100%; height: auto; }
.gy-hero-home__media { position: relative; display: flex; align-items: center; justify-content: center; min-height: 328px; margin-top: 40px; }
.gy-hero-home__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.gy-hero-home__media::after { content: ""; position: absolute; inset: 0; background: rgba(48, 55, 81, .68); pointer-events: none; }
.gy-hero-home__how { position: relative; z-index: 1; margin: 56px 0; }
@media (min-width: 640px) { .gy-hero-home__media { min-height: 460px; } }
@media (min-width: 960px) {
  .gy-hero-home__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gy-gutter-l); }
  .gy-hero-home__text { padding: 0 0 70px var(--gy-container-pad); }
  .gy-hero-home__media { min-height: 0; margin-top: 0; }
  .gy-hero-home__media::after { background: rgba(48, 55, 81, .7); }
  .gy-hero-home .gy-lead { font-size: 20px; }
  .gy-hero-home__trust { margin: 86px 0 36px; }
}
.gy-hero-home__title .gy-tw { white-space: nowrap; }

/* The animated headline: all words stay in the DOM. With JS (html.gy-tw-on, home.js measured each line) every line is revealed in 80ms steps
   per character, 300ms between lines, behind a blinking underscore cursor; the last cursor stays 3s, then fades. Reduced motion: none of it applies. */
.gy-tw__cursor { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .gy-tw-on .gy-tw__text { display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; white-space: nowrap;
    animation: gy-type var(--gy-tw-dur) steps(var(--gy-tw-n), end) var(--gy-tw-delay) forwards; }
  .gy-tw-on .gy-tw__cursor { display: inline-block; visibility: hidden; width: .55em; height: .07em; margin-left: 3px; vertical-align: text-bottom; position: relative; top: -.08em; background: currentColor;
    animation: gy-cur-vis calc(var(--gy-tw-dur) + 300ms) var(--gy-tw-delay) 1, gy-blink .7s step-end var(--gy-tw-delay) infinite; }
  .gy-tw-on .gy-tw:last-of-type .gy-tw__cursor { animation: gy-cur-last calc(var(--gy-tw-dur) + 4500ms) var(--gy-tw-delay) 1; }
}
@keyframes gy-type { to { width: var(--gy-tw-w); } }
@keyframes gy-cur-vis { from, to { visibility: visible; } }
@keyframes gy-blink { 50% { opacity: 0; } }
@keyframes gy-cur-last { 0% { visibility: visible; opacity: 1; } 66% { visibility: visible; opacity: 1; } 100% { visibility: visible; opacity: 0; } }

/* ---------- home: services (three columns with dividers, images 230 wide) ---------- */
.gy-services-intro { max-width: 960px; padding-top: 40px; margin-bottom: 90px; }
.gy-services h3 { margin-top: 40px; }
.gy-services p { margin-bottom: 20px; }

/* ---------- what-we-deliver: lattice media (300 wide, set in the lower right of the hatched card and cut by it, measured against the live render) ---------- */
.gy-lattice__card--media { min-height: 270px; }
.gy-lattice__media { display: none; }
@media (min-width: 960px) {
  .gy-lattice__card--media { min-height: 0; }
  .gy-lattice__media { display: block; position: absolute; left: 60.7%; bottom: 0; z-index: 1; width: 300px; max-width: none; height: auto; }
}

/* ---------- what-we-deliver: tabs (WAI-ARIA; tabs.js). Vertical list on the left from 960 (labels right-aligned, a hairline on the right edge, the active one marked
   by a 2px dark border), a horizontal list above the panels below. Without JS the buttons are hidden and every panel shows. ---------- */
.gy-tile--tabs { padding: 0; }
.gy-tabs:not(.is-ready) .gy-tabs__list { display: none; }
.gy-tabs:not(.is-ready) .gy-tabs__panel + .gy-tabs__panel { border-top: 1px solid var(--gy-s-line); }
.gy-tabs__list { position: relative; display: flex; margin: 0; padding: 0; }
.gy-tabs__list::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid var(--gy-s-line); }
.gy-tabs__list [role=tab] {
  position: relative; display: flex; align-items: center; justify-content: center; margin: 0; padding: 15px 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
  font: 500 16px/1.5 var(--gy-font-body); color: var(--gy-tab-inactive); cursor: pointer; transition: .1s ease-in-out; transition-property: color, border-color;
}
.gy-tabs__list [role=tab]:hover { color: var(--gy-ink); }
.gy-tabs__list [role=tab][aria-selected=true] { color: var(--gy-ink); border-bottom-color: var(--gy-ink); }
.gy-tabs__panel { padding: 40px 15px; }
.gy-tabs__panel[hidden] { display: none; }
.gy-tabs__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gy-gutter); align-items: center; }
.gy-tabs__body > * { min-width: 0; }
.gy-tabs__body > :first-child > :last-child { margin-bottom: 0; }
.gy-tabs__body img { display: block; max-width: 100%; height: auto; margin: 0 auto; background: #f7f7f7; }   /* the live image box decoration measures #f7f7f7, 400x215 */
@media (min-width: 960px) {
  .gy-tabs { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
  .gy-tabs__list { flex-direction: column; padding-top: 50px; }
  .gy-tabs__list::before { left: auto; top: 0; right: 0; bottom: 0; border-bottom: 0; border-right: 1px solid var(--gy-s-line); }
  .gy-tabs__list [role=tab] { justify-content: flex-end; padding: 15px 20px 15px 30px; text-align: right; border-bottom: 0; border-right: 2px solid transparent; }
  .gy-tabs__list [role=tab][aria-selected=true] { border-right-color: var(--gy-ink); }
  .gy-tabs__panel { padding: 70px 40px; }
  .gy-tabs__body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gy-gutter-l); }
}

/* ---------- Plain pages: component output without gy-sections (legal articles, team, sitemap, login) ----------
   index.php wraps it in .gy-container (narrow for articles) and sets body.gy-plain. Spacing as the YOOtheme section: 40px
   top and bottom on phones, 70px from 960; articles get 140px below from 960 (uk-section-large-bottom, 70px on phones). */
.gy-plain #gy-main { padding: 40px 0; }
.gy-plain--article #gy-main { padding-bottom: 70px; }
@media (min-width: 960px) {
  .gy-plain #gy-main { padding: 70px 0; }
  .gy-plain--article #gy-main { padding-bottom: 140px; }
}
.gy-plain #gy-main :is(h1, h2, h3, h4, h5, h6) { margin: 0 0 20px; font-family: var(--gy-font-body); font-weight: 600; color: #fff; text-transform: none; }
.gy-plain #gy-main * + :is(h1, h2, h3, h4, h5, h6) { margin-top: 40px; }
.gy-plain #gy-main :is(p, ul, ol, dl, table) { margin: 0 0 20px; }
.gy-plain #gy-main h1 { font-size: 37.4px; line-height: 1.2; }
.gy-plain #gy-main h2 { font-size: 28.9px; line-height: 1.3; }
.gy-plain #gy-main h3 { font-size: 24px; line-height: 1.4; }
.gy-plain #gy-main h4 { font-size: 20px; line-height: 1.4; }
@media (min-width: 960px) {
  .gy-plain #gy-main h1 { font-size: 44px; }
  .gy-plain #gy-main h2 { font-size: 34px; }
}
.gy-plain #gy-main a { color: var(--gy-primary); }
.gy-plain #gy-main a:hover { color: var(--gy-primary-hover); }
.gy-plain #gy-main p a, .gy-plain #gy-main li a { text-decoration: underline; }   /* WCAG 1.4.1 */
.gy-legal__title { margin-bottom: 20px; }
.gy-legal__head ~ .gy-legal__body { margin-top: 40px; }
.gy-legal__body > :last-child { margin-bottom: 0; }

/* Contact list and other Bootstrap tables on navy: transparent cells, hairline rows as on the live team page */
.gy-plain .table {
  --bs-table-color: var(--gy-text); --bs-table-bg: transparent; --bs-table-striped-bg: transparent; --bs-table-striped-color: var(--gy-text);
  --bs-table-hover-bg: rgba(255, 255, 255, .04); --bs-table-hover-color: var(--gy-text); --bs-table-accent-bg: transparent;
  width: 100%; border-collapse: collapse; border: 0; color: var(--gy-text);
}
.gy-plain .table > :not(caption) > * > * { padding: 8px; border: 0; background: transparent; box-shadow: none; color: inherit; }
.gy-plain .table tr { border-top: 1px solid var(--gy-line); border-bottom: 1px solid var(--gy-text); }
.gy-plain .table thead th, .gy-plain .table tbody th { text-align: center; font-weight: 700; }

/* Login: the reset / remind links are Bootstrap list-group items (white); put them on the page surface */
.gy-plain .list-group { padding: 0; list-style: none; }
.gy-plain .list-group-item { background: transparent; border-color: var(--gy-line); color: var(--gy-primary); }
.gy-plain .well { padding: 0; border: 0; background: none; }

/* NAGW pages (wcag-lp markup): the live article sat in a YOOtheme section (40px above its own spacing, 70px below it from 960) */
.gy-nagw #gy-main { padding-top: 40px; }
@media (min-width: 960px) { .gy-nagw #gy-main { padding-bottom: 70px; } }
/* The live YOOtheme page showed no previous/next article navigation; core's layout still emits it when the article's show_item_navigation is on */
.gy-legal .pagenavigation { display: none; }

/* Invalid fields on the white NAGW form card (the article's own .wcag-panel rule sets a tan border with !important): a dark red edge, 6:1 on white. The navy forms use --gy-invalid (kit.css). */
.wcag-lp .wcag-panel .gy-input:user-invalid, .wcag-lp .wcag-panel .gy-input[aria-invalid="true"] { border-color: #B3261E !important; box-shadow: inset 0 0 0 1px #B3261E; }
