@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-roman-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("assets/fonts/caveat-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #06131f;
  --ink-deep: #02080e;
  --navy: #0d2a3c;
  --navy-raised: #15384d;
  --cyan: #64cbea;
  --cyan-soft: rgba(155, 227, 244, 0.38);
  --ivory: #f5f0e6;
  --amber: #efa64c;
  --window-top: clamp(16px, 2.2vw, 36px);
  --window-right: clamp(14px, 3vw, 52px);
  --window-bottom: clamp(88px, 12vh, 124px);
  --window-left: clamp(14px, 3vw, 52px);
  --frame-width: clamp(7px, 0.8vw, 12px);
  --parallax-x: 0px;
  --parallax-y: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--ink-deep);
}

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--ivory);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.experience {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(54, 126, 157, 0.18), transparent 34%),
    linear-gradient(145deg, var(--navy) 0%, var(--ink-deep) 58%, #081c2a 100%);
}

.experience::after {
  position: absolute;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  opacity: 0.12;
  mix-blend-mode: soft-light;
}

.canopy-frame,
.sky-view,
.sky-grade,
.glass-reflection {
  position: absolute;
  clip-path: polygon(2.5% 0, 97.5% 0, 100% 5%, 100% 92%, 96.5% 100%, 3.5% 100%, 0 92%, 0 5%);
}

.canopy-frame {
  z-index: 1;
  inset: var(--window-top) var(--window-right) var(--window-bottom) var(--window-left);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.34), transparent 9% 86%, rgba(100, 203, 234, 0.55)),
    linear-gradient(180deg, #214b61, #071622 72%);
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.58));
}

.sky-view,
.sky-grade,
.glass-reflection {
  inset:
    calc(var(--window-top) + var(--frame-width))
    calc(var(--window-right) + var(--frame-width))
    calc(var(--window-bottom) + var(--frame-width))
    calc(var(--window-left) + var(--frame-width));
}

.sky-view {
  z-index: 2;
  display: block;
  overflow: hidden;
  background: #72bedc;
}

.sky-view img {
  position: absolute;
  inset: -1.5%;
  width: 103%;
  height: 103%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.018);
  filter: saturate(0.98) contrast(1.025);
  will-change: transform;
}

.sky-grade {
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 12, 20, 0.58) 0%, rgba(4, 20, 32, 0.15) 24%, transparent 48%),
    linear-gradient(180deg, rgba(3, 16, 25, 0.18), transparent 35%, rgba(1, 9, 15, 0.18));
}

.glass-reflection {
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(116deg, transparent 23%, rgba(229, 251, 255, 0.08) 24%, rgba(229, 251, 255, 0.02) 38%, transparent 39%),
    radial-gradient(ellipse at 70% 4%, rgba(255, 255, 255, 0.2), transparent 26%);
  mix-blend-mode: screen;
}

.top-beam {
  position: absolute;
  z-index: 8;
  inset: 0 0 auto;
  height: clamp(42px, 7vh, 72px);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 18%),
    linear-gradient(100deg, var(--ink-deep) 0 19%, var(--navy) 19% 35%, var(--ink) 35% 68%, #0a2333 68% 84%, var(--ink-deep) 84%);
  clip-path: polygon(0 0, 100% 0, 100% 57%, 82% 57%, 78% 100%, 22% 100%, 18% 57%, 0 57%);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}

.top-beam__seam {
  position: absolute;
  top: 50%;
  left: 22%;
  width: 56%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-soft), transparent);
}

.top-beam__marker {
  position: absolute;
  top: clamp(10px, 1.7vh, 17px);
  right: max(5vw, calc(env(safe-area-inset-right) + 18px));
  display: flex;
  gap: 9px;
  align-items: center;
  color: rgba(217, 243, 249, 0.58);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.status-light {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(239, 166, 76, 0.85);
}

.side-rib {
  position: absolute;
  z-index: 7;
  top: 3vh;
  bottom: calc(var(--window-bottom) - 18px);
  width: clamp(32px, 6vw, 96px);
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(180deg, var(--navy-raised), var(--ink-deep));
  filter: drop-shadow(12px 0 18px rgba(0, 0, 0, 0.34));
}

.side-rib::after {
  position: absolute;
  top: 12%;
  bottom: 14%;
  width: 1px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(100, 203, 234, 0.66) 22% 76%, transparent);
  box-shadow: 0 0 11px rgba(100, 203, 234, 0.25);
}

