/* WEBv3 detail pass. Intentional image/text stacking keeps its original geometry. */
:root {
  --muted: rgba(244, 247, 251, 0.74);
  --faint: rgba(244, 247, 251, 0.57);
  --focus-ring: #a6e5ff;
}

::selection {
  color: #fff;
  background: rgba(79, 149, 192, 0.48);
}

[data-typewriter],
[data-typewriter] .typewriter-letter {
  animation: none;
  transition: none;
  transform: none;
}

[data-typewriter] .typewriter-letter {
  position: relative;
  display: inline;
  visibility: hidden;
}

[data-typewriter] .typewriter-letter.is-shown {
  visibility: visible;
}

[data-typewriter] .typewriter-letter.is-cursor::after {
  content: "";
  position: absolute;
  top: .1em;
  left: 0;
  width: .2em;
  max-width: 9px;
  height: .86em;
  visibility: visible;
  background: #b9dce8;
  pointer-events: none;
}

[data-typewriter] .typewriter-letter.is-cursor-end::after {
  left: calc(100% + 1px);
}

[data-typewriter] .typewriter-letter.is-cursor.is-pausing::after {
  animation: title-caret-blink 440ms step-end infinite;
}

@keyframes title-caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter-readable {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  user-select: none;
}

.is-typewriter-ready [data-typewriter-reveal] {
  opacity: 0;
  visibility: hidden;
  transition: opacity 450ms ease;
}

.is-typewriter-ready[data-typewriter-state="done"] [data-typewriter-reveal] {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  [data-typewriter] .typewriter-letter {
    visibility: visible;
  }

  [data-typewriter] .typewriter-letter.is-cursor::after {
    display: none;
  }

  .is-typewriter-ready [data-typewriter-reveal] {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 5px;
}

button,
.primary-button,
.play-button,
.ghost-button,
.text-link {
  touch-action: manipulation;
}

.site-header {
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(202, 223, 242, 0.09);
  background: rgba(3, 5, 9, 0.86);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.brand-text small {
  color: rgba(227, 237, 247, 0.62);
}

/* Keep the longer brand sign and product names fully visible. */
@media (min-width: 721px) {
  .page-contact {
    --sub-visual-position: right top;
  }
}

@media (max-width: 360px) {
  .layers-visual article strong {
    font-size: 17px;
  }
}

.nav-trigger {
  border-color: rgba(216, 232, 248, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-panel {
  display: grid;
  border-color: rgba(184, 216, 239, 0.2);
  background: linear-gradient(155deg, rgba(18, 25, 34, 0.98), rgba(6, 10, 16, 0.97));
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-panel-link {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.nav-panel-link[aria-current="page"] {
  border-color: rgba(131, 217, 255, 0.25);
  background: linear-gradient(100deg, rgba(131, 217, 255, 0.14), rgba(255, 255, 255, 0.025));
  box-shadow: inset 2px 0 0 rgba(151, 225, 255, 0.8);
}

.primary-button {
  border-color: rgba(191, 231, 249, 0.55);
  background: linear-gradient(135deg, rgba(184, 224, 246, 0.28), rgba(122, 162, 191, 0.12));
  box-shadow: inset 0 1px 0 rgba(237, 249, 255, 0.24), 0 10px 28px rgba(0, 0, 0, 0.18);
}

.play-button,
.ghost-button,
.text-link {
  border-color: rgba(221, 232, 245, 0.28);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.primary-button:hover {
  border-color: rgba(204, 239, 255, 0.8);
  background: linear-gradient(135deg, rgba(168, 219, 248, 0.35), rgba(127, 171, 205, 0.17));
  box-shadow: inset 0 1px 0 rgba(244, 252, 255, 0.28), 0 12px 36px rgba(62, 119, 158, 0.17);
}

.primary-button:focus-visible,
.play-button:focus-visible,
.ghost-button:focus-visible,
.text-link:focus-visible,
.nav-panel-link:focus-visible,
.nav-trigger:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 5px;
}

.primary-button > span,
.ghost-button > span,
.text-link > span {
  transition: transform 0.2s ease;
}

.primary-button:hover > span,
.ghost-button:hover > span,
.text-link:hover > span {
  transform: translateX(3px);
}

.play-button > span {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(238, 247, 255, 0.85);
  background: transparent;
}

.play-button > span::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 7px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
}

.site-footer .footer-links {
  font-size: 13px;
  color: rgba(231, 239, 248, 0.7);
}

.site-footer .footer-meta {
  font-size: 12px;
  line-height: 1.85;
  color: rgba(216, 229, 243, 0.62);
}

.hero h1,
.sub-hero h1 {
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.24);
}

/* Refine the existing screen artwork without changing its paths or placement. */
.device-face-svg .screen-face-line {
  stroke-width: 6.5;
  opacity: 0.94;
}

.device-face-svg .screen-face-thin {
  stroke-width: 1.3;
  opacity: 0.7;
}

.device-face-svg .screen-face-hud {
  stroke: rgba(180, 238, 255, 0.18);
}

.device-face-svg .screen-face-ball {
  stroke-width: 2.6;
}

.architecture-visual,
.layers-visual {
  border-color: rgba(186, 217, 242, 0.2);
  background:
    radial-gradient(ellipse at 28% 12%, rgba(114, 171, 205, 0.14), transparent 65%),
    linear-gradient(145deg, rgba(24, 34, 46, 0.9), rgba(7, 12, 19, 0.94));
  box-shadow: inset 0 1px 0 rgba(232, 247, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.24);
}

.architecture-visual > span {
  gap: 12px;
  border-color: rgba(174, 211, 234, 0.18);
  background: linear-gradient(120deg, rgba(28, 42, 55, 0.75), rgba(5, 11, 18, 0.9));
  color: #e6f3fb;
  box-shadow: inset 0 1px 0 rgba(213, 237, 255, 0.05);
}

.architecture-visual > span::before {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a4dbf2;
  box-shadow: 0 0 10px rgba(115, 210, 249, 0.3);
}

.boundary-visual::before {
  inset: 12% 8%;
  transform: none;
  border-style: dashed;
  border-radius: 20px;
  border-color: rgba(192, 221, 240, 0.28);
}

.boundary-visual > span::before {
  flex-basis: 6px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  border: 1px solid rgba(183, 218, 241, 0.8);
  background: transparent;
  box-shadow: none;
}

.layers-visual article {
  border-color: rgba(187, 220, 242, 0.18);
  background: linear-gradient(120deg, rgba(22, 35, 46, 0.94), rgba(6, 12, 18, 0.96));
  box-shadow: inset 2px 0 0 rgba(131, 217, 255, 0.42), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.layers-visual article > span {
  color: rgba(174, 222, 246, 0.76);
  font-size: 12px;
}

.scene-toc-item {
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.scene-toc-item.is-active {
  background: linear-gradient(180deg, rgba(129, 201, 236, 0.08), transparent);
}

.scene-toc-item:hover {
  color: #e5f5ff;
  background-color: rgba(146, 203, 235, 0.045);
}

.scene-toc-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -5px;
}

.scene-detail[hidden] {
  display: none !important;
}

.scene-device-pill {
  border-color: rgba(189, 223, 244, 0.34);
  box-shadow: inset 0 1px 0 rgba(247, 253, 255, 0.13), 0 9px 25px rgba(0, 0, 0, 0.16);
}

.origin-principle {
  border-color: rgba(173, 207, 232, 0.16);
  box-shadow: inset 0 1px 0 rgba(244, 250, 255, 0.04);
}

.origin-principle-tags > span {
  color: rgba(233, 244, 252, 0.78);
  font-size: 12px;
}

.contact-wechat-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 2px 0;
  border: 0;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.contact-wechat-button .contact-qr-trigger {
  display: grid;
  flex: 0 0 42px;
  margin: 0;
  pointer-events: none;
}

.contact-wechat-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 6px;
}

.contact-qr-slide {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

/* Fade the background layers into one continuous page surface. */
.page-home,
.sub-page {
  --section-base: #030509;
  --section-fade: clamp(110px, 15vh, 190px);
  background: var(--section-base);
}

.page-home .hero,
.sub-page .sub-hero {
  background: var(--section-base);
}

.page-home .hero-bg {
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--section-fade) + var(--hero-bg-bottom)), transparent calc(100% + var(--hero-bg-bottom)));
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--section-fade) + var(--hero-bg-bottom)), transparent calc(100% + var(--hero-bg-bottom)));
}

