:root {
  --parchment: #f7f3e9;
  --parchment-deep: #f2ecde;
  --ink: #27251f;
  --ink-soft: #6d5b46;
  --gold: #b1843f;
  --gold-dark: #8d6932;
  --rule: rgba(115, 91, 55, 0.25);
  --rule-light: rgba(115, 91, 55, 0.14);
  --content: 770px;
  --wide: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  background-color: var(--parchment);
  background-image:
    radial-gradient(circle at 17% 21%, rgba(123, 91, 43, 0.055) 0 0.65px, transparent 0.8px),
    radial-gradient(circle at 73% 64%, rgba(123, 91, 43, 0.045) 0 0.55px, transparent 0.75px),
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 45%, rgba(197, 168, 113, 0.025));
  background-size: 23px 23px, 31px 31px, 100% 100%;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--ink);
  background: rgba(177, 132, 63, 0.2);
}

a {
  color: inherit;
}

img {
  display: block;
}

h1,
h2,
h3,
.brand-word,
.d-title,
.r-title,
.speaker {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  color: var(--ink);
}

/* Header */
.site-header {
  width: calc(100% - 16px);
  max-width: var(--wide);
  min-height: 69px;
  margin: 0 auto;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand-word {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.28em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 36px);
}

.site-nav a {
  position: relative;
  padding: 25px 0 22px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.19em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 17px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-dark);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
}

/* Shared page frame */
main {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 77px 0 92px;
}

.page-sun {
  width: 58px;
  height: 58px;
  margin: 0 auto 40px;
}

h1.page-title {
  position: relative;
  width: fit-content;
  margin: 0 auto 75px;
  padding: 0 0 23px;
  font-size: clamp(49px, 6vw, 63px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-align: center;
}

h1.page-title::after {
  content: "◆";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 272px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 7px;
  line-height: 1px;
  letter-spacing: 0;
  background:
    linear-gradient(var(--rule), var(--rule)) left center / calc(50% - 14px) 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) right center / calc(50% - 14px) 1px no-repeat;
  transform: translateX(-50%);
}

.lede {
  max-width: 650px;
  margin: -39px auto 38px;
  color: var(--ink-soft);
  font-size: 17px;
  font-style: italic;
  text-align: center;
}

/* Landing page */
body:has(.hero) main {
  width: 100%;
  padding: 0;
}

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

.hero .sun-emblem {
  width: 87px;
  height: 87px;
  margin-bottom: 61px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(45px, 7.2vw, 75px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.17em;
  text-indent: 0.17em;
  text-transform: uppercase;
}

.hero p {
  margin: 33px 0 0;
  color: var(--ink-soft);
  font-size: 22px;
  font-style: italic;
  line-height: 1.2;
}

.enter-link {
  position: relative;
  margin-top: 77px;
  color: var(--gold-dark);
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.39em;
  text-indent: 0.39em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, letter-spacing 180ms ease;
}

.enter-link::before {
  content: "◆";
  position: absolute;
  left: 50%;
  top: -45px;
  width: 272px;
  color: var(--gold);
  font-size: 7px;
  line-height: 1px;
  letter-spacing: 0;
  text-indent: 0;
  background:
    linear-gradient(var(--rule), var(--rule)) left center / calc(50% - 14px) 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) right center / calc(50% - 14px) 1px no-repeat;
  transform: translateX(-50%);
}

.enter-link:hover,
.enter-link:focus-visible {
  color: var(--ink);
  letter-spacing: 0.46em;
}

/* Threshold page */
body:has(.threshold) main {
  padding: 0;
}

.threshold {
  min-height: 100vh;
  padding: 9vh 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.threshold .sun-emblem {
  width: 87px;
  height: 87px;
  margin-bottom: 42px;
}

.threshold .sun-emblem.emblem-large {
  width: 108px;
  height: 108px;
}

.threshold h1 {
  margin: 0 0 35px;
  font-size: clamp(45px, 7.2vw, 75px);
  font-weight: 500;
  line-height: 1;
}

.threshold-note {
  max-width: 480px;
  margin: -18px 0 40px;
  color: var(--ink-soft);
  font-size: 19px;
  font-style: italic;
  line-height: 1.55;
}

.threshold-note.success-text {
  max-width: 520px;
  margin: 20px 0 0;
  color: var(--gold-dark);
  font-size: 23px;
  font-style: normal;
  line-height: 1.5;
}

.threshold-form {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 27px;
}

.threshold-input {
  width: 100%;
  padding: 11px 8px;
  color: var(--ink);
  font: italic 19px/1.4 "EB Garamond", Garamond, Georgia, serif;
  text-align: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
}

.threshold-input:focus {
  outline: 0;
  border-color: var(--gold);
}

.threshold-input::placeholder {
  color: rgba(109, 91, 70, 0.65);
}

.threshold-submit {
  padding: 4px 2px;
  color: var(--gold-dark);
  font: 500 12px/1 "Cormorant Garamond", Garamond, Georgia, serif;
  letter-spacing: 0.31em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}

.threshold-submit:hover,
.threshold-submit:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.threshold-response {
  min-height: 1.4em;
  max-width: 480px;
  margin: 25px 0 0;
  color: var(--ink-soft);
  font-style: italic;
}

.threshold-response.accepted {
  color: var(--gold-dark);
  font-style: normal;
}

/* Library */
.dialogue-list {
  margin: 0 0 42px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-light);
}

