@font-face {
  font-family: "RP Stereo";
  src: url("../../02-stats-scroll/assets/StereoGothic-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RP Montserrat";
  src: url("../../02-stats-scroll/assets/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

.site-footer,
.documents-dialog {
  --footer-accent: var(--rp-global-accent, #ff5a1f);
  --footer-text: #f2f2ee;
  --footer-muted: rgba(242, 242, 238, 0.5);
  --footer-line: rgba(242, 242, 238, 0.14);
  font-family: "RP Montserrat", Arial, sans-serif;
  font-weight: 400;
  color: var(--footer-text);
}

.site-footer {
  position: relative;
  padding: clamp(46px, 5vw, 76px) clamp(22px, 5vw, 76px) max(26px, env(safe-area-inset-bottom));
  background-color: #020303;
  background-image: none;
  border-top: 1px solid color-mix(in srgb, var(--footer-accent) 24%, var(--footer-line));
}

.footer-shell {
  width: min(100%, 1840px);
  margin: 0 auto;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(250px, 1.15fr) repeat(3, minmax(180px, 0.72fr));
  gap: clamp(28px, 4vw, 76px);
  align-items: start;
}

.footer-brand {
  display: inline-block;
  width: min(360px, 100%);
  line-height: 0;
}

.footer-brand__logo {
  display: block;
  width: 100%;
  height: auto;
}

.footer-label,
.footer-legal__name,
.footer-documents,
.footer-credit__label {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.footer-contact {
  min-width: 0;
}

.footer-label {
  display: block;
  margin-bottom: 14px;
  color: var(--footer-muted);
}

.footer-contact a,
.footer-contact address {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 9px;
  color: var(--footer-text);
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 170ms ease;
}

.footer-contact address {
  font-style: normal;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--footer-accent);
  outline: none;
}

.footer-contact__note {
  display: block;
  color: var(--footer-muted);
  font-size: 11px;
  line-height: 1.5;
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto minmax(190px, auto);
  align-items: center;
  gap: 28px;
  margin-top: clamp(44px, 5vw, 70px);
  padding-top: 20px;
  border-top: 1px solid var(--footer-line);
}

.footer-legal__name {
  display: inline-block;
  margin-right: 14px;
  color: var(--footer-text);
}

.footer-legal p {
  display: inline;
  margin: 0;
  color: var(--footer-muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.6;
}

.footer-legal p + p::before {
  margin: 0 8px;
  content: "·";
}

.footer-documents {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  color: var(--footer-text);
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: color 170ms ease;
}

.footer-documents svg {
  width: 15px;
  height: 15px;
  color: var(--footer-accent);
  transition: transform 170ms ease;
}

.footer-documents:hover,
.footer-documents:focus-visible {
  color: var(--footer-accent);
}

.footer-documents:hover svg,
.footer-documents:focus-visible svg {
  transform: translate3d(2px, -2px, 0);
}

.footer-documents:focus-visible,
.footer-credit__name:focus-visible,
.footer-brand:focus-visible {
  outline: 1px solid var(--footer-accent);
  outline-offset: 5px;
}

.documents-tabs button:focus-visible,
.documents-dialog__close:focus-visible {
  outline: 1px solid rgba(242, 242, 238, 0.72);
  outline-offset: 4px;
}

.footer-credit {
  display: flex;
  flex-direction: column;
  justify-self: end;
  align-items: flex-start;
  gap: 10px;
  white-space: nowrap;
}

.footer-credit__label {
  color: var(--footer-muted);
}

.footer-credit__name {
  color: var(--footer-accent);
  font-family: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: none;
  text-underline-offset: 4px;
}

.footer-credit__name strong {
  font-weight: 700;
  font-style: italic;
}

.footer-credit__name:hover {
  text-decoration: underline;
}

.documents-dialog {
  width: min(900px, calc(100vw - 40px));
  max-height: min(760px, calc(100svh - 40px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--footer-text);
  background-color: #0a0a09;
  background-image: none;
  border: 1px solid rgba(242, 242, 238, 0.18);
  border-radius: 0;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 150ms ease, transform 150ms ease;
}

.documents-dialog[open].is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.documents-dialog.is-closing {
  opacity: 0;
  transform: translate3d(0, 4px, 0);
}

.documents-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.documents-dialog__layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  min-height: min(620px, calc(100svh - 80px));
  background-image: none;
}

.documents-dialog__rail {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.6vw, 40px);
  background-color: #070707;
  background-image: none;
  border-right: 1px solid rgba(242, 242, 238, 0.12);
}

.documents-dialog__eyebrow {
  margin: 0 0 30px;
  color: rgba(242, 242, 238, 0.88);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.documents-tabs {
  display: grid;
  gap: 2px;
}

.documents-tabs button {
  padding: 12px 0 12px 14px;
  color: rgba(242, 242, 238, 0.56);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.documents-tabs button[aria-selected="true"] {
  color: var(--footer-text);
  background-color: rgba(242, 242, 238, 0.055);
  border-left-color: rgba(242, 242, 238, 0.86);
}

.documents-dialog__rail-note {
  margin: auto 0 0;
  color: rgba(242, 242, 238, 0.44);
  font-size: 11px;
  line-height: 1.55;
}

.documents-dialog__content {
  position: relative;
  padding: clamp(64px, 6vw, 82px) clamp(28px, 5vw, 62px) 48px;
  overflow: auto;
  background-color: #0a0a09;
  background-image: none;
}

.documents-dialog__close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  color: rgba(242, 242, 238, 0.76);
  background: transparent;
  border: 1px solid rgba(242, 242, 238, 0.16);
  border-radius: 0;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.documents-dialog__close:hover {
  color: var(--footer-text);
  background-color: rgba(242, 242, 238, 0.05);
  border-color: rgba(242, 242, 238, 0.34);
}

.documents-dialog__close svg {
  width: 18px;
  height: 18px;
}

.document-title-compact { display: none; }
@media (max-width: 980px) {
  .document-title-wide { display: none; }
  .document-title-compact { display: inline; }
  .documents-panel h2 { overflow-wrap: normal; word-break: normal; hyphens: none; }
}

.documents-panel h2 {
  max-width: 650px;
  margin: 0 0 24px;
  font-family: "RP Montserrat", Arial, sans-serif;
  font-size: clamp(24px, 2.1vw, 34px);
  font-weight: 400;
  line-height: 1.16;
  text-transform: none;
}

.documents-panel p,
.documents-panel li {
  max-width: 680px;
  color: rgba(242, 242, 238, 0.7);
  font-size: clamp(13px, 0.95vw, 15px);
  line-height: 1.72;
}

.documents-panel p {
  margin: 0 0 16px;
}

.documents-panel ul {
  margin: 22px 0 0;
  padding-left: 18px;
}

.documents-panel strong {
  color: var(--footer-text);
}

.documents-panel__mock {
  display: inline-block;
  margin-bottom: 20px;
  padding: 5px 8px;
  color: rgba(242, 242, 238, 0.58);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  background-color: rgba(242, 242, 238, 0.045);
  border: 1px solid rgba(242, 242, 238, 0.12);
}

@media (max-width: 980px) {
  .footer-main {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
    width: min(320px, 62vw);
    margin-bottom: 12px;
  }
}

@media (max-width: 700px) {
  .site-footer {
    padding-top: 42px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 30px 22px;
  }

  .footer-contact:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
  }

  .footer-legal p {
    display: block;
    margin-top: 4px;
  }

  .footer-legal p + p::before {
    display: none;
  }

  .footer-credit {
    justify-self: start;
  }

  .documents-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
  }

  .documents-dialog__layout {
    display: block;
    min-height: calc(100svh - 22px);
  }

  .documents-dialog__rail {
    padding: 22px 58px 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--footer-line);
  }

  .documents-dialog__eyebrow {
    margin-bottom: 14px;
  }

  .documents-tabs {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .documents-tabs::-webkit-scrollbar { display: none; }

  .documents-tabs button {
    flex: 0 0 auto;
    padding: 11px 0 13px;
    white-space: nowrap;
    border-left: 0;
    border-bottom: 0;
  }

  .documents-tabs button[aria-selected="true"] {
    color: var(--footer-text);
    background-color: transparent;
    border-bottom: 1px solid rgba(242, 242, 238, 0.72);
  }

  .documents-dialog__rail-note {
    display: none;
  }

  .documents-dialog__content {
    max-height: calc(100svh - 138px);
    padding: 40px 20px 44px;
  }

  .documents-dialog__close {
    top: 13px;
    right: 12px;
  }
}

@media (max-width: 430px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-contact:last-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer *,
  .documents-dialog {
    transition-duration: 0.01ms !important;
  }
}
