:root {
  color-scheme: dark;
  --bg-top: #050810;
  --bg-bottom: #0d1b2a;
  --surface: rgb(255 255 255 / 0.06);
  --surface-strong: rgb(255 255 255 / 0.1);
  --stroke: rgb(255 255 255 / 0.12);
  --stroke-soft: rgb(255 255 255 / 0.08);
  --text: #f8fbff;
  --muted: #b7c0d4;
  --muted-strong: #d8e1f2;
  --header-bg: rgb(7 17 31 / 0.72);
  --header-stroke: rgb(255 255 255 / 0.12);
  --doc-surface: #07111f;
  --doc-surface-strong: #0a1a2d;
  --activity: #3b96ff;
  --hydration: #63d5ff;
  --shadow: rgb(0 0 0 / 0.3);
  --content: min(1120px, calc(100vw - 40px));
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--activity) 24%, transparent), transparent 30rem),
    radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--hydration) 14%, transparent), transparent 25rem),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 16px 28px, rgb(255 255 255 / 0.95) 0 1px, transparent 1.7px),
    radial-gradient(circle at 130px 96px, rgb(216 238 255 / 0.72) 0 1px, transparent 1.6px),
    radial-gradient(circle at 84px 158px, rgb(99 213 255 / 0.58) 0 1.2px, transparent 2px),
    url("/assets/stars.png");
  background-size:
    190px 190px,
    270px 270px,
    410px 410px,
    cover;
  background-position:
    0 0,
    46px 22px,
    120px 76px,
    top center;
  opacity: 0.78;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.025), transparent 28rem),
    linear-gradient(135deg, color-mix(in srgb, var(--activity) 7%, transparent), transparent 44%);
  mix-blend-mode: screen;
}

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

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

.site-shell {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: clip;
}

main {
  flex: 1 0 auto;
}

.site-shell > main:not(.doc-layout) {
  display: flex;
}

.site-shell > main:not(.doc-layout) .hero-section {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  width: var(--content);
  height: 72px;
  margin: 14px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--header-stroke);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.035)),
    var(--header-bg);
  box-shadow:
    0 18px 52px rgb(0 0 0 / 0.18),
    inset 0 1px 0 rgb(255 255 255 / 0.16);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
}

.hero-section {
  width: var(--content);
  min-height: calc(100dvh - 162px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: clamp(62px, 7vw, 96px) 0 clamp(64px, 7vw, 88px);
}

.hero-content {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.hero-title-segment {
  display: inline;
}

.hero-subtitle {
  max-width: 100%;
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.24;
}

.logo-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 38px);
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
}

.logo-showcase img {
  width: clamp(132px, 15vw, 190px);
  height: clamp(132px, 15vw, 190px);
  object-fit: contain;
  filter: drop-shadow(0 22px 52px color-mix(in srgb, var(--activity) 28%, transparent));
}

.site-footer {
  flex: 0 0 auto;
  width: var(--content);
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid var(--stroke-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.site-footer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 15px;
}

.site-footer span {
  display: block;
}

.text-link {
  color: var(--hydration);
  font-weight: 700;
}

.footer-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.site-footer a {
  color: var(--muted);
  font-weight: 700;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-email {
  display: block;
}

.doc-layout {
  width: min(820px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(38px, 7vw, 76px) 0;
}

.doc-card {
  border: 1px solid var(--stroke);
  border-radius: 24px;
  background:
    linear-gradient(135deg, var(--doc-surface-strong), var(--doc-surface));
  box-shadow: 0 24px 80px var(--shadow), inset 0 1px 0 rgb(255 255 255 / 0.12);
  padding: clamp(24px, 5vw, 48px);
}

.doc-card h1 {
  max-width: 100%;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 66px);
}

.doc-meta {
  margin-bottom: 30px;
  color: var(--muted);
  line-height: 1.55;
}

.doc-card h2 {
  margin: 28px 0 10px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.08;
}

.doc-card p,
.doc-card li {
  color: var(--muted);
  line-height: 1.62;
}

.doc-card ul {
  padding-left: 1.2rem;
}

.error-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 32px;
  text-align: center;
}

@media (max-width: 760px) {
  :root {
    --content: min(100vw - 28px, 1120px);
  }

  .site-header {
    height: auto;
    min-height: 68px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    top: 10px;
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 24px;
    text-align: center;
  }

  .brand-lockup {
    justify-content: center;
    font-size: 17px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 10px 18px;
    overflow-x: visible;
    white-space: normal;
    font-size: 15px;
    padding-bottom: 0;
  }

  .hero-section {
    min-height: 0;
    padding: clamp(34px, 8vw, 52px) 0 clamp(38px, 9vw, 56px);
  }

  h1 {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    font-size: clamp(38px, 9vw, 54px);
    text-wrap: balance;
    word-break: normal;
    white-space: normal;
  }

  .logo-showcase {
    justify-content: center;
    width: auto;
    max-width: 100%;
    gap: 16px;
  }

  .logo-showcase img {
    width: min(38vw, 136px);
    height: min(38vw, 136px);
  }

  .hero-content {
    justify-items: center;
    text-align: center;
  }

  .site-footer,
  .footer-meta {
    justify-content: center;
    justify-items: center;
    text-align: center;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .site-footer > div {
    width: auto;
    max-width: 100%;
  }

  .footer-meta {
    width: min(100%, 340px);
    gap: 8px;
  }

  .footer-links {
    justify-content: center;
    gap: 10px 16px;
  }
}

@media (max-width: 640px) {
  h1 {
    width: auto;
    max-width: 100%;
    font-size: clamp(36px, 10.5vw, 46px);
    text-wrap: auto;
  }

  .hero-title-segment {
    display: block;
  }
}
