:root {
  --font-noto-sans-sc: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.home-about-more-link {
  transition: filter 240ms ease, transform 240ms ease;
}

.home-about-video,
.home-five-image {
  transition: transform 360ms ease;
}

.coverage-map-cards > li {
  transition: transform 360ms ease;
}

.division-detail-link {
  color: var(--muted-foreground);
  transform-origin: left center;
  transition: color 200ms ease, transform 200ms ease;
}

#divisions .group:focus-visible .division-detail-link {
  color: var(--accent);
  transform: scale(1.04);
}

@media (hover: hover) {
  .home-about-more-link:hover {
    transform: scale(1.03);
  }

  .home-about-video:hover,
  .home-five-image:hover {
    transform: scale(1.03);
  }

  .coverage-map-cards > li:hover {
    transform: scale(1.03);
  }

  #divisions .group:hover .division-detail-link {
    color: var(--accent);
    transform: scale(1.04);
  }
}

.site-nav-link.is-active::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1.5rem;
  height: 2px;
  content: "";
  background: var(--brand-orange);
  transform: translateX(-50%);
}

.hero-slide[hidden],
.brand-slide[hidden] {
  display: none !important;
}

.brand-track {
  display: flex;
  transition: transform 500ms ease-out;
}

.brand-track > div img,
.brand-story-image img,
.brand-philosophy-image {
  transition: transform 360ms ease;
}

@media (hover: hover) {
  .brand-track > div:hover img,
  .brand-story-image:hover img,
  .brand-philosophy-image:hover {
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-track > div img,
  .brand-story-image img,
  .brand-philosophy-image {
    transition: none;
  }

  .brand-track > div:hover img,
  .brand-story-image:hover img,
  .brand-philosophy-image:hover {
    transform: none;
  }
}

.cms-article p {
  margin-top: 1.5rem;
  line-height: 1.625;
}

.cms-article p:first-child {
  margin-top: 0;
}

.cms-article img {
  width: 100%;
  height: auto;
  margin: 2rem auto;
  object-fit: cover;
}

.cms-article h2,
.cms-article h3 {
  margin-top: 2rem;
  font-weight: 900;
  color: var(--brand-navy);
}

.cms-article h2 {
  font-size: 1.5rem;
}

.cms-article h3 {
  font-size: 1.25rem;
}

.cms-article ul,
.cms-article ol {
  margin-top: 1.5rem;
  padding-left: 1.5rem;
  line-height: 1.625;
}

.cms-article ul {
  list-style: disc;
}

.cms-article ol {
  list-style: decimal;
}

.cms-pagination .page-num {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 150ms ease, color 150ms ease;
}

.cms-pagination .page-num:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.cms-pagination .page-num-current,
.cms-pagination .page-num-current:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: var(--primary-foreground);
}

.message-status {
  display: none;
}

.message-status.is-visible {
  display: flex;
}

.consult-input {
  width: 100%;
  border: 1px solid var(--input);
  background: var(--secondary);
  padding: 0.75rem 1rem;
  color: var(--foreground);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.consult-input:focus {
  border-color: var(--brand-blue);
  background: var(--background);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-blue) 20%, transparent);
}

.consult-tab.is-active {
  background: var(--secondary);
  color: var(--brand-navy);
  box-shadow: 0 1px 3px rgba(15, 36, 64, 0.12);
}

/* Match the source mode switch: white outer frame, inset spacing, and a small gap between tabs. */
.consult-tabs {
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--background);
}

/* The source layout stacks all personal-experience fields; institution keeps its contact row split. */
#consult [data-consult-fields="personal"] > .grid {
  grid-template-columns: minmax(0, 1fr);
}

.consult-tab:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Keep the consultation panel aligned with the source screen at desktop sizes. */
#consult [data-consult-form] {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#consult [data-consult-fields]:not([hidden]) {
  display: grid;
  gap: 1.5rem;
}

#consult [data-consult-form] > button {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
}

#consult [data-consult-features] > li > span {
  background-color: rgb(29 120 167 / 10%);
  background: color-mix(in srgb, var(--brand-blue) 10%, transparent);
}

#consult [data-consult-features] svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
}

#consult [data-consult-success] {
  min-height: 20rem;
}

#consult textarea {
  resize: vertical;
}

@media (min-width: 48rem) {
  #consult-panel {
    padding: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consult-input,
  .consult-tab {
    transition: none;
  }
}

.footer-quick-title {
  color: var(--primary-foreground);
  font-weight: 700;
}

.footer-quick-links {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  column-gap: 1.25rem;
  row-gap: 0.5rem;
}

.footer-quick-links a {
  color: color-mix(in srgb, var(--primary-foreground) 60%, transparent);
  font-weight: 500;
  transition: color 150ms ease, transform 150ms ease;
}

.footer-quick-links a:hover,
.footer-quick-links a:focus-visible {
  color: var(--brand-orange);
  transform: translateY(-1px);
}

.footer-quick-links a:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

/* Reveal each QR code label from the bottom of the image on hover. */
.footer-qrcode-overlay {
  position: absolute;
  inset: -1px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  transform: translateY(100%);
  transition: transform 240ms ease-out;
  pointer-events: none;
}

@media (hover: hover) {
  .footer-qrcode-image:hover .footer-qrcode-overlay {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
