:root {
  color-scheme: dark;
  --ink: #f5f5f1;
  --muted: #a6abb1;
  --faint: rgba(245, 245, 241, 0.5);
  --line: rgba(245, 245, 241, 0.18);
  --cyan: #90e4e6;
  --night: #050608;
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.entry-page {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 45%, rgba(24, 54, 62, 0.36), transparent 31rem),
    linear-gradient(105deg, #060709 0%, #080a0d 52%, #030405 100%);
}

.entry-backdrop,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.entry-backdrop {
  z-index: -2;
  overflow: hidden;
}

.entry-backdrop::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 5, 7, 0.98) 0%, rgba(4, 5, 7, 0.87) 31%, rgba(4, 5, 7, 0.24) 65%, rgba(2, 3, 4, 0.66) 100%),
    linear-gradient(0deg, rgba(2, 3, 4, 0.78) 0%, transparent 38%, rgba(2, 3, 4, 0.32) 100%);
  content: "";
}

.city-grid {
  position: absolute;
  right: -5vw;
  bottom: 8%;
  width: 63vw;
  height: 40vh;
  min-height: 220px;
  opacity: 0.7;
  transform: perspective(500px) rotateX(57deg) rotateZ(-5deg);
  transform-origin: bottom right;
  background:
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(123, 217, 225, 0.14) 39px 40px),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(123, 217, 225, 0.1) 30px 31px);
  mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 100%);
}

.window-reflection {
  position: absolute;
  top: -12%;
  right: 19%;
  width: 27vw;
  height: 130%;
  opacity: 0.52;
  transform: rotate(11deg);
  background: linear-gradient(90deg, transparent, rgba(130, 216, 222, 0.09), transparent);
  filter: blur(8px);
}

.figure-shadow {
  position: absolute;
  right: 12%;
  bottom: -2%;
  width: min(27vw, 370px);
  height: 86%;
  opacity: 0.79;
  border-radius: 52% 48% 0 0;
  background:
    radial-gradient(ellipse at 56% 9%, rgba(55, 79, 83, 0.56) 0 8%, transparent 8.5%),
    linear-gradient(106deg, transparent 0 21%, rgba(16, 22, 25, 0.92) 22% 77%, transparent 78%),
    linear-gradient(90deg, rgba(5, 8, 10, 0.12), rgba(30, 43, 46, 0.55), rgba(4, 5, 7, 0.83));
  filter: blur(0.4px);
}

.desk-line {
  position: absolute;
  right: 0;
  bottom: 14%;
  width: 59%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(174, 234, 235, 0.3), rgba(174, 234, 235, 0.04));
  box-shadow: 0 30px 34px rgba(101, 197, 204, 0.08);
}

.screen-glow {
  position: absolute;
  right: 19%;
  bottom: 17%;
  width: 12rem;
  height: 7rem;
  opacity: 0.44;
  transform: perspective(400px) rotateY(-22deg) rotateX(12deg);
  background: linear-gradient(135deg, rgba(80, 174, 185, 0.27), rgba(7, 15, 17, 0.4));
  box-shadow: 0 0 68px rgba(77, 207, 219, 0.15);
}

