/* QR Free Digital — Signal Mesh chrome (asymmetric). Motor IDs / tab order untouched. */
:root {
  --ink: #10241f;
  --desk: #e7f1ee;
  --panel: #ffffff;
  --mute: #4d6760;
  --azure: #1283d4;
  --azure-ink: #e8f4fc;
  --mango: #ff5c1a;
  --mango-ink: #fff4ee;
  --sky: #7dd3fc;
  --line: #c5d8d1;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 18px 40px rgba(16, 36, 31, 0.1);
  --lift: 0 8px 0 rgba(18, 131, 212, 0.22);
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --cut-sm: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk);
  color: var(--ink) !important;
  font: 16px/1.55 var(--font-body);
}

.topbar *,
.deck h1,
.deck h2,
.folio h1,
.folio h2,
.ledger__lead,
.mark__word {
  text-transform: none !important;
}

/* Atmosphere + digital layers */
.fx-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(820px 480px at 8% -8%, rgba(18, 131, 212, 0.16), transparent 58%),
    radial-gradient(640px 400px at 100% 0%, rgba(255, 92, 26, 0.12), transparent 55%),
    radial-gradient(520px 340px at 55% 100%, rgba(125, 211, 252, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 40%),
    repeating-linear-gradient(
      118deg,
      transparent 0 18px,
      rgba(16, 36, 31, 0.03) 18px 19px
    ),
    repeating-linear-gradient(
      28deg,
      transparent 0 22px,
      rgba(18, 131, 212, 0.04) 22px 23px
    );
  animation: mesh-drift 28s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
  from { background-position: 0 0, 100% 0, 50% 100%, 0 0, 0 0, 0 0; }
  to { background-position: 5% 7%, 95% 5%, 52% 96%, 0 0, 14px 10px, -10px 8px; }
}

.fx-scan {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 3px,
    rgba(16, 36, 31, 0.025) 3px 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.fx-scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(18, 131, 212, 0.08),
    transparent
  );
  animation: scan-sweep 7.5s linear infinite;
}

@keyframes scan-sweep {
  0% { top: -20%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 105%; opacity: 0; }
}

.fx-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-flicker 1.8s steps(2) infinite;
}

@keyframes noise-flicker {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1%, 1%); }
}

/* Asymmetric sticky topbar — no clip-path (it hid the language menu) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 10px 18px 10px 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--azure) 35%, var(--line));
  background: rgba(231, 241, 238, 0.94);
  backdrop-filter: blur(14px);
  overflow: visible;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--azure), var(--mango));
  animation: bar-pulse 2.8s ease-in-out infinite;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 42px;
  height: 8px;
  background: var(--desk);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  pointer-events: none;
}

@keyframes bar-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.mark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  transform: rotate(-0.6deg);
}

.mark__tile { display: none !important; }

.mark__badge {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 4px 14px 4px 14px;
  overflow: hidden;
  box-shadow: 6px 6px 0 rgba(255, 92, 26, 0.28);
  flex: 0 0 auto;
  background: var(--ink);
  animation: badge-pop 0.6s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.mark__badge img {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes badge-pop {
  from { transform: scale(0.72) rotate(-8deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.mark__word {
  position: relative;
  font-family: var(--font-display) !important;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink) !important;
  animation: brand-rise 0.7s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.mark__word::before,
.mark__word::after {
  content: attr(data-glitch);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.mark__word::before {
  color: var(--azure);
  animation: glitch-a 4.5s steps(1) infinite;
}

.mark__word::after {
  color: var(--mango);
  animation: glitch-b 4.5s steps(1) infinite;
}

@keyframes glitch-a {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  91% { opacity: 0.7; transform: translate(2px, -1px); clip-path: inset(10% 0 60% 0); }
  92% { opacity: 0; }
  94% { opacity: 0.55; transform: translate(-2px, 1px); clip-path: inset(40% 0 20% 0); }
  95% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  91.5% { opacity: 0.55; transform: translate(-2px, 1px); clip-path: inset(55% 0 5% 0); }
  92.5% { opacity: 0; }
  94.5% { opacity: 0.45; transform: translate(2px, -1px); clip-path: inset(0 0 55% 0); }
  95.5% { opacity: 0; }
}

@keyframes brand-rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Cut-corner digital buttons */
.sat-scan,
.sat-scan--cut {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 18px;
  border: 2px solid var(--ink);
  border-radius: 0;
  clip-path: var(--cut-sm);
  background: #fff !important;
  color: var(--ink) !important;
  font: 700 13px/1 var(--font-body);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase !important;
  box-shadow: 5px 5px 0 rgba(18, 131, 212, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.sat-scan::after,
.sat-scan--cut::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(125, 211, 252, 0.45) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: none;
  pointer-events: none;
}

.sat-scan:hover,
.sat-scan--cut:hover {
  background: var(--azure) !important;
  color: #fff !important;
  transform: translate(-2px, -2px) skewX(-2deg);
  box-shadow: 8px 8px 0 rgba(16, 36, 31, 0.35);
}

.sat-scan:hover::after,
.sat-scan--cut:hover::after {
  animation: btn-shine 0.55s ease;
}

@keyframes btn-shine {
  to { transform: translateX(120%); }
}

.ledger .sat-scan,
.ledger__more .sat-scan,
.scanlane .sat-scan {
  background: #fff !important;
  color: var(--ink) !important;
}

.ledger .sat-scan:hover,
.scanlane .sat-scan:hover {
  background: var(--azure) !important;
  color: #fff !important;
}

.ledger__scan-note {
  color: var(--ink) !important;
  opacity: 1 !important;
  font-weight: 600;
  font-size: 0.92rem;
}

.topbar .langlist { margin-left: auto; position: relative; z-index: 90; }
.langlist { position: relative; }

.langlist summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  min-height: 42px;
  padding: 8px 38px 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 0;
  clip-path: none;
  background: #10241f !important;
  color: #e7f1ee !important;
  font: 700 13px/1.2 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase !important;
  box-shadow: 4px 4px 0 rgba(18, 131, 212, 0.45);
}

