:root {
  --app-width: 100vw;
  --app-height: 100vh;
  --mobile-panel-center-y: 50%;
  --mobile-panel-max-height: 100vh;
  --panel-size: clamp(18rem, 25.5vw, 24.75rem);
  --text-size: 14.52px;
  --text-color: #f6f8ef;
  --line-color: #f6f8ef;
  --banner-color: #333534;
  --banner-hover-color: #f6f8ef;
  --paper: #333534;
  --paper-shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Roboto", sans-serif;
  font-size: var(--text-size);
  text-transform: uppercase;
  background: #d8d6cf;
  color: var(--text-color);
  min-height: var(--app-height);
  overflow: hidden;
  cursor: none;
}

a,
button {
  color: inherit;
}

button,
a,
.interactive-phrase,
.text-panel,
.text-panel-inner,
.text-panel * {
  cursor: none;
}

.site-shell {
  position: relative;
  width: var(--app-width);
  height: var(--app-height);
  overflow: hidden;
}

.site-chrome {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.site-banner {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0 0.25vw;
  color: var(--banner-color);
  font-family: "Inter", sans-serif;
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.08em;
  text-align: center;
  white-space: nowrap;
}

body.hovering-phrase .site-banner {
  color: var(--banner-hover-color);
}

body.overlay-open .site-banner {
  color: var(--banner-hover-color);
}

.site-banner-text {
  display: inline-block;
  position: relative;
  left: -0.035em;
  will-change: font-size;
}

.site-banner-top {
  top: clamp(0.45rem, 0.95vw, 0.95rem);
}

.site-banner-bottom {
  bottom: clamp(0.45rem, 0.95vw, 0.95rem);
}

.site-banner-top .site-banner-text {
  font-size: 136px;
  left: -0.015em;
}

.site-banner-bottom .site-banner-text {
  font-size: 72px;
}

.page {
  position: absolute;
  inset: 0;
  display: none;
}

.page.active {
  display: block;
}

.background-layer {
  position: absolute;
  inset: 0;
  background-color: #cbc8bf;
  background-image: url("bg1.svg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.text-panel,
.contact-panel {
  position: absolute;
  z-index: 2;
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  border: 0;
}

body.hovering-phrase .text-panel,
body.overlay-open .text-panel {
  background: #f6f8ef;
  color: #333534;
}

body.hovering-phrase .text-panel a,
body.hovering-phrase .text-panel p,
body.overlay-open .text-panel a,
body.overlay-open .text-panel p {
  color: #333534;
}

body.hovering-phrase .text-panel .text-banner,
body.overlay-open .text-panel .text-banner,
body.hovering-phrase .text-panel .text-banner *,
body.overlay-open .text-panel .text-banner * {
  color: #f6f8ef;
}

.text-panel {
  left: 50%;
  top: 54%;
  width: min(var(--panel-size), calc(100vw - 3rem), calc(100vh - 3rem));
  height: min(var(--panel-size), calc(100vw - 3rem), calc(100vh - 3rem));
  padding: clamp(1rem, 1.7vw, 1.4rem);
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.image-caption {
  position: absolute;
  left: 50%;
  top: calc(54% + (min(var(--panel-size), calc(100vw - 3rem), calc(100vh - 3rem)) / 2) + 0.9rem);
  width: min(var(--panel-size), calc(100vw - 3rem), calc(100vh - 3rem));
  transform: translateX(-50%);
  color: #f6f8ef;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-align: right;
  opacity: 0;
  pointer-events: none;
}

.image-caption.visible {
  opacity: 1;
}

.text-panel-inner {
  height: 100%;
  overflow-y: auto;
  padding-top: 2rem;
  padding-bottom: 2rem;
  padding-right: 0.5rem;
  line-height: 1.62;
  letter-spacing: 0.035em;
  text-align: justify;
}

.text-banner {
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  background: #333534;
  color: #f6f8ef;
  z-index: 1;
  text-decoration: none;
}

.scroll-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--scroll-cue-offset, 0);
  height: var(--scroll-cue-height, 1.6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f8ef;
  color: #333534;
  z-index: 1;
  letter-spacing: 0.08em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 120ms linear;
}

.scroll-cue.is-hidden {
  opacity: 0;
}

.text-banner-top {
  top: 0;
  border-bottom: 1px solid #f6f8ef;
}

.text-banner-bottom {
  bottom: 0;
  border-top: 1px solid #f6f8ef;
}

body.hovering-phrase .text-banner-top,
body.overlay-open .text-banner-top {
  border-bottom-color: transparent;
}

body.hovering-phrase .text-banner-bottom,
body.overlay-open .text-banner-bottom {
  border-top-color: transparent;
}

.text-banner-track {
  display: flex;
  width: max-content;
  animation: text-banner-scroll 27s linear infinite;
  will-change: transform;
}

.text-banner-track span {
  display: inline-block;
  flex: 0 0 auto;
  padding: 0.28rem 0;
  white-space: nowrap;
  letter-spacing: 0.05em;
  font-variant-emoji: text;
}

@keyframes text-banner-scroll {
  from {
    transform: translateX(-66.6667%);
  }

  to {
    transform: translateX(0);
  }
}

.text-panel-inner::-webkit-scrollbar {
  width: 8px;
}

.text-panel-inner::-webkit-scrollbar-thumb {
  background: rgba(51, 53, 52, 0.28);
}

.text-panel p,
.contact-panel p {
  margin: 0 0 1rem;
}

.interactive-phrase {
  display: inline;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0.08em 0.22em;
  margin: -0.08em -0.22em;
}

.interactive-click {
  text-decoration-thickness: 2px;
}

.interactive-phrase:hover,
.interactive-phrase:focus-visible {
  color: #ffffff;
  background: #333534;
  text-decoration: none;
}

.interactive-click:hover,
.interactive-click:focus-visible {
  text-decoration-thickness: 2px;
}

body.touch-mode .interactive-phrase.is-touch-active {
  color: #f6f8ef;
  background: #333534;
  text-decoration: none;
}

body.touch-mode .interactive-click.is-touch-armed {
  color: #f6f8ef;
  background: #333534;
  text-decoration: none;
  animation: touch-armed-flash 720ms ease-in-out infinite alternate;
}

@keyframes touch-armed-flash {
  0% {
    color: #f6f8ef;
    background: #333534;
    opacity: 1;
  }

  100% {
    color: #f6f8ef;
    background: #333534;
    opacity: 0.35;
  }
}

.italic-title {
  font-style: italic;
}

.interactive-click:focus-visible,
.book-link:focus-visible,
.overlay-close:focus-visible,
.back-link:focus-visible,
.contact-panel a:focus-visible {
  outline: 1px solid var(--line-color);
  outline-offset: 3px;
}

.book-link,
.back-link,
.contact-panel a {
  text-decoration: none;
}

.contact-panel p a {
  display: inline-block;
  padding: 0.16em 0.34em;
  margin: -0.06em -0.1em;
  border: 1px solid rgba(246, 248, 239, 0.55);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.contact-panel p a:hover,
.contact-panel p a:focus-visible {
  background: #f6f8ef;
  color: #333534;
}

.book-link {
  display: inline-block;
  margin-top: 0.8rem;
  margin-left: 0;
  padding: 0.16em 0.34em;
  border: 1px solid rgba(246, 248, 239, 0.55);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  background: transparent;
  color: inherit;
  font-variant-emoji: text;
}

.book-link:hover,
.book-link:focus-visible {
  background: #f6f8ef;
  color: #333534;
}

.back-link {
  display: inline-block;
  padding: 0.12em 0.26em;
  margin: -0.06em -0.1em 1rem;
  font-variant-emoji: text;
}

.overlay-system {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  background: rgba(255, 255, 255, 0.1);
}

.overlay-system.active {
  display: block;
}

.overlay-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  border: 0;
  background: #f6f8ef;
  color: #333534;
  width: 2.5rem;
  height: 2.5rem;
  font: inherit;
  letter-spacing: 0.06em;
}

.overlay-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.overlay-block {
  position: absolute;
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
  background: #f6f8ef;
  color: #333534;
  border: 0;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.2);
  user-select: none;
  touch-action: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 120ms linear, transform 120ms linear;
}

.overlay-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.overlay-block.dragging {
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.26);
}

.overlay-block img,
.overlay-block video,
.overlay-block iframe {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid rgba(51, 53, 52, 0.1);
}

.overlay-block iframe {
  height: var(--embed-height, auto);
  background: #333534;
}

.overlay-embed-container {
  width: 100%;
  overflow: hidden;
}

.overlay-block p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-line;
}

