:root {
  --ink: #1a2420;
  --ink-soft: #3d4a44;
  --muted: #6b7872;
  --paper: #f3efe6;
  --paper-deep: #e8e2d4;
  --lagoon: #1f6b63;
  --lagoon-soft: #2a8a80;
  --mist: #d6e4df;
  --line: rgba(26, 36, 32, 0.12);
  --font-brand: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Literata", "Palatino Linotype", Palatino, serif;
  --font-ui: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 36, 32, 0.28) transparent;
}

/* Quiet, nearly invisible scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 36, 32, 0.28) transparent;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(26, 36, 32, 0.2);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(26, 36, 32, 0.38);
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(214, 228, 223, 0.9), transparent 60%),
    radial-gradient(900px 500px at 80% 100%, rgba(31, 107, 99, 0.08), transparent 50%),
    linear-gradient(180deg, #eef4f1 0%, var(--paper) 45%, #ebe6db 100%);
  background-attachment: fixed;
}

a {
  color: var(--lagoon);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--lagoon-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Hub —— */
.stage {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
}

.stage.is-paper {
  min-height: 0;
}

/* Town-site / handoff boot: never flash the chooser (“just arrived”) before JS. */
html.rhn-booting .tagline,
html.rhn-booting .hub-actions,
html.rhn-booting .hub-dir,
html.rhn-booting .hub-foot {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.rhn-booting .hub {
  /* Keep brand centered; status fills in from handoff / boot */
  min-height: 100dvh;
}

.hub {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out),
    visibility 0.65s;
}

/* Leave document flow immediately so paper isn't pushed down a blank viewport */
.hub.is-exiting {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0;
  transform: translateY(-12px) scale(0.985);
  pointer-events: none;
  visibility: hidden;
}

.hub.is-gone {
  display: none;
}

.hub-inner {
  width: min(36rem, 100%);
}

.brand {
  font-family: var(--font-brand);
  font-weight: 560;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 1rem;
  color: var(--ink);
}

.brand .dot {
  color: var(--lagoon);
}

.tagline {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-weight: 500;
  line-height: 1.45;
}

.hub-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out);
}

/* Soft exit when a town match is confirmed — same ease language as type/locate fade */
.hub-actions.is-departing {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

/* Type mode: locate stays in its slot as muted underlined text; type fades away */
.hub-actions.is-typing #locate-btn {
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 0;
  padding: 0.15rem 0.1rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  opacity: 0.72;
  transform: none;
}

.hub-actions.is-typing #locate-btn:hover {
  background: none;
  color: var(--ink-soft);
  opacity: 0.95;
  transform: none;
}

.hub-actions.is-typing #type-btn {
  opacity: 0;
  transform: translateY(6px);
  max-height: 0;
  margin: 0 0 -0.85rem; /* cancel flex gap so form sits under locate text */
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
  border: 0;
}

#locate-btn,
#type-btn {
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out),
    max-height 0.4s var(--ease-out),
    margin 0.4s var(--ease-out),
    padding 0.4s var(--ease-out),
    background 0.4s var(--ease-out),
    color 0.4s var(--ease-out),
    font-size 0.4s var(--ease-out),
    border-radius 0.4s var(--ease-out);
  max-height: 4rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: 999px;
  padding: 0.85rem 1.55rem;
  background: var(--ink);
  color: #f7f5ef;
  transition: transform 0.2s var(--ease-out), background 0.2s;
}

.btn:hover {
  background: #0f1714;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.town-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(22.5rem, 100%);
  box-sizing: border-box;
  gap: 0.55rem;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  /* Glow/outline sits inside this padding so overflow:hidden doesn’t clip it */
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    max-height 0.5s var(--ease-out),
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out),
    margin-top 0.45s var(--ease-out),
    padding 0.45s var(--ease-out);
}

.town-form.is-open {
  max-height: 16rem;
  opacity: 1;
  /* Let .town-suggest hang below the input; closed state keeps overflow:hidden for the slide */
  overflow: visible;
  pointer-events: auto;
  transform: translateY(0);
  margin-top: 0.15rem;
  padding: 0.4rem 0.45rem 0.2rem;
}

.town-input-group {
  position: relative;
  width: 100%;
}

.town-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.town-form input:focus {
  outline: 2px solid rgba(31, 107, 99, 0.35);
  outline-offset: 1px;
}

.town-form input.is-suggesting {
  border-color: rgba(31, 107, 99, 0.45);
}

.town-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 20;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  background: rgba(247, 243, 234, 0.98);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(26, 36, 32, 0.08);
  max-height: 14rem;
  overflow: auto;
  text-align: left;
}

