/*
 * TPO rebrand core stylesheet: base, layout rail, buttons and the site shell
 * (header, footer, mobile Call bar). Loaded on every page after tokens.css.
 * Page families add one stylesheet of their own. No @import.
 *
 * Breakpoints
 *   < 768px      mobile: sticky header and fixed Call bar (Figma 375)
 *   768-1279px   tablet header with Menu toggle (Figma 768)
 *   >= 1024px    desktop footer and container gutter
 *   >= 1280px    desktop header: full navigation needs about 1,130px of rail
 */

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--neutral-800);
  font-family: var(--font-sans);
  font-size: var(--paragraph-font-size);
  font-weight: var(--font-weight-normal);
  line-height: var(--paragraph-line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--brand-navy);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--heading-letter-spacing);
  text-transform: uppercase;
}

h1 {
  font-size: var(--h1-font-size);
  font-style: italic;
  line-height: var(--h1-line-height);
}

h2 {
  font-size: var(--h2-font-size);
  font-style: italic;
  line-height: var(--h2-line-height);
}

h3 {
  font-size: var(--h3-font-size);
  line-height: var(--h3-line-height);
}

h4 {
  font-size: var(--h4-font-size);
  line-height: var(--h4-line-height);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-skip-link {
  position: absolute;
  top: var(--spacing-xs);
  left: var(--spacing-xs);
  z-index: 100;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  background: var(--brand-navy);
  color: var(--primary-foreground);
  font-size: var(--paragraph-small-font-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--paragraph-small-line-height);
  text-decoration: none;
  transform: translateY(-200%);
}

.site-skip-link:focus {
  transform: none;
}

/* ---------- Layout rail ---------- */
.site-container {
  width: 100%;
  max-width: calc(var(--container-content) + 2 * var(--container-gutter));
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.site-main {
  display: block;
}

.site-main:focus {
  outline: none;
}

/* ---------- Icons (SVG sprite) ---------- */
.site-icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.site-icon--16 {
  width: 16px;
  height: 16px;
}

/* ---------- Buttons (Button - Nova) ---------- */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  min-height: var(--header-control-height);
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 0;
  border-radius: var(--radius-2xl);
  font-family: var(--font-sans);
  font-size: var(--paragraph-small-font-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--paragraph-small-line-height);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.site-btn--secondary {
  background: var(--secondary);
  color: var(--brand-navy);
}

.site-btn--secondary:hover {
  background: var(--neutral-200);
}

.site-btn--brand {
  background: var(--brand-red);
  color: var(--primary-foreground);
}

.site-btn--brand:hover {
  background: var(--brand-red-hover);
}

/* Remaining Button - Nova variants used by the M4b sections (Figma set 202:642,
   Brand red set 2064:9190). Heights, inline padding, shadow, shape and width are
   per-instance overrides in the section masters, so they are modifiers.
   Focus keeps the shell ring above (2px, offset 2px): Figma's zero-offset navy
   ring would be invisible on the navy Primary button. Dark sections switch the
   ring to white in sections.css. */
.site-btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.site-btn--primary:hover {
  background: var(--primary-hover);
}

.site-btn--outline {
  border: 1px solid var(--border);
  background: var(--alpha-white-outline-bg);
  color: var(--foreground);
}

.site-btn--outline:hover {
  background: linear-gradient(var(--alpha-black-switch-5), var(--alpha-black-switch-5)), var(--alpha-white-switch-30);
  box-shadow: var(--shadow-xs);
}

.site-section--dark .site-btn--outline:hover {
  background-color: var(--alpha-white-outline-bg);
}

.site-btn--sm {
  min-height: var(--button-height-sm);
}

.site-btn--lg {
  min-height: var(--button-height-lg);
}

.site-btn--wide {
  padding-inline: var(--spacing-lg);
}

.site-btn--shadow,
.site-btn--shadow:hover {
  box-shadow: var(--shadow-lg);
}

.site-btn--pill {
  border-radius: var(--radius-full);
}

.site-btn--icon-only {
  width: var(--header-control-height);
  min-width: var(--header-control-height);
  padding-inline: 0;
  border-radius: var(--radius-full);
  transition: opacity 0.15s ease;
}

/* Icon Button - Nova Large Secondary, Hover & Active (Figma 202:1311). */
.site-btn--icon-only.site-btn--secondary:is(:hover, :active) {
  background: var(--secondary);
  opacity: 0.8;
}

.site-btn--fill {
  width: 100%;
}

@media (max-width: 767px) {
  .site-btn--fill-mobile {
    width: 100%;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--background);
  border-bottom: 1px solid var(--sidebar-border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding-block: var(--spacing-xs);
}

.site-header__logo {
  display: block;
  flex: none;
  width: 143px;
  height: var(--header-logo-height);
}

.site-header__logo img {
  width: 143px;
  height: var(--header-logo-height);
  object-fit: contain;
}

.site-header__nav {
  display: none;
}

.site-nav-list {
  display: flex;
  list-style: none;
  color: var(--brand-navy);
  font-size: var(--paragraph-small-font-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--paragraph-small-line-height);
  white-space: nowrap;
}

.site-nav-list a {
  display: inline-block;
  text-decoration: none;
  text-underline-offset: 4px;
}

.site-nav-list a:hover,
.site-nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-header__nav .site-nav-list {
  gap: var(--spacing-2xl);
}

.site-header__actions {
  display: none;
  gap: var(--spacing-sm);
}

.site-header__toggle {
  display: none;
  flex: none;
  align-items: center;
  gap: var(--spacing-xs);
  min-height: var(--header-control-height);
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-navy);
  font-size: var(--paragraph-small-font-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--paragraph-small-line-height);
  cursor: pointer;
}

.js .site-header__toggle {
  display: inline-flex;
}

.site-header__toggle-open,
.site-header__toggle[aria-expanded="true"] .site-header__toggle-closed {
  display: none;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-open {
  display: block;
}

/* Menu panel. Without JavaScript it stays open below the bar.
   shadow-lg separates the open menu from the page (Figma 1275:17154, owner 2026-11-25). */
.site-menu {
  background: var(--background);
  box-shadow: var(--shadow-lg);
}

.js .site-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
}

.js .site-menu:not(.is-open) {
  display: none;
}

.site-menu .site-nav-list {
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
}

.site-menu__inner {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  padding: var(--spacing-md);
}

.site-menu__actions {
  display: flex;
  gap: var(--spacing-sm);
}

.site-menu__actions .site-btn {
  flex: 1 1 0;
  min-width: 0;
}

@media (width < 768px) {
  :root {
    --call-bar-reserve: calc(var(--call-bar-height) + env(safe-area-inset-bottom, 0px));
    scroll-padding-block-end: var(--call-bar-reserve);
  }

  :root.is-typing {
    --call-bar-reserve: 0px;
  }

  :root.js {
    --mobile-header-height: calc(var(--header-logo-height) + 2 * var(--spacing-xs) + 1px + env(safe-area-inset-top, 0px));
    scroll-padding-block-start: var(--mobile-header-height);
  }

  .js .site-header {
    position: sticky;
    inset-block-start: 0;
    padding-block-start: env(safe-area-inset-top, 0px);
  }

  .js .site-skip-link {
    position: fixed;
    inset-block-start: calc(var(--spacing-xs) + env(safe-area-inset-top, 0px));
  }

  .js .site-menu {
    max-block-size: calc(100dvh - var(--mobile-header-height) - var(--call-bar-reserve));
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}

@media (min-width: 768px) {
  .site-header__actions {
    display: flex;
  }

  .site-menu {
    border-radius: 0 0 var(--radius-3xl) var(--radius-3xl);
  }

  .js .site-menu {
    left: auto;
    width: 200px;
  }

  .site-menu__inner {
    padding: var(--spacing-md) var(--spacing-xl);
  }

  .site-menu .site-nav-list {
    align-items: flex-end;
  }

  .site-menu__actions {
    display: none;
  }
}

@media (min-width: 1280px) {
  .site-header__nav {
    display: block;
  }

  .js .site-header__toggle,
  .site-menu,
  .js .site-menu.is-open {
    display: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--neutral-800);
  color: var(--primary-foreground);
}

/* Decorative backdrop (<picture>) under a 50% black overlay (Figma alpha-black-50).
   Explicit layers: photo at -2, overlay at -1, content above. */
.site-footer__bg,
.site-footer::before {
  position: absolute;
  inset: 0;
}

.site-footer__bg {
  z-index: -2;
}

.site-footer::before {
  z-index: -1;
}

.site-footer__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer::before {
  content: "";
  background: var(--alpha-black-no-switch-50);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer :focus-visible {
  outline-color: var(--primary-foreground);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2xl);
  padding-block: var(--spacing-xl);
}

.site-footer__main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4xl);
  width: 100%;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.site-footer__logo {
  width: 210px;
  aspect-ratio: 210 / 83.6;
  object-fit: cover;
  object-position: 44% 50%;
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  list-style: none;
}

.site-footer__contact li {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.site-footer__contact-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--muted);
  color: var(--brand-navy);
}

.site-footer__contact a,
.site-footer__social-label,
.site-footer__copyright {
  font-size: var(--paragraph-small-font-size);
  line-height: var(--paragraph-small-line-height);
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-4xl);
}

