:root {
  --bg: #0f1211;
  --ink: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.66);
  --soft: rgba(244, 241, 234, 0.12);
  --line: rgba(244, 241, 234, 0.22);
  --line-strong: rgba(244, 241, 234, 0.5);
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Inter", "Avenir Next", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(10, 12, 12, 0.82), rgba(10, 12, 12, 0.5) 46%, rgba(10, 12, 12, 0.18)),
    linear-gradient(0deg, rgba(10, 12, 12, 0.68), rgba(10, 12, 12, 0.1) 42%);
  content: "";
}

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

.hero-image {
  object-fit: cover;
  object-position: center;
  filter: saturate(0.72) contrast(0.95) brightness(0.82);
  transform: scale(1.03);
  animation: image-settle 1400ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.08;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: soft-light;
}

.spotlight {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--cursor-x, 68%) var(--cursor-y, 42%),
    rgba(244, 241, 234, 0.14),
    transparent 28rem
  );
  opacity: 0.62;
}

.hero-content {
  position: relative;
  z-index: 5;
  align-self: center;
  width: min(760px, calc(100% - 48px));
  margin-left: clamp(24px, 9vw, 120px);
  padding-bottom: 5vh;
}

.type-title {
  min-height: 1.18em;
  margin: 0;
  font-size: clamp(44px, 8.4vw, 112px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 24px 70px var(--shadow);
}

.type-tail {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.86em;
  margin-left: 0.08em;
  background: currentColor;
  transform: translateY(0.08em);
  animation: blink 980ms steps(2, start) infinite;
}

.type-avatar {
  display: inline-flex;
  width: 1.08em;
  height: 1.08em;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-left: 0.015em;
  opacity: 0;
  transform: translateY(0.015em) scale(0.9);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.type-avatar img {
  display: block;
  width: 100%;
  height: 100%;
}

.type-title.is-complete .cursor {
  width: 0;
  margin-left: 0;
  opacity: 0;
  animation: none;
}

.type-title.is-complete .type-avatar {
  opacity: 1;
  transform: translateY(0.015em) scale(1);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 5vh, 44px);
}

.action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 148px;
  min-height: 48px;
  border: 1px solid var(--line);
  padding: 0 16px 0 18px;
  background: rgba(244, 241, 234, 0.055);
  color: rgba(244, 241, 234, 0.9);
  font-size: 14px;
  font-weight: 450;
  line-height: 1;
  backdrop-filter: blur(18px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.action-link::after {
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  opacity: 0.72;
  transform: rotate(45deg);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.action-link:hover,
.action-link:focus-visible {
  border-color: var(--line-strong);
  background: rgba(244, 241, 234, 0.1);
  color: var(--ink);
  transform: translateY(-1px);
}

.action-link:hover::after,
.action-link:focus-visible::after {
  opacity: 1;
  transform: translateX(2px) rotate(45deg);
}

.action-link:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid rgba(244, 241, 234, 0.72);
  outline-offset: 4px;
}

.site-footer {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  bottom: clamp(18px, 4vh, 36px);
  z-index: 6;
  color: rgba(244, 241, 234, 0.58);
  font-size: 14px;
  line-height: 1;
}

.site-footer a {
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: rgba(244, 241, 234, 0.9);
}

@keyframes image-settle {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1.03);
  }
}

@keyframes blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  body {
    overflow: hidden;
  }

  .hero::before {
    background:
      linear-gradient(0deg, rgba(10, 12, 12, 0.82), rgba(10, 12, 12, 0.34) 58%, rgba(10, 12, 12, 0.7)),
      linear-gradient(90deg, rgba(10, 12, 12, 0.52), rgba(10, 12, 12, 0.14));
  }

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

  .hero-content {
    align-self: end;
    width: calc(100% - 40px);
    margin: 0 20px clamp(112px, 17vh, 144px);
    padding-bottom: 0;
  }

  .type-title {
    min-height: 2.3em;
    font-size: 46px;
  }

  .type-avatar {
    width: 0.96em;
    height: 0.96em;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 28px;
  }

  .action-link {
    width: 100%;
    min-height: 46px;
  }

  .site-footer {
    right: 20px;
    bottom: 18px;
    left: 20px;
    text-align: right;
  }
}

@media (max-width: 420px) {
  .hero-content {
    width: calc(100% - 32px);
    margin-right: 16px;
    margin-left: 16px;
  }

  .type-title {
    font-size: 40px;
  }

  .type-avatar {
    width: 0.92em;
    height: 0.92em;
  }
}

@media (max-width: 360px) {
  .type-title {
    font-size: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
