/* twotop.nyc — Candlelight, elevated */

:root {
  --bg: #141110;
  --surface: #1c1714;
  --surface-raised: #251d18;
  --hairline: rgba(230, 168, 92, 0.16);
  --hairline-strong: rgba(230, 168, 92, 0.36);
  --text: #f4ebdf;
  --text-dim: #b3a390;
  --amber: #e6a256;
  --amber-deep: #c9812f;
  --flame: linear-gradient(135deg, #f0b164, #d9832f);
  --radius: 16px;
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0 auto;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 42% at 50% -6%, rgba(230, 168, 92, 0.09), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  max-width: 640px;
}

h1, h2, .bar-name { font-optical-sizing: auto; }

/* ---------- Hero ---------- */

.site-header {
  text-align: center;
  padding: clamp(36px, 9vw, 56px) 0 6px;
}

.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(56px, 15vw, 76px);
  line-height: 1;
  margin: 0;
  color: var(--amber);
  letter-spacing: -0.02em;
  text-shadow: 0 0 48px rgba(230, 168, 92, 0.28);
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 4.6vw, 22px);
  line-height: 1.35;
  color: var(--text);
  margin: 14px auto 2px;
  max-width: 30ch;
}

.tagline em {
  font-style: italic;
  color: var(--text-dim);
}

/* ---------- Toolbar ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  background: linear-gradient(var(--bg) 78%, transparent);
}

.view-toggle {
  display: flex;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 17, 16, 0.6);
}

.toggle-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: 600 14px var(--sans);
  letter-spacing: 0.01em;
  padding: 10px 24px;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.toggle-btn.is-active {
  background: var(--flame);
  color: #1a1208;
}

.near-btn {
  appearance: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 500 14px var(--sans);
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.15s var(--ease);
}

.near-btn:active { background: var(--surface-raised); transform: scale(0.97); }
.near-btn .spin { display: inline-block; animation: rotate 1s linear infinite; }

@keyframes rotate { to { transform: rotate(360deg); } }

@media (hover: hover) {
  .near-btn:hover, .chip:hover { border-color: var(--hairline-strong); }
  .near-btn:hover { border-color: var(--amber); }
}

/* ---------- Filters ---------- */

.filters {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 0 12px;
  margin-bottom: 12px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant: all-small-caps;
  color: var(--text-dim);
  flex: 0 0 92px;
}

.chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  margin: -2px;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--text);
  font: 500 13px var(--sans);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              color 0.3s var(--ease), transform 0.15s var(--ease);
}

.chip:active { transform: scale(0.95); }

@media (hover: hover) {
  .chip:hover { border-color: var(--amber); color: var(--amber); }
}

.chip.is-on {
  background: rgba(230, 168, 92, 0.16);
  border-color: var(--amber);
  color: var(--amber);
}

.chip--soon {
  opacity: 0.4;
  cursor: default;
  font-style: italic;
}

.chip--soon:hover { border-color: var(--hairline); color: var(--text); }

.result-count {
  font-size: 13px;
  color: var(--text-dim);
  margin: 6px 2px 16px;
  font-variant: all-small-caps;
  letter-spacing: 0.12em;
  min-height: 1.2em;
}

/* ---------- Bar cards ---------- */

.list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  animation: card-in 0.5s var(--ease) both;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

@media (hover: hover) {
  .bar-card:hover {
    transform: translateY(-2px);
    border-color: var(--hairline-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(230, 168, 92, 0.05);
  }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.bar-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.bar-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.15;
}

.verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  color: var(--amber);
  font-size: 10px;
  font-family: var(--sans);
  font-weight: 600;
  vertical-align: 3px;
  margin-left: 7px;
}

.price-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
  padding-top: 6px;
}

.price-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  display: inline-block;
}

.price-dots .dot.is-filled {
  background: var(--amber);
  border-color: var(--amber);
}

.meta-line {
  font-variant: all-small-caps;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: var(--text-dim);
  margin: 4px 0 10px;
}

.meta-line .distance { color: var(--amber); }

.one-liner {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16.5px;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.55;
  max-width: 44ch;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  font-variant: all-small-caps;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 11px;
}

.card-rule {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 14px 0;
}

.card-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.book-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--flame);
  color: #1a1208;
  font: 600 14.5px var(--sans);
  letter-spacing: 0.01em;
  border-radius: 11px;
  padding: 13px 16px;
  box-shadow: 0 2px 12px rgba(217, 131, 47, 0.25);
  transition: filter 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.3s var(--ease);
}

@media (hover: hover) {
  .book-btn:hover { filter: brightness(1.07); box-shadow: 0 4px 18px rgba(217, 131, 47, 0.35); }
}

.book-btn:active { transform: scale(0.98); filter: brightness(1.1); }

.walkin-badge {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font: 500 13px var(--sans);
  font-variant: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--amber);
  border: 1px dashed var(--hairline-strong);
  border-radius: 11px;
  padding: 13px 16px;
  transition: background 0.3s var(--ease), transform 0.15s var(--ease);
}