.side-rib--left {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 51% 20%, 36% 76%, 100% 100%, 0 100%);
}

.side-rib--left::after {
  right: 31%;
  transform: rotate(4deg);
}

.side-rib--right {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 64% 76%, 49% 20%);
  filter: drop-shadow(-12px 0 18px rgba(0, 0, 0, 0.34));
}

.side-rib--right::after {
  left: 31%;
  transform: rotate(-4deg);
}

.side-rib span {
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(192, 231, 240, 0.2);
  border-radius: 50%;
  background: #05101a;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.side-rib span:first-child {
  top: 24%;
}

.side-rib span:last-child {
  bottom: 20%;
}

.side-rib--left span {
  left: 18%;
}

.side-rib--right span {
  right: 18%;
}

.welcome {
  position: absolute;
  z-index: 10;
  top: clamp(112px, 18vh, 190px);
  left: max(9vw, calc(env(safe-area-inset-left) + 52px));
  width: min(42vw, 600px);
  color: var(--ivory);
  text-shadow: 0 3px 24px rgba(1, 9, 15, 0.42);
}

.welcome__prelude,
.welcome h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
}

.welcome__prelude {
  margin-left: 0.09em;
  font-size: clamp(1.4rem, 2.7vw, 2.65rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: 0.015em;
}

.welcome h1 {
  font-size: clamp(3rem, 7vw, 7.6rem);
  font-weight: 600;
  line-height: 0.84;
  letter-spacing: -0.06em;
}

.welcome h1 span {
  margin-left: 0.03em;
  color: #d9f3f9;
  font-size: 0.42em;
  letter-spacing: -0.035em;
}

.welcome__rule {
  position: relative;
  width: min(100%, 430px);
  height: 16px;
  margin-top: clamp(15px, 2.5vh, 26px);
  overflow: hidden;
}

.welcome__rule::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 100%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(245, 240, 230, 0.72), rgba(100, 203, 234, 0.2), transparent);
}

.welcome__rule span {
  position: absolute;
  top: 2px;
  left: 0;
  display: block;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(245, 240, 230, 0.86);
  transform: rotate(45deg);
  background: rgba(8, 29, 44, 0.42);
}

.window-marks {
  position: absolute;
  z-index: 9;
  top: 50%;
  display: flex;
  gap: 5px;
  align-items: center;
  color: rgba(220, 247, 252, 0.38);
  font-size: 8px;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.window-marks i {
  display: block;
  width: 1px;
  height: 7px;
  background: rgba(100, 203, 234, 0.34);
}

.window-marks i:nth-of-type(2) {
  height: 12px;
}

.window-marks--left {
  left: calc(var(--window-left) + var(--frame-width) + 8px);
  transform: rotate(-90deg) translateX(-50%);
  transform-origin: left top;
}

.window-marks--right {
  right: calc(var(--window-right) + var(--frame-width) + 8px);
  transform: rotate(90deg) translateX(50%);
  transform-origin: right top;
}

.lower-deck {
  position: absolute;
  z-index: 11;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(var(--window-bottom) + 24px);
  padding: 0 max(6vw, calc(env(safe-area-inset-right) + 26px)) max(18px, env(safe-area-inset-bottom));
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 9%),
    radial-gradient(ellipse at 50% 0, rgba(100, 203, 234, 0.13), transparent 25%),
    linear-gradient(112deg, var(--ink-deep) 0 24%, #0c2738 24% 46%, var(--ink) 46% 68%, #102f42 68% 86%, var(--ink-deep) 86%);
  clip-path: polygon(0 23%, 28% 23%, 32% 0, 44% 0, 47% 32%, 53% 32%, 56% 0, 68% 0, 72% 23%, 100% 23%, 100% 100%, 0 100%);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.48);
}

.lower-deck::before {
  position: absolute;
  top: 31%;
  right: 5%;
  left: 5%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(100, 203, 234, 0.34) 18% 36%, transparent 48% 53%, rgba(100, 203, 234, 0.24) 68% 85%, transparent);
}

.lower-deck__left {
  position: absolute;
  bottom: max(25px, calc(env(safe-area-inset-bottom) + 13px));
  left: max(6vw, calc(env(safe-area-inset-left) + 25px));
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(207, 237, 243, 0.28);
  font-size: 8px;
  letter-spacing: 0.25em;
}

