/* ScaleSiam — the guardian site footer, shared by every page that shows it.
   Self-contained: it brings its own tokens, type and button styles so
   it renders the same whatever the host page's stylesheet does.
   The guardian IS the footer. He stands bottom-right, taller than the
   footer itself, rising into the free column the FAQ above leaves him;
   the closing invitation, the links and the legal lines sit on the left. */
.site-footer {
  --footer-ink: #172238;
  --footer-ink-soft: #626b79;
  --footer-paper: #fafaf7;
  --footer-accent: #475bbe;
  --footer-max: 1280px;
  --footer-gutter: clamp(24px, 5vw, 72px);
  --footer-ease: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  overflow-y: visible;
  padding: 0;
  border: 0;
  background:
    radial-gradient(ellipse at 88% 90%, #e9eaf270 0%, transparent 54%),
    var(--footer-paper);
  color: var(--footer-ink);
  font-family: Anuphan, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.002em;
}
.site-footer a {
  color: inherit;
}
.site-footer .btn,
.site-footer .wordmark,
.site-footer .guardian-footer-alt {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.site-footer .guardian-footer-inner {
  position: relative;
  z-index: 1;
  max-width: calc(var(--footer-max) + 2 * var(--footer-gutter));
  margin: 0 auto;
  padding: 92px var(--footer-gutter) 34px;
  min-height: 795px;
}
.site-footer .guardian-footer-content {
  width: 59%;
  max-width: 710px;
}

/* Closing invitation */
.site-footer .guardian-footer-kicker {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #56617a;
}
html[lang="th"] .site-footer .guardian-footer-kicker {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 12px;
}
.site-footer .guardian-footer-title,
html[lang="th"] .site-footer .guardian-footer-title {
  margin: 0 0 22px;
  padding: 0;
  font-family: Syne, Anuphan, sans-serif;
  font-weight: 600;
  font-size: clamp(46px, 5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: var(--footer-ink);
  text-wrap: balance;
}
.site-footer .guardian-footer-title em {
  font-style: normal;
  color: #5869bf;
}
html[lang="th"] .site-footer .guardian-footer-title {
  font-family: Anuphan, sans-serif;
  font-size: clamp(38px, 4.2vw, 62px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  padding-top: 0.1em;
}
.site-footer .guardian-footer-lead {
  max-width: 430px;
  margin: 0 0 30px;
  color: var(--footer-ink-soft);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}
.site-footer .guardian-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-bottom: 58px;
}
.site-footer .guardian-footer-alt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--footer-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.site-footer .guardian-footer-alt > span:first-child {
  text-decoration: underline;
  text-decoration-color: #a9b3df;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 160ms ease;
}
.site-footer .guardian-footer-alt > span[aria-hidden] {
  display: inline-block;
  transition: transform 200ms var(--footer-ease);
}

/* Navigation */
.site-footer .guardian-footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 480px;
}
.site-footer .footer-link-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.site-footer .footer-link-column h2,
html[lang="th"] .site-footer .footer-link-column h2 {
  margin: 0 0 13px;
  padding: 0;
  font: 600 12px/1.5 Anuphan, sans-serif;
  letter-spacing: 0.07em;
  color: #8b91a0;
  text-transform: uppercase;
}
html[lang="th"] .site-footer .footer-link-column h2 {
  letter-spacing: 0;
  text-transform: none;
}
.site-footer .footer-link-column a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  color: var(--footer-ink);
  text-decoration: none;
  transition: color 160ms ease;
}
.site-footer .footer-link-column a[aria-current="page"] {
  color: var(--footer-accent);
}

/* Buttons */
.site-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 52px;
  padding: 13px 24px;
  border: 0;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms var(--footer-ease),
    box-shadow 180ms var(--footer-ease),
    background-color 180ms var(--footer-ease);
}
.site-footer .btn-dark {
  background: linear-gradient(180deg, #34435a, #1b273c);
  color: var(--footer-paper);
  box-shadow:
    inset 0 1px 0 #ffffff35,
    0 2px 3px #17223820,
    0 0 0 1px #182338;
}
.site-footer .btn-dark::after {
  content: "↗";
  font-size: 18px;
  line-height: 1;
}
.site-footer .btn:active {
  transform: scale(0.97);
}
.site-footer .btn:focus-visible {
  border-radius: 999px;
}
html[lang="th"] .site-footer .btn {
  height: auto;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}

/* Brand mark and legal */
.site-footer .guardian-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px 44px;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid #e3e6ec;
}
.site-footer .wordmark,
html[lang="th"] .site-footer .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-top: 2px;
  color: var(--footer-ink);
  font-family: Syne, Anuphan, sans-serif;
  font-weight: 750;
  font-size: 22px;
  letter-spacing: -1.1px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 160ms var(--footer-ease);
}
.site-footer .brand-symbol {
  flex: none;
  width: 26px;
  height: 26px;
  color: #5665ba;
}
.site-footer .brand-dot {
  margin: 0;
  color: #6b79c0;
}
.site-footer .guardian-footer-legal {
  flex: 1 1 280px;
  max-width: 520px;
}
.site-footer .fine {
  max-width: none;
  margin: 0;
  color: #818996;
  font-size: 11px;
  line-height: 1.8;
}
.site-footer .fine + .fine {
  margin-top: 10px;
}

