:root {
  --ink: #0f0e0b;
  --panel: #17130f;
  --panel-2: #211a13;
  --paper: #f7ecd3;
  --paper-dim: #cdbb93;
  --muted: rgba(247, 236, 211, 0.68);
  --gold: #d8a52d;
  --gold-soft: rgba(216, 165, 45, 0.16);
  --red: #aa3e2b;
  --line: rgba(247, 236, 211, 0.14);
  --line-strong: rgba(216, 165, 45, 0.35);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(216, 165, 45, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216, 165, 45, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 84% 14%, rgba(126, 44, 28, 0.28), transparent 26rem),
    radial-gradient(circle at 18% 78%, rgba(72, 82, 52, 0.2), transparent 28rem),
    var(--ink);
  background-size: 46px 46px, 46px 46px, auto, auto, auto;
  font-family: ui-serif, "Songti SC", "SimSun", Georgia, serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 76px;
  backdrop-filter: blur(18px);
}

.brand,
nav,
.hero-actions,
.passport-actions,
.contract-meta,
.address-row,
.button,
.hero-stats {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-seal {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff5df;
  background: var(--red);
  border: 1px solid rgba(247, 236, 211, 0.28);
  font-weight: 900;
}

nav {
  gap: 4px;
  height: 46px;
  border: 1px solid var(--line);
  background: rgba(15, 14, 11, 0.78);
  padding: 4px;
}

nav a {
  display: grid;
  min-width: 64px;
  height: 36px;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

nav a:hover {
  color: var(--paper);
  background: rgba(247, 236, 211, 0.08);
}

.topbar > .button {
  justify-self: end;
}

.button,
.icon-button {
  border: 1px solid var(--line);
  color: var(--paper);
  background: rgba(247, 236, 211, 0.075);
}

.button {
  min-height: 44px;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  font-weight: 900;
  white-space: nowrap;
}

.button-primary {
  border-color: var(--gold);
  color: #161009;
  background: var(--gold);
}

.button-primary:hover {
  background: #efc75e;
}

.button-dark:hover,
.button-plain:hover,
.icon-button:hover {
  border-color: rgba(216, 165, 45, 0.72);
  background: rgba(216, 165, 45, 0.16);
}

.button-icon {
  color: inherit;
  font-weight: 900;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 450px;
  gap: 48px;
  align-items: center;
  min-height: calc(100dvh - 76px);
  padding: 44px 0 72px;
}

.hero-copy {
  display: grid;
  align-content: center;
  min-height: 560px;
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0 0 22px;
  max-width: 680px;
  font-size: clamp(3.4rem, 6vw, 5.35rem);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text {
  max-width: 40rem;
  margin-bottom: 28px;
  color: rgba(247, 236, 211, 0.78);
  font-size: 18px;
  line-height: 1.78;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin-top: 22px;
}

.hero-stats div {
  min-height: 70px;
  border: 1px solid var(--line);
  background: rgba(247, 236, 211, 0.055);
  padding: 12px 14px;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  color: var(--paper);
  font-size: 20px;
  line-height: 1.2;
}

.hero-stats span {
  margin-top: 7px;
  color: var(--paper-dim);
  font-size: 12px;
  font-weight: 800;
}

.status-line {
  width: fit-content;
  max-width: 100%;
  margin-top: 18px;
  border-left: 3px solid var(--gold);
  color: rgba(247, 236, 211, 0.66);
  background: rgba(247, 236, 211, 0.045);
  padding: 10px 12px;
  font-size: 14px;
}

.passport-panel,
.contract-panel {
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(216, 165, 45, 0.13), transparent 44%),
    rgba(247, 236, 211, 0.055);
  box-shadow: var(--shadow);
}

.passport-panel {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  min-height: 560px;
  padding: 24px;
}

.panel-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
}

.panel-heading .eyebrow {
  margin-bottom: 6px;
}

.panel-subtitle {
  color: var(--paper-dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-heading h2 {
  color: var(--paper);
  font-size: clamp(2.1rem, 3.6vw, 3.25rem);
  text-align: right;
  white-space: nowrap;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 12px solid #0b0907;
  background: var(--panel-2);
}

.portrait-frame img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-frame.has-image img {
  display: block;
}

.portrait-frame.has-image .portrait-placeholder {
  display: none;
}

.portrait-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(247, 236, 211, 0.62);
  padding: 22px;
  text-align: center;
}

.identity-list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.identity-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 40px;
  border-bottom: 1px solid var(--line);
}

.identity-list dt,
.identity-list dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 8px 10px;
}

.identity-list dt {
  color: var(--paper-dim);
  border-right: 1px solid var(--line);
}

.identity-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.passport-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gallery-section,
.contract-section {
  padding: 70px 0;
  border-top: 1px solid rgba(247, 236, 211, 0.12);
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-item {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(247, 236, 211, 0.055);
  padding: 12px;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: var(--panel);
  object-fit: cover;
}

.gallery-item figcaption {
  height: 38px;
  padding-top: 10px;
  color: rgba(247, 236, 211, 0.7);
  font-weight: 900;
  text-align: center;
}

.contract-section {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.contract-panel {
  padding: 22px;
}

.contract-panel label {
  display: block;
  margin-bottom: 12px;
  color: var(--paper-dim);
  font-weight: 900;
}

.address-row {
  gap: 10px;
}

.address-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid rgba(216, 165, 45, 0.38);
  color: var(--paper);
  background: rgba(15, 14, 11, 0.84);
  padding: 0 14px;
  outline: none;
}

.icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  font-weight: 900;
}

.contract-meta {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.contract-meta span,
.contract-meta a {
  border: 1px solid rgba(216, 165, 45, 0.22);
  color: rgba(247, 236, 211, 0.78);
  background: var(--gold-soft);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
  }

  .hero-copy,
  .passport-panel {
    min-height: auto;
  }

  .contract-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 28px, 1160px);
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  nav {
    display: none;
  }

  .hero-stats,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar > .button {
    width: 44px;
    padding: 0;
  }

  .topbar > .button span:last-child {
    display: none;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 3.8rem);
  }

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

  .passport-actions,
  .panel-heading,
  .identity-list div {
    grid-template-columns: 1fr;
  }

  .panel-heading h2 {
    text-align: left;
  }

  .identity-list dt {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
  }
}
