:root {
  --void: #090807;
  --chamber: #100e0b;
  --ink: #f4ecd8;
  --muted: #b3a88d;
  --faint: #7a7160;
  --line: rgba(232, 214, 176, 0.16);
  --gold: #d4b37a;
  --gold-deep: #8d7040;
  --display: "Markazi Text", "Noto Naskh Arabic", serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Vazirmatn", "IRANSans", sans-serif;
}

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

html,
body {
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  color: var(--ink);
  background:
    radial-gradient(1200px 720px at 50% 42%, #1a1610 0%, var(--void) 72%);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(212, 179, 122, 0.3);
  color: #fff8ea;
}

#field,
.atmosphere,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#field {
  z-index: 0;
}

.atmosphere {
  z-index: 1;
  background:
    radial-gradient(ellipse 55% 48% at 50% 46%, transparent 0%, rgba(9, 8, 7, 0.18) 46%, rgba(9, 8, 7, 0.72) 100%),
    linear-gradient(180deg, rgba(9, 8, 7, 0.35), transparent 18%, transparent 82%, rgba(9, 8, 7, 0.5));
}

.grain {
  z-index: 4;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.chamber {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  overflow: hidden;
  padding:
    max(1.35rem, env(safe-area-inset-top))
    clamp(1.35rem, 4.2vw, 3.25rem)
    max(1.25rem, env(safe-area-inset-bottom));
}

.passe {
  position: absolute;
  inset: 0.85rem 0.9rem;
  border: 1px solid rgba(232, 214, 176, 0.28);
  pointer-events: none;
}

.passe::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 179, 122, 0.4);
}

.tick {
  position: absolute;
  width: 22px;
  height: 22px;
}

.tick::before,
.tick::after {
  content: "";
  position: absolute;
  background: var(--gold);
}

.tick.tl { top: -1px; right: -1px; }
.tick.tr { top: -1px; left: -1px; }
.tick.bl { bottom: -1px; right: -1px; }
.tick.br { bottom: -1px; left: -1px; }

.tick.tl::before,
.tick.tr::before,
.tick.bl::before,
.tick.br::before {
  width: 22px;
  height: 1px;
}

.tick.tl::after,
.tick.tr::after,
.tick.bl::after,
.tick.br::after {
  width: 1px;
  height: 22px;
}

.tick.tl::before,
.tick.tl::after { top: 0; right: 0; }
.tick.tr::before,
.tick.tr::after { top: 0; left: 0; }
.tick.bl::before,
.tick.bl::after { bottom: 0; right: 0; }
.tick.br::before,
.tick.br::after { bottom: 0; left: 0; }

.masthead,
.colophon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.masthead {
  padding: 0.35rem 0.4rem 0.95rem;
}

.identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.crest,
.seal {
  color: var(--gold);
  flex: 0 0 auto;
}

.crest {
  width: 2.15rem;
  height: 2.15rem;
}

.wordmark {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.wordmark strong {
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.wordmark em {
  color: var(--faint);
  font-family: var(--serif);
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.regalia {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  color: var(--muted);
  text-align: start;
}

.regalia span {
  font-size: 0.72rem;
  font-weight: 300;
}

.regalia span:last-child {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
  text-align: center;
}

.halo {
  position: absolute;
  width: min(58vw, 34rem);
  height: min(58vw, 34rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 179, 122, 0.16), rgba(212, 179, 122, 0.04) 42%, transparent 70%);
  pointer-events: none;
}

.seal {
  position: relative;
  width: 3.6rem;
  height: 3.6rem;
  margin-bottom: 1.15rem;
}

.kicker {
  position: relative;
  margin: 0 0 0.85rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.statement {
  position: relative;
  max-width: 9.2em;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.6vw + 1.5vh, 5.6rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  position: relative;
  max-width: 28rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 0.25vw + 0.82rem, 1.06rem);
  font-weight: 300;
  line-height: 1.9;
}

.colophon {
  align-items: start;
  padding: 1rem 0.4rem 0.35rem;
}

.colophon::before {
  content: "";
  position: absolute;
  top: 0;
  right: 8%;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.meta:nth-child(2) {
  flex: 1 1 16rem;
  text-align: center;
}

.meta:last-child {
  text-align: start;
}

a.meta {
  transition: color 200ms ease;
}

a.meta:hover .meta-value,
a.meta:focus-visible .meta-value {
  color: var(--gold);
}

.meta-label {
  color: var(--faint);
  font-family: var(--serif);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.meta-value {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.7;
  transition: color 200ms ease;
}

.reveal {
  animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--d, 0s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .colophon {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    row-gap: 0.75rem;
  }

  .meta:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
    text-align: start;
  }

  .meta:last-child {
    text-align: end;
  }

  .kicker {
    letter-spacing: 0.26em;
  }
}

@media (max-width: 520px) {
  .wordmark em,
  .passe::after {
    display: none;
  }
}

@media (max-height: 560px) {
  .seal,
  .lede {
    display: none;
  }

  .statement {
    font-size: clamp(2.1rem, 7vh, 3.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
  }
}
