:root {
  color-scheme: light;
  --ink: #111111;
  --paper: #f4f4f1;
  --muted: #696966;
  --line: rgba(17, 17, 17, 0.2);
  --vermilion: #9f1f18;
  --white: #ffffff;
  --font-sans: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

a {
  color: inherit;
}

.hero {
  position: relative;
  min-height: min(84vh, 900px);
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  inset: -24px 0;
  z-index: -2;
  height: calc(100% + 48px);
  object-fit: cover;
  object-position: center;
  scale: 1.035;
  transform: translate3d(0, var(--hero-shift, 0), 0);
  will-change: transform, scale;
  animation: hero-media-settle 2200ms var(--ease-out) forwards;
}

.hero-scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.9) 0%, rgba(5, 5, 5, 0.64) 38%, rgba(5, 5, 5, 0.12) 72%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.54) 0%, transparent 38%);
  animation: hero-scrim-in 1200ms ease-out both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  animation: hero-item-in 720ms 100ms var(--ease-out) both;
}

.brand,
.quiet-link {
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  letter-spacing: 0.14em;
}

.brand-mark {
  width: 22px;
  height: 3px;
  background: var(--vermilion);
}

.quiet-link {
  padding: 8px 0;
  border-bottom: 1px solid currentColor;
}

.hero-content {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding-top: clamp(88px, 14vh, 160px);
}

.eyebrow,
.section-number,
.hero-index {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero h1 {
  max-width: 560px;
  margin: 22px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(64px, 7vw, 92px);
  font-weight: 500;
  line-height: 1.08;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
}

.lede {
  max-width: 520px;
  margin: 0;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.65;
}

.primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero-content > * {
  animation: hero-item-in 860ms var(--ease-out) both;
}

.hero-content > :nth-child(1) {
  animation-delay: 180ms;
}

.hero-content > :nth-child(2) {
  animation-delay: 260ms;
}

.hero-content > :nth-child(3) {
  animation-delay: 340ms;
}

.hero-content > :nth-child(4) {
  animation-delay: 430ms;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-primary {
  min-width: 240px;
  color: var(--ink);
  background: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: var(--white);
  background: var(--vermilion);
}

.button-quiet {
  min-width: 184px;
  color: var(--white);
  background: rgba(5, 5, 5, 0.24);
  border-color: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(10px);
}

.button-quiet:hover,
.button-quiet:focus-visible {
  color: var(--ink);
  background: var(--white);
}

.hero-index {
  position: absolute;
  right: 32px;
  bottom: 28px;
  color: var(--white);
  writing-mode: vertical-rl;
}

.access-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(48px, 10vw, 160px);
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
  padding: 96px 0 104px;
}

.access-intro h2 {
  margin: 14px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
}

.access-intro p:last-child {
  max-width: 380px;
  color: var(--muted);
  line-height: 1.8;
}

.access-form {
  align-self: end;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}

.access-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.field-row input {
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(17, 17, 17, 0.5);
  border-radius: 4px;
  font: inherit;
}

.field-row input:focus {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}

.button-submit {
  min-width: 164px;
  color: var(--white);
  background: var(--vermilion);
}

.button-submit:hover,
.button-submit:focus-visible {
  background: #7f1712;
}

.button-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-message[data-state="error"] {
  color: #9f1f18;
}

.form-message[data-state="success"] {
  color: #22673d;
}

.logout-link {
  margin-top: 14px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.logout-link:hover,
.logout-link:focus-visible {
  color: var(--ink);
  border-bottom-color: currentColor;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  color: #d8d8d2;
  background: var(--ink);
  font-size: 12px;
}

footer a {
  text-decoration: none;
}

body.motion-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
}

body.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 760ms var(--ease-out),
    transform 760ms var(--ease-out);
}

@keyframes hero-media-settle {
  to {
    scale: 1;
  }
}

@keyframes hero-scrim-in {
  from {
    opacity: 0.35;
  }
}

@keyframes hero-item-in {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 82vh;
  }

  .hero-media {
    object-position: 56% center;
  }

  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.72) 58%, rgba(5, 5, 5, 0.2) 100%),
      linear-gradient(0deg, rgba(5, 5, 5, 0.58) 0%, transparent 44%);
  }

  .topbar,
  .hero-content,
  .access-section {
    width: min(100% - 36px, 720px);
  }

  .topbar {
    padding: 20px 0;
  }

  .hero-content {
    padding-top: 76px;
  }

  .hero h1 {
    max-width: 320px;
    font-size: clamp(52px, 15vw, 64px);
  }

  .primary-actions,
  .button {
    width: 100%;
  }

  .hero-index {
    display: none;
  }

  .access-section {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 72px 0 80px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    padding: 22px 18px;
  }
}

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

  .button,
  .topbar,
  .hero-content > *,
  .hero-media,
  .hero-scrim,
  body.motion-ready [data-reveal] {
    opacity: 1;
    scale: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}