.ornament-line {
  display: block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.signature {
  position: absolute;
  right: max(7vw, calc(env(safe-area-inset-right) + 24px));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 7px));
  margin: 0;
  color: rgba(255, 250, 239, 0.94);
  font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  font-size: clamp(1.55rem, 2.5vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.44);
  transform: rotate(-2deg);
}

.signature__heart {
  width: 0.75em;
  height: 0.7em;
  margin-left: 0.1em;
  overflow: visible;
  vertical-align: 0.02em;
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paw-trail {
  position: absolute;
  right: 35%;
  bottom: max(17px, calc(env(safe-area-inset-bottom) + 7px));
  left: 26%;
  height: 55px;
  color: rgba(168, 222, 232, 0.12);
}

.paw {
  position: absolute;
  width: clamp(13px, 1.25vw, 20px);
  height: auto;
  fill: currentColor;
  opacity: 1;
  filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 1px 0 rgba(210, 240, 245, 0.05));
}

.paw--1 {
  bottom: 2px;
  left: 2%;
  transform: rotate(-24deg);
}

.paw--2 {
  bottom: 20px;
  left: 20%;
  transform: rotate(-13deg);
}

.paw--3 {
  bottom: 7px;
  left: 40%;
  transform: rotate(-3deg);
}

.paw--4 {
  bottom: 23px;
  left: 62%;
  transform: rotate(11deg);
}

.paw--5 {
  bottom: 7px;
  left: 84%;
  transform: rotate(24deg);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.has-js:not(.is-ready) .welcome__prelude,
.has-js:not(.is-ready) .welcome h1 {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(5px);
}

.has-js:not(.is-ready) .welcome__rule,
.has-js:not(.is-ready) .signature,
.has-js:not(.is-ready) .paw {
  opacity: 0;
}

.has-js:not(.is-ready) .signature {
  transform: rotate(-2deg) translateY(7px);
}

.is-ready .sky-view img {
  animation: sky-arrival 1.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.is-ready .welcome__prelude {
  animation: title-arrival 1s 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.is-ready .welcome h1 {
  animation: title-arrival 1.15s 0.44s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.is-ready .welcome__rule {
  animation: quiet-fade 0.9s 0.86s ease-out forwards;
}

.is-ready .signature {
  animation: signature-arrival 0.95s 1.02s ease-out forwards;
}

.is-ready .paw {
  animation: paw-arrival 0.55s ease-out forwards;
}

.is-ready .paw--1 {
  animation-delay: 1.1s;
}

.is-ready .paw--2 {
  animation-delay: 1.2s;
}

.is-ready .paw--3 {
  animation-delay: 1.3s;
}

.is-ready .paw--4 {
  animation-delay: 1.4s;
}

.is-ready .paw--5 {
  animation-delay: 1.5s;
}

@keyframes sky-arrival {
  from {
    opacity: 0.35;
    transform: translate3d(var(--parallax-x), calc(var(--parallax-y) + 5px), 0) scale(1.045);
    filter: saturate(0.75) contrast(1.08) blur(4px);
  }

  to {
    opacity: 1;
    transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.018);
    filter: saturate(0.98) contrast(1.025) blur(0);
  }
}

@keyframes title-arrival {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes quiet-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes signature-arrival {
  from {
    opacity: 0;
    transform: rotate(-2deg) translateY(7px);
  }

  to {
    opacity: 1;
    transform: rotate(-2deg) translateY(0);
  }
}

@keyframes paw-arrival {
  from {
    opacity: 0;
    translate: 0 3px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  :root {
    --window-top: calc(116px + env(safe-area-inset-top));
    --window-right: 10px;
    --window-bottom: calc(112px + env(safe-area-inset-bottom));
    --window-left: 10px;
    --frame-width: 7px;
  }

  .top-beam {
    height: calc(128px + env(safe-area-inset-top));
    clip-path: polygon(0 0, 100% 0, 100% 79%, 82% 79%, 77% 100%, 23% 100%, 18% 79%, 0 79%);
  }

  .top-beam__seam {
    top: auto;
    bottom: 23px;
    left: 24%;
    width: 52%;
  }

  .top-beam__marker {
    top: calc(13px + env(safe-area-inset-top));
    right: calc(18px + env(safe-area-inset-right));
  }

  .side-rib {
    top: calc(102px + env(safe-area-inset-top));
    bottom: calc(96px + env(safe-area-inset-bottom));
    width: 23px;
  }

  .side-rib--left {
    clip-path: polygon(0 0, 100% 0, 58% 18%, 46% 79%, 100% 100%, 0 100%);
  }

  .side-rib--right {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 54% 79%, 42% 18%);
  }

  .side-rib span,
  .window-marks {
    display: none;
  }

  .sky-view img {
    inset: -1%;
    width: 102%;
    height: 102%;
    object-fit: cover;
    object-position: center center;
  }

  .sky-grade {
    background:
      linear-gradient(180deg, rgba(2, 12, 20, 0.18), transparent 18% 72%, rgba(1, 9, 15, 0.13)),
      radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(5, 20, 30, 0.17));
  }

  .welcome {
    top: calc(27px + env(safe-area-inset-top));
    left: calc(23px + env(safe-area-inset-left));
    width: calc(100% - 46px - env(safe-area-inset-left) - env(safe-area-inset-right));
    text-shadow: none;
  }

  .welcome__prelude {
    font-size: clamp(1.16rem, 5.7vw, 1.55rem);
    line-height: 0.82;
  }

  .welcome h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
    line-height: 0.86;
  }

  .welcome__rule {
    width: min(64vw, 250px);
    height: 10px;
    margin-top: 10px;
  }

  .welcome__rule::before {
    top: 4px;
  }

  .welcome__rule span {
    top: 1px;
    width: 7px;
    height: 7px;
  }

  .lower-deck {
    height: calc(124px + env(safe-area-inset-bottom));
    clip-path: polygon(0 17%, 24% 17%, 29% 0, 42% 0, 46% 24%, 54% 24%, 58% 0, 71% 0, 76% 17%, 100% 17%, 100% 100%, 0 100%);
  }

  .lower-deck::before {
    top: 25%;
  }

  .lower-deck__left {
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
    left: calc(19px + env(safe-area-inset-left));
    font-size: 6px;
  }

  .ornament-line {
    width: 14px;
  }

  .signature {
    right: calc(19px + env(safe-area-inset-right));
    bottom: max(15px, calc(env(safe-area-inset-bottom) + 7px));
    font-size: clamp(1.16rem, 5.4vw, 1.55rem);
  }

  .paw-trail {
    right: 35%;
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 6px));
    left: 29%;
    height: 37px;
  }

  .paw {
    width: 10px;
  }
}

