:root {
  color-scheme: dark;
  --bg: #111110;
  --surface: #1c1c1a;
  --ink: #f4f1eb;
  --ink-2: #cbc7bf;
  --ink-3: #99968f;
  --stroke: rgb(184 181 174 / 16%);
  --brand: #ff8a3d;
  --content-width: 760px;
  --page-gutter: clamp(20px, 5vw, 48px);
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.page-home::before,
.page-privacy::before,
.page-support::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: clamp(540px, 68vh, 700px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 100%);
}

.page-home::before,
.page-privacy::before {
  background-image: url("assets/privacy-background.png");
}

.page-support::before {
  background-image: url("assets/support-background.png");
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
}

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

.site-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--stroke);
}

.header-inner,
.footer-inner {
  width: min(100%, 1180px);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: clamp(22px, 4vw, 40px);
}

nav a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 560;
}

nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}

nav a:hover,
nav a.active {
  color: var(--ink);
}

nav a.active::after {
  background: var(--brand);
}

.page-shell {
  width: min(100%, var(--content-width));
  min-height: calc(100dvh - var(--header-height));
  margin: 0 auto;
  padding: clamp(112px, 17vh, 176px) var(--page-gutter) 136px;
}

.page-intro {
  max-width: 640px;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(40px, 6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.page-intro > p:not(.updated) {
  max-width: 36em;
  margin-bottom: 14px;
  color: var(--ink-2);
  font-size: clamp(16px, 2vw, 18px);
}

.updated {
  margin-bottom: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.home-links a {
  min-height: 44px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgb(28 28 26 / 72%);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.home-links a:hover {
  border-color: rgb(255 138 61 / 56%);
}

.document-sections,
.faq-list {
  margin-top: clamp(210px, 34vh, 360px);
}

.document-sections {
  display: grid;
  gap: 64px;
}

.document-sections section {
  max-width: 620px;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.document-sections p,
.contact-line p,
.faq-list details p {
  margin-bottom: 0;
  color: var(--ink-2);
}

.placeholder-email {
  color: var(--brand);
}

.placeholder-note {
  margin-left: 8px;
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

.faq-list {
  border-top: 1px solid var(--stroke);
}

.faq-list details {
  border-bottom: 1px solid var(--stroke);
}

.faq-list summary {
  min-height: 64px;
  padding: 18px 2px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
}

.faq-list summary::marker {
  color: var(--ink-3);
}

.faq-list details p {
  max-width: 600px;
  padding: 0 2px 22px 18px;
}

.contact-line {
  margin-top: 88px;
}

.site-footer {
  height: 88px;
  border-top: 1px solid var(--stroke);
  color: var(--ink-3);
  font-size: 13px;
}

.site-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-2);
  text-decoration: none;
}

a:focus-visible,
summary:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--brand);
  outline-offset: 5px;
}

@media (max-width: 640px) {
  :root {
    --header-height: 64px;
  }

  .header-inner {
    padding-right: 18px;
    padding-left: 18px;
  }

  .wordmark {
    font-size: 15px;
  }

  nav {
    gap: 20px;
  }

  nav a {
    font-size: 13px;
  }

  .page-shell {
    padding-top: 84px;
    padding-bottom: 104px;
  }

  .page-home::before,
  .page-privacy::before,
  .page-support::before {
    height: 470px;
    background-size: auto 100%;
    opacity: 0.72;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  }

  .page-home::before,
  .page-privacy::before {
    background-position: 82% center;
  }

  .page-support::before {
    background-position: 86% center;
  }

  .document-sections,
  .faq-list {
    margin-top: 170px;
  }

  .document-sections {
    gap: 52px;
  }

  .faq-list summary {
    min-height: 60px;
  }

  .site-footer {
    height: 80px;
  }
}

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