.grain {
  z-index: 5;
  opacity: 0.08;
  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='.87' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.entry-topbar,
.entry-footer {
  position: absolute;
  right: clamp(1.5rem, 5vw, 5.4rem);
  left: clamp(1.5rem, 5vw, 5.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.entry-topbar {
  top: calc(clamp(1.6rem, 4.5vw, 3.6rem) + env(safe-area-inset-top));
}

.wordmark {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.wordmark span {
  margin: 0 0.1em;
  color: var(--cyan);
}

.edition {
  color: var(--faint);
}

.entry-copy {
  width: min(690px, 62vw);
  margin: auto 0 auto clamp(1.5rem, 11vw, 12rem);
  padding: calc(7rem + env(safe-area-inset-top)) 0 calc(6rem + env(safe-area-inset-bottom));
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 2rem;
  color: var(--cyan);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.19em;
}

.eyebrow-rule {
  display: inline-block;
  width: 2.8rem;
  height: 1px;
  background: var(--cyan);
  opacity: 0.68;
}

h1 {
  max-width: 11.5ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.15rem, 5.8vw, 6.4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.94;
}

h1 em {
  color: var(--cyan);
  font-style: normal;
}

.dek {
  max-width: 32rem;
  margin: 2.1rem 0 2.4rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.55;
}

.watch-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.8rem;
  padding: 0.85rem 1.1rem 0.85rem 1.25rem;
  border: 1px solid rgba(245, 245, 241, 0.82);
  background: var(--ink);
  color: #070809;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.watch-button:hover,
.watch-button:focus-visible {
  background: var(--cyan);
  box-shadow: 0 10px 34px rgba(144, 228, 230, 0.2);
  outline: none;
  transform: translateY(-2px);
}

.watch-icon {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.watch-icon span {
  width: 0;
  height: 0;
  margin-left: 0.13rem;
  border-top: 0.22rem solid transparent;
  border-bottom: 0.22rem solid transparent;
  border-left: 0.3rem solid currentColor;
}

.button-arrow {
  margin-left: 0.7rem;
  font-size: 1rem;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.2rem;
  color: var(--faint);
  font-size: 0.63rem;
  letter-spacing: 0.15em;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
}

.entry-footer {
  bottom: calc(clamp(1.6rem, 4.5vw, 3.6rem) + env(safe-area-inset-bottom));
  color: rgba(245, 245, 241, 0.42);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scroll-line {
  display: inline-block;
  width: 2.25rem;
  height: 1px;
  background: rgba(245, 245, 241, 0.35);
}

.safari-gate {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(1.35rem + env(safe-area-inset-top))
    calc(1.35rem + env(safe-area-inset-right))
    calc(1.35rem + env(safe-area-inset-bottom))
    calc(1.35rem + env(safe-area-inset-left));
  background: rgba(2, 3, 4, 0.78);
  backdrop-filter: blur(18px);
}

.safari-gate[hidden] {
  display: none;
}

.safari-gate-panel {
  position: relative;
  width: min(100%, 28rem);
  padding: clamp(2rem, 6vw, 3.2rem);
  border: 1px solid rgba(245, 245, 241, 0.22);
  background: rgba(14, 18, 20, 0.94);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.safari-gate-panel .eyebrow {
  margin-bottom: 1.25rem;
  font-size: 0.6rem;
}

.safari-gate-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.95;
}

.safari-gate-panel > p:not(.eyebrow):not(.safari-gate-help) {
  max-width: 22rem;
  margin: 1.4rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.safari-gate-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(245, 245, 241, 0.2);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.safari-gate-close:hover,
.safari-gate-close:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  outline: none;
}

.safari-gate-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.85rem 1rem 0.85rem 1.2rem;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: #071012;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.safari-gate-action:hover,
.safari-gate-action:focus-visible {
  background: var(--ink);
  color: #071012;
  outline: none;
  transform: translateY(-2px);
}

.safari-gate-help {
  margin: 1rem 0 0;
  color: rgba(245, 245, 241, 0.43);
  font-size: 0.7rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .entry-page {
    min-height: 100svh;
    background:
      radial-gradient(circle at 89% 38%, rgba(21, 55, 62, 0.34), transparent 17rem),
      #050608;
  }

  .entry-backdrop::before {
    background:
      linear-gradient(90deg, rgba(4, 5, 7, 0.96) 0%, rgba(4, 5, 7, 0.78) 58%, rgba(2, 3, 4, 0.52) 100%),
      linear-gradient(0deg, rgba(2, 3, 4, 0.83) 0%, transparent 50%, rgba(2, 3, 4, 0.2) 100%);
  }

  .city-grid {
    right: -21vw;
    bottom: 15%;
    width: 118vw;
    height: 31vh;
  }

  .window-reflection {
    right: -10%;
    width: 56vw;
  }

  .figure-shadow {
    right: -2%;
    width: 43vw;
    height: 68%;
    opacity: 0.56;
  }

  .screen-glow {
    right: 5%;
    bottom: 18%;
    width: 6.5rem;
    height: 4rem;
  }

  .entry-topbar,
  .entry-footer {
    right: 1.35rem;
    left: 1.35rem;
  }

  .entry-copy {
    width: auto;
    margin: auto 1.35rem;
    padding: calc(6rem + env(safe-area-inset-top)) 0 calc(7rem + env(safe-area-inset-bottom));
  }

  .eyebrow {
    margin-bottom: 1.55rem;
    font-size: 0.58rem;
    letter-spacing: 0.13em;
  }

  .eyebrow-rule {
    width: 1.9rem;
  }

  h1 {
    max-width: 10.5ch;
    font-size: clamp(2.9rem, 13vw, 4.6rem);
    line-height: 0.94;
  }

  .dek {
    max-width: 20rem;
    margin: 1.6rem 0 2rem;
    font-size: 0.92rem;
  }

  .watch-button {
    width: 100%;
    justify-content: space-between;
    min-height: 3.65rem;
    padding-left: 1rem;
    font-size: 0.68rem;
  }

  .safari-gate-panel {
    padding: 2.2rem 1.35rem 1.5rem;
  }

  .entry-footer > span:first-child {
    max-width: 13rem;
    line-height: 1.4;
  }

  .scroll-cue {
    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;
  }
}
