/* ============================================================
   apiegg — data residency page (residency.html)
   Loads AFTER styles.css and reuses its tokens.
   Hero globe + orbiting flag chips, steps, law cards, FAQ.
   ============================================================ */

/* ---------- Hero overrides (reuses .hero / .hero-grid) ---------- */
.residency-hero .hero-title { max-width: none; }
.hero-alt-cta {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

/* ---------- Globe + orbiting flag chips ---------- */
.globe-wrap {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1;
  margin: 0 auto;
  --chip: 42px;
  --half: 21px;
}
.globe-svg {
  position: absolute;
  inset: 15%;
  width: 70%;
  height: 70%;
  filter: drop-shadow(0 0 46px rgba(124, 92, 252, 0.22));
}
.orbit-ring {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  border: 1.5px dashed rgba(245, 239, 230, 0.13);
  animation: orbitSpin 70s linear infinite;
}
.orbit-ring.inner {
  inset: 13%;
  border-color: rgba(255, 194, 75, 0.1);
  animation-direction: reverse;
  animation-duration: 95s;
}
.orbit { position: absolute; inset: 0; animation: orbitSpin 52s linear infinite; }
.flag-chip {
  position: absolute;
  width: var(--chip); height: var(--chip);
  display: grid;
  place-items: center;
  font-size: 1.18rem;
  border-radius: 50%;
  background: rgba(20, 16, 28, 0.82);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(245, 239, 230, 0.08), 0 0 22px rgba(124, 92, 252, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: orbitSpinRev 52s linear infinite;
}
.fc1 { left: calc(95% - var(--half));   top: calc(50% - var(--half)); }
.fc2 { left: calc(81.8% - var(--half)); top: calc(81.8% - var(--half)); }
.fc3 { left: calc(50% - var(--half));   top: calc(95% - var(--half)); }
.fc4 { left: calc(18.2% - var(--half)); top: calc(81.8% - var(--half)); }
.fc5 { left: calc(5% - var(--half));    top: calc(50% - var(--half)); }
.fc6 { left: calc(18.2% - var(--half)); top: calc(18.2% - var(--half)); }
.fc7 { left: calc(50% - var(--half));   top: calc(5% - var(--half)); }
.fc8 { left: calc(81.8% - var(--half)); top: calc(18.2% - var(--half)); }
@media (max-width: 640px) {
  .globe-wrap { --chip: 36px; --half: 18px; max-width: 300px; }
  .flag-chip { font-size: 1.02rem; }
}
.globe-tag {
  position: absolute;
  bottom: 4%;
  left: -2%;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(20, 16, 28, 0.88);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 0.45rem 0.9rem;
  border-radius: 0.7rem;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: floaty 6s ease-in-out infinite;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.globe-tag strong { color: var(--green); font-weight: 500; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitSpinRev { to { transform: rotate(-360deg); } }

/* ---------- How-it-works steps ---------- */
.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--yolk);
  background: rgba(255, 194, 75, 0.08);
  border: 1px solid rgba(255, 194, 75, 0.28);
  padding: 0.22rem 0.62rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}
.inline-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--yolk);
  background: rgba(255, 194, 75, 0.09);
  border: 1px solid rgba(255, 194, 75, 0.22);
  border-radius: 0.45rem;
  padding: 0.08rem 0.4rem;
  white-space: nowrap;
}

/* ---------- Optional-capability callout ---------- */
.res-callout {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 720px;
  margin: 2.4rem auto 0;
  padding: 1.15rem 1.4rem;
  border-radius: 1.1rem;
  border: 1px dashed rgba(255, 194, 75, 0.38);
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}
.res-callout .callout-emoji {
  flex: none;
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 194, 75, 0.4));
}
.res-callout strong { color: var(--yolk); font-weight: 600; }

