:root {
  --paper: #f3eddf;
  --paper-deep: #e6dcc8;
  --ink: #132b2f;
  --ink-soft: #4b5d5d;
  --signal: #f04b32;
  --blue: #2855c7;
  --rule: rgba(19, 43, 47, 0.22);
  --display: "Bodoni 72", Didot, "Songti SC", "STSong", serif;
  --body: "Avenir Next", Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(19, 43, 47, 0.025) 50%, transparent 50.2%),
    var(--paper);
  font-family: var(--body);
  text-rendering: optimizeLegibility;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.10'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

.masthead {
  width: min(1180px, calc(100% - 40px));
  min-height: 88px;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand img { display: block; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-family: var(--display); font-size: 22px; letter-spacing: 0.06em; }
.brand-copy small { margin-top: 5px; font-size: 9px; font-weight: 800; letter-spacing: 0.25em; }

.edition {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.edition b { color: var(--signal); }
.edition-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }

main, .site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  min-height: 620px;
  padding: 88px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
}

.hero-copy { position: relative; z-index: 2; }
.eyebrow, .section-index {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.eyebrow span {
  display: inline-block;
  margin-right: 12px;
  padding: 6px 9px;
  color: var(--paper);
  background: var(--ink);
  transform: rotate(-2deg);
}

.hero h1 {
  max-width: 710px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(64px, 7.4vw, 116px);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.055em;
}
.hero h1 em {
  display: block;
  color: var(--signal);
  font-weight: inherit;
  white-space: nowrap;
}
.hero-intro {
  max-width: 590px;
  margin: 32px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.85;
}
.hero-cta {
  width: fit-content;
  margin-top: 34px;
  padding: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 38px;
  border-bottom: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: gap 0.25s ease, color 0.25s ease;
}
.hero-cta:hover { gap: 48px; color: var(--signal); }

.hero-deck {
  position: relative;
  min-height: 460px;
  perspective: 1000px;
}
.show-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(310px, 70vw);
  aspect-ratio: 0.68;
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 10px 12px 0 rgba(19, 43, 47, 0.16);
  transform-origin: 50% 100%;
}
.show-card-back {
  color: var(--paper);
  background: var(--blue);
  transform: translate(-72%, -47%) rotate(-15deg);
}
.show-card-mid {
  color: var(--ink);
  background: #f3b526;
  transform: translate(-36%, -51%) rotate(10deg);
}
.show-card-back span, .show-card-mid span {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.show-card-back i, .show-card-mid i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 156px;
  font-style: normal;
}
.show-card-front {
  padding: 24px;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 43%, rgba(243, 237, 223, 0.15) 0 2px, transparent 3px),
    var(--signal);
  background-size: 22px 22px;
  transform: translate(-52%, -52%) rotate(-2deg);
  animation: card-arrive 0.8s cubic-bezier(.16, 1, .3, 1) both;
}
.show-card-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 900; letter-spacing: 0.16em; }
.show-card-symbol {
  width: 156px;
  height: 156px;
  margin: 76px auto 48px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 112px;
  line-height: 1;
}
.show-card-front p { margin: 0; font-size: 16px; font-weight: 900; line-height: 1.3; letter-spacing: 0.08em; }

.ad-ticket {
  min-height: 72px;
  margin: 20px 0;
  border: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-ticket-label { writing-mode: vertical-rl; margin-right: 14px; color: var(--ink-soft); font-size: 8px; letter-spacing: 0.14em; }

.collection { padding: 96px 0 32px; }
.collection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 46px;
}
.section-index { margin-bottom: 14px; color: var(--signal); }
.collection-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 5.4vw, 78px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.collection-note { margin: 0 0 8px; color: var(--ink-soft); font-family: var(--display); font-size: 18px; font-style: italic; }

