/* ==========================================================================
   Location gate — the front door at /. Asks where the project is, stores the
   answer in this browser only, and sends the visitor to the relevant site.
   No cookies, no IP lookup, no third party.
   ========================================================================== */

.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  background:
    radial-gradient(80% 90% at 20% 0%, rgba(168, 70, 34, 0.18), transparent 60%),
    rgba(9, 42, 34, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: auto;
}

html[data-gate="on"] .gate {
  display: grid;
}

html[data-gate="on"],
html[data-gate="on"] body {
  overflow: hidden;
}

.gate__panel {
  position: relative;
  width: min(1080px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(26px, 3.6vw, 46px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 50px 120px -50px rgba(0, 0, 0, 0.65);
  animation: gate-in 0.42s var(--ease) both;
}

@keyframes gate-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate__panel {
    animation: none;
  }
}

.gate__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.gate__close:hover {
  border-color: var(--clay);
  color: var(--clay);
}

.gate__close .icon {
  width: 15px;
  height: 15px;
}

.gate__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(22px, 3vw, 34px);
}

.gate__brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.gate__brand span {
  font: 750 14px/1 var(--sans);
  letter-spacing: 0.04em;
}

.gate__brand small {
  font: 650 8.5px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 8px;
  margin-left: 4px;
}

.gate__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.6vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
  max-width: 11ch;
}

.gate__title em {
  font-style: italic;
  color: var(--clay);
}

.gate__lede {
  margin: 20px 0 0;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.gate__fine {
  margin: 24px 0 0;
  max-width: 38ch;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.gate__fine a {
  color: var(--clay);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.gate__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gate-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 148px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    background 0.25s var(--ease);
}

.gate-card:hover,
.gate-card:focus-visible {
  border-color: var(--clay);
  background: var(--paper);
  transform: translateY(-2px);
  outline: none;
}

.gate-card.is-suggested {
  border-color: var(--clay);
}

.gate-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.gate-card__num {
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--clay);
}

.gate-card__badge {
  font: 700 7.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-deep);
  background: rgba(168, 70, 34, 0.09);
  border: 1px solid rgba(168, 70, 34, 0.24);
  border-radius: 999px;
  padding: 5px 7px;
}

.gate-card__name {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 500;
}

.gate-card__desc {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.gate-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  font: 650 9px/1.3 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gate-card__foot .icon {
  width: 14px;
  height: 14px;
  color: var(--clay);
  flex: none;
}

.gate__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 18px;
}

.gate__skip {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 11.5px/1.4 var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.gate__skip:hover {
  color: var(--ink);
}

.gate__note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 14px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}

.gate__note .icon {
  width: 12px;
  height: 12px;
  margin-top: 2px;
  flex: none;
  color: var(--clay);
}

@media (max-width: 860px) {
  .gate {
    padding: 10px;
  }

  .gate__panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 26px 20px 22px;
    border-radius: 22px;
  }

  .gate__title {
    max-width: 15ch;
    font-size: clamp(2.1rem, 8vw, 3rem);
  }

  .gate__lede {
    max-width: 46ch;
  }

  .gate__cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .gate-card {
    min-height: 118px;
  }

  .gate__brand {
    margin-bottom: 20px;
  }

  .gate__fine {
    max-width: 46ch;
  }
}

@media (max-width: 420px) {
  .gate__panel {
    padding: 22px 16px 18px;
  }
}

/* A small persistent link for people who want to change the choice later. */
.loc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  font: inherit;
}

.loc-link:hover {
  color: var(--clay);
}


/* No-JavaScript fallback: a plain location bar instead of the dialog. */
.nojs-loc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 96px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  font: 600 12px/1.4 var(--sans);
  color: var(--muted);
}

.nojs-loc strong {
  color: var(--ink);
  letter-spacing: 0.04em;
}

.nojs-loc a {
  color: var(--clay);
  text-underline-offset: 3px;
}
