/*--------------------------------------------------------------
UX Enhancements
Loaded after style.css / responsive.css so these rules win ties
on equal specificity. Scoped additions only — nothing here
removes or overrides the site's visual identity.

# Design tokens
# Navigation
# Skip link
# Focus-visible states
# Button hierarchy (primary / ghost / disabled / loading)
# Form feedback (alerts, validation, success/error states)
# Depth (hover/press feedback)
# Touch targets
# Reduced motion
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Design tokens
Radius values match what the site already uses for cards/panels
(4-10px, e.g. the contact info panel, team cards) — buttons stay
at their existing 0px (.thm-btn) since that's an established,
deliberate part of the button identity and isn't touched here.
--------------------------------------------------------------*/
:root {
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --container-width: 1200px;
}

/*--------------------------------------------------------------
# Breadcrumb
Compact wayfinding bar rendered at the top of <main> on every
inner page, matching the BreadcrumbList structured data emitted
in top-layout.php — Google flags schema with no visible
on-page counterpart, so this keeps the two in sync.
--------------------------------------------------------------*/
.site-breadcrumb {
  /* <main> itself has no background (the page's white default shows
     through); every inner-page section that follows uses cobalt-dark,
     so match that explicitly rather than relying on what's behind it. */
  background: var(--color-cobalt-dark, #033378);
  padding: 18px 0;
}

.site-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--thm-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
}

.site-breadcrumb li[aria-current="page"] {
  color: rgba(255, 255, 255, 0.9);
}

.site-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition-fast, 0.2s ease);
}

.site-breadcrumb a:hover,
.site-breadcrumb a:focus-visible {
  color: #ffffff;
}

.site-breadcrumb__sep {
  color: rgba(255, 255, 255, 0.3);
}

/*--------------------------------------------------------------
# 404 page
Four recovery links now sit in a row that was built for one;
wrap them so mobile doesn't overflow horizontally.
--------------------------------------------------------------*/
.error-page__content .btn-box {
  flex-wrap: wrap;
  gap: 16px;
}

/*--------------------------------------------------------------
# Navigation
Interface font (Inter) with a clearer weight than the default,
matching the brief's nav = 500-600 guidance.
--------------------------------------------------------------*/
.main-menu__list li a {
  font-weight: 600;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10000;
  background: var(--color-primary);
  color: #ffffff;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  transition: top 200ms ease;
}

.skip-link:focus {
  top: 12px;
}

/* Focus-visible states (keyboard only — mouse clicks stay clean) */
a:focus-visible,
button:focus-visible,
.thm-btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.85);
  border-radius: 1px;
}

/* Buttons that sit on light sections need a dark ring instead of a white one */
.contact-page .input-box input:focus-visible,
.contact-page .input-box textarea:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -1px;
  box-shadow: none;
}

/*--------------------------------------------------------------
# Button hierarchy
--------------------------------------------------------------*/

/* Primary: solid fill, for the one main action in a group.
   White fill + cobalt text rather than a solid brand-color fill,
   because .thm-btn--primary is used on cobalt-blue sections (the
   homepage hero) as well as black ones — a cobalt-on-cobalt button
   would disappear into its own section background. White holds
   contrast against every section colour this site actually uses. */
.thm-btn.thm-btn--primary {
  background: #ffffff;
  color: var(--color-primary-dark);
}

.thm-btn.thm-btn--primary .bdrl,
.thm-btn.thm-btn--primary .bdrr,
.thm-btn.thm-btn--primary:before,
.thm-btn.thm-btn--primary:after {
  display: none;
}

.thm-btn.thm-btn--primary:hover,
.thm-btn.thm-btn--primary:focus {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.thm-btn.thm-btn--primary:active {
  transform: translateY(0);
  background: #e2e2e2;
}

/* .main-slider-one__content .btn-box .thm-btn (style.css) sets a white
   border + white text at higher specificity than the rules above —
   override it here so the hero's primary CTA doesn't render white-on-white. */
.main-slider-one__content .btn-box .thm-btn.thm-btn--primary,
.main-slider-one__content .btn-box .thm-btn.thm-btn--primary:hover,
.main-slider-one__content .btn-box .thm-btn.thm-btn--primary:focus {
  color: var(--color-primary-dark);
  border-color: transparent;
}

/* Secondary is the existing outline .thm-btn — just add depth feedback */
.thm-btn:hover,
.thm-btn:focus {
  transform: translateY(-1px);
}

.thm-btn:active {
  transform: translateY(0);
}

/* Ghost/tertiary: lowest-emphasis action, e.g. "Learn More →" inline links */
.thm-btn.thm-btn--ghost {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.thm-btn.thm-btn--ghost .bdrl,
.thm-btn.thm-btn--ghost .bdrr,
.thm-btn.thm-btn--ghost:before,
.thm-btn.thm-btn--ghost:after {
  display: none;
}

.thm-btn.thm-btn--ghost:hover,
.thm-btn.thm-btn--ghost:focus {
  border-bottom-color: #ffffff;
  transform: translateY(0);
}

/* Destructive: reserved for delete/cancel/irreversible actions */
.thm-btn.thm-btn--destructive {
  color: #ff8a80;
}

.thm-btn.thm-btn--destructive:hover,
.thm-btn.thm-btn--destructive:focus {
  color: #ffffff;
  background: var(--color-error);
}

.thm-btn.thm-btn--destructive .bdrl,
.thm-btn.thm-btn--destructive .bdrr {
  background: rgba(192, 57, 43, 0.4);
}

/* Disabled + loading states apply to every thm-btn variant */
.thm-btn:disabled,
.thm-btn[disabled],
.thm-btn.is-loading {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none !important;
  pointer-events: none;
}

.thm-btn.is-loading {
  position: relative;
  pointer-events: none;
}

.thm-btn.is-loading .txt {
  padding-left: 22px;
}

.thm-btn.is-loading .txt:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ux-spin 700ms linear infinite;
}

.thm-btn--primary.is-loading .txt:before {
  border-color: rgba(5, 74, 190, 0.25);
  border-top-color: var(--color-primary-dark);
}

@keyframes ux-spin {
  to {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Form feedback
--------------------------------------------------------------*/

.form-alert {
  margin-bottom: 20px;
}

.form-alert:empty {
  margin-bottom: 0;
}

.form-alert .inner {
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
}

.form-alert--success .inner {
  background: rgba(46, 139, 87, 0.12);
  border: 1px solid rgba(46, 139, 87, 0.4);
}

.form-alert--success p {
  color: var(--color-success);
  margin: 0;
  font-weight: 500;
}

.form-alert--error .inner {
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid rgba(192, 57, 43, 0.4);
}

.form-alert--error p {
  color: var(--color-error);
  margin: 0;
  font-weight: 500;
}

/* Inline validation error text (pairs with the display:block fix in style.css) */
#contact-form label.error {
  display: block;
}

#contact-form .input-box {
  position: relative;
}

/*--------------------------------------------------------------
# Touch targets
--------------------------------------------------------------*/

.mobile-nav__toggler,
.search-toggler,
.navSidebar-button,
.mobile-nav__close {
  min-width: 40px;
  min-height: 40px;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Reset default button chrome on elements converted from <span>/<div> to <button> for keyboard access */
button.mobile-nav__close {
  border: none;
  font: inherit;
  padding: 0;
}

/*--------------------------------------------------------------
# Reduced motion
--------------------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .thm-btn:hover,
  .thm-btn:focus,
  .thm-btn.thm-btn--primary:hover,
  .thm-btn.thm-btn--primary:focus {
    transform: none;
  }
}
