/* =========================================================================
   Uniquely — editorial city guide
   Native modern CSS: custom properties, Grid, Flexbox. No framework.
   ========================================================================= */

/* --- Design tokens ----------------------------------------------------- */
:root {
  /* Earthy, muted palette */
  --color-bone: #f3f0e8;
  --color-paper: #faf8f3;
  --color-charcoal: #26251f;
  --color-moss: #73765b;
  --color-olive: #8a8c73;
  --color-clay: #b26f52;
  --color-sand: #d8ccba;
  --color-line: #d9d5cb;

  /* Semantic roles */
  --bg: var(--color-paper);
  --bg-alt: var(--color-bone);
  --text: var(--color-charcoal);
  --text-muted: #57564d;          /* AA on paper/bone */
  --accent: #a85b3c;              /* darker clay for interaction */
  --accent-strong: #8f4b30;
  --line: var(--color-line);
  --focus: #6a3a24;

  /* Type */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.28rem + 0.8vw, 1.9rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.4vw, 2.7rem);
  --step-4: clamp(2.3rem, 1.8rem + 2.4vw, 3.8rem);
  --step-5: clamp(2.9rem, 2.1rem + 3.8vw, 5rem);

  /* Space + shape */
  --space-1: 0.35rem;
  --space-2: 0.6rem;
  --space-3: 1rem;
  --space-4: 1.6rem;
  --space-5: 2.6rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --radius: 4px;
  --radius-lg: 8px;

  --container: 1280px;
  --container-wide: 1400px;
  --container-narrow: 720px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-3);
  max-width: 68ch;
}

a {
  color: var(--text);
  text-decoration-color: var(--line);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-5) 0;
}

/* --- Layout helpers ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.4rem);
}
.container--wide {
  max-width: var(--container-wide);
}
.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: clamp(2.4rem, 6vw, var(--space-7));
}
.section--alt {
  background: var(--bg-alt);
}
.section--tight {
  padding-block: clamp(1.6rem, 4vw, var(--space-6));
}

.stack > * + * {
  margin-top: var(--space-3);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}
.eyebrow--accent {
  color: var(--accent-strong);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text);
  max-width: 60ch;
}

.muted {
  color: var(--text-muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.section-head h2 {
  margin: 0;
}
.section-head .section-head__link {
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: var(--color-paper);
  padding: 0.7rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* --- Header / navigation ---------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.1) blur(6px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 68px;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
  padding-block: 0.4rem;
}
.brand:hover {
  color: var(--text);
}
.brand__city {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.18em 0.5em;
  border: 1px solid var(--line);
  border-radius: 999px;
  position: relative;
  bottom: 0.15em;
}

/* Responsive nav via <details> — no JavaScript required */
/* Small, always-visible nav — no JS, no disclosure widget. Wraps onto its own
   row on small screens (no hamburger needed for a handful of links). */
.nav {
  display: flex;
  justify-content: flex-end;
}
.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem clamp(0.9rem, 2.2vw, 1.9rem);
}
.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
  padding: 0.4rem 0;
}
.nav__links a:hover {
  color: var(--accent);
}
.nav__links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.3em;
}
.nav__links .nav__cta {
  color: var(--accent-strong);
}

@media (max-width: 620px) {
  .site-header__inner {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 0.3rem;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
  }
  .nav__links {
    justify-content: flex-start;
    gap: 0.1rem 1.1rem;
  }
  .nav__links a {
    font-size: var(--step--1);
    min-height: 40px;
  }
}

/* --- Buttons / pills --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: var(--text);
  color: var(--color-paper);
}
.btn--solid {
  background: var(--text);
  color: var(--color-paper);
}
.btn--solid:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--color-paper);
}
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: var(--step-1);
  font-family: var(--font-display);
}
.arrow-link .arrow {
  transition: transform 0.15s ease;
}
.arrow-link:hover .arrow {
  transform: translateX(3px);
}

/* --- Tags -------------------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tag {
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2em 0.7em;
  background: color-mix(in srgb, var(--color-paper) 60%, transparent);
}

/* --- Grids ------------------------------------------------------------- */
.grid-cards {
  display: grid;
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 288px), 1fr));
}
.grid-cards--wide {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.grid-2 {
  display: grid;
  gap: clamp(1.4rem, 3vw, 3rem);
}
@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

/* --- Business card ----------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  height: 100%;
}
.card:hover {
  color: var(--text);
}
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-sand);
  border-radius: var(--radius);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card__media img,
.card:focus-visible .card__media img {
  transform: scale(1.03);
}
.card__badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--color-paper);
  color: var(--text);
  padding: 0.25em 0.7em;
  border-radius: 999px;
}
.card__body {
  padding-top: var(--space-3);
}
.card__meta {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}
.card__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.15;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.card:hover .card__name {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.18em;
}
.card__desc {
  color: var(--text-muted);
  font-size: var(--step-0);
  margin: 0 0 var(--space-2);
  max-width: none;
}
.card .tags {
  margin-top: auto;
  padding-top: var(--space-2);
}

/* --- Hero / masthead --------------------------------------------------- */
.hero {
  padding-block: clamp(2.6rem, 7vw, 6rem);
}
.hero__title {
  font-size: var(--step-5);
  max-width: 16ch;
  margin-bottom: var(--space-4);
}
.hero__intro {
  font-size: var(--step-1);
  color: var(--text);
  max-width: 46ch;
}
.hero__intro p {
  max-width: 46ch;
}

.display-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-2);
  color: var(--text);
  line-height: 1.3;
  max-width: 24ch;
}

