/* ============================================================
   CourierGuard — network-native scroll cinema
   Scoped entirely under #courier-section (cg- prefix)
   ============================================================ */

#courier-section.cg-root {
  --cg-white: #ffffff;
  --cg-black: #000000;
  --cg-ink: #1e1e1e;
  --cg-panel: #141414;
  --cg-gray-1: #8a8a8e;
  --cg-gray-2: #3a3a3c;
  --cg-line: rgba(255, 255, 255, 0.14);
  --cg-line-soft: rgba(255, 255, 255, 0.07);
  position: relative;
  background: var(--cg-black);
  color: var(--cg-white);
  padding: 0;
  overflow: hidden;
}

#courier-section.cg-root * {
  box-sizing: border-box;
}

/* ---------- Chrome (progress rail, brand, hints) ---------- */
#courier-section .cg-brand-mark {
  position: sticky;
  top: 28px;
  left: 32px;
  z-index: 5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  float: left;
  margin: 28px 0 0 32px;
  pointer-events: none;
}
#courier-section .cg-scene-index {
  position: sticky;
  top: 28px;
  z-index: 5;
  font-size: 0.7rem;
  color: var(--cg-gray-1);
  letter-spacing: 0.1em;
  float: right;
  margin: 28px 32px 0 0;
  pointer-events: none;
}
#courier-section .cg-progress-rail {
  position: sticky;
  top: 50%;
  float: right;
  transform: translateY(-50%);
  width: 2px;
  height: 160px;
  background: var(--cg-line-soft);
  z-index: 5;
  margin-right: 24px;
  pointer-events: none;
}
#courier-section .cg-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--cg-white);
}
#courier-section .cg-scroll-hint {
  position: sticky;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--cg-gray-1);
  text-transform: uppercase;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto;
  pointer-events: none;
}
#courier-section .cg-stick {
  width: 1px;
  height: 24px;
  background: var(--cg-gray-2);
  position: relative;
  overflow: hidden;
}
#courier-section .cg-stick i {
  position: absolute;
  top: -24px;
  left: 0;
  width: 100%;
  height: 24px;
  background: var(--cg-white);
  animation: cgStickMove 1.8s ease-in-out infinite;
}
@keyframes cgStickMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(48px);
  }
}

/* ---------- Stage / pin structure ---------- */
#courier-section .cg-stage-wrap {
  position: relative;
}
#courier-section .cg-pin {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#courier-section .cg-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
#courier-section .cg-layer {
  position: relative;
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

/* ---------- Typography ---------- */
/* #courier-section .cg-display {
  font-family: "Poppins", "Inter Tight", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-align: center;
} */
#courier-section .cg-xl {
  font-size: clamp(2rem, 7vw, 4.6rem);
}
#courier-section .cg-lg {
  font-size: clamp(1.6rem, 4.6vw, 3.4rem);
}
#courier-section .cg-md {
  font-size: clamp(1.15rem, 2.6vw, 1.9rem);
  font-weight: 600;
}

#courier-section .cg-eyebrow {
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cg-gray-1);
  font-weight: 600;
}

#courier-section .cg-mono {
  font-family: "SF Mono", "Roboto Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

#courier-section .cg-char {
  display: inline-block;
  will-change: transform, opacity;
}

/* ---------- Tags / dots ---------- */
#courier-section .cg-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--cg-line);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cg-gray-1);
}
#courier-section .cg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cg-gray-1);
  flex-shrink: 0;
}
#courier-section .cg-dot.cg-live {
  background: var(--cg-white);
  animation: cgPulse 1.6s infinite;
}
#courier-section .cg-dot.cg-dead {
  background: #5a2a2a;
}
@keyframes cgPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* ---------- Data cards ---------- */
#courier-section .cg-data-card {
  border: 1px solid var(--cg-line);
  padding: 16px 22px;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.02);
}
#courier-section .cg-data-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--cg-line-soft);
}
#courier-section .cg-data-row:last-child {
  border-bottom: none;
}
#courier-section .cg-k {
  color: var(--cg-gray-1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.64rem;
}
#courier-section .cg-v {
  font-weight: 600;
}

#courier-section .cg-hr {
  height: 1px;
  background: var(--cg-line-soft);
  margin: 14px 0;
}

#courier-section svg {
  display: block;
  overflow: visible;
  max-width: 100%;
}

#courier-section .cg-node-label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cg-gray-1);
  text-align: center;
}

/* ---------- Phone card (scene 09) ---------- */
#courier-section .cg-phone-card {
  width: 260px;
  border: 1px solid var(--cg-line);
  border-radius: 26px;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- Operator scene layout ---------- */
#courier-section .cg-operator-flex {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Mesh / relay / gateway status states ---------- */
#courier-section .cg-mesh-link,
#courier-section .cg-relay-link,
#courier-section .cg-gateway-link {
  transition:
    stroke 0.4s ease,
    opacity 0.4s ease;
}

/* ---------- Footer / real project content (non-pinned) ---------- */
#courier-section .cg-footer {
  position: relative;
  padding: 120px 24px;
  background: var(--cg-black);
  border-top: 1px solid var(--cg-line-soft);
}
#courier-section .cg-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
#courier-section .cg-footer-title {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 14px 0 48px;
  letter-spacing: -0.02em;
}
#courier-section .cg-footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
#courier-section .cg-footer-media {
  width: 100%;
}
#courier-section .cg-footer-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--cg-line);
  background: var(--cg-panel);
}
#courier-section .cg-footer-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#courier-section .cg-footer-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Toggle (preserved concept, restyled) */
#courier-section .courier-toggle {
  display: inline-flex;
  gap: 8px;
  border: 1px solid var(--cg-line);
  border-radius: 100px;
  padding: 4px;
  width: fit-content;
}
#courier-section .courier-toggle-btn {
  border: none;
  background: transparent;
  color: var(--cg-gray-1);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
#courier-section .courier-toggle-btn:focus-visible {
  outline: 2px solid var(--cg-white);
  outline-offset: 2px;
}
#courier-section .courier-toggle-btn.active {
  background: var(--cg-white);
  color: var(--cg-black);
}

#courier-section .courier-desc {
  color: var(--cg-gray-1);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 46ch;
}

#courier-section .courier-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
#courier-section .courier-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#courier-section .courier-stats > div span:first-child {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cg-gray-1);
}
#courier-section .courier-stats > div span:last-child {
  font-weight: 700;
  font-size: 0.95rem;
}

#courier-section .courier-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#courier-section .courier-list li {
  position: relative;
  padding-left: 20px;
  color: var(--cg-white);
  font-size: 0.9rem;
}
#courier-section .courier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cg-white);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  #courier-section .cg-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #courier-section .cg-progress-rail,
  #courier-section .cg-brand-mark,
  #courier-section .cg-scene-index {
    display: none;
  }
  #courier-section .cg-data-card {
    min-width: 0;
    width: 100%;
    max-width: 280px;
    padding: 14px 16px;
  }
  #courier-section .cg-footer {
    padding: 72px 20px;
  }
  #courier-section .courier-stats {
    gap: 18px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #courier-section .cg-pin {
    height: auto;
    min-height: 60vh;
    padding: 60px 0;
  }
  #courier-section .cg-stick i {
    animation: none;
  }
  #courier-section .cg-dot.cg-live {
    animation: none;
  }
  #courier-section .cg-char {
    opacity: 1 !important;
    transform: none !important;
  }
}
