.locales {
  position: relative;
  overflow: hidden;
  background-color: #0e3b30;
  color: #ffffff;
  padding: 88px 0;
}

.locales__leaf {
  background-size: 1800px auto;
  background-position: 30% 60%;
  opacity: 0.13;
}

.locales__inner {
  position: relative;
}

.locales__head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 32px 96px;
  align-items: end;
  margin-bottom: 40px;
}

.locales__head-col {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.locales__title {
  font-size: 50px;
  width: 590px;
}

.locales__title em {
  color: rgb(143, 211, 191);
}

.locales__tabs {
  display: flex;
  gap: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.locales__tab {
  position: relative;
  color: rgba(255, 255, 255, 0.5);
}

.locales__tab.is-on {
  color: #ffffff;
}

/* Active tab underline: one element shared across tabs (moved with a FLIP tween). */
.locales__tab-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #8fd3bf;
}

/* Parents of crossfading text (Swap, popLayout) must be positioned. */
.locales__plan-copy,
.locales__plan-stats,
.locales__panel-block,
.locales__fit {
  position: relative;
}

.locales__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 24px;
  align-items: stretch;
}

.locales__plan {
  position: relative;
  min-height: 460px;
  border: 1px solid rgba(143, 211, 191, 0.28);
  border-radius: 6px;
  background: rgba(10, 23, 20, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 44px 64px;
}

.locales__plan-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 30px;
}

.locales__plan-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.locales__plan-title {
  font-size: 10px;
  color: #8fd3bf;
}

.locales__plan-sub {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 300;
  max-width: 300px;
}

.locales__plan-stats {
  text-align: right;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.locales__plan-m2 {
  font-size: 28px;
  line-height: 1;
}

.locales__kiosk-title {
  font-size: 17px;
  color: #eafafa;
}

.locales__kiosk-sub {
  font-size: 13px;
  color: rgba(182, 228, 214, 0.75);
}

.locales__corner {
  position: absolute;
  width: 18px;
  height: 18px;
}

.locales__corner--tl {
  top: 14px;
  left: 14px;
  border-top: 1px solid #8fd3bf;
  border-left: 1px solid #8fd3bf;
}

.locales__corner--tr {
  top: 14px;
  right: 14px;
  border-top: 1px solid #8fd3bf;
  border-right: 1px solid #8fd3bf;
}

.locales__corner--bl {
  bottom: 14px;
  left: 14px;
  border-bottom: 1px solid #8fd3bf;
  border-left: 1px solid #8fd3bf;
}

.locales__corner--br {
  bottom: 14px;
  right: 14px;
  border-bottom: 1px solid #8fd3bf;
  border-right: 1px solid #8fd3bf;
}

.locales__panel {
  border-radius: 6px;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: rgba(255, 255, 255, 0.05);
}

.locales__panel-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.locales__mint {
  color: #8fd3bf;
}

.locales__muted {
  color: rgba(255, 255, 255, 0.6);
}

.locales__level {
  margin: 0;
  font-size: 48px;
  line-height: 1;
}

.locales__desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 300;
}

.locales__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.locales__chip {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.locales__chip.is-on {
  background: #8fd3bf;
  color: #0a1714;
  border-color: #8fd3bf;
}

/* Reserved size: the pill sits inside the chip, which tightens its right padding (per the spec). */
.locales__chip.is-reserved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding-left: 16px;
  padding-right: 5px;
}

.locales__chip[hidden],
.locales__reserved[hidden] {
  display: none;
}

/* "Reservados" pill: yellow, lock icon, uppercase. */
.locales__reserved {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  background: #f2c14e;
  color: #0a1714;
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.locales__reserved--chip {
  gap: 4px;
  padding: 4px 8px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.locales__reserved--plan {
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.locales__reserved svg {
  flex: none;
}

.locales__fit {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.locales__fit-text {
  font-size: 20px;
  line-height: 1.35;
}

.locales__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

/* Idle scan: a soft light rises through the units in the selected range, cascading left to right.
   Reserved units (data-state="reserved", striped background) do not scan: the moving light over the
   stripes reads as noise and the stripes already mark the selection. */
.lp-u[data-state="match"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(234, 250, 250, 0) 0%, rgba(234, 250, 250, 0.32) 50%, rgba(234, 250, 250, 0) 100%);
  transform: translateY(100%);
  opacity: 0;
  animation: lp-scan 3.6s cubic-bezier(0.2, 0.7, 0.1, 1) infinite;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes lp-scan {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  55%,
  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .locales__plan-stats {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-u[data-state="match"]::after {
    display: none;
  }
}
