/* Fraunces and Inter, both SIL Open Font License. Sky paintings are separate layers. */

@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-600.woff2") format("woff2");
}

@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-600-italic.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}

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

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-600.woff2") format("woff2");
}

:root {
  --ivory: #f8f1e3;
  --cream: #fdfaf3;
  --navy: #2e4053;
  --brown: #6f4a2f;
  --camel: #c19a6b;
  --gold: #c9a227;
  --ink: #2e4053;
  --ink-soft: #3c4e60;
  --panel: rgba(253, 250, 243, 0.88);
  --panel-edge: rgba(193, 154, 107, 0.55);
  --chip: rgba(248, 241, 227, 0.9);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3ead8;
    --ink-soft: #efe6d6;
    --panel: rgba(34, 48, 64, 0.88);
    --panel-edge: rgba(193, 154, 107, 0.6);
    --chip: rgba(34, 48, 64, 0.9);
  }
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-synthesis: none;
  font-size: 1rem;
  line-height: 1.6;
}

h1,
h2,
h3,
.wordmark,
.closer {
  font-family: Fraunces, Georgia, serif;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 50;
  transform: translateY(-160%);
  padding: 0.55rem 0.8rem;
  background: var(--navy);
  color: var(--ivory);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus,
.skip:focus-visible {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: var(--camel);
  color: var(--navy);
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--ivory);
}

.layer {
  position: absolute;
  left: -6%;
  width: 112%;
}

.layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.l-bg {
  top: -10%;
  height: 120%;
  z-index: 1;
}

.l-far {
  top: 6%;
  height: 62%;
  z-index: 2;
}

.l-far img,
.l-mid img {
  object-fit: contain;
}

.l-mid {
  top: 34%;
  height: 58%;
  z-index: 3;
}

.l-fore {
  top: 30%;
  height: 84%;
  z-index: 4;
}

.l-fore img {
  object-fit: cover;
  object-position: center bottom;
}

main,
footer {
  position: relative;
  z-index: 10;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 20px 108px;
}

.domain,
.by,
.kicker,
.scroll-cue {
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown);
}

.domain,
.by,
.scroll-cue {
  text-shadow: 0 1px 0 rgba(253, 250, 243, 0.95), 0 2px 8px rgba(253, 250, 243, 0.8);
}

.domain {
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.22em;
}

.wordmark {
  margin: 0;
  color: var(--navy);
  font-weight: 600;
  font-size: clamp(2.7rem, 10vw, 6.2rem);
  line-height: 0.98;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(253, 250, 243, 0.65), 0 10px 34px rgba(253, 250, 243, 0.55);
}

.wordmark em {
  font-style: italic;
  font-weight: 600;
  color: var(--brown);
}

.rule {
  width: 74px;
  height: 2px;
  margin: 26px auto 20px;
  background: var(--gold);
}

.lede {
  max-width: 34rem;
  color: #43566b;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  font-weight: 500;
  line-height: 1.55;
  text-shadow: 0 1px 10px rgba(253, 250, 243, 0.8);
}

.by,
.scroll-cue {
  color: var(--navy);
}

.by {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  font-size: 11px;
}

.scroll-cue .arrow {
  font-size: 18px;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.section {
  display: flex;
  justify-content: center;
  padding: 14vh 20px;
}

.panel {
  width: 100%;
  max-width: 680px;
  padding: clamp(24px, 5vw, 44px);
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(46, 64, 83, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.kicker {
  margin-bottom: 12px;
  font-size: 11px;
}

.panel h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}

.panel p {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.panel p:last-child {
  margin-bottom: 0;
}

.pair {
  display: grid;
  gap: 1.25rem;
  margin-top: 4px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--panel-edge);
}

.pair h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.15;
}

.pair p {
  margin-bottom: 0;
}

.turn {
  color: var(--ink);
  font-weight: 500;
}

.steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 0 0 16px 46px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.steps li:last-child {
  padding-bottom: 0;
}

.n {
  position: absolute;
  left: 0;
  top: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: var(--brown);
  font-family: Fraunces, Georgia, serif;
  font-size: 15px;
  font-weight: 600;
}

.closer {
  margin-top: 22px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}

footer {
  display: flex;
  justify-content: center;
  padding: 2vh 20px 40px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  padding: 12px 22px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(46, 64, 83, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.foot p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-404 main {
  flex: 1;
  display: flex;
}

.missing {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 12vh 20px;
}

.miss-panel {
  text-align: center;
}

.miss-panel h1 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(2.3rem, 8vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  text-wrap: balance;
}

.back {
  display: inline-block;
  margin-top: 6px;
  padding-block: 0.15rem;
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 0.18em;
}

.back:hover {
  color: var(--brown);
}

@media (min-width: 680px) {
  .pair {
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
  }

  .pair article + article {
    padding-left: 2rem;
    border-left: 1px solid var(--panel-edge);
  }
}

@media (max-width: 560px) {
  .l-far {
    top: 0%;
    left: -40%;
    width: 180%;
    height: 46%;
  }

  .l-mid {
    top: 56%;
    left: -45%;
    width: 190%;
    height: 42%;
  }

  .l-fore {
    top: 18%;
    left: -30%;
    width: 160%;
    height: 94%;
  }
}

@media (prefers-color-scheme: dark) {
  .kicker,
  .n {
    color: var(--camel);
  }

  .back:hover {
    color: var(--camel);
  }
}

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

  .scroll-cue .arrow {
    animation: none;
  }
}

@media print {
  .stage,
  .scroll-cue,
  .skip {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .panel,
  .foot {
    background: white;
    box-shadow: none;
  }
}