.town-suggest[hidden] {
  display: none;
}

.town-suggest-btn {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.town-suggest li.is-active .town-suggest-btn,
.town-suggest-btn:hover {
  background: rgba(31, 107, 99, 0.1);
}

.waitlist-sheet {
  width: min(34rem, 100%);
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 1.75rem) 2.5rem;
  text-align: left;
}

.paper.is-open.is-waitlist {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  box-sizing: border-box;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.paper.is-open.is-waitlist .waitlist-sheet {
  width: min(34rem, 100%);
}

.waitlist-title {
  font-family: var(--font-brand);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 1.25rem 0 0.75rem;
  color: var(--ink);
}

.waitlist-copy {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 1.35rem;
}

.waitlist-break {
  display: none;
}

@media (min-width: 640px) {
  .waitlist-break {
    display: inline;
  }
}

.waitlist-copy strong {
  color: var(--ink);
  white-space: nowrap;
}

.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
}

.waitlist-form input[type="email"] {
  flex: 1 1 14rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.waitlist-form .btn {
  flex: 0 0 auto;
}

.waitlist-status {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Locating state overlays hub copy */
.status {
  display: grid;
  place-items: center;
  margin-bottom: 0;
}

.status:has(.status-line:not([hidden])) {
  min-height: 4.5rem;
  margin-bottom: 1.5rem;
}

.status.is-error:has(.status-line:not([hidden])) {
  min-height: 0;
  margin-bottom: 0.85rem;
}

.status-line {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 3.2vw, 1.45rem);
  color: var(--ink-soft);
  line-height: 1.4;
  margin: 0;
  max-width: 22rem;
  text-wrap: pretty;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out);
}

.status-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Errors: small muted one-line. Never locating size, never brand treatment. */
.status-line.is-error {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
  max-width: 17rem;
  text-wrap: pretty;
}

.status-line.is-error strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.status-line strong {
  color: var(--ink);
  font-weight: 650;
}

.status-brand {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-brand);
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--lagoon);
}

/* Brand under status is locating-only. Errors must never show it. */
.status.is-error .status-brand {
  display: none;
}

.status.is-locating .status-line.is-visible {
  animation: locate-breathe 1.8s ease-in-out 0.45s infinite;
}

@keyframes locate-breathe {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

.hub-foot {
  margin-top: 2.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.hub-foot a {
  color: inherit;
}

.hub-dir {
  margin: 1.75rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hub-dir a {
  color: var(--muted);
  text-decoration: none;
}

.hub-dir a:hover,
.hub-dir a:focus-visible {
  color: var(--lagoon);
}

/* —— All towns directory (Craigslist-style text index) —— */
.dir-page {
  min-height: 100dvh;
}

.dir {
  width: min(52rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.75rem 0 4rem;
}

.dir-head {
  margin-bottom: 2rem;
}

.dir-brand {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
}

.dir-brand .dot {
  color: var(--lagoon);
}

.dir-brand:hover,
.dir-brand:focus-visible {
  color: var(--ink);
}

.dir-title {
  margin: 1.15rem 0 0.35rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.dir-lede {
  margin: 0;
  max-width: 28rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
}

.dir-jump {
  margin-top: 1.15rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--muted);
}

.dir-jump a {
  color: var(--ink-soft);
  text-decoration: none;
}

.dir-jump a:hover,
.dir-jump a:focus-visible {
  color: var(--lagoon);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.dir-sep {
  color: var(--muted);
  opacity: 0.55;
  margin: 0 0.05em;
}

.dir-body {
  display: grid;
  gap: 1.35rem;
}

.dir-state-name {
  margin: 0 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dir-towns {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.dir-towns li {
  break-inside: avoid;
  margin: 0 0 0.12rem;
  padding: 0;
}

.dir-town {
  color: var(--ink);
  text-decoration: none;
}

.dir-town:hover,
.dir-town:focus-visible {
  color: var(--lagoon);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 640px) {
  .dir-towns {
    columns: 2;
  }
}

@media (max-width: 380px) {
  .dir-towns {
    columns: 1;
  }
}

.dir-empty {
  margin: 0;
  font-family: var(--font-body);
  color: var(--muted);
}

.dir-foot {
  margin: 2.5rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dir-foot a {
  color: var(--muted);
  text-decoration: none;
}

.dir-foot a:hover,
.dir-foot a:focus-visible {
  color: var(--lagoon);
}

/* waitlist line break 2026-08-06 */
/* headed-to redirect beat 2026-08-06 */