.dialogue-list li {
  border-bottom: 1px solid var(--rule);
}

.dialogue-list a,
.dialogue-list .pending {
  min-height: 72px;
  padding: 13px 2px;
  display: grid;
  grid-template-columns: 52px 1fr 24px;
  align-items: center;
  gap: 17px;
  text-decoration: none;
}

.dialogue-list a {
  transition: background 160ms ease, padding 160ms ease;
}

.dialogue-list a:hover {
  padding-left: 8px;
  background: rgba(177, 132, 63, 0.045);
}

.dialogue-list .num {
  color: var(--gold-dark);
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 16px;
}

.dialogue-list .meta {
  min-width: 0;
}

.dialogue-list .d-title {
  display: block;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
}

.dialogue-list .d-desc {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.25;
}

.dialogue-list .arrow {
  color: var(--gold-dark);
  font-size: 18px;
  text-align: right;
}

.dialogue-list .pending {
  color: var(--ink-soft);
  cursor: default;
}

.dialogue-list .pending .d-title {
  color: var(--ink-soft);
}

/* About */
.prose {
  width: min(722px, calc(100% - 40px));
}

.prose h1.page-title {
  margin-bottom: 48px;
}

.prose > p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.75;
}

.prose h2 {
  margin: 54px 0 15px;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
}

.prose .enter-link {
  display: inline-block;
  margin-top: 44px;
}

/* Dialogue reader */
.dialogue-nav {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.dialogue-nav:hover {
  color: var(--gold-dark);
}

.dialogue-pager {
  display: flex;
  justify-content: space-between;
  margin: 0 0 42px;
  padding-bottom: 12px;
  color: var(--ink-soft);
  font-size: 14px;
  border-bottom: 1px solid var(--rule);
}

.dialogue-pager a {
  text-decoration: none;
}

.dialogue-pager a:hover {
  color: var(--gold-dark);
}

.eyebrow {
  margin: -50px 0 15px;
  color: var(--gold-dark);
  font-size: 11px;
  letter-spacing: 0.17em;
  text-align: center;
  text-transform: uppercase;
}

.epigraph {
  max-width: 590px;
  margin: -44px auto 52px;
  padding: 0;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
  border: 0;
}

.speaker {
  margin: 31px 0 0;
  color: var(--gold-dark);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.line {
  margin: 4px 0 0;
}

/* Footer */
.site-footer {
  max-width: var(--content);
  margin: 0 auto;
  padding: 34px 20px 46px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.07em;
  text-align: center;
  border-top: 1px solid var(--rule-light);
}

.site-footer .page-sun {
  width: 31px;
  height: 31px;
  margin: 0 auto 13px;
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 28px);
    min-height: auto;
    padding: 15px 0 10px;
    flex-wrap: wrap;
    gap: 9px 20px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-word {
    font-size: 13px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-end;
    gap: 21px;
  }

  .site-nav a {
    padding: 8px 0 7px;
    font-size: 10px;
  }

  .site-nav a::after {
    bottom: 2px;
  }

  main {
    padding-top: 57px;
  }

  .page-sun {
    width: 49px;
    height: 49px;
    margin-bottom: 30px;
  }

  h1.page-title {
    margin-bottom: 63px;
  }

  .hero {
    min-height: 100svh;
  }

  .hero .sun-emblem {
    width: 70px;
    height: 70px;
    margin-bottom: 45px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 49px);
    letter-spacing: 0.11em;
    text-indent: 0.11em;
  }

  .threshold h1 {
    font-size: clamp(34px, 10vw, 49px);
  }

  .threshold .sun-emblem {
    width: 70px;
    height: 70px;
  }

  .threshold .sun-emblem.emblem-large {
    width: 87px;
    height: 87px;
  }

  .hero p {
    margin-top: 25px;
    font-size: 19px;
  }

  .enter-link {
    margin-top: 70px;
  }

  .dialogue-list a,
  .dialogue-list .pending {
    grid-template-columns: 35px 1fr 18px;
    gap: 10px;
  }
}

@media (max-width: 430px) {
  .brand-word {
    letter-spacing: 0.2em;
  }

  .site-nav {
    justify-content: space-between;
    gap: 12px;
  }

  .prose > p {
    font-size: 17px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
