:root {
  --ink: #f5f7fa;
  --muted: #9da8b7;
  --dim: #9aa5b5;
  --ground: #07090d;
  --surface: #0d1118;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #62e6ff;
  --amber: #ffbd6f;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ground);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% 48%, rgba(44, 132, 157, 0.13), transparent 34rem),
    linear-gradient(135deg, #07090d 0%, #090c12 55%, #07090d 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
  content: "";
  pointer-events: none;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: #071015;
  background: var(--cyan);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.25rem, 2.6vw, 2.5rem) clamp(1.25rem, 4vw, 4.5rem) max(1.1rem, env(safe-area-inset-bottom));
}

.masthead,
.site-footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.wordmark small {
  color: var(--muted);
  font-size: 0.57em;
  font-weight: 620;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wordmark-mark {
  position: relative;
  display: inline-block;
  width: 1.42em;
  height: 1.42em;
  margin-right: 0.36em;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transform: translateY(0.32em);
}

.wordmark-mark::before,
.wordmark-mark i {
  position: absolute;
  left: 50%;
  width: 62%;
  height: 1px;
  background: currentColor;
  content: "";
  transform: translateX(-50%) rotate(-19deg);
  transform-origin: center;
}

.wordmark-mark::before {
  top: 50%;
}

.wordmark-mark i:first-child {
  top: 35%;
  background: var(--cyan);
}

.wordmark-mark i:last-child {
  top: 65%;
  background: var(--amber);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-pulse {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(98, 230, 255, 0.5);
  animation: status-pulse 2.4s ease-out infinite;
}

.hero {
  display: grid;
  grid-template-columns: minmax(19rem, 0.73fr) minmax(31rem, 1.27fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  width: min(100%, 100rem);
  margin: 0 auto;
  padding: clamp(3rem, 5.5vh, 5.75rem) 0;
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 39rem;
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.7rem, 6.4vw, 7.9rem);
  font-weight: 580;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

h1 em {
  color: transparent;
  background: linear-gradient(92deg, #f6f9fb 5%, #8eeaff 52%, #ffca88 110%);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.intro {
  max-width: 31rem;
  margin: clamp(1.7rem, 3vw, 2.5rem) 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.62;
}

.loop-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  width: min(100%, 29rem);
  margin-top: clamp(2.2rem, 4vw, 3.75rem);
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.meter-track {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.meter-track i {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  animation: meter 10s linear infinite -0.6s;
}

.reel {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  isolation: isolate;
  perspective: 1200px;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 300ms var(--ease);
}

.reel-aura {
  position: absolute;
  inset: 10% 3% 8%;
  z-index: -1;
  border-radius: 42%;
  background: linear-gradient(130deg, rgba(60, 224, 255, 0.17), rgba(255, 165, 75, 0.12));
  filter: blur(5rem);
  opacity: 0.78;
  animation: aura 10s ease-in-out infinite;
}

.reel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: clamp(0.9rem, 1.55vw, 1.55rem);
  background: #0b0f16;
  box-shadow:
    0 2.8rem 7rem rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(98, 230, 255, 0.035) inset;
  transform: translateZ(0);
}

.reel-stage::after {
  position: absolute;
  inset: 0;
  z-index: 6;
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(98, 230, 255, 0.4), transparent 32%, transparent 72%, rgba(255, 189, 111, 0.28)) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  content: "";
  opacity: 0.62;
  pointer-events: none;
}

.reel-scene {
  --from-x: -1%;
  --from-y: 0%;
  --to-x: 1%;
  --to-y: 0%;
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity, transform;
  animation: cinematic-dissolve 10s linear infinite both;
}

.reel-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04) brightness(0.91);
}

.reel-build {
  --from-x: -1.1%;
  --from-y: -0.5%;
  --to-x: 1.2%;
  --to-y: 0.6%;
  animation-delay: -0.6s;
}

.reel-launch {
  --from-x: 0.5%;
  --from-y: 1%;
  --to-x: -0.9%;
  --to-y: -1.2%;
  animation-delay: 1.9s;
}

.reel-create {
  --from-x: 1%;
  --from-y: -0.4%;
  --to-x: -1.1%;
  --to-y: 0.7%;
  animation-delay: 4.4s;
}

.reel-advance {
  --from-x: -0.5%;
  --from-y: 0.9%;
  --to-x: 1%;
  --to-y: -0.7%;
  animation-delay: 6.9s;
}

.reel-caption {
  position: absolute;
  right: clamp(1.1rem, 2.3vw, 2rem);
  bottom: clamp(1.15rem, 2.3vw, 2rem);
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0;
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.reel-caption span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.15em;
}

.reel-caption strong {
  font-size: clamp(1rem, 1.55vw, 1.32rem);
  font-weight: 620;
  letter-spacing: -0.025em;
}

.reel-vignette,
.reel-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reel-vignette {
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(2, 4, 8, 0.22), transparent 27%, transparent 55%, rgba(2, 4, 8, 0.62)),
    radial-gradient(circle at center, transparent 45%, rgba(2, 4, 8, 0.24) 100%);
}

.reel-grain {
  z-index: 4;
  opacity: 0.14;
  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='.48'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  animation: grain-shift 0.45s steps(2, end) infinite;
}

