:root {
  color-scheme: light;
  --text: rgba(17, 24, 39, 0.72);
  --muted: rgba(17, 24, 39, 0.52);
  --paper: rgb(245 242 236);
  --bg-focus-x: 62%;
  --bg-focus-y: 50%;
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.12);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  text-transform: lowercase;
  background-color: var(--paper);
  background-image: url("./assets/background-desktop.jpg");
  background-image: image-set(
    url("./assets/background-desktop.webp") type("image/webp"),
    url("./assets/background-desktop.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: var(--bg-focus-x) var(--bg-focus-y);
  background-repeat: no-repeat;
  overflow-x: hidden;
}

body.legal-page {
  background-image: none;
  background-color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.38);
  outline-offset: 4px;
  border-radius: 10px;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: calc(76px + env(safe-area-inset-top)) clamp(16px, 5vw, 72px)
    calc(76px + env(safe-area-inset-bottom));
}

.hero__content {
  width: min(560px, 100%);
  text-align: left;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

h1 {
  margin: 0;
  font-weight: 720;
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.08;
}

h2 {
  margin: 14px 0 0;
  font-weight: 520;
  letter-spacing: -0.02em;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: var(--muted);
}

p {
  margin: 14px 0 0;
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero__cta {
  margin-top: 22px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 24, 39, 0.22);
  padding-bottom: 2px;
  transition: opacity 160ms ease;
}

.cta::after {
  content: "→";
  opacity: 0.55;
}

.cta:hover {
  opacity: 0.92;
  border-bottom-color: rgba(17, 24, 39, 0.36);
  text-decoration: none;
}

.legal {
  padding: 56px clamp(16px, 5vw, 72px) 116px;
}

.legal__content {
  width: min(860px, 100%);
}

.legal__home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(17, 24, 39, 0.62);
  border-bottom: 1px solid rgba(17, 24, 39, 0.18);
  padding-bottom: 2px;
}

.legal__home:hover {
  text-decoration: none;
  border-bottom-color: rgba(17, 24, 39, 0.32);
}

.legal__meta {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.legal h1 {
  margin-top: 18px;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.14;
}

.legal h2 {
  margin: 28px 0 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(17, 24, 39, 0.72);
}

.legal p {
  max-width: 82ch;
}

.legal ul {
  margin: 10px 0 0;
  padding-left: 18px;
  max-width: 84ch;
  color: var(--muted);
}

.legal li {
  margin-top: 8px;
  line-height: 1.6;
}

.legal strong {
  font-weight: 650;
  color: rgba(17, 24, 39, 0.68);
}

.footer-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  font-size: 0.9rem;
  color: rgba(17, 24, 39, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  z-index: 2;
}

.footer-nav__left,
.footer-nav__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.sep {
  opacity: 0.55;
}

@media (max-width: 680px) {
  :root {
    --bg-focus-x: 50%;
    --bg-focus-y: 62%;
  }

  html.home {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
  }

  body.home {
    background-image: url("./assets/background-mobile.jpg");
    background-image: image-set(
      url("./assets/background-mobile.webp") type("image/webp"),
      url("./assets/background-mobile.jpg") type("image/jpeg")
    );
    background-size: cover;
    background-position: var(--bg-focus-x) var(--bg-focus-y);
    height: 100vh;
    height: 100svh;
    overflow: hidden;
  }

  body.home .page {
    height: 100%;
    min-height: 0;
  }

  body.home .hero {
    height: 100%;
    min-height: 0;
  }

  .hero {
    min-height: auto;
    align-items: flex-start;
    padding-top: calc(clamp(64px, 10vh, 128px) + env(safe-area-inset-top));
    padding-top: calc(clamp(64px, 10svh, 128px) + env(safe-area-inset-top));
    padding-bottom: 16px;
    padding-inline: 16px;
  }

  .footer-nav {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta {
    transition: none;
  }
}
