@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --fog: #e9e9e9;
  --line: #000000;
  --big: clamp(2.7rem, 11vw, 9rem);
  --head: "Space Grotesk", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --text: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  overflow-x: clip;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

/* header */
.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem clamp(16px, 4vw, 48px);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.4rem;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.mark {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.mark-dot {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--ink);
  border-radius: 50%;
}

.nav p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav-b p {
  justify-content: flex-end;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.5rem;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.burger {
  position: absolute;
  top: 50%;
  right: clamp(16px, 4vw, 48px);
  transform: translateY(-50%);
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 70;
}

.burger-bar {
  display: block;
  width: 26px;
  height: 2px;
  margin: 6px auto;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* hero */
.hero-wrap {
  padding-top: clamp(8px, 2vw, 22px);
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 70vh;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.82) 78%);
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12);
  transform: scale(1.14);
  will-change: transform;
}

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(20px, 4vw, 56px);
  text-align: right;
}

.hero-h1 {
  margin: 0;
  font-family: var(--head);
  font-weight: 900;
  font-size: var(--big);
  line-height: 0.86;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

/* body grid */
.body-grid {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(36px, 7vw, 96px);
}

.side {
  align-self: start;
  background: var(--ink);
  color: var(--paper);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 30px);
}

.kick {
  display: block;
  font-family: var(--head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: rgba(255, 255, 255, 0.6);
}

.side-h {
  margin: 0.45rem 0 1rem;
  font-family: var(--head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 0;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  transition: padding-left 0.24s ease;
}

.side-list li:last-child a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.side-list a:hover {
  padding-left: 6px;
  background: rgba(255, 255, 255, 0.08);
}

/* document */
.flow {
  min-width: 0;
}

.doc {
  max-width: 70ch;
  overflow-wrap: anywhere;
}

.doc > div {
  border-top: 2px solid var(--ink);
  padding-block: clamp(30px, 6vw, 62px);
  scroll-margin-top: 96px;
}

.doc > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.doc h2 {
  margin: 0.5rem 0 1.1rem;
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(1.9rem, 5.6vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.doc h3 {
  margin: 1.9rem 0 0.7rem;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.doc small {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: #575757;
}

.doc p {
  margin: 0 0 1.15em;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.doc ul,
.doc ol {
  margin: 0 0 1.2em;
  padding-left: 1.25em;
  line-height: 1.8;
}

.doc li {
  margin-bottom: 0.4em;
}

.doc a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.doc a:hover {
  background: var(--ink);
  color: var(--paper);
}

.doc img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1.6rem 0;
  border-radius: 18px;
}

.doc blockquote {
  margin: 1.6rem 0;
  padding: 1.15rem 1.3rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 18px;
  font-size: 1.06rem;
}

.doc blockquote p:last-child {
  margin-bottom: 0;
}

.doc table {
  width: 100%;
  margin: 1.4rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  border: 2px solid var(--ink);
  padding: 0.6rem 0.7rem;
  text-align: left;
}

.doc th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--head);
}

.doc pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--fog);
  border-radius: 18px;
  font-size: 0.9rem;
}

.doc hr {
  height: 2px;
  border: 0;
  background: var(--ink);
  margin: 2.4rem 0;
}

.rv {
  opacity: 0;
  transform: translateY(20px);
}

.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* footer */
.foot {
  margin-top: clamp(40px, 8vw, 110px);
  background: var(--ink);
  color: var(--paper);
  padding-top: clamp(36px, 7vw, 78px);
}

.cta {
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0 clamp(16px, 4vw, 48px) clamp(26px, 5vw, 52px);
  max-width: 1240px;
  margin-inline: auto;
}

.cta-link {
  display: block;
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(2.5rem, 12vw, 9rem);
  line-height: 0.84;
  letter-spacing: -0.06em;
  text-decoration: none;
  color: var(--paper);
  transition: transform 0.3s ease;
  transform-origin: left center;
}

.cta-link:hover {
  transform: translateX(6px);
}

.foot-row {
  display: grid;
  gap: 1rem;
  max-width: 1240px;
  margin-inline: auto;
  padding: 1.3rem clamp(16px, 4vw, 48px) 1.8rem;
}

.foot-brand {
  display: flex;
  align-items: center;
}

.foot-brand .mark {
  filter: invert(1);
}

.foot-brand .mark-dot {
  background: var(--paper);
}

.foot-nav p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.45rem;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.92rem;
}

.foot-nav a:hover {
  background: var(--paper);
  color: var(--ink);
}

.foot-copy p {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
}

.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 760px) {
  .foot-row {
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1.4rem;
  }

  .foot-copy {
    justify-self: end;
    text-align: right;
  }
}

/* wide layout */
@media (min-width: 900px) {
  .body-grid {
    grid-template-columns: minmax(178px, 236px) minmax(0, 1fr);
    align-items: start;
  }

  .side {
    position: sticky;
    top: 92px;
  }
}

/* compact / overlay menu */
@media (max-width: 860px) {
  .burger {
    display: block;
  }

  .hdr {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-block: 0.35rem;
  }

  .brand {
    order: -1;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    background: var(--ink);
    padding-inline: 1.1rem;
    transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-a {
    top: 0;
    bottom: 50%;
    align-items: flex-end;
    padding-top: 86px;
    transform: translateY(-101%);
  }

  .nav-b {
    top: 50%;
    bottom: 0;
    align-items: flex-start;
    transform: translateY(101%);
  }

  .nav p {
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding-block: 0.6rem;
  }

  .nav a {
    color: var(--paper);
    font-family: var(--head);
    font-size: clamp(1.35rem, 6vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    padding: 0.35rem 0.7rem;
    min-height: 46px;
  }

  .nav a::after {
    background: var(--paper);
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.35rem;
  }

  body.menu-open .nav-a,
  body.menu-open .nav-b {
    transform: translateY(0);
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .burger-bar:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  body.menu-open .burger-bar:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .hero {
    min-height: 62vh;
  }
}

@media (max-width: 420px) {
  .doc p,
  .doc li {
    font-size: 1rem;
  }

  .side-list a {
    font-size: 0.92rem;
  }
}

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

  .hero-img {
    transform: none;
  }

  .rv {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001s !important;
    animation-duration: 0.001s !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