/* Guardian */
.site-footer .guardian-footer-image {
  position: absolute;
  z-index: 0;
  bottom: 0;
  right: 0;
  display: block;
  height: 760px;
  max-height: calc(100% - 25px);
  width: auto;
  max-width: none;
  margin: 0;
  object-fit: contain;
  object-position: bottom right;
  mask-image: linear-gradient(#000 0%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(#000 0%, #000 88%, transparent 100%);
  pointer-events: none;
}
/* On wide screens he is taller than the footer and rises into the section above. */
@media (min-width: 1001px) {
  .site-footer .guardian-footer-image {
    height: clamp(810px, 70vw, 1260px);
    max-height: none;
    right: min(0px, calc((100% - var(--footer-max)) / 2));
  }
}

@media (hover: hover) and (pointer: fine) {
  .site-footer .wordmark:hover {
    opacity: 0.65;
  }
  .site-footer .footer-link-column a:hover {
    color: #5869bf;
    text-decoration: underline;
    text-underline-offset: 5px;
  }
  .site-footer .guardian-footer-alt:hover {
    color: var(--footer-ink);
  }
  .site-footer .guardian-footer-alt:hover > span:first-child {
    text-decoration-color: currentColor;
  }
  .site-footer .guardian-footer-alt:hover > span[aria-hidden] {
    transform: translateX(3px);
  }
  .site-footer .btn-dark:hover {
    background: linear-gradient(#44536e, #293952);
    box-shadow:
      inset 0 1px 0 #ffffff35,
      0 5px 12px #17223824,
      0 0 0 1px #182338;
    transform: translateY(-1px);
  }
}
@media (pointer: coarse) {
  .site-footer .footer-link-column a {
    min-height: 44px;
  }
}

@media (min-width: 701px) and (max-width: 1000px) {
  .site-footer .guardian-footer-inner {
    min-height: 790px;
    padding-top: 64px;
  }
  .site-footer .guardian-footer-content {
    width: 56%;
  }
  .site-footer .guardian-footer-title,
  html[lang="th"] .site-footer .guardian-footer-title {
    font-size: clamp(40px, 5.4vw, 54px);
  }
  .site-footer .guardian-footer-links {
    gap: 25px;
  }
  .site-footer .guardian-footer-image {
    height: 715px;
  }
  .site-footer .guardian-footer-actions {
    gap: 12px 20px;
    margin-bottom: 44px;
  }
  .site-footer .guardian-footer-legal {
    max-width: 380px;
  }
}

@media (max-width: 700px) {
  .site-footer {
    --footer-gutter: 24px;
  }
  .site-footer .guardian-footer-inner {
    padding: 48px var(--footer-gutter) 25px;
    min-height: 0;
  }
  .site-footer .guardian-footer-content {
    width: 100%;
    max-width: none;
  }
  .site-footer .guardian-footer-kicker {
    margin-bottom: 18px;
    font-size: 10px;
  }
  .site-footer .guardian-footer-title,
  html[lang="th"] .site-footer .guardian-footer-title {
    font-size: clamp(40px, 10.5vw, 54px);
    margin-bottom: 18px;
  }
  html[lang="th"] .site-footer .guardian-footer-title {
    font-size: clamp(32px, 8.6vw, 44px);
  }
  .site-footer .guardian-footer-lead {
    max-width: 330px;
    margin-bottom: 24px;
    font-size: 14px;
  }
  .site-footer .guardian-footer-actions {
    gap: 10px 20px;
    margin-bottom: 40px;
  }
  .site-footer .guardian-footer-links {
    gap: 25px;
    max-width: 430px;
  }
  .site-footer .footer-link-column h2,
  html[lang="th"] .site-footer .footer-link-column h2 {
    font-size: 10px;
    margin-bottom: 7px;
  }
  .site-footer .footer-link-column a {
    font-size: 13px;
    min-height: 44px;
  }
  .site-footer .guardian-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 16px;
    min-height: 395px;
    margin-top: 28px;
    padding-top: 0;
    border-top: 0;
  }
  .site-footer .wordmark,
  html[lang="th"] .site-footer .wordmark {
    font-size: 21px;
    gap: 7px;
  }
  .site-footer .brand-symbol {
    width: 24px;
    height: 24px;
  }
  .site-footer .guardian-footer-legal {
    flex: none;
    width: 45%;
    max-width: 225px;
  }
  .site-footer .fine {
    font-size: 10px;
    line-height: 1.75;
    color: #737d8c;
  }
  .site-footer .fine + .fine {
    margin-top: 12px;
  }
  .site-footer .guardian-footer-image {
    height: 410px;
    max-height: none;
    mask-image: linear-gradient(#000 0%, #000 94%, #0009 100%);
    -webkit-mask-image: linear-gradient(#000 0%, #000 94%, #0009 100%);
  }
}

@media (max-width: 370px) {
  .site-footer {
    --footer-gutter: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .btn,
  .site-footer .guardian-footer-alt > span[aria-hidden] {
    transition: none;
  }
  .site-footer .btn:active,
  .site-footer .btn-dark:hover {
    transform: none;
  }
}

@media print {
  .site-footer .guardian-footer-inner {
    padding: 25px;
    min-height: 0;
  }
  .site-footer .guardian-footer-content {
    width: 100%;
  }
  .site-footer .guardian-footer-image,
  .site-footer .guardian-footer-actions {
    display: none;
  }
  .site-footer .guardian-footer-bottom {
    min-height: 0;
  }
  .site-footer .guardian-footer-legal {
    width: 100%;
    max-width: none;
  }
}

/* The guardian rises a little as the footer scrolls into view. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .site-footer .guardian-footer-image {
      animation: guardian-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}
@keyframes guardian-rise {
  from { translate: 0 56px; }
  to { translate: 0 0; }
}
