/* Functional repairs only. Approved page styles remain the visual source of truth. */
:root { --header-height: 106px; --anchor-offset: 190px; }
/* The entire shared header owns its typography and geometry, independent of page CSS. */
.header {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5; color: #0a1b33;
}
.header .container { width: min(1240px,calc(100% - 48px)); margin-inline: auto; }
.header .nav { position: relative; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header .nav > .brand { display: flex; flex: 0 0 auto; gap: 0; line-height: 0; }
.header .nav > .brand img { width: auto; height: 38px; max-width: 142px; object-fit: contain; }
.header .navlinks { display: flex; align-items: center; gap: 28px; margin: 0 auto 0 18px; }
.header .header-contact { display: flex; align-items: center; flex-shrink: 0; gap: 18px; margin-left: 0; white-space: nowrap; }
.header .header-phone { order: 0; display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 900; letter-spacing: -.01em; color: #061a35; padding: 0; border: 0; }
.header .header-phone::before { font-size: 14px; margin-right: 0; }
.header .header-cta { order: 1; font-size: 10px; font-weight: 900; line-height: 1.5; }
.header .services-trigger > span { font-size: 12px; margin-left: 0; color: #ff820b; }
.header .navlinks > a,
.header .navlinks > a.is-current,
.header .services-trigger,
.header .services-trigger.is-current,
.header .mobile-menu > a:not(.mobile-cta),
.header .mobile-menu > a.is-current:not(.mobile-cta) {
  font: normal 700 14px/1.5 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: normal;
  white-space: nowrap;
}
.header .navlinks > a,
.header .services-trigger {
  position: relative;
  display: flex; align-items: center; gap: 6px; padding: 28px 0 25px;
  color: #0a1b33;
  transition: color .2s ease, opacity .2s ease;
  opacity: .78;
}
.header .navlinks > a:hover,
.header .navlinks > a:focus-visible,
.header .navlinks > a.is-current,
.header .services-trigger:hover,
.header .services-trigger:focus-visible,
.header .services-trigger.is-current { opacity: 1; }
.header .navlinks > a::after,
.header .services-trigger::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 17px;
  height: 2px; border-radius: 2px; background: #ff820b;
  transform: scaleX(0); transform-origin: center; transition: transform .2s ease;
}
.header .navlinks > a:hover::after,
.header .navlinks > a:focus-visible::after,
.header .navlinks > a.is-current::after,
.header .services-trigger:hover::after,
.header .services-trigger:focus-visible::after,
.header .services-trigger.is-current::after,
.header .services-nav.is-open .services-trigger::after { transform: scaleX(1); }
.header .navlinks > a.is-current,
.header .services-trigger.is-current,
.header .mobile-menu .is-current { color: #ff820b; opacity: 1; }
.header .header-cta.is-current { outline: 2px solid #ff820b; outline-offset: 3px; }
@media (min-width: 1001px) and (max-width: 1240px) {
  .header .nav { gap: 20px; }
  .header .navlinks { gap: 16px; margin-left: 8px; margin-right: auto; }
}
/* The expanded, approved story keeps the existing timeline treatment. */
#q360-story .timeline-copy { min-width: 0; }
#q360-story .timeline-copy p { font-size: 17px; }
#q360-story .timeline-copy p + p { margin-top: 12px; }
#q360-story .timeline-copy strong { color: var(--ink); }
/* Shared header elements must also work on templates with their own base CSS. */
.skip-link {
  position: fixed; left: 18px; top: 12px; z-index: 200;
  transform: translateY(-160%); padding: 11px 16px; border-radius: 12px;
  background: #fff; color: var(--navy); font-size: 13px; font-weight: 900;
  box-shadow: 0 12px 35px rgba(3,20,43,.25);
}
.skip-link:focus { transform: translateY(0); outline: 3px solid var(--orange); outline-offset: 3px; }
.utility-bar { height: 30px; background: var(--navy); color: rgba(255,255,255,.72); }
.utility-inner {
  height: 30px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; font-size: 9px; line-height: 1.5; font-weight: 850; letter-spacing: .13em; text-transform: uppercase;
}
.utility-inner strong { color: #fff; font-weight: 900; }
.utility-inner span { display: flex; align-items: center; gap: 9px; }
.utility-inner i { display: inline-block; flex-shrink: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
/* Use the existing orange Q marker consistently across service-page themes. */
.eyebrow { font-size: 14px !important; }
.eyebrow::before {
  content: ""; display: inline-block; position: relative; flex: 0 0 14px;
  width: 14px; height: 14px; border: 0; border-radius: 0;
  background: url("../images/dot-05.png") center / contain no-repeat;
  box-shadow: none; filter: drop-shadow(0 0 5px rgba(255,130,11,.55));
}
.eyebrow::after { content: none; }
@media (max-width: 780px) {
  .header .container { width: min(1240px,calc(100% - 32px)); }
  .header .nav { height: 68px; }
  .header .nav > .brand img { height: 34px; }
  .utility-bar, .utility-inner { height: 28px; }
  .utility-inner { font-size: 8px; }
}
.scroll-progress.q360-scroll-progress { position: fixed; inset: 0 0 auto; width: 100%; height: 3px; z-index: 150; pointer-events: none; background: transparent; transform: none !important; }
.scroll-progress.q360-scroll-progress i { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg,var(--orange),#ffd2a3); box-shadow: 0 0 18px rgba(255,130,11,.65); }
html { scroll-padding-top: var(--anchor-offset); }
/* JS calculates one viewport offset; do not apply a second section margin. */
main [id] { scroll-margin-top: 0; }
.header .services-mega { top: var(--header-height); max-height: calc(100dvh - var(--header-height)); overflow-y: auto; }
.subnav { top: var(--header-height); }
.subnav-inner { justify-content: flex-start; }
.subnav a { flex-shrink: 0; }
.subnav a.is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
/* Several service anchors share one grid row; identify the exact destination. */
.service-card:target { outline: 3px solid var(--orange); outline-offset: 6px; }
.service-card.orange:target { outline-color: var(--navy); }
/* Escape/click owns visibility even when the pointer or keyboard focus remains inside. */
.navigation-ready .services-nav .services-mega {
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
}
.navigation-ready .services-nav.is-open .services-mega {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
}
.header .mobile-menu.open {
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100dvh - var(--header-height)); overflow-y: auto;
  background: #fff;
}
.menu-btn { min-width: 44px; min-height: 44px; }
.mobile-menu a, .mobile-menu summary { min-height: 44px; }
button:disabled { cursor: not-allowed; opacity: .6; }
.enquiry-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[data-enquiry-status]:not(:empty) { margin-top: 18px; line-height: 1.6; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
html:not(.q360-script-ready) .reveal { opacity: 1; transform: none; }
.reveal.anchor-arrival { transform: none !important; transition: none !important; }
[data-lifecycle-panel][hidden] { display: none !important; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.trading-name { font: inherit; }
/* User-approved home console introduction; let the longer copy wrap naturally. */
.home-page .console-header { flex-wrap: wrap; }
.home-page .console-header .console-intro { flex: 1 1 300px; min-width: 0; gap: 6px; }
.home-page .console-intro em { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.84); }
.home-page .console-intro p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.72); }
.home-page .console-header .console-status { flex: 0 0 174px; width: 174px; max-width: 100%; justify-content: center; white-space: nowrap; }
/* The expanded introduction must not squeeze the footer against the card edge. */
.home-page .product-console-canvas { height: auto; grid-auto-rows: max-content; }
.home-page .lifecycle-console { padding-bottom: 30px; }
.home-page .console-footer { padding: 16px 3px 8px; gap: 12px 18px; flex-wrap: wrap; line-height: 1.5; }
.home-page .console-footer > span { min-width: 0; }
.home-page .console-footer span i { flex-shrink: 0; }
/* Intrinsic HTML dimensions reserve space; the displayed logo must scale both axes. */
.footer-brand .footer-logo { width: 130px; max-width: 100%; height: auto; object-fit: contain; }
/* Cybersecurity is a peer service, with the approved menu styling retained. */
.header .service-groups { grid-template-columns: repeat(5,minmax(0,1fr)); }
.header .service-group { min-width: 0; }
.header .service-group .menu-category { display: block; margin: 12px 0 4px; font-size: 10px; font-weight: 800; color: var(--muted); }
.managed-page .res-grid { grid-template-columns: 1fr; }
@media (max-width: 1180px) {
  .header .service-groups { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
/* Fixed-height rows clipped approved descriptions. Keep the original card styling,
   allow content to determine height, and reserve space for decorative icons. */
.services .bento { grid-auto-rows: minmax(255px,auto); }
.services .service-card { min-width: 0; padding-bottom: 92px; }
.services .service-card .mini-tags { position: static; padding-right: 44px; margin-top: 24px; }
.services .service-card .m365-ui { position: static; margin-top: 28px; }
/* The six Automation capabilities share consistent tracks; all approved text stays. */
.automation-page .services .bento { grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: 1fr; }
.automation-page .services .service-card.large { grid-row: auto; grid-column: auto; }
/* The Hospitality overlay must leave the photo caption visible beneath it. */
@media (min-width: 781px) {
  .industry-hospitality .story-cinematic .industry-copy {
    width: min(560px,70%);
    padding: 28px;
    margin-bottom: 120px;
  }
  .industry-hospitality .industry-media figcaption {
    left: 38px;
    right: 38px;
    bottom: 38px;
  }
}
@media (max-width: 1080px) {
  .automation-page .services .bento { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
/* All templates use a reachable mobile menu at the same navigation breakpoint. */
@media (max-width: 1000px) {
  .header .navlinks, .header .header-contact { display: none; }
  .header .menu-btn { display: flex; align-items: center; justify-content: center; margin-left: auto; }
  .header .menu-btn::before { display: none; content: none; }
  .header .services-mega { display: none; }
  .header .mobile-menu.open { display: block; padding: 18px 24px 6px; }
  .header .mobile-menu a { display: block; padding: 10px 0; }
  .header .mobile-menu .mobile-cta { width: fit-content; margin-left: auto; margin-right: auto; padding: 10px 24px; }
  /* Navigation remains reachable if its controller does not load. */
  .header:not(.navigation-ready) .menu-btn { display: none; }
  .header:not(.navigation-ready) .mobile-menu { display: block; padding: 18px 24px 6px; }
  .header:not(.navigation-ready) { position: relative; }
}
@media (max-width: 780px) {
  .automation-page .services .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
}
/* At zoom/landscape sizes, leave enough space for the destination to be read. */
@media (max-height: 500px) {
  .header, .subnav { position: relative; top: auto; }
  .header .services-mega { position: absolute; top: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* Three footer columns after removing office addresses. */
.footer .footer-grid { grid-template-columns: minmax(0,1.5fr) repeat(2,minmax(0,1fr)); }
.footer .footer-grid > :first-child { grid-column: auto; }
@media (max-width: 900px) {
  .footer .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer .footer-grid { grid-template-columns: minmax(0,1fr); }
}

/* QFlow wordmark: a slightly larger Q keeps the product name balanced. */
.qflow-wordmark { display: inline-flex; align-items: baseline; white-space: nowrap; font: inherit; letter-spacing: -.035em; }
.qflow-wordmark .qflow-q { display: inline; font: inherit; font-size: 1.18em; line-height: .85; color: inherit; }
.home-page .console-intro .console-product-promise { color: #fff; font-size: clamp(16px,1.55vw,20px); font-weight: 600; line-height: 1.45; margin-top: 10px; max-width: 560px; }
/* The current console fits its container without the old orbit graphic's scaling. */
@media (max-width: 1080px), (hover: none), (pointer: coarse) {
  .home-page .product-console-canvas { width: 100%; min-width: 0; margin-inline: auto; margin-bottom: 0; transform: none !important; transition: none; }
}

/* Keep the decorative glow inside its section after scrolling. */
.managed-page .automation { position: relative; }
.managed-page .automation::after { pointer-events: none; }

/* One touch navigation, shared by Home and every content page. */
@media (max-width: 1000px) {
  html.mobile-navigation-open { overflow: hidden; }
  .header .menu-btn { width: 48px; height: 48px; flex: 0 0 48px; padding: 12px; border: 1px solid #dbe3ec; border-radius: 12px; background: #fff; color: #0a1b33; }
  .header .menu-btn > span, .header .menu-btn > span::before, .header .menu-btn > span::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
  .header .menu-btn > span { position: relative; }
  .header .menu-btn > span::before, .header .menu-btn > span::after { content: ''; position: absolute; left: 0; }
  .header .menu-btn > span::before { top: -7px; }
  .header .menu-btn > span::after { top: 7px; }
  .header .menu-btn[aria-expanded="true"] > span { background: transparent; }
  .header .menu-btn[aria-expanded="true"] > span::before { top: 0; transform: rotate(45deg); }
  .header .menu-btn[aria-expanded="true"] > span::after { top: 0; transform: rotate(-45deg); }
  .header .mobile-menu.open { position: fixed; inset: var(--header-height) 0 auto; width: 100%; margin: 0; max-height: calc(100dvh - var(--header-height)); padding: 12px 20px max(20px,env(safe-area-inset-bottom)); border-top: 1px solid #dbe3ec; box-shadow: 0 18px 32px rgba(4,21,44,.15); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .header .mobile-menu > a:not(.mobile-cta), .header .mobile-menu > a.is-current:not(.mobile-cta), .header .mobile-services > summary { font: 600 16px/1.5 Inter,system-ui,sans-serif !important; }
  .header .mobile-menu > a { min-height: 48px; padding: 12px 4px; border-bottom: 1px solid #edf1f6; }
  .header .mobile-services { border-bottom: 1px solid #edf1f6; }
  .header .mobile-services > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 12px 4px; list-style: none; cursor: pointer; }
  .header .mobile-services > summary::-webkit-details-marker { display: none; }
  .header .mobile-services > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 7px; }
  .header .mobile-services[open] > summary::after { transform: rotate(225deg); }
  .header .mobile-service-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; padding: 4px 12px 10px; margin: 0 0 8px; background: #f3f6fa; border-radius: 12px; }
  .header .mobile-service-grid > a { display: flex; align-items: center; min-height: 48px; padding: 11px 8px; color: #243b56; font: 600 16px/1.5 Inter,system-ui,sans-serif; }
  .header .mobile-service-grid > a.is-current { color: #ad4900; }
  .header .mobile-menu .mobile-cta { display: flex; align-items: center; justify-content: center; width: 100%; margin: 16px 0 4px; min-height: 48px; }
  .header .mobile-menu .mobile-phone { text-align: center; border-bottom: 0; }
  .header .mobile-menu a, .header .mobile-menu summary, .header .menu-btn { -webkit-tap-highlight-color: transparent; }
}
@media (max-width: 780px) {
  .hero h1 { font-size: clamp(34px,10.8vw,46px); line-height: 1.06; letter-spacing: -.045em; }
  .section-title { font-size: clamp(30px,8.7vw,38px); line-height: 1.08; letter-spacing: -.035em; }
  .hero .hero-inner { padding-top: 52px; padding-bottom: 52px; }
  .contact-page .form-field input, .contact-page .form-field select, .contact-page .form-field textarea { font-size: 16px; min-height: 48px; }
  .contact-page .contact-form button[type="submit"] { width: 100%; min-height: 48px; }
  .footer .footer-grid { gap: 30px; }
  .footer .footer-grid > div:not(:first-child) > a, .footer .footer-phone { display: flex; align-items: center; min-height: 44px; font-size: 14px; margin-block: 0; }
}