.deck-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 30px;
  border-block: 1px solid var(--ink);
}
.deck-tab {
  min-height: 62px;
  padding: 0 20px;
  border: 0;
  border-right: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 800 13px/1 var(--body);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.deck-tab:last-child { border-right: 0; }
.deck-tab b { font-size: 10px; font-weight: 800; opacity: 0.5; }
.deck-tab:hover, .deck-tab.is-active { color: var(--paper); background: var(--ink); }
.deck-tab:focus-visible { outline: 3px solid var(--signal); outline-offset: -4px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-grid[hidden] { display: none; }

.project-card {
  --accent: var(--signal);
  --delay: 0ms;
  min-height: 330px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: rgba(250, 247, 238, 0.72);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  animation: card-reveal 0.55s cubic-bezier(.16, 1, .3, 1) var(--delay) both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.project-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -100px;
  bottom: -100px;
  border: 30px solid var(--accent);
  border-radius: 50%;
  opacity: 0.18;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.project-card:hover {
  z-index: 2;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 9px 10px 0 var(--accent);
  transform: translate(-4px, -5px) rotate(-0.4deg);
}
.project-card:hover::after { opacity: 0.8; transform: scale(1.35); }
.project-card:focus-visible { outline: 4px solid var(--signal); outline-offset: 3px; }
.card-top, .card-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.card-number, .card-kind { font-size: 9px; font-weight: 900; letter-spacing: 0.16em; }
.card-kind { color: var(--accent); }
.card-mark { width: 9px; height: 9px; border: 1px solid var(--ink); border-radius: 50%; background: var(--accent); }
.project-card:hover .card-mark { border-color: var(--paper); }
.project-card h3 {
  position: relative;
  z-index: 1;
  margin: 46px 0 14px;
  font-family: var(--display);
  font-size: clamp(27px, 2.5vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.card-description { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.project-card:hover .card-description { color: rgba(243, 237, 223, 0.72); }
.card-footer { margin-top: auto; padding-top: 28px; align-items: end; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tag { padding: 5px 8px; border: 1px solid currentColor; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; }
.card-arrow { font-family: var(--display); font-size: 28px; line-height: 1; transition: transform 0.25s ease; }
.project-card:hover .card-arrow { transform: translate(4px, -4px); }

.empty-state, .error-state {
  grid-column: 1 / -1;
  min-height: 220px;
  border: 1px dashed var(--rule);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}
.error-state { color: #9e281b; }

.native-note {
  min-height: 96px;
  margin: 56px 0 0;
  padding: 16px;
  border: 1px solid var(--ink);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}
.native-note > span { font-size: 8px; font-weight: 900; letter-spacing: 0.18em; writing-mode: vertical-rl; }

.site-footer {
  margin-top: 100px;
  min-height: 260px;
  padding: 56px 0 48px;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: start;
  gap: 32px;
}
.footer-mark { font-family: var(--display); font-size: 36px; font-weight: 700; }
.footer-mark span { color: var(--signal); font-size: 18px; }
.site-footer > p { margin: 0; }
.site-footer > p:not(.footer-meta) { max-width: 420px; font-family: var(--display); font-size: 27px; line-height: 1.25; }
.footer-meta { justify-self: end; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: 0.12em; }

@keyframes card-arrive {
  from { opacity: 0; transform: translate(-48%, -45%) rotate(8deg) scale(0.88); }
  to { opacity: 1; transform: translate(-52%, -52%) rotate(-2deg) scale(1); }
}
@keyframes card-reveal {
  from { opacity: 0; transform: translateY(24px) rotate(0.8deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 70px; }
  .hero-copy { max-width: 760px; }
  .hero-deck { min-height: 500px; }
  .show-card { width: 300px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { grid-template-columns: 1fr 2fr; }
  .footer-meta { display: none; }
}

@media (max-width: 620px) {
  .masthead, main, .site-footer { width: min(100% - 28px, 1180px); }
  .masthead { min-height: 72px; }
  .brand img { width: 36px; height: 36px; }
  .brand-copy strong { font-size: 19px; }
  .edition span:first-child, .edition-dot { display: none; }
  .edition { max-width: 98px; text-align: right; font-size: 8px; line-height: 1.5; }
  .hero { min-height: auto; padding: 62px 0 46px; gap: 20px; }
  .hero h1 { font-size: clamp(53px, 16vw, 78px); }
  .hero h1 em { white-space: normal; }
  .hero-intro { margin-top: 24px; font-size: 15px; line-height: 1.8; }
  .hero-deck { min-height: 410px; transform: scale(0.86); margin-inline: -24px; }
  .ad-ticket { margin-top: 8px; }
  .collection { padding-top: 72px; }
  .collection-heading { align-items: start; margin-bottom: 34px; }
  .collection-heading h2 { font-size: 46px; }
  .collection-note { display: none; }
  .deck-tab { min-height: 56px; padding: 0 12px; }
  .project-grid { grid-template-columns: 1fr; gap: 14px; }
  .project-card { min-height: 292px; padding: 22px; }
  .project-card h3 { margin-top: 38px; font-size: 34px; }
  .site-footer { min-height: 230px; margin-top: 72px; grid-template-columns: 1fr; }
  .site-footer > p:not(.footer-meta) { font-size: 24px; }
}

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