/* pizza.co.nz */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fbf7f0;          /* mozzarella */
  --surface: #ffffff;
  --surface-2: #f3ebdf;
  --ink: #2a211c;
  --muted: #6b5f56;
  --line: #e6dccf;
  --tomato: #c23a2b;
  --tomato-ink: #ffffff;
  --basil: #2f6b3a;
  --basil-soft: #e2efe2;
  --map: #2f6b3a;         /* the 1997 map was green too */
  --pin: #f2c14e;         /* ...with yellow dots */
  --pin-stroke: #1d3a22;
  --pin-active: #c23a2b;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(42 33 28 / .05), 0 6px 18px rgb(42 33 28 / .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --surface: #211b16;
    --surface-2: #2a231d;
    --ink: #f2eadf;
    --muted: #b3a698;
    --line: #3a3129;
    --tomato: #ec6a58;
    --tomato-ink: #1a0f0c;
    --basil: #8cc795;
    --basil-soft: #1e3322;
    --map: #2c5a33;
    --pin-stroke: #0d1a10;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--tomato); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 640;
  line-height: 1.08;
  letter-spacing: -.012em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); }
p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- header / footer ---------- */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 700; font-size: 1.4rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.logo svg { width: 32px; height: 32px; flex: none; }
.logo em { font-style: normal; color: var(--tomato); }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem;
  padding: 8px 13px; border-radius: 999px;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--surface-2); }
.nav a.nav-cta { background: var(--tomato); color: var(--tomato-ink); margin-left: 6px; }
.nav a.nav-cta:hover { filter: brightness(1.06); }
@media (max-width: 560px) {
  .logo { font-size: 1.2rem; }
  .logo svg { width: 28px; height: 28px; }
  .nav a { padding: 7px 10px; font-size: .9rem; }
  .nav .nav-regions { display: none; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 44px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.site-footer a { color: inherit; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tomato); color: var(--tomato-ink);
  font: inherit; font-weight: 600; text-decoration: none;
  padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }

/* ---------- home ---------- */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  grid-template-areas: "intro map" "lists map";
  column-gap: 64px; row-gap: 36px;
  padding: 52px 0 24px;
  align-items: start;
}
.intro { grid-area: intro; }
.map-col { grid-area: map; position: sticky; top: 24px; }
.lists-wrap, .home-grid > .lists { grid-area: lists; }
.lede { font-size: 1.15rem; color: var(--muted); margin-top: 18px; max-width: 46ch; }
.lede strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; grid-template-areas: "intro" "map" "lists"; padding-top: 32px; row-gap: 28px; }
  .map-col { position: static; max-width: 320px; width: 100%; margin: 0 auto; }
  /* While searching, put the results straight under the search box */
  .home-grid:has(#results:not([hidden])) .map-col { display: none; }
}

.search { position: relative; margin-top: 28px; max-width: 520px; }
.search > svg { position: absolute; left: 17px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  padding: 14px 18px 14px 48px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
}
.search input::placeholder { color: var(--muted); opacity: .8; }
.search:has(.near:not([hidden])) input { padding-right: 132px; }
.near {
  position: absolute; right: 7px; top: 50%; translate: 0 -50%;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink);
  padding: 8px 14px 8px 11px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface-2);
}
.near svg { width: 17px; height: 17px; flex: none; }
.near:hover { filter: brightness(.97); }
.near[aria-pressed="true"] { background: var(--tomato); color: var(--tomato-ink); }
.near:disabled { cursor: progress; opacity: .7; }
@media (max-width: 420px) {
  .near { padding: 9px; right: 6px; }
  .near span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .search > svg { left: 15px; }
  .search input { font-size: 1rem; padding-left: 44px; }
  .search input::placeholder { font-size: .94rem; }
  .search:has(.near:not([hidden])) input { padding-right: 48px; }
}
.near-status { color: var(--muted); font-size: .88rem; margin-top: 10px; padding-left: 18px; }
.search input:focus, .field :is(input, select, textarea):focus {
  outline: none; border-color: var(--tomato);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tomato) 18%, transparent);
}

.results { display: grid; gap: 2px; }
.results-count { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.result {
  display: flex; align-items: center; gap: 4px 16px; margin: 0 -14px; border-radius: 10px;
}
.result:hover, .result:focus-within { background: var(--surface-2); }
.result-main { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 11px 14px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.result strong { font-weight: 600; }
.result-main span { color: var(--muted); font-size: .9rem; }
.result-side { display: grid; justify-items: end; gap: 2px; padding-right: 14px; font-size: .88rem; white-space: nowrap; }
.result-side .dist { font-weight: 600; font-variant-numeric: tabular-nums; }
.result-side .map-link { font-weight: 600; }
.result .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--basil); margin-left: 8px; vertical-align: middle; }

.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 520px) { .lists { grid-template-columns: 1fr; gap: 24px; } }
.island h2 {
  font: 700 .76rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 10px; border-bottom: 1.5px solid var(--ink);
}
.island ul { list-style: none; margin: 0; padding: 0; }
.region-link {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 550;
}
.region-link:hover, .region-link.is-hover { color: var(--tomato); }
.region-link .count { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; font-size: .92rem; }
.region-link.empty { color: var(--muted); font-weight: 400; }

/* ---------- map ---------- */

