:root {
  color-scheme: light;
  --sand: #e7d4b7;
  --sand-deep: #806247;
  --sand-hover: #71553d;
  --parchment: #efe1c9;
  --parchment-rgb: 239, 225, 201;
  --line: rgba(128, 98, 71, .24);
  --focus: #6d5945;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow-x: hidden;
  color: var(--sand-deep);
  background: var(--parchment);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  transform: translateY(-200%);
  padding: .75rem 1rem;
  color: #fff;
  background: var(--sand-deep);
  border-radius: .8rem;
}

.skip-link:focus { transform: translateY(0); }

.portal-header {
  position: relative;
  z-index: 5;
  min-height: clamp(6.7rem, 9vw, 8.2rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1rem clamp(1.25rem, 4.2vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--sand);
}

.wordmark {
  position: relative;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  padding: 1.25rem 1.6rem;
  color: var(--sand-deep);
  text-decoration: none;
}

.brand-text {
  position: relative;
  z-index: 2;
  display: block;
  white-space: nowrap;
  font-size: clamp(1.05rem, 2vw, 1.65rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: .015em;
}

.brand-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  color: #b58f5d;
}

.brand-stars i {
  position: absolute;
  display: block;
  font-style: normal;
  line-height: 1;
}

.brand-stars i:nth-child(1) { top: .05rem; left: .05rem; font-size: 1.05rem; }
.brand-stars i:nth-child(2) { top: .25rem; left: 13%; font-size: .7rem; }
.brand-stars i:nth-child(3) { bottom: .05rem; left: 8%; font-size: .8rem; }
.brand-stars i:nth-child(4) { top: .2rem; right: 12%; font-size: .72rem; }
.brand-stars i:nth-child(5) { right: 1.3rem; bottom: .1rem; font-size: .82rem; }
.brand-stars i:nth-child(6) { right: .05rem; bottom: .75rem; font-size: 1.08rem; }

.enter-button {
  min-width: 7.2rem;
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.4rem;
  color: #fff;
  background: var(--sand-deep);
  border: 1px solid rgba(75, 55, 39, .16);
  border-radius: 1rem;
  box-shadow: 0 .7rem 1.8rem rgba(91, 68, 48, .16);
  font-size: clamp(.9rem, 1.4vw, 1.12rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: .015em;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.enter-button:hover {
  transform: translateY(-2px);
  background: var(--sand-hover);
  box-shadow: 0 .9rem 2.1rem rgba(91, 68, 48, .22);
}

.wordmark:focus-visible,
.enter-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.portrait-stage {
  min-width: 0;
  min-height: 0;
  position: relative;
  background: var(--parchment);
}

.desktop-triptych {
  width: 100%;
  height: 100%;
  min-height: 34rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portrait,
.mobile-portrait {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--parchment);
}

.portrait + .portrait { border-left: 1px solid var(--line); }

.portrait img,
.portrait canvas,
.mobile-portrait img,
.mobile-portrait canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}

.portrait canvas,
.mobile-portrait canvas { display: none; }

.portrait.is-rendered img,
.mobile-portrait.is-rendered img { display: none; }

.portrait.is-rendered canvas,
.mobile-portrait.is-rendered canvas { display: block; }

.mobile-carousel { display: none; }

.portal-footer {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--sand-deep);
  background: var(--sand);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .portal-header {
    min-height: 6.35rem;
    gap: .55rem;
    padding: .8rem 1rem;
  }

  .wordmark { padding: 1.1rem .75rem; }

  .brand-text {
    font-size: clamp(.77rem, 3.45vw, 1rem);
    letter-spacing: 0;
  }

  .brand-stars i:nth-child(1) { left: 0; }
  .brand-stars i:nth-child(2) { left: 16%; }
  .brand-stars i:nth-child(3) { left: 11%; }
  .brand-stars i:nth-child(4) { right: 15%; }
  .brand-stars i:nth-child(5) { right: .65rem; }
  .brand-stars i:nth-child(6) { right: 0; }

  .enter-button {
    min-width: 4.75rem;
    min-height: 2.65rem;
    padding: .55rem .85rem;
    border-radius: .85rem;
    font-size: clamp(.76rem, 3.2vw, .9rem);
  }

  .desktop-triptych { display: none; }

  .mobile-carousel {
    width: 100%;
    height: 100%;
    min-height: 30rem;
    position: relative;
    display: block;
    overflow: hidden;
  }

  .mobile-portrait {
    width: 100%;
    height: 100%;
  }

  .portrait-dots {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 1rem;
    left: 0;
    display: flex;
    justify-content: center;
    gap: .52rem;
  }

  .portrait-dots i {
    width: .43rem;
    aspect-ratio: 1;
    display: block;
    border: 1px solid var(--sand-deep);
    border-radius: 50%;
    background: transparent;
    opacity: .35;
    transition: opacity .25s ease, background-color .25s ease;
  }

  .portrait-dots i.is-active {
    background: var(--sand-deep);
    opacity: .85;
  }

  .portal-footer {
    min-height: 2.85rem;
    font-size: .65rem;
  }
}

@media (max-width: 390px) {
  .portal-header { padding-inline: .65rem; }
  .wordmark { padding-inline: .45rem; }
  .brand-text { font-size: .72rem; }
  .enter-button { min-width: 4.25rem; padding-inline: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