.site-footer__nav .site-nav-list {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-sm);
  color: inherit;
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
  width: 100%;
}

.site-footer__social {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.site-footer__social ul {
  display: flex;
  gap: var(--spacing-sm);
  list-style: none;
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.site-footer__payments {
  width: 100%;
  max-width: 517px;
  height: auto;
}

.site-footer__divider {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--border);
}

.site-footer__legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
  width: 100%;
  font-size: var(--paragraph-mini-font-size);
  line-height: var(--paragraph-mini-line-height);
}

.site-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.site-footer__legal li + li::before {
  content: "\00b7";
  padding-inline: 8px;
}

.site-footer__disclaimer {
  align-self: stretch;
  text-align: right;
}

@media (min-width: 768px) {
  .site-footer__inner {
    align-items: flex-start;
    padding-block: var(--spacing-3xl);
  }

  .site-footer__nav {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-4xl);
  }

  .site-footer__nav .site-nav-list {
    width: 210px;
  }

  .site-footer__legal {
    align-items: flex-start;
  }

  .site-footer__disclaimer {
    align-self: auto;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .site-footer__inner {
    align-items: stretch;
    padding-block: var(--spacing-4xl);
  }

  .site-footer__main {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-2xl);
  }

  .site-footer__brand {
    flex: 0 1 440px;
  }

  .site-footer__nav {
    justify-content: flex-end;
  }

  .site-footer__meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .site-footer__legal {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--spacing-2xl);
  }

  .site-footer__disclaimer {
    text-align: right;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .site-footer__nav .site-nav-list {
    width: auto;
    min-width: 150px;
  }
}

/* ---------- Mobile Call bar ---------- */
.site-call-bar {
  display: none;
}

@media (width < 768px) {
  .site-call-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    min-height: var(--call-bar-reserve);
    padding: 0 var(--spacing-md) env(safe-area-inset-bottom, 0px);
    background: var(--call-bar-background);
    color: var(--primary-foreground);
    font-size: var(--paragraph-font-size);
    font-weight: var(--font-weight-bold);
    line-height: var(--paragraph-line-height);
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 -1px 0 var(--alpha-white-no-switch-20);
  }

  .site-footer a.site-call-bar:hover {
    text-decoration: none;
  }

  .site-call-bar:focus-visible {
    outline-offset: -4px;
  }

  /* The footer reserves exactly the bar height so the last row is never covered. */
  .site-footer {
    padding-bottom: var(--call-bar-reserve);
  }

  /* Hide while typing so the bar never sits on top of the on-screen keyboard. */
  .is-typing .site-call-bar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
