/* ============================================================
   Colour values live in palettes.css. This file is structure,
   type and spacing only.
   ============================================================ */

:root {
  --radius: 3px;
  --measure: 720px;
  --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.shell {
  max-width: var(--measure);
  margin: 0 auto;
  background: var(--surface);
  min-height: 100vh;
}

/* Small-caps label treatment, used throughout. Fine-dining menus
   lean on letterspaced caps instead of size and colour. */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ---------------- Masthead ---------------- */

.masthead {
  padding: 46px 24px 34px;
  text-align: center;
}

.masthead__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  line-height: 1.04;
  margin: 0;
  letter-spacing: 0.015em;
}

.masthead__tagline {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Thin rule interrupted by a small diamond. */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px auto;
  max-width: 240px;
  color: var(--accent);
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.ornament span {
  font-size: 0.5rem;
  line-height: 1;
  transform: rotate(45deg);
  width: 5px;
  height: 5px;
  background: currentColor;
}

.masthead__meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: grid;
  gap: 4px;
}

.masthead__hours { display: grid; gap: 2px; }
.masthead__hours span b { font-weight: 600; color: var(--text); }
.masthead__hours .is-closed { opacity: 0.62; }

/* Lunch and dinner service split, which cuts across every open day and
   so doesn't belong on any single line above. */
.hours__note {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--rule);
  font-style: italic;
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  touch-action: manipulation;
}

.btn:hover { border-color: var(--accent); color: var(--accent); }

/* display:inline-flex would otherwise defeat the hidden attribute */
.btn[hidden] { display: none; }

.btn--primary {
  border-color: var(--accent);
  color: var(--accent);
}

.actions--left { justify-content: flex-start; }

/* ---------------- Site nav ---------------- */

.sitenav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 12px 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

body[data-page="home"] .sitenav,
body[data-page="gallery"] .sitenav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: max(12px, env(safe-area-inset-top));
}

.sitenav__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.sitenav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: -4px -10px -4px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.sitenav__bars,
.sitenav__bars::before,
.sitenav__bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.15s, top 0.15s, background-color 0.15s;
}

.sitenav__bars {
  position: relative;
}

.sitenav__bars::before,
.sitenav__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.sitenav__bars::before { top: -6px; }
.sitenav__bars::after { top: 6px; }

.sitenav.is-open .sitenav__bars { background: transparent; }

.sitenav.is-open .sitenav__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.sitenav.is-open .sitenav__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.sitenav__links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sitenav__links a {
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  touch-action: manipulation;
}

.sitenav__links a[aria-current="page"],
.sitenav__links a:hover {
  color: var(--accent);
}

@media (max-width: 767px) {
  .sitenav__toggle { display: inline-flex; }

  .sitenav__links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 6px;
  }

  .sitenav.is-open .sitenav__links { display: flex; }

  .sitenav__links a {
    min-height: 44px;
    padding: 0 2px;
    border-bottom: 1px solid var(--line);
  }

  .sitenav__links a:last-child { border-bottom: 0; }
}

/* ---------------- Homepage ---------------- */

