:root {
  --paper: #f5f2eb;
  --tint: #ece6da;
  --card: #fffdf8;
  --ink: #17150f;
  --muted: #6a6358;
  --line: #ddd5c6;
  --accent: #8a5a2e;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

address {
  font-style: normal;
}

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 242, 235, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.brand em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

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

.nav .nav-cta {
  color: var(--paper);
  background: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
}

.nav .nav-cta:hover {
  color: var(--paper);
  background: var(--accent);
}

/* Hero */

.hero {
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 104px 0 64px;
}

.eyebrow,
.index,
.cert-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 7.5vw, 88px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.lede {
  margin: 28px 0 0;
  max-width: 32rem;
  font-size: 18px;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--accent);
}

.btn-ghost {
  border: 1px solid var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Illustrations */

.scene {
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 72px;
}

.scene img,
.vignette {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
}

.scene figcaption {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head .vignette {
  margin-top: 36px;
  max-width: 340px;
}

/* Certificate card */

.cert {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 36px 32px 28px;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -24px rgba(23, 21, 15, 0.18);
}

.cert::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.cert-number {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.1;
}

.cert-rows {
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
}

.cert-rows div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.cert-rows dt {
  color: var(--muted);
}

.cert-rows dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.cert-foot {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--muted);
}

/* Sections */

.section {
  padding: 96px 0;
}

.section-tint {
  background: var(--tint);
  border-block: 1px solid var(--line);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}

h2 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-head h2 + p {
  margin: 14px 0 0;
  max-width: 22rem;
  color: var(--muted);
}

.table {
  margin: 0;
  border-top: 1px solid var(--ink);
}

.table div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.table dt {
  color: var(--muted);
}

.table dd {
  margin: 0;
  font-weight: 500;
}

.address {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.3;
}

.address-zh {
  margin: 14px 0 0;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.faq {
  margin: 0;
  border-top: 1px solid var(--ink);
}

.faq div {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.faq dt {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
}

.faq dd {
  margin: 8px 0 0;
  max-width: 40rem;
  color: var(--muted);
}

.faq a {
  color: var(--ink);
  text-underline-offset: 4px;
}

.faq a:hover {
  color: var(--accent);
}

.link {
  display: inline-block;
  margin-top: 24px;
  font-weight: 500;
  text-underline-offset: 5px;
}

.link:hover {
  color: var(--accent);
}

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.contacts li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contacts span {
  color: var(--muted);
}

.contacts a {
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
}

.contacts a:hover {
  color: var(--accent);
}

/* Footer */

.footer {
  background: var(--ink);
  color: rgba(245, 242, 235, 0.7);
  padding: 48px 0;
  font-size: 14px;
}

.footer p {
  margin: 4px 0 0;
}

.footer-name {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--paper);
}

/* 404 */

.missing {
  min-height: 100vh;
  display: grid;
  align-content: center;
  width: min(640px, calc(100% - 48px));
  margin: 0 auto;
}

.missing h1 {
  font-size: clamp(40px, 6vw, 60px);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-grid {
    padding: 64px 0 48px;
  }

  .scene {
    padding-bottom: 48px;
  }

  .section {
    padding: 64px 0;
  }

  .nav a:not(.nav-cta) {
    display: none;
  }

  .table div,
  .contacts li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contacts a {
    font-size: 21px;
  }
}

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