/* --- Breadcrumbs ------------------------------------------------------- */
.breadcrumbs {
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  padding-block: var(--space-3);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}
.breadcrumbs li {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.breadcrumbs li + li::before {
  content: "→";
  color: var(--line);
}
.breadcrumbs a {
  text-decoration: none;
  color: var(--text-muted);
}
.breadcrumbs a:hover {
  color: var(--accent);
}
.breadcrumbs [aria-current="page"] {
  color: var(--text);
}

/* --- Business detail --------------------------------------------------- */
.detail-hero {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.6rem);
}
@media (min-width: 900px) {
  .detail-hero {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}
.detail-hero__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-sand);
}
.detail-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-hero__body {
  align-self: center;
}
.detail-title {
  font-size: var(--step-4);
  margin-bottom: var(--space-2);
}

.gallery {
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.gallery figure {
  margin: 0;
}
.gallery__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-sand);
}
.gallery__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery figcaption {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Key/value facts */
.facts {
  border-top: 1px solid var(--line);
  margin: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) 1fr;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 520px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
.facts dt {
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.facts dd {
  margin: 0;
}
.facts address {
  font-style: normal;
}

.prose p {
  max-width: 62ch;
}
.prose {
  font-size: var(--step-0);
}

.layout-sidebar {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.4rem);
}
@media (min-width: 940px) {
  .layout-sidebar {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
  }
}

/* --- Category chips / filters ----------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  background: var(--color-paper);
}
.chip:hover {
  /* --accent-strong clears AA (4.5:1) on both paper and the bone alt sections. */
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}
.chip[aria-current="true"],
.chip--active {
  background: var(--text);
  color: var(--color-paper);
  border-color: var(--text);
}
.chip[aria-current="true"]:hover {
  color: var(--color-paper);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) 0;
  border-block: 1px solid var(--line);
  margin-bottom: var(--space-4);
}
.filter-group {
  min-width: 0;
}
.filter-group__label {
  display: block;
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* --- Search ------------------------------------------------------------ */
.search-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  max-width: 560px;
}
.search-form input[type="search"] {
  flex: 1 1 260px;
  font: inherit;
  padding: 0.85rem 1rem;
  min-height: 48px;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--text);
}
.search-form input[type="search"]::placeholder {
  color: var(--text-muted);
}
.search-form input[type="search"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Header inline mini-search on the city home */
.mini-search {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
}
.mini-search input {
  flex: 1;
  font: inherit;
  padding: 0.75rem 1rem;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--text);
}

/* --- Empty / notice states -------------------------------------------- */
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 3rem);
  text-align: center;
  background: color-mix(in srgb, var(--color-bone) 55%, transparent);
}
.notice h2,
.notice h1 {
  margin-top: 0;
}
.notice p {
  margin-inline: auto;
}
/* Darker accent for hover links on bone (alt) surfaces, to keep AA contrast.
   Scoped to paragraphs/notices so it never overrides card hover styling. */
.notice a:hover,
.section--alt p a:hover {
  color: var(--accent-strong);
}

.error-page {
  display: flex;
  min-height: 60vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6) 0;
}
.error-page .code {
  font-family: var(--font-display);
  font-size: var(--step-5);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-3);
}

/* --- Feature list / editorial columns --------------------------------- */
.feature-grid {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.feature h3 {
  margin-bottom: 0.4rem;
}
.feature p {
  color: var(--text-muted);
  margin: 0;
}

/* --- Neighbourhood list ----------------------------------------------- */
.place-list {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.place-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--color-paper);
  transition: border-color 0.15s ease;
}
.place-card:hover {
  border-color: var(--accent);
  color: var(--text);
}
.place-card h3 {
  margin: 0;
}
.place-card .count {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- City list (landing / cities) ------------------------------------- */
.city-list {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.city-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 180px;
  justify-content: space-between;
  background: var(--color-paper);
}
.city-card:hover {
  border-color: var(--accent);
  color: var(--text);
}
.city-card .eyebrow {
  display: block;
  margin-bottom: 0.2rem;
}
.city-card__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  margin: 0;
}
.city-card--soon {
  opacity: 0.55;
  pointer-events: none;
}

/* --- Footer ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding-block: var(--space-6) var(--space-4);
  margin-top: var(--space-6);
}
.footer-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.footer-grid h2 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.footer-grid a {
  text-decoration: none;
  color: var(--text);
}
.footer-grid a:hover {
  /* Darker accent for AA contrast on the bone footer background. */
  color: var(--accent-strong);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: var(--step-2);
}
.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* --- Utility ----------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-center {
  text-align: center;
}
.flow > * + * {
  margin-top: var(--space-4);
}
.divider {
  border-top: 1px solid var(--line);
}
