@font-face {
  font-family: "Beiruti";
  src: url("/assets/fonts/beiruti-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Averia";
  src: url("/assets/fonts/averia-serif-libre-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Averia";
  src: url("/assets/fonts/averia-serif-libre-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f0ede5;
  --muted: #a6ada9;
  --line: rgba(226, 236, 231, 0.2);
  --glass: rgba(6, 14, 16, 0.68);
  --pink: #ff3d77;
  --cyan: #b8f5e8;
  --edge: clamp(14px, 2.4vw, 34px);
  --parallax-x: 0px;
  --parallax-y: 0px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #071113;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #071113;
  font-family: "Beiruti", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
a {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  color: #071113;
  background: var(--cyan);
  text-shadow: none;
}

::highlight(leviathan) {
  color: #071113;
  background-color: var(--pink);
  text-shadow: none;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 50%;
  padding: 10px 16px;
  color: #071113;
  background: var(--cyan);
  transform: translate(-50%, -180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.scene,
.scene__image,
.scene__wash,
.scene__grain {
  position: fixed;
  inset: 0;
}

.scene__particles {
  position: fixed;
  z-index: 11;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.72;
  transform: translate3d(calc(var(--parallax-x) * -0.6), calc(var(--parallax-y) * -0.6), 0);
  transition: transform 900ms ease-out;
}

.scene__particles i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(184, 245, 232, 0.82);
  box-shadow: 0 0 9px rgba(184, 245, 232, 0.42);
  animation: particle-drift var(--duration) ease-in-out var(--delay) infinite;
}

@keyframes particle-drift {
  0%, 100% { transform: translate3d(0, 12px, 0); opacity: 0.08; }
  50% { transform: translate3d(18px, -34px, 0); opacity: 0.7; }
}

.scene__particles[data-scene="2"] i,
.scene__particles[data-scene="5"] i { background: rgba(255, 61, 119, 0.72); box-shadow: 0 0 9px rgba(255, 61, 119, 0.34); }
.motion-paused .scene__particles i { animation-play-state: paused; }
.motion-paused .scene__image,
.motion-paused .scene__particles { transition: none; }
.scene-loading .scene__image--current { filter: saturate(0.55) contrast(1.03) blur(2px); }

.scene {
  z-index: 0;
  overflow: hidden;
  background: #071113;
}

.scene__image {
  background-image: url("/assets/images/backgrounds/deep-03.webp");
  background-position: center;
  background-size: cover;
  filter: saturate(0.8) contrast(1.08);
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.025);
  animation: background-zoom 32s ease-in-out infinite alternate;
  transition: transform 700ms ease-out;
}

@keyframes background-zoom {
  from { scale: 1.025; }
  to { scale: 1.09; }
}

.scene__image--next {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.scene__image--next.is-visible {
  opacity: 1;
}

.scene__wash {
  background:
    linear-gradient(90deg, rgba(3, 9, 11, 0.86) 0%, rgba(3, 9, 11, 0.64) 44%, rgba(3, 9, 11, 0.12) 100%),
    linear-gradient(0deg, rgba(3, 9, 11, 0.72) 0%, transparent 46%, rgba(3, 9, 11, 0.18) 100%);
}

.scene__grain {
  opacity: 0.18;
  background-image: url("/assets/images/background.webp");
  background-size: 620px;
  mix-blend-mode: soft-light;
}

.site-frame {
  position: fixed;
  z-index: 10;
  inset: var(--edge);
  border: 1px solid var(--line);
  pointer-events: none;
}

.site-frame::before,
.site-frame::after {
  content: "";
  position: absolute;
  background: var(--pink);
}

.site-frame::before {
  top: -1px;
  left: 12%;
  width: 72px;
  height: 1px;
}

.site-frame::after {
  right: -1px;
  bottom: 14%;
  width: 1px;
  height: 72px;
}

.site-frame i {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--line);
  border-style: solid;
}

.site-frame i:nth-child(1) {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.site-frame i:nth-child(2) {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.site-frame i:nth-child(3) {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

.site-frame i:nth-child(4) {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--edge) + clamp(10px, 1.5vw, 20px));
}

.masthead,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: 0.11em;
}

.wordmark__name {
  font-family: "Averia", serif;
  font-size: 19px;
  font-weight: 700;
}

.wordmark__dot {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: var(--pink);
}

.wordmark__suffix,
.domain-state,
.eyebrow,
.lander__number,
.source-note,
.scene-control,
footer {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wordmark__suffix {
  color: var(--muted);
}

.domain-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(184, 245, 232, 0.1);
}

.lander {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(180px, 1fr);
  gap: clamp(36px, 7vw, 120px);
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1460px;
  margin: auto;
  min-height: 0;
  overflow: visible;
  padding: clamp(24px, 4vh, 44px) clamp(36px, 4vw, 64px);
}

.lander__number {
  position: absolute;
  top: 50%;
  left: 8px;
  color: rgba(240, 237, 229, 0.58);
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
}

.message {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(24px, 4vw, 54px);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(5, 13, 15, 0.76), rgba(5, 13, 15, 0.48));
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.message__scroll {
  min-height: 0;
  overflow-y: auto;
  scroll-padding-block: 22px;
  padding: 22px 18px 22px 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  scrollbar-color: var(--pink) transparent;
  scrollbar-width: thin;
  transition: opacity 220ms ease, transform 260ms ease;
}

.message__scroll::-webkit-scrollbar { width: 3px; }
.message__scroll::-webkit-scrollbar-track { background: transparent; }
.message__scroll::-webkit-scrollbar-thumb { border-radius: 0; background: var(--pink); }

.eyebrow {
  margin: 0 0 20px;
  color: var(--cyan);
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-family: "Averia", Georgia, serif;
  font-size: clamp(46px, 7vw, 94px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

h1 em {
  color: var(--pink);
  font-weight: 400;
}

.intro {
  max-width: 48ch;
  margin: clamp(30px, 5vh, 52px) 0 16px;
  color: var(--muted);
}

.reasons {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.reasons li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.reasons span {
  color: var(--pink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.reassurance {
  margin: 28px 0 0;
  color: var(--ink);
  font-family: "Averia", serif;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.35;
}

.source-note {
  margin: 18px 0 0;
  color: var(--muted);
}

.actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.contact-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.contact-link span { color: var(--ink); }
.contact-link:hover { color: var(--cyan); }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button--primary {
  border-color: var(--pink);
  color: #071113;
  background: var(--pink);
}

.button--quiet {
  color: var(--muted);
  background: rgba(2, 9, 10, 0.36);
}

.button--quiet span {
  color: var(--ink);
  text-transform: none;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary:hover {
  border-color: var(--cyan);
  color: #071113;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(184, 245, 232, 0.28);
}

.button:disabled,
.button[aria-disabled="true"] {
  border-color: rgba(255, 61, 119, 0.35);
  color: rgba(240, 237, 229, 0.42);
  background: rgba(42, 19, 27, 0.72);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.button--quiet:hover {
  border-color: var(--cyan);
  color: var(--ink);
}

.contact-form {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding-right: 18px;
  opacity: 0;
  transform: translate3d(18px, 0, 0);
  scrollbar-color: var(--pink) transparent;
  scrollbar-width: thin;
  transition: opacity 260ms ease, transform 260ms ease;
}

.contact-form.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
.message--contact .contact-form { display: flex; }
.contact-form.is-success { opacity: 0; transform: translate3d(-18px, 0, 0); }

.contact-form::-webkit-scrollbar { width: 3px; }
.contact-form::-webkit-scrollbar-track { background: transparent; }
.contact-form::-webkit-scrollbar-thumb { border-radius: 0; background: var(--pink); }

.message--contact .message__scroll { display: none; }
.message--contact > .actions { display: none; }
.message--contact > .contact-link { display: none; }

.contact-success[hidden] { display: none; }

.contact-success {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 18px;
  opacity: 0;
  transform: translate3d(18px, 0, 0);
  scrollbar-color: var(--pink) transparent;
  scrollbar-width: thin;
  transition: opacity 260ms ease, transform 260ms ease;
}

.contact-success.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
.contact-success h2 { max-width: 9ch; margin: 0; font-family: "Averia", Georgia, serif; font-size: clamp(38px, 5vw, 66px); font-weight: 400; letter-spacing: -0.05em; line-height: 0.9; }
.contact-success p:not(.eyebrow) { max-width: 42ch; color: var(--muted); }
.contact-success__note { color: var(--cyan) !important; font-size: 13px; }

.contact-form h2 {
  margin: 0;
  font-family: "Averia", Georgia, serif;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.contact-form__hint,
.contact-form__note {
  color: var(--muted);
}

.contact-form__hint {
  max-width: 42ch;
  margin: 18px 0 28px;
}

.contact-form label {
  display: block;
  margin: 22px 0 7px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-form label::after {
  content: " *";
  color: var(--pink);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(2, 9, 10, 0.42);
  font: inherit;
  resize: vertical;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.contact-form textarea { min-height: 150px; }

.turnstile-widget { min-height: 65px; margin-top: 20px; }

.contact-select { position: relative; }
.contact-select::after {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--cyan);
  border-bottom: 1px solid var(--cyan);
  content: "";
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.contact-form select {
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
}

.contact-form select option { color: var(--ink); background: #071113; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(166, 173, 169, 0.62); }

.contact-form input:required:placeholder-shown,
.contact-form textarea:required:placeholder-shown,
.contact-form select:required:invalid {
  border-color: rgba(255, 61, 119, 0.48);
}

.contact-form input:user-valid,
.contact-form textarea:user-valid,
.contact-form select:user-valid {
  border-color: rgba(184, 245, 232, 0.78);
  background: rgba(184, 245, 232, 0.06);
}

.contact-form input:user-invalid,
.contact-form textarea:user-invalid,
.contact-form select:user-invalid {
  border-color: var(--pink);
  background: rgba(255, 61, 119, 0.07);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 2px rgba(184, 245, 232, 0.12);
}

.contact-form__note { font-size: 13px; }
.contact-form__note.is-ready { color: var(--cyan); }

.depth-mark {
  display: grid;
  justify-items: end;
  align-self: stretch;
}

.depth-mark img {
  width: clamp(72px, 9vw, 128px);
  max-height: 128px;
  opacity: 0.9;
}

.scene-control {
  display: grid;
  grid-template-columns: auto auto;
  gap: 14px;
  align-self: end;
  align-items: center;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.scene-control__index {
  color: var(--pink);
}

.scene-control__label {
  color: var(--muted);
}

.scene-control + .scene-control { margin-top: 8px; }
.scene-control[aria-pressed="true"] .scene-control__index { color: var(--muted); }

footer {
  color: var(--muted);
}

footer p {
  margin: 0;
}

footer p:first-child {
  color: var(--ink);
  font-family: "Averia", serif;
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

footer span {
  color: var(--ink);
}

footer a {
  text-decoration: none;
}

.error-page {
  display: grid;
  place-items: center;
  padding: calc(var(--edge) + 36px);
}

.error-page .scene__image {
  background-image: url("/assets/images/backgrounds/deep-03.webp");
}

.error-message {
  max-width: 720px;
  padding: clamp(28px, 6vw, 70px);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
}

.error-message p:not(.eyebrow) {
  max-width: 45ch;
  margin: 28px 0;
  color: var(--muted);
}

/*
 * Mobile browser chrome changes the visual viewport while the page scrolls.
 * Bind the decorative layers to the document on touch/narrow layouts so the
 * frame and background do not resize independently of the content.
 */
@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  body {
    position: relative;
  }

  .scene,
  .scene__image,
  .scene__wash,
  .scene__grain {
    position: absolute;
  }

  .scene {
    z-index: 0;
  }

  .site-frame {
    position: absolute;
    top: max(var(--edge), env(safe-area-inset-top));
    right: max(var(--edge), env(safe-area-inset-right));
    bottom: max(var(--edge), env(safe-area-inset-bottom));
    left: max(var(--edge), env(safe-area-inset-left));
  }

  .page-shell,
  .error-message {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 860px) {
  .scene__wash {
    background: linear-gradient(0deg, rgba(3, 9, 11, 0.86) 0%, rgba(3, 9, 11, 0.58) 65%, rgba(3, 9, 11, 0.24) 100%);
  }

  .lander {
    grid-template-columns: 1fr;
    padding: 24px 12px;
  }

  .lander__number {
    display: none;
  }

  .depth-mark {
    display: grid;
    justify-items: end;
    align-self: auto;
    gap: 18px;
    order: -1;
  }

  .depth-mark img { width: 76px; max-height: 76px; }

  .message {
    max-width: 720px;
  }

  footer p:nth-child(2) {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --edge: 10px;
  }

  body {
    font-size: 16px;
  }

  .page-shell {
    padding:
      max(30px, calc(env(safe-area-inset-top) + 20px))
      max(24px, calc(env(safe-area-inset-right) + 14px))
      max(30px, calc(env(safe-area-inset-bottom) + 20px))
      max(24px, calc(env(safe-area-inset-left) + 14px));
  }

  .domain-state {
    max-width: 46vw;
    letter-spacing: 0.1em;
    text-align: right;
  }

  .domain-state .pulse {
    display: none;
  }

  .wordmark__suffix {
    display: none;
  }

  .lander {
    padding: 24px 12px;
  }

  .message {
    padding: 24px 20px;
    backdrop-filter: blur(12px);
  }

  h1 {
    font-size: clamp(43px, 14vw, 66px);
  }

  .intro {
    margin-top: 28px;
  }

  .actions,
  .button {
    width: 100%;
  }

  footer p:first-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .button:hover {
    transform: none;
  }
}