a.walkin-badge:active { background: rgba(230, 168, 92, 0.08); transform: scale(0.98); }

@media (hover: hover) {
  a.walkin-badge:hover { background: rgba(230, 168, 92, 0.08); }
}

.share-btn {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--text);
  font: 500 13px var(--sans);
  border-radius: 11px;
  padding: 13px 18px;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.15s var(--ease);
}

.share-btn:active { background: var(--surface-raised); transform: scale(0.95); }

@media (hover: hover) {
  .share-btn:hover { border-color: var(--amber); }
}

/* ---------- Skeleton loading ---------- */

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
}

.skeleton-card .sk {
  border-radius: 6px;
  background: linear-gradient(100deg, var(--surface-raised) 40%, rgba(230, 168, 92, 0.07) 50%, var(--surface-raised) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.skeleton-card .sk-title { height: 22px; width: 55%; margin-bottom: 12px; }
.skeleton-card .sk-meta  { height: 11px; width: 35%; margin-bottom: 14px; }
.skeleton-card .sk-line  { height: 14px; width: 85%; margin-bottom: 8px; }
.skeleton-card .sk-line2 { height: 14px; width: 60%; margin-bottom: 18px; }
.skeleton-card .sk-btn   { height: 44px; width: 100%; border-radius: 11px; }

@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 56px 16px;
}

.empty-state .empty-flame {
  font-size: 26px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.7;
}

.empty-state p {
  color: var(--text-dim);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17.5px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.clear-filters-btn {
  appearance: none;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--amber);
  font: 500 13.5px var(--sans);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.15s var(--ease);
}

.clear-filters-btn:active { background: rgba(230, 168, 92, 0.1); transform: scale(0.97); }

@media (hover: hover) {
  .clear-filters-btn:hover { background: rgba(230, 168, 92, 0.1); }
}

/* ---------- Map ---------- */

.map-view { animation: card-in 0.5s var(--ease) both; }

#map {
  height: 66vh;
  min-height: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

/* Dark-romantic treatment of standard OSM tiles */
.leaflet-tile-pane {
  filter: invert(100%) hue-rotate(190deg) saturate(0.35) brightness(0.72) contrast(1.05) sepia(0.25);
}

.leaflet-container {
  background: #191512;
  font-family: var(--sans);
}

.tt-pin { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)); }

.tt-popup .leaflet-popup-content-wrapper {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--hairline-strong);
  border-radius: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 4px 6px;
}

.tt-popup .leaflet-popup-content { margin: 12px 14px; line-height: 1.4; }
.tt-popup .leaflet-popup-tip {
  background: var(--surface-raised);
  border: 1px solid var(--hairline-strong);
  box-shadow: none;
}

.tt-popup .leaflet-popup-close-button {
  color: var(--text-dim);
  font-size: 18px;
  padding: 6px 8px 0 0;
}

.tt-popup .leaflet-popup-close-button:hover { color: var(--amber); }

.popup-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 3px;
  padding-right: 10px;
}

.popup-line {
  font-style: italic;
  font-family: var(--serif);
  font-size: 13.5px;
  margin: 0 0 10px;
  color: var(--text-dim);
}

.popup-book {
  color: var(--amber);
  font-weight: 600;
  font-size: 13px;
  font-variant: all-small-caps;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.leaflet-control-attribution {
  background: rgba(20, 17, 16, 0.75) !important;
  color: var(--text-dim) !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a { color: var(--text-dim) !important; }

.leaflet-bar a {
  background: var(--surface-raised) !important;
  color: var(--text) !important;
  border-color: rgba(230, 168, 92, 0.25) !important;
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 56px;
  border-top: 1px solid var(--hairline);
  padding-top: 30px;
}

.faq h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color 0.3s var(--ease);
}

@media (hover: hover) {
  .faq summary:hover { color: var(--amber); }
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--amber);
  font-size: 18px;
  flex: 0 0 auto;
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 10px 0 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 44px 0 16px;
  color: var(--text-dim);
  font-size: 13px;
}

.footer-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--amber);
  margin: 0 0 4px;
}

.footer-dot { color: var(--text-dim); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: var(--surface-raised);
  border: 1px solid var(--hairline-strong);
  color: var(--text);
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 900;
  max-width: calc(100vw - 48px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .bar-card, .map-view { animation: none; }
  .skeleton-card .sk { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Small phones (≤390px) ---------- */

@media (max-width: 390px) {
  body { padding-left: 14px; padding-right: 14px; }
  .filter-group { flex-direction: column; align-items: flex-start; gap: 5px; margin-bottom: 12px; }
  .filter-label { flex-basis: auto; }
  .chip-row { width: 100%; }
  .bar-name { font-size: 23px; }
  .toggle-btn { padding: 10px 18px; }
  .near-btn { padding: 10px 14px; }
}