.overlay-block p.large-text {
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 700;
  text-align: justify;
}

.overlay-block .eyebrow {
  margin-bottom: 0.2rem;
  letter-spacing: 0.08em;
}

.overlay-block a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.overlay-block .overlay-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  font-size: 1.1em;
}

.overlay-resize-handle {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  width: 1.2rem;
  height: 1.2rem;
  cursor: nwse-resize;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
}

.overlay-resize-handle::before {
  content: "";
  position: absolute;
  left: 0.14rem;
  top: 0.14rem;
  width: 0.92rem;
  height: 0.92rem;
  background:
    linear-gradient(135deg,
      transparent 0 18%,
      #333534 18% 24%,
      transparent 24% 36%,
      #333534 36% 42%,
      transparent 42% 58%,
      #333534 58% 64%,
      transparent 64% 76%,
      #333534 76% 82%,
      transparent 82% 100%);
  transform: rotate(0deg);
}

.overlay-resize-handle::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 24%, #333534 24% 30%, transparent 30% 70%, #333534 70% 76%, transparent 76% 100%);
  clip-path: polygon(0 70%, 30% 70%, 30% 100%, 100% 30%, 70% 30%, 70% 0, 0 70%);
  opacity: 0.95;
}

.overlay-carousel {
  display: grid;
  gap: 0.6rem;
}