.nz-map { display: block; width: 100%; height: auto; overflow: visible; }
.nz-map .land { fill: var(--map); }
.pin { cursor: pointer; }
.pin:focus { outline: none; }
.pin circle {
  fill: var(--pin); stroke: var(--pin-stroke); stroke-width: 1.5;
  transition: fill .15s ease, transform .15s ease;
  transform-box: fill-box; transform-origin: center;
}
.pin.empty circle { fill: var(--map); stroke: var(--pin); stroke-width: 2; stroke-dasharray: 2.5 1.8; }
.pin text {
  font: 650 12.5px var(--sans); fill: var(--ink);
  paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.pin.labelled text { opacity: 1; }
.pin:is(:hover, :focus-visible, .is-hover) text { opacity: 1; }
.pin:is(:hover, :focus-visible, .is-hover) circle { fill: var(--pin-active); transform: scale(1.25); }
.pin:focus-visible circle { stroke: var(--ink); stroke-width: 2.5; }
.map-caption { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 10px; }

.mini .pin circle { fill: var(--pin); opacity: .6; }
.mini .pin.empty circle { opacity: .5; }
.mini .pin.current circle { fill: var(--pin-active); opacity: 1; stroke: var(--bg); stroke-width: 2.5; }
.mini .pin text { display: none; }

/* ---------- region page ---------- */

.crumbs { padding-top: 28px; font-size: .92rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.region-head { display: grid; grid-template-columns: 1fr 170px; gap: 36px; align-items: center; padding: 10px 0 8px; }
.region-head .meta { color: var(--muted); font-size: 1.08rem; margin-top: 12px; }
.region-head .intro-text { margin-top: 14px; max-width: 60ch; }
.region-head .btn { margin-top: 22px; }
.mini { width: 170px; }
@media (max-width: 640px) {
  .region-head { grid-template-columns: 1fr 88px; gap: 16px; }
  .mini { width: 88px; }
}

.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.65rem; }
.section-head .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.section-note { color: var(--muted); margin: 8px 0 20px; max-width: 64ch; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 360px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 14px; box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}
.card:target { outline: 3px solid var(--tomato); outline-offset: 2px; }
.card h3 { font-size: 1.28rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .96rem; }
.facts li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: start; overflow-wrap: anywhere; }
.facts svg { width: 16px; height: 16px; margin-top: 4px; color: var(--muted); }
.facts .muted { color: var(--muted); }
.go { display: flex; align-items: flex-start; gap: 6px; margin-top: 3px; font-size: .9rem; font-weight: 600; }
.go svg { width: 14px; height: 14px; margin: 5px 0 0; color: var(--tomato); flex: none; }
.go > .map-link { display: inline-flex; align-items: center; gap: 6px; }
.go > .map-link svg { margin: 0; }
.go > span { min-width: 0; color: var(--muted); font-weight: 500; }
.go > span .map-link { font-weight: 600; }
.quote {
  margin: 0; padding-left: 14px; border-left: 3px solid var(--tomato);
  font-family: var(--serif); font-style: italic; font-size: 1.03rem; line-height: 1.5;
  white-space: pre-line; overflow-wrap: anywhere;
}
.quote footer { font-family: var(--sans); font-style: normal; font-size: .86rem; color: var(--muted); margin-top: 6px; }
.card-foot {
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .82rem;
}
.card-foot a { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 650; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.live { background: var(--basil-soft); color: var(--basil); }
.badge.archive { background: var(--surface-2); color: var(--muted); }

.archive .card { background: transparent; box-shadow: none; }
.archive .card h3 { font-weight: 560; }

.empty-state {
  margin-top: 36px; padding: 40px 28px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
}
.empty-state p { color: var(--muted); margin-bottom: 18px; font-size: 1.08rem; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { color: var(--ink); text-decoration: none; display: grid; gap: 2px; }
.pager a:hover strong { color: var(--tomato); }
.pager small { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.pager strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- call to action band ---------- */

.band {
  display: flex; justify-content: space-between; align-items: center; gap: 20px 32px;
  background: var(--surface-2); border-radius: 22px; padding: 36px 40px; margin-top: 48px;
}
.band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.band p { color: var(--muted); margin-top: 8px; }
@media (max-width: 640px) { .band { flex-direction: column; align-items: flex-start; padding: 26px 24px; } }

/* ---------- forms ---------- */

.page-head { padding: 40px 0 8px; max-width: 680px; }
.page-head p { color: var(--muted); font-size: 1.12rem; margin-top: 14px; }
.form { display: grid; gap: 20px; max-width: 640px; margin-top: 28px; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend, .field > label { display: block; font-weight: 650; margin-bottom: 8px; padding: 0; }
.field :is(input, select, textarea) {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 3.2em; }
.field small { display: block; color: var(--muted); font-size: .86rem; margin-top: 6px; }
.form .req { color: var(--tomato); }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; gap: 12px; align-items: center; cursor: pointer;
  padding: 12px 14px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px;
}
.choice input { accent-color: var(--tomato); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--tomato); background: color-mix(in srgb, var(--tomato) 6%, var(--surface)); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-divider { border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- prose (about) ---------- */

.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { font-size: 1.6rem; margin: 1.8em 0 .6em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.05em; }
.prose li { margin-bottom: .4em; }
.prose .muted { color: var(--muted); font-size: .92rem; }
.heritage {
  display: flex; gap: 12px; align-items: flex-end; justify-content: center; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px 14px; margin: 8px 0 1.4em; width: fit-content; max-width: 100%;
}
.heritage figcaption { width: 100%; text-align: center; color: #6b5f56; font-size: .85rem; }
.heritage img { height: auto; }