/* ---------- Jurisdiction law cards ---------- */
.laws {
  background:
    radial-gradient(ellipse 55% 40% at 80% 0%, rgba(255, 194, 75, 0.05), transparent),
    radial-gradient(ellipse 50% 45% at 15% 100%, rgba(124, 92, 252, 0.07), transparent);
}
.law-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
@media (max-width: 900px) { .law-grid { grid-template-columns: 1fr; } }

.law-card {
  padding: 1.9rem 1.8rem 1.6rem;
  border-radius: 1.3rem;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.law-card:hover {
  border-color: rgba(255, 194, 75, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), var(--shadow-glow-amber);
}
.law-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.law-flag {
  width: 52px; height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 194, 75, 0.14), rgba(167, 139, 250, 0.14));
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(245, 239, 230, 0.08);
}
.law-head h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.law-ref {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--yolk);
  letter-spacing: 0.05em;
  opacity: 0.9;
}
.law-req { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }
.law-req strong { color: var(--text); font-weight: 600; }
.law-req em { color: var(--text-muted); }
.law-warn { margin-top: 0.7rem; font-size: 0.8rem; color: var(--yolk); opacity: 0.85; }
.law-help {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(245, 239, 230, 0.12);
}
.law-help .law-egg {
  flex: none;
  font-size: 1.05rem;
  filter: drop-shadow(0 0 8px rgba(255, 194, 75, 0.4));
}
.law-help p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.law-help strong { color: var(--yolk); font-weight: 600; }

/* ---------- jurisdiction status chips + legend (tiering, Nov 2026) ---------- */
.law-status {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.5;
}
.law-status.is-live    { color: #34D399; background: rgba(52, 211, 153, 0.10); border: 1px solid rgba(52, 211, 153, 0.35); }
.law-status.is-policy  { color: var(--yolk); background: rgba(255, 194, 75, 0.10); border: 1px solid rgba(255, 194, 75, 0.35); }
.law-status.is-roadmap { color: #A78BFA; background: rgba(167, 139, 250, 0.10); border: 1px solid rgba(167, 139, 250, 0.35); }
.law-status.is-off     { color: var(--text-muted); background: rgba(245, 239, 230, 0.05); border: 1px solid rgba(245, 239, 230, 0.18); }

.law-legend {
  margin: 0.5rem auto 0;
  max-width: 48rem;
  font-size: 0.8rem;
  line-height: 2.1;
  color: var(--text-muted);
}
.law-legend .lg {
  display: inline-block;
  margin: 0 0.4rem 0 0.9rem;
  padding: 0.08rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.law-legend .lg:first-child { margin-left: 0; }
.lg-live    { color: #34D399; border: 1px solid rgba(52, 211, 153, 0.35); }
.lg-policy  { color: var(--yolk); border: 1px solid rgba(255, 194, 75, 0.35); }
.lg-roadmap { color: #A78BFA; border: 1px solid rgba(167, 139, 250, 0.35); }
.lg-off     { color: var(--text-muted); border: 1px solid rgba(245, 239, 230, 0.18); }

/* ---------- "…and anywhere else" card ---------- */
.anywhere-card {
  margin-top: 1.6rem;
  padding: 2.2rem 2rem;
  border-radius: 1.4rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 194, 75, 0.05), rgba(124, 92, 252, 0.06));
}
@media (max-width: 640px) { .anywhere-card { padding: 1.9rem 1.4rem; } }
.anywhere-plus {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--yolk);
  background: rgba(255, 194, 75, 0.09);
  border: 1px dashed rgba(255, 194, 75, 0.4);
  margin-bottom: 1rem;
  box-shadow: 0 0 26px rgba(255, 194, 75, 0.12);
}
.anywhere-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}
.anywhere-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 58ch;
  margin: 0 auto;
  line-height: 1.75;
}
.anywhere-card p strong { color: var(--text); font-weight: 600; }
.anywhere-note { margin-top: 0.8rem; font-size: 0.85rem; color: var(--text-faint); }