.langlist summary::-webkit-details-marker { display: none; }

.langlist summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #7dd3fc;
  border-bottom: 2px solid #7dd3fc;
  transform: translateY(-70%) rotate(45deg);
}

.langlist[open] summary {
  border-color: #7dd3fc;
  background: #1283d4 !important;
  color: #fff !important;
}

.langlist ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 100;
  margin: 0;
  padding: 8px 0;
  min-width: 240px;
  max-height: min(70vh, 520px);
  overflow: auto;
  list-style: none;
  border: 2px solid #7dd3fc;
  border-radius: 0;
  background: #10241f !important;
  box-shadow: 8px 10px 0 rgba(255, 92, 26, 0.35), 0 18px 40px rgba(16, 36, 31, 0.35);
}

.langlist li { margin: 0; padding: 0; }

.langlist a {
  display: block;
  padding: 10px 16px;
  color: #e7f1ee !important;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-left: 3px solid transparent;
}

.langlist a:hover,
.langlist a[aria-current="page"] {
  background: #1283d4 !important;
  color: #fff !important;
  border-left-color: #ff5c1a;
}

html[dir="rtl"] .langlist ul { right: auto; left: 0; }

.deck {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.page-inner .deck {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto 0;
}

/* Live signal strip — breaks symmetry */
.signalband {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 18px 12px 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--ink);
  background: color-mix(in srgb, var(--ink) 92%, #1283d4);
  color: #e7f1ee;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 18px 100%, 0 calc(100% - 12px));
  transform: rotate(-0.4deg);
  font: 700 11px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 8px 8px 0 rgba(255, 92, 26, 0.35);
}

.signalband__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #39ffb4;
  box-shadow: 0 0 0 0 rgba(57, 255, 180, 0.55);
  animation: pulse-dot 1.6s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(57, 255, 180, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(57, 255, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(57, 255, 180, 0); }
}

.signalband__tag { color: #7dd3fc; }
.signalband__bits {
  margin-left: auto;
  opacity: 0.75;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.rig {
  position: relative;
  width: min(1380px, calc(100% - 36px));
  margin: 20px 28px 18px 12px;
  padding: 0 0 0 18px;
  transform: rotate(-0.35deg);
}

.slash { display: none !important; }

.rig__rail {
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.rig__rail i {
  flex: 1;
  background:
    repeating-linear-gradient(
      180deg,
      var(--azure) 0 6px,
      transparent 6px 12px
    );
  opacity: 0.55;
  animation: rail-scroll 2.4s linear infinite;
}

.rig__rail i:nth-child(2) {
  background:
    repeating-linear-gradient(
      180deg,
      var(--mango) 0 6px,
      transparent 6px 12px
    );
  animation-duration: 1.8s;
  animation-direction: reverse;
}

.rig__rail i:nth-child(3) {
  background:
    repeating-linear-gradient(
      180deg,
      var(--sky) 0 6px,
      transparent 6px 12px
    );
  animation-duration: 3s;
}

@keyframes rail-scroll {
  from { background-position: 0 0; }
  to { background-position: 0 24px; }
}

.rig__shell {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 0;
  clip-path: var(--cut);
  background: var(--panel);
  box-shadow: 12px 14px 0 rgba(18, 131, 212, 0.18);
  overflow: clip;
}

.rig__notch {
  display: block;
  height: 12px;
  background:
    linear-gradient(90deg, var(--azure), var(--sky) 42%, var(--mango));
  position: relative;
  overflow: hidden;
}

.rig__notch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: notch-run 2.8s ease-in-out infinite;
}

@keyframes notch-run {
  0% { transform: translateX(-60%); }
  100% { transform: translateX(60%); }
}

.rig__hud {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 6px 14px 0;
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.14em;
  color: var(--mute);
}

.rig__hud span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: #f4faf8;
}

.rig__hud span:last-child {
  color: #0a8f5a;
  border-color: #0a8f5a;
  background: #e8fff4;
}

.rig__well,
.folio,
.ledger {
  background: var(--panel) !important;
  border-radius: 0 !important;
}

.folio {
  width: min(860px, calc(100% - 40px));
  margin: 24px 12px 24px auto;
  padding: 28px 26px;
  border: 2px solid var(--ink);
  clip-path: var(--cut);
  box-shadow: 10px 10px 0 rgba(255, 92, 26, 0.16);
  transform: rotate(0.4deg);
}

.folio__head h1 {
  font-family: var(--font-display) !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink) !important;
}

.folio__head p,
.ledger__n {
  color: var(--mute) !important;
}

/* Staggered asymmetric ledger */
.ledger {
  width: min(1320px, calc(100% - 40px));
  margin: 8px 10px 28px 28px;
  padding: 22px 20px 24px;
  border: 2px solid var(--ink);
  clip-path: polygon(0 12px, 18px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 18px) 100%, 0 100%);
  box-shadow: -8px 10px 0 rgba(255, 92, 26, 0.14);
  transform: rotate(0.45deg);
}

