/* DefoVisit web.
   Palette and gradient are lifted from the pin mark: a dawn arc running from
   midnight navy through purple and rose to gold. The gradient appears in
   exactly two places — the mark itself and the tally bars — so it stays a
   signature rather than decoration. */

:root {
  color-scheme: light dark;
  --sand: #fffbf4;
  --paper: #ffffff;
  --ink: #1a2e63;
  --slate: #6b7185;
  --line: #eae2d5;
  --link: #c42250;
  --radius: 10px;
  --dawn: linear-gradient(90deg, #1a2e63 0%, #33509e 18%, #7b3fa8 38%, #e52e68 58%, #ff8c39 80%, #ffc24a 100%);
  --shadow: 0 1px 2px rgba(26, 46, 99, 0.04), 0 10px 30px rgba(26, 46, 99, 0.06);
  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand: #101426;
    --paper: #1a1f35;
    --ink: #f3efe8;
    --slate: #9aa2b8;
    --line: #2a3350;
    --link: #ff8fac;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { background: var(--sand); overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--body);
  font-variation-settings: "wdth" 100;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bar, main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

main { padding-bottom: 72px; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "wdth" 118, "wght" 750;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
}

h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); margin: 28px 0 12px; }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin: 38px 0 6px; }
h3 { font-size: 1.05rem; margin: 26px 0 4px; }
p { margin: 10px 0; }

.lead { font-size: 1.06rem; color: var(--slate); max-width: 46ch; }
.muted { color: var(--slate); }
.star { color: #ff9e3c; }

/* An almanac dateline: what this edition covers, in the data's own voice. */
.dateline {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 18px 0 0;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--sand) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .bar { display: flex; align-items: center; gap: 16px; padding-top: 11px; padding-bottom: 11px; }
.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-variation-settings: "wdth" 112, "wght" 780;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .logo { width: 26px; height: 26px; }
.wordmark:hover { text-decoration: none; }

.search { flex: 1; min-width: 0; position: relative; max-width: 460px; margin-left: auto; }
.search input {
  width: 100%;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}
.search input::placeholder { color: var(--slate); }
.search input:focus { outline: 2px solid var(--link); outline-offset: -1px; }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto; padding: 6px 0;
}
.suggest h4 {
  margin: 10px 14px 4px;
  font-family: var(--mono);
  font-size: 0.68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate);
}
.suggest a { display: block; padding: 8px 14px; color: var(--ink); }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--sand); text-decoration: none; }
.suggest .name { display: block; font-weight: 600; }
.suggest .sub { display: block; font-size: 0.82rem; color: var(--slate); }
.suggest .all { color: var(--link); font-weight: 600; }

/* Hero */
.hero { padding: 26px 0 8px; }
.hero h1 { margin-top: 0; max-width: 13ch; }
.hero .lead, .hero .dateline { max-width: 48ch; }

.section__head h2, .get-app h2, dialog h2 { margin-top: 0; }

/* Sections */
.section { margin-top: 52px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section__head .more { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.hint { margin: 4px 0 0; font-size: 0.86rem; color: var(--slate); }

/* The tally bar: width is this row's share of the largest row, and the fill is
   clipped from a single dawn ramp anchored to the full track — so the biggest
   place shows the whole sunrise and small ones only the blue hour. */
.tally {
  position: relative;
  display: block;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.tally::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dawn);
  clip-path: inset(0 calc(100% - var(--pct, 100%)) 0 0);
}

/* Cards */
.card {
  display: block;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--link) 45%, var(--line)); transform: translateY(-1px); }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
@media (min-width: 620px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: 1fr 1fr 1fr; } }

.place__name, .area__name {
  display: block;
  font-family: var(--display);
  font-variation-settings: "wdth" 108, "wght" 680;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.place__meta, .area__meta, .place__area { display: block; font-size: 0.85rem; color: var(--slate); }
.area__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.area__n { font-family: var(--mono); font-size: 0.8rem; color: var(--slate); white-space: nowrap; }
.area .tally { margin-top: 10px; }

/* Chips / tabs / lists */
.chips, .list { list-style: none; margin: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--wrap { margin-top: 18px; }
.chip {
  display: inline-flex;
  gap: 6px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.88rem;
  white-space: nowrap;
}
.chip:hover { text-decoration: none; border-color: var(--link); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--sand); }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; margin: 16px 0; overflow-x: auto; }

.crumbs { font-size: 0.85rem; color: var(--slate); margin: 18px 0 0; }

/* Photos */
.photos {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  scroll-snap-type: x mandatory;
  margin: 16px -20px;
  padding: 0 20px;
  -webkit-overflow-scrolling: touch;
}
.photos img {
  flex: 0 0 auto;
  width: 190px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  scroll-snap-align: start;
  background: var(--line);
}

.ask-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 16px 0;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--slate);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ask-box:hover { border-color: var(--link); }
.ask-box__icon { color: var(--link); }

/* Buttons */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.store, .button {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sand);
  font-weight: 600;
  font-size: 0.92rem;
}
.store:hover, .button:hover { text-decoration: none; opacity: 0.88; }
.store--soon {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--line);
  font-weight: 500;
}

dialog {
  width: min(92vw, 400px);
  border: 0;
  border-radius: 16px;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: rgba(26, 46, 99, 0.55); }
dialog h2 { margin-top: 0; }
.ghost {
  margin-top: 14px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
img { max-width: 100%; }

footer {
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.88rem;
}
footer .bar { padding-top: 22px; padding-bottom: 40px; }
footer a { color: var(--slate); }

/* Place page */
.filters { font-size: 0.92rem; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; }
.rating { font-family: var(--mono); font-size: 1rem; margin: 14px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.about summary { cursor: pointer; list-style: none; }
.about summary::-webkit-details-marker { display: none; }
.about[open] summary { display: none; }
.about .more { color: var(--link); }
.hours { border-collapse: collapse; width: 100%; max-width: 420px; }
.hours td { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.hours td:last-child { text-align: right; color: var(--slate); font-family: var(--mono); font-size: 0.85rem; }
.hours .today td { color: var(--ink); font-weight: 700; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.details dt { color: var(--slate); }
.details dd { margin: 0; }
.get-app { margin-top: 44px; }
.get-app h2 { margin-bottom: 8px; }

/* Open in the app: the tail of a page, never a wall in front of it. */
.open-app { margin-top: 44px; }
.open-app h2 { margin-top: 0; margin-bottom: 6px; }
.open-app .actions { margin-top: 16px; }
.button--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button--ghost:hover { border-color: var(--link); opacity: 1; }
.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.share__label { flex: 0 0 100%; font-size: 0.82rem; color: var(--slate); }
.share__url {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 460px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sand);
  color: var(--slate);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-overflow: ellipsis;
}
.share__copy { flex: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.92rem; }
.share__done { font-size: 0.85rem; color: var(--slate); }
.profile { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.profile h1 { margin: 0; }
.profile .lead { margin: 6px 0 0; }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.avatar--empty { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: var(--slate); }
.verified { color: var(--link); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
