:root {
  --ink: #1f2933;
  --muted: #687a86;
  --teal: #008b93;
  --cyan: #26c6da;
  --orange: #f5824a;
  --line: rgba(0, 139, 147, 0.18);
  --paper: rgba(255, 255, 255, 0.86);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 12%, rgba(38, 198, 218, 0.18), transparent 28rem),
    linear-gradient(180deg, #fff 0%, #f1f8f8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1320px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 24px 0 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 3px;
}

.brand small,
.eyebrow,
.status-card span,
.method-grid span {
  margin: 0;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand strong {
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1;
}

.topbar nav {
  display: flex;
  gap: 8px;
}

.topbar nav a,
.shop-actions a,
.territory-toggle button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: rgba(0, 139, 147, 0.08);
  color: #536977;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.topbar nav a:hover,
.territory-toggle button.is-active {
  color: #fff;
  background: var(--teal);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: end;
  margin: 30px 0 18px;
}

.intro h1 {
  max-width: 820px;
  margin: 6px 0 12px;
  font-size: clamp(38px, 7vw, 86px);
  line-height: 0.92;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  margin: 0;
  color: #4a5f6d;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.status-card,
.map-lab,
.method-grid article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(21, 70, 80, 0.12);
}

.status-card {
  padding: 18px;
}

.status-card strong {
  display: block;
  margin: 7px 0 8px;
  font-size: 24px;
  line-height: 1;
}

.status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.map-lab {
  overflow: hidden;
}

.map-head {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.map-head h2 {
  margin: 3px 0 0;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1;
}

.territory-toggle {
  display: flex;
  gap: 8px;
}

.territory-toggle button {
  cursor: pointer;
  font-family: inherit;
}

.map-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 38%, rgba(255, 255, 255, 0.7), transparent 24rem),
    #eefafa;
}

#territoryMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.route-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.route-line {
  fill: none;
  stroke: rgba(245, 130, 74, 0.68);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-dasharray: 1.2 1.4;
}

.route-line-soft {
  stroke: rgba(0, 139, 147, 0.52);
}

.buyer-marker {
  --x: 18%;
  --y: 72%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 6;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 8px rgba(245, 130, 74, 0.2), 0 12px 24px rgba(51, 88, 96, 0.28);
  transition: left 0.9s cubic-bezier(0.34, 0.98, 0.42, 1), top 0.9s cubic-bezier(0.34, 0.98, 0.42, 1);
}

.buyer-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -15px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--teal);
}

.buyer-marker.is-moving {
  animation: marker-pulse 0.3s ease-in-out 3;
}

@keyframes marker-pulse {
  50% {
    transform: translate(-50%, -50%) scale(1.16);
  }
}

.shop-node {
  position: absolute;
  z-index: 5;
  width: 218px;
  transform: translate(-50%, -50%);
}

.node-ceramica {
  left: 18%;
  top: 72%;
}

.node-monamour {
  left: 52%;
  top: 38%;
}

.node-mexianita {
  left: 82%;
  top: 34%;
}

.node-hacienda {
  left: 84%;
  top: 72%;
}

.shop-node button {
  width: 100%;
  min-height: 86px;
  display: grid;
  gap: 3px;
  justify-items: start;
  padding: 13px 14px;
  border: 1px solid rgba(0, 139, 147, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 18px 42px rgba(21, 70, 80, 0.14);
}

.shop-node button span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 950;
}

.shop-node button strong {
  font-size: 20px;
  line-height: 1;
}

.shop-node button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shop-node.is-live button {
  border-color: rgba(245, 130, 74, 0.46);
  background:
    linear-gradient(135deg, rgba(245, 130, 74, 0.16), rgba(255, 255, 255, 0.94)),
    #fff;
}

.shop-node.is-current button {
  outline: 3px solid rgba(38, 198, 218, 0.42);
}

.shop-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.shop-actions a {
  min-height: 34px;
  background: var(--orange);
  color: #fff;
  border-color: rgba(245, 130, 74, 0.4);
}

.map-note {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 7;
  max-width: 480px;
  padding: 13px 15px;
  border: 1px solid rgba(0, 139, 147, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
  color: #4a5f6d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  backdrop-filter: blur(12px);
}

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

.method-grid article {
  min-height: 150px;
  padding: 20px;
}

.method-grid h2 {
  margin: 8px 0 9px;
  font-size: 28px;
  line-height: 1;
}

.method-grid p {
  margin: 0;
  color: #4a5f6d;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .topbar,
  .intro,
  .map-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro {
    display: flex;
  }

  .topbar nav,
  .territory-toggle {
    width: 100%;
    overflow-x: auto;
  }

  .map-stage {
    min-height: 860px;
    display: grid;
    gap: 12px;
    padding: 18px;
  }

  #territoryMap,
  .route-layer,
  .buyer-marker {
    display: none;
  }

  .shop-node {
    position: static;
    width: 100%;
    transform: none;
  }

  .map-note {
    position: static;
    max-width: none;
    order: 5;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }
}