.hero {
  position: relative;
  min-height: 58vh;
  color: #f7f1e6;
  overflow: hidden;
  background: #111;
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero__slides img.is-on { opacity: 1; }

.hero__copy {
  position: relative;
  z-index: 1;
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 56px 24px 40px;
  background: linear-gradient(
    to top,
    rgba(10, 8, 6, 0.72) 0%,
    rgba(10, 8, 6, 0.18) 42%,
    rgba(10, 8, 6, 0.22) 100%
  );
}

.hero__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__monogram {
  width: 5.6rem;
  height: 5.6rem;
  border: 2px solid #f3c63a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.45rem;
  font-weight: 400;
  color: #f3c63a;
  letter-spacing: 0;
  background: radial-gradient(circle, rgba(8, 6, 4, 0.9) 52%, rgba(8, 6, 4, 0.78) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 0 5px rgba(10, 8, 6, 0.55),
    0 0 0 6.5px #f3c63a,
    0 14px 40px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 7vw, 3.15rem);
  letter-spacing: 0.06em;
  color: #f4ead8;
  margin: 14px 0 0;
  line-height: 1;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero .eyebrow { color: rgba(247, 241, 230, 0.78); }

.hero__tag {
  margin: 12px 0 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(247, 241, 230, 0.78);
}

.hero .btn,
.hero .btn:visited {
  color: #fff;
  border: 2px solid #f3c63a;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 1px rgba(243, 198, 58, 0.35);
}

.hero .btn--primary,
.hero .btn--primary:visited {
  border-color: #f3c63a;
  color: #fff;
}

.hero .btn:hover {
  border-color: #ffd85a;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 216, 90, 0.5);
}

.page-block {
  padding: 48px 24px 12px;
}

.page-block__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  margin: 8px 0 0;
}

.page-block__kicker {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.about__copy {
  max-width: 42rem;
}

.about__copy p {
  margin: 14px 0 0;
  color: var(--text-muted);
}

.home-band {
  padding: 40px 24px 8px;
}

.intro__photo {
  margin: 24px 0 0;
}

.intro__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.intro__facts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px 12px;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.intro__facts dt {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.intro__facts dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
}

.paths {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 28px;
}

.path {
  display: block;
  padding: 22px 20px 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.path:hover { border-color: var(--accent); }

.path__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 8px 0 0;
}

.path__text {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.path__go {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.plates { padding-bottom: 32px; }

.plates__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.plates__head .page-block__title { margin: 8px 0 0; }

.plates__more {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  white-space: nowrap;
}

.plates__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.plates__item { margin: 0; }

.plates__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.plates__item figcaption {
  padding: 8px 2px 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.visit {
  padding-bottom: 12px;
}

.visit__copy {
  display: grid;
  gap: 10px;
}

.visit .contact__phone { margin: 8px 0 0; }

.visit .masthead__hours { margin-top: 6px; }

.visit .actions { margin-top: 8px; }

.visit .map { margin-top: 24px; }

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.gallery__item {
  margin: 0;
  background: var(--surface-2);
}

.gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery__item figcaption {
  padding: 8px 10px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.contact {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.contact__card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.contact__details {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact__phone a {
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--text);
}

.contact .masthead__hours { margin-top: 8px; }

.map {
  margin-top: 24px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.map iframe {
  display: block;
  width: 100%;
  height: 240px;
  border: 0;
}

@media (min-width: 640px) {
  .contact {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .contact__card img {
    max-height: 380px;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

/* ---------------- Sticky nav ---------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0 0;
}

.navbar.is-stuck {
  padding-top: max(12px, env(safe-area-inset-top));
}

.search {
  position: relative;
  margin: 0 24px 12px;
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 0 42px 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px minimum stops iOS zooming on focus */
}

.search input::placeholder { color: var(--text-faint); }

.search input:focus {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.search__icon,
.search__clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  line-height: 1;
}

.search__icon { left: 15px; pointer-events: none; }

.search__clear {
  right: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.search__clear[hidden] { display: none; }

.chips-row {
  display: flex;
  align-items: stretch;
  position: relative;
  padding-bottom: 4px;
}

.chips-row[hidden] { display: none; }

.chips {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding: 0 12px 0 24px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent);
}

.chips-row.is-end .chips { mask-image: none; }

.chips::-webkit-scrollbar { display: none; }
.chips[hidden],
.chip[hidden] { display: none; }

.chips__index {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 44px;
  margin: 0;
  padding: 0 16px 0 8px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.chips__index:hover,
.chips__index[aria-expanded="true"] {
  color: var(--accent);
}

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0 5px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
  touch-action: manipulation;
}

.chip:hover { color: var(--text); }

.chip[aria-current="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.filter-status[hidden] { display: none; }

.filter-status__clear {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 36px;
  touch-action: manipulation;
}

/* ---------------- Legend ---------------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--text-faint);
  background: var(--surface-2);
}

.legend span,
.legend__filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend__filter {
  margin: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
}

.legend__filter[aria-pressed="true"] {
  color: var(--accent);
}

@media (max-width: 767px) {
  .tag--gf,
  .legend__filter--gf {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .legend__filter:hover {
    color: var(--accent);
  }
}

/* ---------------- Sections ---------------- */

.sections { padding: 0 24px 20px; }

.section {
  padding-top: 52px;
  scroll-margin-top: calc(120px + env(safe-area-inset-top, 0px));
}

html.is-filtering .section {
  scroll-margin-top: calc(156px + env(safe-area-inset-top, 0px));
}

.section__head { text-align: center; margin-bottom: 8px; }

.section__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0;
}

.section__title::before,
.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.group { margin-top: 30px; }

.group__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: center;
  margin: 0 0 3px;
}

.note {
  margin: 0 auto 16px;
  font-size: 0.82rem;
  color: var(--text-faint);
  text-align: center;
  max-width: 46ch;
}

.group--boxed {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

/* ---------------- Items ---------------- */

.items { list-style: none; margin: 0; padding: 0; }

.item { padding: 14px 0; }

.item + .item { border-top: 1px solid var(--line); }

.item__flag {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.item__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.item__name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.3;
  flex: 1;
}

.item__jp {
  font-family: var(--font-body);
  color: var(--text-faint);
  font-size: 0.78em;
}

.item__pc {
  font-family: var(--font-body);
  color: var(--text-faint);
  font-size: 0.72em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item__dots {
  flex: 1;
  border-bottom: 1px dotted var(--line-strong);
  min-width: 12px;
  transform: translateY(-4px);
  opacity: 0.7;
}

/* Prices stay in the text colour. Coloured prices read as a
   sales pitch and are the fastest way to look inexpensive. */
.item__price {
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-muted);
}

.item__desc {
  margin: 5px 0 0;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 58ch;
}

.item__addons {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Raw-fish asterisk. Superscript and quiet — it should register
   without ever being the first thing you notice about a dish. */
.mark {
  font-family: var(--font-body);
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text-faint);
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
  text-decoration: none;
  cursor: help;
}

.legend .mark {
  vertical-align: baseline;
  margin: 0 5px 0 0;
  font-size: 1em;
}

/* Dietary marks: deliberately monochrome. Coloured badges fight
   whichever palette you pick and clutter a long list. */
.tags {
  display: inline-flex;
  gap: 5px;
  margin-left: 4px;
  vertical-align: 2px;
}

.tag {
  font-family: var(--font-body);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 2px 4px 1px;
  text-decoration: none;
  white-space: nowrap;
}

.legend .tag { font-size: 0.6rem; }

/* Two-column layout for by-the-piece lists */

.items--compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 40px;
}

@media (min-width: 600px) {
  .items--compact { grid-template-columns: 1fr 1fr; }
  /* the top border on the first item of column two would float */
  .items--compact .item:nth-child(2) { border-top: 0; }
}

@media (min-width: 1100px) {
  .items--compact { grid-template-columns: 1fr 1fr 1fr; }
  .items--compact .item:nth-child(3) { border-top: 0; }
}

.items--compact .item { padding: 10px 0; }
.items--compact .item__name { font-size: 1rem; }

/* ---------------- Availability badge ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.badge--on { color: var(--accent); }

.badge--on::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 8px;
}

/* ---------------- Empty state ---------------- */

.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-display);
}

.empty[hidden] { display: none; }

/* ---------------- Footer ---------------- */

.footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 32px 24px max(52px, calc(28px + env(safe-area-inset-bottom)));
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-faint);
  background: var(--surface-2);
}

.footer p { margin: 0 auto 12px; max-width: 60ch; text-align: center; }

.advisory { color: var(--text-muted); }

.appearance {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.appearance label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.control {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

/* ---------------- Masthead (phone) ---------------- */

.masthead__more {
  margin: 0;
}

.masthead__more summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  touch-action: manipulation;
}

.masthead__more summary::-webkit-details-marker { display: none; }

.masthead__more summary::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.masthead__more[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.masthead__more[open] summary { margin-bottom: 6px; }

.masthead__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

.masthead__link + .masthead__link { margin-left: 14px; }

.masthead__link:hover { color: var(--accent); }

@media (max-width: 767px) {
  .masthead {
    padding: 22px 24px 18px;
  }

  .masthead__name {
    font-size: clamp(1.85rem, 9vw, 2.5rem);
  }

  .masthead .ornament {
    margin: 14px auto 12px;
  }

  .masthead .actions {
    margin-top: 14px;
  }

  .masthead .actions #a-directions {
    display: none;
  }
}

/* ---------------- Jump-to sheet ---------------- */

.jump {
  width: calc(100% - 32px);
  max-width: 22rem;
  max-height: min(36rem, calc(100% - 32px));
  margin: auto;
  padding: 22px 8px 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}

.jump::backdrop {
  background: rgba(12, 10, 8, 0.55);
}

.jump__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 12px;
  padding: 0 16px;
}

.jump__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jump__list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  touch-action: manipulation;
}

.jump__list a:hover,
.jump__list a[aria-current="true"] {
  color: var(--accent);
}

.jump__close {
  display: block;
  width: calc(100% - 24px);
  margin: 12px 12px 0;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

/* ---------------- Back to top ---------------- */

.to-top {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.to-top[hidden] { display: none; }

.to-top:hover { color: var(--accent); border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================================
   Wide layout — tablet and desktop. Phone styles above stay
   the default; these only add columns and tighten vertical
   spacing once there is room to use them.
   ============================================================ */

@media (min-width: 768px) {
  :root { --measure: 100%; }

  body { background: var(--surface); }

  .sitenav {
    padding: 14px 36px;
    padding-left: max(36px, env(safe-area-inset-left));
    padding-right: max(36px, env(safe-area-inset-right));
  }

  .sitenav__toggle { display: none; }

  .sitenav__links {
    display: flex;
    gap: 6px;
    flex-direction: row;
    flex-basis: auto;
    padding: 0;
  }

  .sitenav__links a { border-bottom: 0; }

  .masthead__more summary,
  .masthead__more .masthead__link { display: none; }

  .sitenav__links a { padding: 0 12px; }

  .hero,
  .hero__copy { min-height: 60vh; }

  .hero__copy {
    padding: 64px 40px 48px;
    gap: 20px;
  }

  .hero__monogram {
    width: 6rem;
    height: 6rem;
    font-size: 2.6rem;
  }

  .masthead {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    column-gap: 40px;
    text-align: left;
    padding: 36px 36px 28px;
  }

  .masthead__name {
    font-size: clamp(2.4rem, 4vw, 3.1rem);
  }

  .masthead__tagline { margin-top: 8px; }

  .ornament {
    margin: 16px 0 0;
    max-width: 160px;
    justify-content: flex-start;
  }

  .masthead__meta {
    grid-column: 2;
    grid-row: 1 / 4;
    text-align: right;
    align-self: center;
  }

  .masthead .actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 20px;
  }

  .page-block,
  .home-band { padding: 40px 36px 8px; }

  .page-block__title { font-size: 1.85rem; }

  .intro {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 20px;
  }

  .intro__photo { margin: 0; }

  .intro__photo img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .paths {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 8px;
    padding-bottom: 36px;
  }

  .path { padding: 28px 26px 24px; }

  .plates {
    padding-top: 8px;
    padding-bottom: 40px;
  }

  .plates__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .visit {
    display: grid;
    grid-template-columns: minmax(16rem, 0.85fr) 1.15fr;
    gap: 36px;
    align-items: start;
    padding-bottom: 28px;
  }

  .visit .map {
    margin-top: 0;
    align-self: stretch;
  }

  .visit .map iframe {
    height: 100%;
    min-height: 280px;
  }

  .search { margin: 0 36px 12px; }

  .chips { padding: 0 12px 0 36px; }

  .chips__index { padding-right: 28px; }

  .filter-status { padding: 0 36px 10px; }

  .legend { padding: 16px 36px; }

  .sections { padding: 0 36px 24px; }

  .section { padding-top: 40px; }

  .footer {
    margin-top: 40px;
    padding: 28px 36px max(40px, calc(20px + env(safe-area-inset-bottom)));
  }
}

@media (min-width: 960px) {
  :root { --measure: 100%; }

  .items:not(.items--compact) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }

  .items:not(.items--compact) .item:nth-child(-n+2) {
    border-top: 0;
  }

  .item__desc { max-width: none; }

  .footer {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 40px;
    align-items: start;
  }

  .footer p {
    text-align: left;
    margin: 0 0 10px;
    grid-column: 1;
  }

  .footer .appearance {
    grid-column: 2;
    grid-row: 1 / span 8;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    flex-direction: column;
    align-items: flex-end;
  }
}

@media (min-width: 1100px) {
  :root { --measure: 100%; }

  .hero,
  .hero__copy { min-height: 64vh; }

  .hero__monogram {
    width: 6.4rem;
    height: 6.4rem;
    font-size: 2.75rem;
  }

  .sitenav,
  .masthead,
  .page-block,
  .home-band,
  .footer {
    padding-left: 56px;
    padding-right: 56px;
  }

  .search { margin: 0 56px 12px; }

  .chips { padding: 0 12px 0 56px; }

  .chips__index { padding-right: 40px; }

  .filter-status { padding: 0 56px 10px; }

  .legend { padding: 16px 56px; }

  .sections { padding: 0 56px 28px; }

  body[data-page="gallery"] .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

@media (min-width: 1600px) {
  :root { --measure: 1520px; }

  body { background: var(--bg); }
}

/* ---------------- Print ---------------- */

@media print {
  @page { margin: 0.55in; }

  html, body {
    background: #fff;
    color: #000;
    font-size: 10pt;
  }

  /* Needs to outrank the [data-palette][data-mode] blocks in
     palettes.css, or a printed page keeps the cream background and
     lays down a full sheet of ink. */
  :root,
  html[data-palette][data-mode] {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --text: #000;
    --text-muted: #2b2b2b;
    --text-faint: #575757;
    --line: #cfcfcf;
    --line-strong: #9a9a9a;
    --accent: #000;
  }

  .navbar,
  .sitenav,
  .actions,
  .appearance,
  .empty,
  .hero__slides,
  .map,
  .to-top,
  .jump,
  .filter-status,
  .chips-row { display: none !important; }

  .shell { max-width: none; }
  .masthead {
    display: block;
    padding: 0 0 14pt;
    text-align: center;
  }
  .masthead__meta { text-align: center; }
  .masthead .actions { justify-content: center; }
  body[data-page="home"] main,
  .intro,
  .visit { display: block; }
  .intro__photo { margin-top: 12pt; }
  .paths,
  .plates { display: none; }
  .section { padding-top: 20pt; }
  .section__head { break-after: avoid; }
  .group__title { break-after: avoid; }
  .item { break-inside: avoid; padding: 4pt 0; }
  .items:not(.items--compact) { display: block; }
  .items--compact { grid-template-columns: 1fr 1fr; }
  .footer {
    display: block;
    margin-top: 20pt;
    padding: 12pt 0 0;
  }
  .footer p { text-align: center; }
}
