:root {
  color-scheme: dark;
  --bg: #05080a;
  --surface: rgba(13, 22, 27, 0.84);
  --surface-strong: #0b1013;
  --fg: #f2f3ed;
  --muted: #9ca39d;
  --line: rgba(225, 235, 226, 0.14);
  --line-strong: rgba(225, 235, 226, 0.24);
  --lime: #c7ff32;
  --ink: #071006;
  --page: min(1240px, calc(100vw - 56px));
  --content: min(820px, calc(100vw - 44px));
  --font-display: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "PingFang SC", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--fg);
  background:
    radial-gradient(circle at 12% 4%, rgba(11, 57, 84, 0.48), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(7, 26, 43, 0.7), transparent 38rem),
    linear-gradient(155deg, #071423 0%, var(--bg) 34rem, #05080a 100%);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.76;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
  animation: page-enter 360ms var(--ease) both;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 100% 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 32rem);
  pointer-events: none;
}

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

a {
  color: inherit;
  word-break: break-word;
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 11px 15px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--lime);
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 88px;
  border-bottom: 1px solid transparent;
  background: rgba(5, 8, 10, 0);
  transition: background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
  view-transition-name: mivo-header;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(5, 8, 10, 0.82);
  backdrop-filter: blur(20px) saturate(1.15);
}

.nav-shell {
  width: var(--page);
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand {
  min-height: 48px;
  font-size: 21px;
  font-weight: 780;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: contain;
}

.content-shell {
  width: var(--content);
  margin: 0 auto;
  padding: clamp(78px, 10vw, 128px) 0 clamp(96px, 12vw, 150px);
}

.legal-content section:first-child {
  padding-top: 0;
}

.legal-content h1,
.legal-content h2 {
  font-family: var(--font-display);
  text-wrap: balance;
}

.legal-content h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.legal-content h2 {
  margin: 48px 0 12px;
  color: var(--fg);
  font-size: clamp(21px, 2.6vw, 26px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.legal-content p {
  margin: 10px 0;
  color: var(--muted);
}

.legal-content p a {
  color: var(--fg);
  text-decoration: none;
  text-decoration-color: rgba(199, 255, 50, 0.48);
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.legal-content p a:hover {
  color: var(--lime);
  text-decoration-color: var(--lime);
}

.meta {
  margin-bottom: 22px;
  color: #737b76;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: var(--page);
  min-height: 176px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-brand {
  font-size: 19px;
  font-weight: 760;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: contain;
}

.copyright {
  color: #646b66;
  font-size: 14px;
}

.footer-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #7d847f;
  font-size: 13px;
  text-decoration: none;
  transition: color 180ms ease;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--fg);
}

.page-transitions.page-leaving body {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 130ms ease, transform 130ms ease;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 120ms ease both fade-out;
}

::view-transition-new(root) {
  animation: 280ms var(--ease) both fade-in;
}

@keyframes fade-out {
  to { opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@media (max-width: 820px) {
  :root {
    --page: min(100% - 34px, 720px);
  }

  .site-header,
  .nav-shell {
    min-height: 74px;
  }

  .content-shell {
    padding-top: 66px;
  }

  .footer-inner {
    min-height: 174px;
    flex-wrap: wrap;
    align-content: center;
    column-gap: 22px;
    row-gap: 14px;
  }

  .footer-links {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  :root {
    --page: min(100% - 28px, 560px);
    --content: min(100% - 28px, 560px);
  }

  body {
    font-size: 15.5px;
  }

  .brand {
    font-size: 19px;
  }

  .legal-content h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  .legal-content h2 {
    margin-top: 42px;
  }

  .footer-inner {
    min-height: 208px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
