:root {
  --bg: #fefaef;
  --navy: #0a1858;
  --navy-muted: rgba(10, 24, 88, 0.55);
  --footer-height: 3.25rem;
  --hero-max-width: min(42vw, 520px);
  --hero-max-height: min(46vh, 440px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  height: 100dvh;
}

html:not(.legal-html),
body:not(.legal-page) {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--navy);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

.hero {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  padding: 1.5rem 1.25rem;
  overflow: hidden;
}

.hero picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  max-width: min(100%, var(--hero-max-width));
  max-height: var(--hero-max-height);
}

.hero img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, var(--hero-max-width));
  max-height: var(--hero-max-height);
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.site-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--footer-height);
  padding: 0.75rem 1rem 1rem;
}

.site-footer a {
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}

.legal ul {
  margin: 0.45rem 0 1rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.legal li + li {
  margin-top: 0.2rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

html.legal-html,
body.legal-page {
  height: auto;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
}

.legal-page .page--legal {
  height: auto;
  max-height: none;
  min-height: 100dvh;
  max-width: 40rem;
  margin: 0 auto;
  overflow: visible;
}

.legal {
  flex: 1 1 auto;
  padding: 2.5rem 1.5rem 1.5rem;
}

.legal__back {
  margin-bottom: 2rem;
}

.legal__back a {
  color: var(--navy-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.legal__back a:hover,
.legal__back a:focus-visible {
  color: var(--navy);
}

.legal h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.legal__intro {
  color: var(--navy-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin: 1.6rem 0 0.55rem;
  text-transform: uppercase;
}

.legal p {
  font-size: 0.95rem;
  line-height: 1.65;
}

.legal p a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 700px) and (orientation: portrait) {
  :root {
    --hero-max-width: min(68vw, 300px);
    --hero-max-height: min(70vh, 520px);
  }

  .hero {
    padding: 1.25rem 1rem;
  }
}

@media (min-width: 701px), (orientation: landscape) {
  .hero {
    padding: 2rem 1.5rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --footer-height: 2.5rem;
    --hero-max-width: min(52vw, 420px);
    --hero-max-height: min(72vh, 320px);
  }

  .hero {
    padding: 0.35rem 0.75rem;
  }

  .site-footer {
    min-height: 2.5rem;
    padding: 0.35rem 1rem 0.5rem;
  }
}
