:root {
  color-scheme: dark;
  --ink: #21170e;
  --paper: #ead6aa;
  --paper-deep: #c9a66c;
  --gold: #c7a75d;
  --gold-bright: #e5c978;
  --night: #070503;
  --night-soft: #130d08;
  --text: #f3e7cb;
  --muted: #b9a98a;
  font-family: Georgia, "Times New Roman", "AppleMyungjo", "Batang", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(circle at 50% -10%, rgba(201, 165, 88, 0.18), transparent 33rem),
    repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    var(--night);
  color: var(--text);
  line-height: 1.72;
}

a {
  color: var(--gold-bright);
  text-underline-offset: 0.2em;
}

a:focus-visible,
.document-card:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}

.shell {
  width: min(100% - 2rem, 1040px);
  margin: 0 auto;
  padding: 4rem 0 2rem;
}

.parchment-frame {
  position: relative;
  border: 1px solid rgba(220, 185, 103, 0.65);
  box-shadow:
    0 0 0 5px var(--night),
    0 0 0 6px rgba(181, 143, 74, 0.4),
    0 28px 80px rgba(0, 0, 0, 0.6);
}

.parchment-frame::before,
.parchment-frame::after {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-color: var(--gold);
  pointer-events: none;
}

.parchment-frame::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.parchment-frame::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) 1.5rem;
  text-align: center;
  background:
    linear-gradient(rgba(10, 7, 4, 0.3), rgba(10, 7, 4, 0.72)),
    radial-gradient(circle, #352518 0, #140e09 60%, #090604 100%);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.hero h1,
.document h1 {
  margin: 0;
  color: var(--gold-bright);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 5.7rem);
  line-height: 1.12;
}

.subtitle {
  margin: 0.5rem 0 1.6rem;
  color: var(--paper-deep);
  font-size: clamp(1.05rem, 3vw, 1.45rem);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lede {
  max-width: 38rem;
  margin: 0 auto;
  color: #d9c9aa;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.document-card {
  min-height: 230px;
  padding: 2.3rem 1.5rem;
  border: 1px solid rgba(199, 167, 93, 0.45);
  background: linear-gradient(145deg, #1a120c, #0c0805);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.document-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-bright);
  background: linear-gradient(145deg, #25190f, #0e0906);
}

.document-card h2 {
  margin: 0.7rem 0 0;
  color: var(--paper);
  font-size: 1.45rem;
}

.document-card p {
  margin: 0.15rem 0 1.5rem;
  color: var(--muted);
}

.ornament,
.card-link {
  color: var(--gold);
}

footer {
  padding: 2rem 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

footer p {
  margin: 0.25rem 0;
}

.muted {
  color: #8f8069;
}

.document-shell {
  width: min(100% - 2rem, 850px);
  padding-top: 1.25rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  margin-bottom: 1.25rem;
}

.top-nav div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.document {
  overflow: hidden;
  padding: clamp(2rem, 7vw, 5rem);
  border-color: #9a753f;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 248, 215, 0.75), transparent 28rem),
    repeating-linear-gradient(5deg, rgba(76, 46, 21, 0.028) 0 1px, transparent 1px 6px),
    var(--paper);
  color: var(--ink);
}

.document section {
  scroll-margin-top: 1rem;
}

.document .eyebrow {
  color: #7b5b2a;
}

.document h1 {
  color: #3e2a15;
  font-size: clamp(2.15rem, 7vw, 3.5rem);
  line-height: 1.2;
}

.effective {
  margin: 0.4rem 0 2.4rem;
  color: #745a36;
}

.document h2 {
  margin: 2.3rem 0 0.55rem;
  color: #442f18;
  font-size: 1.4rem;
  line-height: 1.35;
}

.document h3 {
  margin: 1.8rem 0 0.35rem;
  color: #51391d;
  font-size: 1.08rem;
}

.document p,
.document li {
  font-size: 1rem;
}

.document a {
  color: #66430e;
  font-weight: 700;
}

.document ul {
  padding-left: 1.3rem;
}

.document hr {
  margin: 4rem 0;
  border: 0;
  border-top: 1px solid rgba(91, 61, 28, 0.4);
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.65rem 1.1rem;
  border: 1px solid #72511e;
  background: #3c2a16;
  color: #f3dfb0 !important;
  text-decoration: none;
}

.button-link:hover {
  background: #50391e;
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 1.25rem, 1040px);
    padding-top: 1.4rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav div {
    justify-content: flex-start;
  }

  .document {
    padding: 2.3rem 1.25rem;
  }

  .document p,
  .document li {
    font-size: 0.98rem;
  }
}

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

  .document-card {
    transition: none;
  }
}