.reel-chrome {
  position: absolute;
  top: clamp(0.9rem, 2vw, 1.5rem);
  right: clamp(0.9rem, 2vw, 1.5rem);
  left: clamp(0.9rem, 2vw, 1.5rem);
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.reel-loop {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
}

.reel-loop i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0.8rem rgba(98, 230, 255, 0.75);
}

.reel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(4, 7, 11, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.875rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.reel-toggle:hover,
.reel-toggle:focus-visible {
  border-color: rgba(98, 230, 255, 0.7);
  color: white;
  background: rgba(7, 15, 21, 0.72);
  outline: none;
}

.reel-toggle [data-reel-icon] {
  min-width: 0.65rem;
  color: var(--cyan);
  font-size: 0.875rem;
  text-align: center;
}

.reel-paused .reel-scene,
.reel-paused .reel-aura,
.reel-paused .reel-grain,
.reel-paused .meter-track i {
  animation-play-state: paused;
}

.interaction-hint {
  position: absolute;
  right: 0;
  bottom: -1.85rem;
  margin: 0;
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-footer {
  gap: 1rem;
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: 0.055em;
}

.site-footer p {
  margin: 0;
}

.concept-note {
  text-align: center;
}

.notice-trigger,
.notice-close {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.24);
  text-underline-offset: 0.24em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.notice-trigger:hover,
.notice-trigger:focus-visible,
.notice-close:hover,
.notice-close:focus-visible {
  color: var(--ink);
  text-decoration-color: var(--cyan);
  outline: none;
}

.notice {
  width: min(44rem, calc(100vw - 2rem));
  max-height: min(45rem, calc(100svh - 2rem));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.2rem;
  color: var(--ink);
  background: rgba(12, 16, 23, 0.98);
  box-shadow: 0 2rem 8rem rgba(0, 0, 0, 0.68);
}

.notice::backdrop {
  background: rgba(1, 3, 6, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.notice[open] {
  animation: notice-in 300ms var(--ease) both;
}

.notice-inner {
  padding: clamp(1.35rem, 4vw, 2.5rem);
}

.notice-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.notice-heading .eyebrow {
  margin-bottom: 0.7rem;
  font-size: 0.62rem;
}

.notice h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.notice h3 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.62;
}

.notice-copy {
  display: grid;
  gap: 1.3rem;
  padding-top: 1.6rem;
}

@keyframes meter {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes cinematic-dissolve {
  0% {
    opacity: 0;
    transform: scale(1.035) translate3d(var(--from-x), var(--from-y), 0);
  }
  6% {
    opacity: 1;
  }
  25% {
    opacity: 1;
  }
  31% {
    opacity: 0;
    transform: scale(1.105) translate3d(var(--to-x), var(--to-y), 0);
  }
  100% {
    opacity: 0;
    transform: scale(1.105) translate3d(var(--to-x), var(--to-y), 0);
  }
}

@keyframes grain-shift {
  0% { transform: translate3d(-1%, -1%, 0) scale(1.04); }
  50% { transform: translate3d(1%, 0, 0) scale(1.04); }
  100% { transform: translate3d(0, 1%, 0) scale(1.04); }
}

@keyframes aura {
  0%, 100% { transform: translate3d(-2%, -1%, 0) scale(0.96); opacity: 0.58; }
  50% { transform: translate3d(4%, 3%, 0) scale(1.08); opacity: 0.86; }
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(98, 230, 255, 0.45); }
  55%, 100% { box-shadow: 0 0 0 0.48rem rgba(98, 230, 255, 0); }
}

@keyframes notice-in {
  from { opacity: 0; transform: translateY(1rem) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4rem 0 3.75rem;
  }

  .hero-copy {
    max-width: 43rem;
  }

  h1 {
    font-size: clamp(4.1rem, 12vw, 7.4rem);
  }

  .reel {
    width: min(100%, 47rem);
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  body::before {
    background-size: 48px 48px;
  }

  .site-shell {
    padding-inline: 1rem;
  }

  .masthead {
    align-items: flex-start;
  }

  .status {
    max-width: 8.5rem;
    justify-content: flex-end;
    text-align: right;
    line-height: 1.35;
  }

  .hero {
    gap: 2.7rem;
    padding: 4.25rem 0 3.4rem;
  }

  h1 {
    font-size: clamp(3.75rem, 18vw, 5.8rem);
  }

  .intro {
    max-width: 28rem;
    font-size: 1rem;
  }

  .reel {
    transform: none;
  }

  .reel-stage {
    aspect-ratio: 4 / 3;
  }

  .interaction-hint {
    right: 0;
  }

  .site-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1rem;
    align-items: end;
  }

  .concept-note {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .meter-track i {
    transform: scaleX(1);
  }

  .reel-scene {
    animation: none !important;
    opacity: 0;
    transform: none;
  }

  .reel-scene:first-child {
    opacity: 1;
  }

  .reel-toggle {
    display: none;
  }
}

@media (forced-colors: active) {
  .reel-stage,
  .notice {
    border: 2px solid CanvasText;
  }

  h1 em {
    color: CanvasText;
  }
}