.overlay-carousel-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 53, 52, 0.1);
  touch-action: pan-y;
  background: #ddd;
}

.overlay-carousel-track {
  display: flex;
  transition: transform 180ms ease;
}

.overlay-carousel-slide {
  flex: 0 0 100%;
}

.overlay-carousel-slide img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #efefef;
}

.overlay-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 0;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  font: inherit;
  font-variant-emoji: text;
}

.overlay-carousel-button:disabled {
  opacity: 0.3;
}

.overlay-carousel-button:first-of-type {
  left: 0.45rem;
}

.overlay-carousel-button:last-of-type {
  right: 0.45rem;
}

.overlay-carousel-counter {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 1;
  padding: 0.18rem 0.35rem;
  background: rgba(255, 255, 255, 0.86);
  letter-spacing: 0.08em;
}

.page-contact .contact-background {
  background-image: url("bg1.svg");
}

.contact-panel {
  left: 50%;
  top: 50%;
  width: min(24rem, calc(100vw - 3rem));
  padding: 1.25rem;
  overflow-y: auto;
  transform: translate(-50%, -50%);
}

.contact-kicker {
  margin-top: 1.25rem;
}

.portrait-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f6f8ef;
  color: #333534;
  text-align: center;
}

.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 21;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f6f8ef;
  color: #333534;
  text-align: center;
  opacity: 1;
  transition: opacity 360ms ease;
}

.intro-gate p {
  margin: 0;
  width: 100%;
  max-width: 18ch;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-align: center;
}

.portrait-gate p {
  width: 100%;
  max-width: 18ch;
  margin: 0 auto;
  line-height: 1.4;
  letter-spacing: 0.08em;
  white-space: pre-line;
  text-align: center;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: clamp(2.5rem, 4vw, 3.67rem);
  aspect-ratio: 1956 / 1018;
  pointer-events: none;
  margin-left: 0;
  transform: translateY(-100%);
  background: url("Cursor.png") left bottom / contain no-repeat;
}

.cursor.is-click-hover {
  animation: cursor-bounce-x 420ms ease-in-out infinite;
}

@keyframes cursor-bounce-x {
  0%,
  100% {
    transform: translateY(-100%) translateX(0);
  }

  50% {
    transform: translateY(-100%) translateX(10px);
  }
}

body.portrait-locked .portrait-gate {
  display: flex;
}

body.in-app-browser .portrait-gate {
  display: flex;
}

body.intro-active .intro-gate {
  display: flex;
}

body.intro-fading .intro-gate {
  opacity: 0;
}

body.portrait-locked .site-shell {
  visibility: hidden;
}

body.in-app-browser .site-shell {
  visibility: hidden;
}