.sub-page .sub-hero,
.page-origin .origin-mission,
.page-home .site-footer,
.sub-page .site-footer {
  border-color: transparent;
}

.sub-page .sub-hero::before,
.sub-page .sub-hero::after,
.page-origin .origin-hero-stage::before,
.page-origin .origin-hero-stage::after,
.page-origin .origin-light-overlay {
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--section-fade) + var(--sub-visual-bottom)), transparent calc(100% + var(--sub-visual-bottom)));
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--section-fade) + var(--sub-visual-bottom)), transparent calc(100% + var(--sub-visual-bottom)));
}

.page-origin .origin-mission::before,
.page-origin .origin-mission::after {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 var(--section-fade), #000 calc(100% - var(--section-fade)), transparent);
  mask-image: linear-gradient(180deg, transparent, #000 var(--section-fade), #000 calc(100% - var(--section-fade)), transparent);
}

.page-home .vision {
  border-color: transparent;
  border-radius: 0;
  background: var(--section-base);
  box-shadow: none;
  backdrop-filter: none;
}

.page-home .vision .horizon {
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 76%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 76%, transparent);
}

.page-home .site-footer,
.sub-page .site-footer {
  background: var(--section-base);
}

@media (prefers-reduced-motion: reduce) {
  .primary-button > span,
  .ghost-button > span,
  .text-link > span,
  .nav-panel,
  .scene-toc-item,
  .reveal {
    transition: none;
  }
}

/* Reserved for the new police filing after approval. */
.footer-police-slot {
  display: block;
  flex-basis: 100%;
  min-height: 1.6em;
}
