@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&family=Syne:wght@500;700&display=swap");

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0b1020;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: #dbe8ff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.boot-loading {
  overflow: hidden;
}

body.fallback-active {
  overflow-y: auto;
}

#app {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

.boot-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.0) 36%),
    linear-gradient(180deg, rgba(246, 247, 249, 0.96), rgba(234, 236, 240, 0.97));
  z-index: 60;
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

body.boot-ready .boot-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.boot-error .boot-overlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.0) 36%),
    linear-gradient(180deg, rgba(22, 25, 31, 0.98), rgba(11, 13, 18, 0.98));
}

.boot-mark {
  width: min(480px, 92vw);
  text-align: center;
  color: rgba(19, 24, 34, 0.92);
}

.boot-kicker {
  margin-bottom: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(62, 72, 88, 0.7);
}

.boot-title {
  font-family: "Syne", "Manrope", sans-serif;
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.boot-status {
  margin-top: 12px;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  color: rgba(44, 52, 64, 0.74);
}

.boot-bar {
  width: min(260px, 64vw);
  height: 6px;
  margin: 18px auto 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(56, 66, 82, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.boot-bar-fill {
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(231, 235, 240, 0.98), rgba(158, 170, 186, 0.98));
  animation: bootPulse 1.15s ease-in-out infinite;
  transform-origin: left center;
}

body.boot-error .boot-mark {
  color: rgba(235, 241, 250, 0.96);
}

body.boot-error .boot-kicker {
  color: rgba(200, 211, 226, 0.72);
}

body.boot-error .boot-status {
  color: rgba(214, 224, 238, 0.8);
}

body.boot-error .boot-bar {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.boot-error .boot-bar-fill {
  background: linear-gradient(90deg, rgba(221, 228, 238, 0.88), rgba(129, 144, 165, 0.82));
}

.fallback-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 28px);
  box-sizing: border-box;
  transform: translate(-50%, -46%);
  padding: 28px 26px 24px;
  border-radius: 22px;
  background: rgba(251, 252, 253, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(24, 30, 42, 0.16);
  backdrop-filter: blur(14px);
  color: rgba(18, 24, 35, 0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 55;
  transition: opacity 260ms ease, transform 260ms ease, visibility 260ms ease;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

body.fallback-active .fallback-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.fallback-kicker {
  margin-bottom: 10px;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(69, 78, 94, 0.72);
}

.fallback-panel h1 {
  margin: 0;
  font-family: "Syne", "Manrope", sans-serif;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.fallback-intro {
  margin-top: 10px;
  font-size: clamp(1rem, 1.65vw, 1.14rem);
  line-height: 1.45;
  color: rgba(43, 51, 64, 0.72);
}

.fallback-panel p {
  margin: 14px 0 0;
  font-size: clamp(1rem, 1.55vw, 1.08rem);
  line-height: 1.55;
  color: rgba(35, 42, 55, 0.78);
}

.fallback-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.fallback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(19, 25, 36, 0.92);
  background: rgba(236, 240, 246, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(24, 30, 42, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.fallback-link-card {
  min-height: 148px;
  width: 100%;
  padding: 18px 16px 16px;
  border-radius: 20px;
  align-items: flex-start;
  justify-content: flex-end;
  flex-direction: column;
  gap: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.18) 44%, rgba(255, 255, 255, 0.02) 72%),
    linear-gradient(180deg, rgba(241, 245, 250, 0.96), rgba(230, 236, 244, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.95);
  overflow-wrap: anywhere;
}

.fallback-link-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(74, 84, 102, 0.68);
}

.fallback-link-title {
  font-family: "Syne", "Manrope", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: rgba(17, 23, 35, 0.96);
  text-wrap: balance;
}

.fallback-link-meta {
  font-size: 0.92rem;
  line-height: 1.35;
  color: rgba(41, 49, 62, 0.72);
  text-wrap: pretty;
}

.fallback-link:hover {
  transform: translateY(-1px);
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 12px 24px rgba(24, 30, 42, 0.14);
}

.fallback-link:focus-visible {
  outline: 2px solid rgba(40, 120, 255, 0.8);
  outline-offset: 2px;
}

@keyframes bootPulse {
  0% {
    transform: translateX(-60%) scaleX(0.7);
    opacity: 0.42;
  }
  50% {
    transform: translateX(78%) scaleX(1.08);
    opacity: 1;
  }
  100% {
    transform: translateX(180%) scaleX(0.74);
    opacity: 0.42;
  }
}

.label {
  position: fixed;
  top: 10px;
  left: 12px;
  font-size: 13px;
  opacity: 0.9;
  user-select: none;
  pointer-events: none;
  z-index: 2;
  transform: translate(var(--ui-warp-x, 0px), var(--ui-warp-y, 0px));
}

.year-tag {
  position: fixed;
  transform: translate(-50%, -50%);
  font-size: clamp(0.9rem, 1.15vw, 1.08rem);
  letter-spacing: 0.12em;
  font-weight: 600;
  color: rgba(20, 26, 34, 0.75);
  pointer-events: none;
  user-select: none;
  z-index: 3;
  transition: opacity 220ms ease;
}

.feature-copy {
  --shift-x: 0px;
  --warp-x: 0px;
  --warp-y: 0px;
  position: fixed;
  right: 7vw;
  top: 20vh;
  width: min(500px, 46vw);
  color: rgba(16, 22, 30, 0.9);
  opacity: 0;
  transform: translate(calc(var(--shift-x) + var(--warp-x)), calc(8px + var(--warp-y)));
  transition: opacity 340ms ease, transform 340ms ease;
  z-index: 4;
  pointer-events: none;
}

.feature-copy.right {
  right: 7vw;
  left: auto;
  text-align: left;
}

.feature-copy.left {
  left: 7vw;
  right: auto;
  text-align: left;
}

.feature-copy.center-right {
  left: 52vw;
  right: auto;
  width: min(520px, 42vw);
  text-align: left;
}

.feature-copy.visible {
  opacity: 1;
  transform: translate(calc(var(--shift-x) + var(--warp-x)), var(--warp-y));
  pointer-events: auto;
}

.feature-copy h2 {
  margin: 0 0 0.5rem;
  font-family: "Syne", "Manrope", sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.92rem);
  font-weight: 500;
  line-height: 1.14;
  text-wrap: balance;
}

.feature-copy .feature-year {
  margin: 0 0 0.35rem;
  font-size: clamp(0.9rem, 1.1vw, 1.02rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(36, 45, 58, 0.68);
}

.feature-copy p {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(0.94rem, 1.18vw, 1.02rem);
  line-height: 1.48;
  color: rgba(24, 32, 42, 0.75);
  text-wrap: pretty;
}

.feature-copy .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  filter: blur(2px);
  animation: featureWordIn 540ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: calc(var(--wd, 0) * 1ms);
  will-change: transform, opacity, filter;
}

@keyframes featureWordIn {
  from {
    opacity: 0;
    transform: translateY(0.6em);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 1360px) and (min-width: 769px) {
  .feature-copy {
    width: min(540px, 50vw);
  }

  .feature-copy h2 {
    font-size: clamp(1.34rem, 2.5vw, 2rem);
    line-height: 1.12;
  }

  .feature-copy p {
    font-size: clamp(0.98rem, 1.4vw, 1.08rem);
    line-height: 1.45;
  }
}

body.dark-mode {
  background: #090b10;
  color: #e8edf6;
}

body.dark-mode .label {
  color: rgba(230, 236, 246, 0.85);
}

body.dark-mode .year-tag {
  color: rgba(235, 242, 252, 0.78);
}

body.dark-mode .feature-copy .feature-year {
  color: rgba(218, 226, 238, 0.72);
}

body.dark-mode .feature-copy h2 {
  color: rgba(239, 244, 250, 0.96);
}

body.dark-mode .feature-copy p {
  color: rgba(214, 223, 236, 0.82);
}

body.dark-mode .fallback-panel {
  background: rgba(17, 21, 28, 0.86);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color: rgba(236, 242, 250, 0.96);
}

body.dark-mode .fallback-kicker {
  color: rgba(198, 208, 222, 0.7);
}

body.dark-mode .fallback-intro {
  color: rgba(214, 223, 236, 0.72);
}

body.dark-mode .fallback-link-card {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04) 44%, rgba(255, 255, 255, 0.01) 72%),
    linear-gradient(180deg, rgba(34, 40, 50, 0.96), rgba(24, 29, 38, 0.92));
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .fallback-link-title {
  color: rgba(241, 246, 252, 0.96);
}

body.dark-mode .fallback-link-kicker {
  color: rgba(192, 203, 217, 0.7);
}

body.dark-mode .fallback-link-meta {
  color: rgba(213, 222, 235, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .boot-overlay,
  .feature-copy,
  .feature-copy .word {
    transition: none;
    animation: none;
  }

  .boot-bar-fill {
    animation-duration: 2.4s;
  }
}

@media (max-width: 920px) {
  .fallback-panel {
    width: min(calc(100vw - 24px), 620px);
  }

  .fallback-actions {
    grid-template-columns: 1fr;
  }

  .fallback-link-card {
    min-height: unset;
  }
}

@media (max-width: 680px) {
  .fallback-panel {
    width: calc(100vw - 16px);
    padding: 22px 18px 18px;
    max-height: calc(100vh - 18px);
    border-radius: 18px;
  }

  .fallback-actions {
    grid-template-columns: 1fr;
  }

  .fallback-link {
    width: 100%;
  }
}