@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto;
  }

  a,
  button,
  .interactive-phrase {
    cursor: auto;
  }

  .cursor {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --panel-size: min(20rem, calc(100vw - 2rem), calc(100vh - 2rem));
  }

  .contact-panel {
    left: 50%;
    top: 50%;
    width: min(23rem, calc(100vw - 2rem));
    transform: translate(-50%, -50%);
  }

  .site-banner {
    padding: 0 0.2rem;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  :root {
    --panel-size: min(58vw, calc(var(--app-height) - 3.2rem));
    --text-size: clamp(0.68rem, 0.62rem + 0.35vw, 0.82rem);
    --mobile-banner-height: 1rem;
    --mobile-panel-width: min(22rem, 68.2vw, calc(var(--app-width) - 0.6rem));
  }

  html,
  body {
    width: var(--app-width);
    height: var(--app-height);
  }

  .site-shell {
    position: fixed;
    inset: 0;
    width: var(--app-width);
    height: var(--app-height);
  }

  .background-layer {
    background-size: cover;
    background-position: center center;
  }

  .site-banner-top {
    top: 0;
  }

  .site-banner-bottom {
    bottom: 0;
  }

  .site-banner-top .site-banner-text {
    left: -0.01em;
  }

  .text-panel {
    top: var(--mobile-panel-center-y);
    width: var(--mobile-panel-width);
    height: min(11.52rem, calc(var(--mobile-panel-max-height) - 0.6rem), calc(var(--app-height) - 3.7rem));
    padding: 0.6rem;
  }

  .contact-panel {
    width: var(--mobile-panel-width);
    height: min(11.52rem, calc(var(--mobile-panel-max-height) - 0.6rem), calc(var(--app-height) - 3.7rem));
    top: var(--mobile-panel-center-y);
  }

  .text-panel-inner {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    padding-right: 0.3rem;
    line-height: 1.34;
    letter-spacing: 0.016em;
  }

  .image-caption {
    top: auto;
    bottom: calc(var(--app-height) - (var(--mobile-panel-center-y) + (min(11.52rem, calc(var(--mobile-panel-max-height) - 0.6rem), calc(var(--app-height) - 3.7rem)) / 2)));
    left: calc(50% + (var(--mobile-panel-width) / 2) + 0.2rem);
    width: min(9rem, calc(var(--app-width) * 0.23));
    transform: none;
    font-size: 6.75px;
    line-height: 1.25;
    text-align: left;
  }

  body.touch-mode .interactive-click.is-touch-armed {
    animation: touch-armed-strobe 220ms steps(1, end) infinite;
  }

  @keyframes touch-armed-strobe {
    0%,
    49% {
      color: #f6f8ef;
      background: #333534;
      opacity: 1;
    }

    50%,
    100% {
      color: #333534;
      background: transparent;
      opacity: 1;
    }
  }

  .text-banner-track {
    animation-name: text-banner-scroll-mobile;
    animation-duration: 36s;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
  }

  .text-banner-track span {
    padding: 0.09rem 0;
    letter-spacing: 0.035em;
    font-size: var(--text-size);
    line-height: 1;
  }

  .text-banner,
  .scroll-cue {
    height: var(--mobile-banner-height);
    min-height: var(--mobile-banner-height);
    max-height: var(--mobile-banner-height);
    font-size: var(--text-size);
    line-height: 1;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  .text-banner {
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
  }

  .text-banner:focus,
  .text-banner:active {
    outline: none !important;
    box-shadow: none !important;
    border-top-color: transparent !important;
  }

  .scroll-cue {
    height: var(--mobile-banner-height);
  }

  .text-banner-bottom,
  .text-banner-bottom:focus,
  .text-banner-bottom:active,
  .text-banner-bottom:visited {
    border-top: 1px solid #f6f8ef !important;
    border-bottom: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
    background-clip: padding-box !important;
  }


  .text-banner-bottom *,
  .text-banner-bottom *:focus,
  .text-banner-bottom *:active {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .text-banner-bottom::before,
  .text-banner-bottom::after {
    content: none !important;
  }

  body.hovering-phrase .text-banner,
  body.overlay-open .text-banner,
  body.hovering-phrase .text-banner *,
  body.overlay-open .text-banner * {
    background: #333534;
    color: #f6f8ef;
  }

  body.hovering-phrase .text-banner-top,
  body.overlay-open .text-banner-top {
    border-bottom-color: #f6f8ef;
  }

  body.hovering-phrase .text-banner-bottom,
  body.overlay-open .text-banner-bottom {
    border-top-color: #f6f8ef;
  }

  @keyframes text-banner-scroll-mobile {
    from {
      transform: translate3d(-75%, 0, 0);
    }

    to {
      transform: translate3d(0, 0, 0);
    }
  }

  .book-link,
  .contact-panel p a {
    padding: 0.12em 0.28em;
  }

  .contact-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.22;
    overflow-y: hidden;
    padding-top: 1.15rem;
    padding-bottom: 0.35rem;
  }

  .contact-panel p {
    margin: 0 0 0.72rem;
  }

  .contact-panel .back-link {
    margin-bottom: 0.8rem;
  }

  .overlay-close {
    top: 0.55rem;
    right: 0.55rem;
    width: 2.1rem;
    height: 2.1rem;
  }
}

@media (max-width: 820px) and (orientation: portrait) {
  body {
    overflow: hidden;
  }
}
