/* The frame every page shares: logo, ribbon stripes under the header and over the footer. */
/* the logo's ribbon colours (brand.json), as decoration only: text and buttons keep the one accent */
:root { --rb-blue: #2098b1; --rb-orange: #f34307; --rb-yellow: #ffd382; --rb-teal: #25a57c; }
html:lang(th) :is(.btn, .nav__logo) { letter-spacing: 0; }
html:lang(th) .footer h3 { line-height: 1.45; letter-spacing: 0; }
.nav__logo img { width: 32px; height: 20px; object-fit: contain; }
.nav::after, .footer::before {
  content: ""; position: absolute; inset-inline: 0; height: 5px;
  background: linear-gradient(115deg, var(--rb-blue) 25%, var(--rb-orange) 25% 50%, var(--rb-yellow) 50% 75%, var(--rb-teal) 75%);
}
.nav::after { top: 100%; }
.footer { position: relative; border-top: 0; }
.footer::before { top: 0; }
@media (max-width: 639px) { .nav__logo { font-size: 18px; } }
/* subpages: a shorter bar, the logo on the left and the links on the right */
html:has(.nav--sub) { --nav: 60px; }
@media (min-width: 1024px) { .nav--sub .nav__links { justify-content: flex-end; } }
.nav--sub .nav__toggle { margin-left: auto; }
.footer__name { font: var(--display-weight) var(--t-h3)/1.4 var(--font-display); }
.footer__where { font-style: normal; line-height: 1.75; }
.footer__legal { justify-content: flex-start; align-items: center; }
.footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }
/* the narrowest phones: the header button (also in the menu) makes room for the menu toggle */
@media (max-width: 359px) {
  .nav--split:not(.is-open) .nav__actions { display: none; }
  .nav--split:not(.is-open) .nav__toggle { margin-left: auto !important; }
}
.footer__reach { display: flex; flex-wrap: wrap; column-gap: var(--s-6); }
.footer__reach a { display: inline-flex; align-items: center; min-height: 44px; }
.footer .footer__map { display: block; list-style: none; margin-inline: 0; padding: 0; columns: 1; }
.footer .footer__map li { margin: 0; break-inside: avoid; }
.footer__map a { display: inline-flex; align-items: center; min-height: 44px; }
/* the white and grey buttons hover like the blue one: a change of tone only, no outline appearing */
html[data-buttons] body .btn--secondary:hover { border-color: transparent; background: color-mix(in oklab, var(--ink) 4%, var(--bg)); }
/* a pale step of the ink; any darker and the grey small print drops under 4.5:1 */
.footer.footer--visit { background: #f1f2f2; }
/* the kit's blue ring is faint round the pause disc on a tinted panel */
.loop-pause:focus-visible { outline-color: var(--ink); }
/* on a phone the kit underlines the second button as a text link; tonal buttons keep their fill, so no line */
@media (max-width: 639px) { html[data-buttons="tonal"] .btn-row > .btn--secondary { text-decoration: none; } }
/* one rhythm on every page: the space above and below a desktop section */
:root { --section-pad: clamp(44px, 4.5vw, 68px); }
/* the drawn underlines sit close under their words; the links keep their height for tapping */
@media (min-width: 1024px) { .nav__link::before, .nav__link[aria-current="page"]::after { bottom: 5px; } }
html[lang] body .footer.footer--visit .footer__map a { background-position-y: calc(100% - 11px); }
/* the footer's other links match its menu: no line at rest, the same line drawn on hover */
html[lang] body .footer.footer--visit :is(.footer__reach a, .footer__legal a, .footer__where a) {
  text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat right 0 bottom 11px / 0% 1px;
  transition: background-size var(--m-out) var(--m-ease);
}
/* the address wraps, so it is drawn under each of its lines */
html[lang] body .footer.footer--visit .footer__where a { background-position: right 0 bottom 0; padding-bottom: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
html[lang] body .footer.footer--visit :is(.footer__reach a, .footer__legal a, .footer__where a):is(:hover, :focus-visible) {
  background-position-x: left; background-size: 100% 1px; transition-duration: var(--m-in);
}
@media (prefers-reduced-motion: reduce) { html[lang] body .footer.footer--visit :is(.footer__reach a, .footer__legal a, .footer__where a) { transition: none; } }
/* a link that jumps to a heading glides there, unless the visitor asked for less motion */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* desktop footer: a wider services column, so no link wraps (its drawn line would cross the words) */
@media (min-width: 1024px) {
  .footer .grid > nav.footer__col { grid-column: 7 / span 4; }
  .footer .grid > nav.footer__col ~ nav.footer__col { grid-column: 11 / span 2; }
}
/* the footer links get their height from padding, so the drawn line stays under the last line of a wrapped one */
html[lang] body .footer.footer--visit :is(.footer__map a, .footer__reach a, .footer__legal a) { padding-block: 11px 13px; }
