
:root {
  color-scheme: dark;
  --void: #071315;
  --teal: #0f565b;
  --brass: #c7a56a;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--void);
}

.splash {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(2rem, 6vw, 6rem);
  background:
    linear-gradient(rgb(199 165 106 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(199 165 106 / 0.035) 1px, transparent 1px),
    radial-gradient(circle at 68% 42%, rgb(15 86 91 / 0.2), transparent 38%),
    var(--void);
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.grain {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.frame {
  position: absolute;
  inset: clamp(1rem, 3vw, 2.5rem);
  pointer-events: none;
}

.corner {
  position: absolute;
  width: clamp(2.5rem, 5vw, 5rem);
  height: clamp(2.5rem, 5vw, 5rem);
  border-color: rgb(232 222 201 / 0.28);
  border-style: solid;
}

.corner--tl {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.corner--tr {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

.corner--bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}

.corner--br {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
}

.presence {
  position: relative;
  display: grid;
  width: min(76rem, 90vw);
  place-items: center;
}

.mark-layer {
  position: relative;
  z-index: 1;
  width: min(72rem, 88vw);
  transform: translate3d(var(--logo-x, 0), var(--logo-y, 0), 0);
  will-change: transform;
}

.logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(1px 0 0 rgb(199 165 106 / 0.58))
    drop-shadow(-1px 0 0 rgb(199 165 106 / 0.58))
    drop-shadow(0 1px 0 rgb(199 165 106 / 0.58))
    drop-shadow(0 -1px 0 rgb(199 165 106 / 0.58));
  animation: reveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.blink {
  position: absolute;
  z-index: 2;
  top: 60.88%;
  left: 53.1%;
  width: 2.37%;
  height: 16.46%;
  pointer-events: none;
}

.blink::before,
.blink::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blink::before,
.blink::after {
  background: url("assets/pupil_closed.png") center / 100% 100% no-repeat;
  content: "";
}

.blink::before {
  clip-path: inset(0 100% 0 0);
}

.blink::after {
  clip-path: inset(0 0 0 100%);
}

.blink.is-blinking::before {
  animation: blink-left 760ms cubic-bezier(0.45, 0, 0.55, 1);
}

.blink.is-blinking::after {
  animation: blink-right 760ms cubic-bezier(0.45, 0, 0.55, 1);
}

.cartouche-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  transform: translate3d(var(--cartouche-x, 0), var(--cartouche-y, 0), 0);
  will-change: transform;
}

.aperture {
  position: absolute;
  top: 69.03%;
  left: 54%;
  width: clamp(2.625rem, 5.25vw, 5.25rem);
  height: clamp(15rem, 44vw, 35rem);
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 1px solid rgb(199 165 106 / 0.28);
  border-radius: 999px;
  opacity: 0;
  animation: aperture 1.2s 0.25s ease-out forwards;
}

.aperture__glow {
  position: absolute;
  inset: 15% -100%;
  opacity: 0.35;
  transform: scale(0.9);
  background: radial-gradient(ellipse, rgb(199 165 106 / 0.22), transparent 68%);
  animation: breathe 5s 1.4s ease-in-out infinite both;
}

.continuity {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(3.25rem, 7vw, 6.5rem);
  width: clamp(7rem, 15vw, 13rem);
  height: 1px;
}

.continuity__line {
  position: absolute;
  inset: 0;
  background: rgb(232 222 201 / 0.25);
  transform: scaleX(0);
  transform-origin: left;
  animation: draw 1.1s 1s ease-out forwards;
}

.node {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgb(232 222 201 / 0.48);
  border-radius: 50%;
  background: var(--void);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: arrive 0.4s 1.7s ease-out forwards;
}

.node--first { left: 0; }
.node--active {
  left: 62%;
  width: 9px;
  height: 9px;
  border-color: var(--brass);
  box-shadow: 0 0 0 4px rgb(199 165 106 / 0.08);
  animation: arrive 0.4s 1.85s ease-out forwards, pulse 4s 2.3s ease-in-out infinite;
}
.node--last { left: 100%; animation-delay: 2s; }

.copyright {
  position: absolute;
  z-index: 2;
  right: clamp(1.5rem, 3.5vw, 3rem);
  bottom: clamp(1.35rem, 3.5vw, 3rem);
  color: rgb(232 222 201 / 0.62);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
}

.copyright a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.copyright a:hover {
  text-decoration-thickness: 2px;
}

.copyright a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}

@keyframes blink-left {
  0%, 100% { clip-path: inset(0 100% 0 0); }
  40%, 60% { clip-path: inset(0 49% 0 0); }
}

@keyframes blink-right {
  0%, 100% { clip-path: inset(0 0 0 100%); }
  40%, 60% { clip-path: inset(0 0 0 49%); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes arrive {
  to { opacity: 1; }
}

@keyframes aperture {
  from { opacity: 0; transform: translate(-50%, -48%) scaleY(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scaleY(1); }
}

@keyframes draw {
  to { transform: scaleX(1); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 0.75; transform: scale(1.08); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgb(199 165 106 / 0.08); }
  50% { box-shadow: 0 0 0 8px rgb(199 165 106 / 0.02); }
}

@media (max-width: 47.99rem) {
  .presence {
    width: 100%;
  }

  .mark-layer {
    width: min(42rem, 94vw);
  }


  .continuity {
    bottom: clamp(3rem, 12vw, 5rem);
  }
}

@media (max-width: 29.99rem) {
  .splash {
    padding-inline: 0.75rem;
  }

  .mark-layer {
    width: 96vw;
  }
}

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