:root {
  --ground: #080706;
  --ivory: #eadfca;
  --silt: #857a6b;
  --clay: #c47d3b;
}

@font-face {
  font-family: "Cinzel";
  src: url("/fonts/cinzel-subset.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-subset.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ground);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.stage {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  row-gap: clamp(8px, 2vmin, 28px);
  padding: clamp(14px, 3.2vmin, 40px);
  overflow: hidden;
}

.mark {
  display: flex;
  justify-content: center;
  max-width: 100%;
}

.wordmark {
  margin: 0;
  padding-left: 0.3em;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.25rem, min(5.6vw, 6.4vh), 6rem);
  letter-spacing: 0.3em;
  line-height: 1;
  white-space: nowrap;
  color: var(--ivory);
  text-decoration: none;
}

.wordmark .tld {
  color: var(--silt);
}

a.wordmark:focus-visible {
  outline: 1px solid var(--clay);
  outline-offset: 8px;
}

.tablet {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.tablet-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.caption {
  display: grid;
  row-gap: clamp(6px, 1.4vmin, 16px);
  justify-items: center;
  text-align: center;
  max-width: 100%;
}

.line {
  margin: 0;
  padding-left: 0.04em;
  font-size: clamp(1rem, min(4vw, 2.8vh), 1.9rem);
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--ivory);
  text-wrap: balance;
}

.year {
  margin: 0;
  padding-left: 0.4em;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.65rem, 1.8vh, 0.95rem);
  letter-spacing: 0.4em;
  line-height: 1;
  color: var(--silt);
}

.tablet-svg .edge {
  fill: none;
  stroke: var(--ivory);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.tablet-svg .field,
.tablet-svg .rule,
.tablet-svg .mid {
  fill: none;
  stroke: var(--silt);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.tablet-svg .reg,
.tablet-svg .cut,
.tablet-svg .scan {
  stroke: var(--clay);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.tablet-svg .sign {
  fill: var(--ivory);
}

.tablet-svg .translit {
  fill: var(--silt);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 34px;
  letter-spacing: 2px;
}

.tablet-svg .numeral {
  fill: var(--ivory);
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: 88px;
}

.tablet-svg .scan {
  animation: sweep 18s ease-in-out infinite alternate;
}

.tablet-svg .scan-2 {
  animation-delay: -9s;
}

@keyframes sweep {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(544px);
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    column-gap: clamp(12px, 3vw, 40px);
    row-gap: clamp(10px, 3vh, 20px);
  }

  .mark {
    grid-area: 1 / 1;
    align-self: end;
  }

  .caption {
    grid-area: 2 / 1;
    align-self: start;
  }

  .tablet {
    grid-area: 1 / 2 / 3 / 3;
  }

  .wordmark {
    font-size: clamp(1.1rem, min(3.4vw, 9vh), 3rem);
  }

  .line {
    font-size: clamp(0.9rem, min(2.2vw, 5vh), 1.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tablet-svg .scan {
    animation: none;
    display: none;
  }
}