.ledger--skew { position: relative; }

.ledger__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.ledger__kicker {
  margin: 0;
  font: 700 11px/1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--azure);
}

.ledger__more--top { margin: 0; }

.ledger__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ledger__item,
.ledger__list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  background: #f4faf8;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ledger__item--0 { margin-right: 12%; border-radius: 0 12px 0 0; }
.ledger__item--1 { margin-left: 7%; margin-right: 5%; border-radius: 0; transform: skewX(-2deg); }
.ledger__item--2 { margin-left: 14%; border-radius: 0 0 0 12px; }

.ledger__item:hover,
.ledger__list li:hover {
  border-color: var(--azure);
  box-shadow: 4px 4px 0 rgba(18, 131, 212, 0.2);
  transform: translateX(4px);
}

.ledger__item--1:hover { transform: skewX(-2deg) translateX(4px); }

.ledger__n {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--azure) !important;
  min-width: 2ch;
}

.ledger a {
  color: var(--ink) !important;
  text-decoration: none;
  font-weight: 650;
}

.ledger a:hover { color: var(--mango) !important; }

.ledger__more a {
  font-family: var(--font-display) !important;
  font-weight: 700;
  color: var(--azure) !important;
}

.scanlane {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 48px));
  margin: 0 36px 34px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  background: color-mix(in srgb, #fff 82%, #7dd3fc);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  transform: rotate(-0.55deg);
  box-shadow: 10px 8px 0 rgba(16, 36, 31, 0.12);
}

.colophon {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 22px 28px;
  border-top: 2px solid var(--ink);
  background: #dceae5;
  clip-path: polygon(0 10px, 28px 0, 100% 0, 100% 100%, 0 100%);
}

.colophon a {
  color: var(--ink) !important;
  font-weight: 650;
  text-decoration: none;
}

.colophon a:hover { color: var(--azure) !important; }

.colophon__biz {
  appearance: none;
  border: 2px solid var(--ink);
  background: var(--mango);
  color: #fff;
  font: 700 13px/1 var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 0;
  clip-path: var(--cut-sm);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
}

.colophon__biz:hover {
  background: var(--azure);
  transform: translate(-2px, -2px);
}

body.sat-hero-mesh .rig { order: 0; }

@media (max-width: 720px) {
  .topbar { padding: 10px 12px 10px 18px; gap: 8px; }
  .mark { transform: none; }
  .mark__word { font-size: 1.02rem; }
  .sat-scan { padding: 8px 10px; font-size: 11px; }
  .signalband {
    width: calc(100% - 20px);
    margin: 12px 10px 0;
    transform: none;
    letter-spacing: 0.08em;
  }
  .signalband__bits { display: none; }
  .rig, .ledger, .scanlane, .folio {
    width: calc(100% - 16px);
    margin-left: 8px;
    margin-right: 8px;
    transform: none;
    padding-left: 0;
  }
  .rig { padding-left: 14px; }
  .ledger__item--0,
  .ledger__item--1,
  .ledger__item--2 {
    margin: 0;
    transform: none;
  }
  .ledger__item--1:hover { transform: translateX(3px); }
  .rig__shell, .ledger, .folio, .scanlane {
    box-shadow: 5px 5px 0 rgba(18, 131, 212, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-grid, .fx-scan::after, .fx-noise,
  .mark__word::before, .mark__word::after,
  .rig__rail i, .rig__notch::after,
  .signalband__pulse, .topbar::before { animation: none !important; }
}
