:root {
  color-scheme: dark;

  --soil: #24150d;
  --soil-deep: #130b07;

  --cream: #f5dfae;
  --amber: #dba44b;

  --muted: #b79873;
}

* {
  box-sizing: border-box;
}

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

html {
  background: var(--soil-deep);
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  overflow-x: hidden;

  background: #1c100a;
  color: var(--cream);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 18px;
  line-height: 1.6;
}


/* WORLD */

#colony {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 0;

  pointer-events: none;
}

main {
  position: relative;
  z-index: 2;
}


/* DEPTH */

.depth {
  position: fixed;
  z-index: 10;

  right: max(16px, env(safe-area-inset-right));
  top: max(18px, env(safe-area-inset-top));

  color: rgba(238, 207, 158, 0.48);

  font-family:
    "Courier New",
    monospace;

  font-size: 11px;

  pointer-events: none;
}


/* SURFACE */

.surface {
  position: relative;

  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  align-items: flex-end;

  padding:
    max(50px, env(safe-area-inset-top))
    max(28px, env(safe-area-inset-right))
    70px
    max(28px, env(safe-area-inset-left));
}

.surface-copy {
  width: min(800px, 100%);
  margin: 0 auto;
}

h1 {
  margin: 0;

  color: #f1c96f;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  font-size: clamp(92px, 23vw, 230px);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: -0.1em;
}

.surface p {
  width: min(430px, 100%);

  margin: 40px 0 0;

  color: #e7d3ae;

  font-size: clamp(22px, 3.6vw, 34px);
}

.surface span {
  display: block;

  margin-top: 45px;

  color: var(--amber);

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  font-size: 29px;
}


/* SCROLL SPACE */

.scene {
  position: relative;

  min-height: 105vh;
  min-height: 105dvh;

  pointer-events: none;
}


/* WORDS IN THE SOIL */

.note {
  position: absolute;

  width: min(360px, calc(100% - 52px));

  color: #ecd5ac;

  text-shadow:
    0 2px 9px rgba(0, 0, 0, 0.9);
}

.note.left {
  left: clamp(28px, 10vw, 160px);
  top: 34%;
}

.note.right {
  right: clamp(28px, 10vw, 160px);
  top: 38%;
}

.note.center {
  left: 50%;
  top: 42%;

  width: min(520px, calc(100% - 50px));

  transform: translateX(-50%);

  text-align: center;
}

.note.low {
  top: 58%;
}

.note span {
  display: block;

  margin-bottom: 13px;

  color: #c99954;

  font-family:
    "Courier New",
    monospace;

  font-size: 11px;
  text-transform: lowercase;
}

.note p {
  margin: 0 0 13px;
}

.note .large {
  color: #f5dfae;

  font-size: clamp(34px, 6vw, 67px);
  line-height: 1.05;
}


/* BOTTOM */

.bottom {
  position: relative;

  min-height: 110vh;
  min-height: 110dvh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding:
    100px
    max(24px, env(safe-area-inset-right))
    max(110px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));

  text-align: center;
}

.bottom-line {
  max-width: 700px;

  margin: 0;

  color: #e8cca0;

  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.25;
}

.contact {
  appearance: none;

  margin-top: 90px;

  border: 0;
  padding: 4px 1px;

  background: transparent;
  color: #bd8e52;

  font-family:
    "Courier New",
    monospace;

  font-size: 13px;

  text-decoration: underline;

  cursor: pointer;
}

.contact:hover {
  color: #f0ca81;
}


/* TINY INTERACTION HINT */

#crumb-hint {
  position: fixed;
  z-index: 20;

  left: max(17px, env(safe-area-inset-left));
  bottom: max(17px, env(safe-area-inset-bottom));

  color: rgba(232, 198, 143, 0.5);

  font-family:
    "Courier New",
    monospace;

  font-size: 10px;

  pointer-events: none;

  transition:
    opacity 1s ease;
}

#crumb-hint.hidden {
  opacity: 0;
}


/* PHONE */

@media (max-width: 700px) {
  .surface {
    padding-left:
      max(20px, env(safe-area-inset-left));

    padding-right:
      max(20px, env(safe-area-inset-right));
  }

  h1 {
    font-size: clamp(85px, 32vw, 140px);
  }

  .note.left,
  .note.right {
    left: 25px;
    right: auto;

    width: min(310px, calc(100% - 50px));
  }

  .note.right {
    left: auto;
    right: 25px;
  }

  .note.center {
    width: calc(100% - 50px);
  }

  .scene {
    min-height: 108dvh;
  }

  .bottom {
    min-height: 110dvh;
  }
}