@media (max-width: 440px) and (max-height: 700px) {
  :root {
    --window-top: calc(102px + env(safe-area-inset-top));
    --window-bottom: calc(95px + env(safe-area-inset-bottom));
  }

  .top-beam {
    height: calc(112px + env(safe-area-inset-top));
  }

  .welcome {
    top: calc(19px + env(safe-area-inset-top));
  }

  .welcome h1 {
    font-size: 2.55rem;
  }

  .welcome__rule {
    display: none;
  }

  .lower-deck {
    height: calc(105px + env(safe-area-inset-bottom));
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --window-top: 12px;
    --window-right: 16px;
    --window-bottom: 72px;
    --window-left: 16px;
    --frame-width: 6px;
  }

  .top-beam {
    height: 40px;
  }

  .top-beam__marker {
    top: 9px;
    right: 28px;
  }

  .side-rib {
    top: 18px;
    bottom: 58px;
    width: 34px;
  }

  .welcome {
    top: 62px;
    left: 8vw;
    width: 44vw;
  }

  .welcome__prelude {
    font-size: 1.12rem;
  }

  .welcome h1 {
    font-size: clamp(2.6rem, 7vw, 3.7rem);
  }

  .welcome__rule {
    width: 280px;
    margin-top: 10px;
  }

  .lower-deck {
    height: 82px;
  }

  .signature {
    right: 6vw;
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 3px));
    font-size: 1.35rem;
  }

  .lower-deck__left {
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 5px));
  }

  .paw-trail {
    bottom: max(9px, calc(env(safe-area-inset-bottom) + 3px));
    height: 32px;
  }

  .paw {
    width: 10px;
  }
}

@media (min-width: 1600px) {
  .welcome {
    left: 11vw;
  }
}

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

  .sky-view img {
    transform: scale(1.018);
    will-change: auto;
  }
}
