/* Family site. Clean black-and-white look with one sans-serif family. */

:root {
  --ground: #FFFFFF;
  --surface: #F2F2F4;
  --ink: #0E0E12;
  --muted: #535457;
  --line: #D8D8DB;
  --line-strong: #B5B5BA;
  --accent: #0E0E12;

  --text: Barlow, "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
}

[hidden] { display: none !important; }

img { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #0B57D0;
  outline-offset: 2px;
}

/* Header */

.site-header {
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
}

.nav-link:hover { box-shadow: inset 0 -2px 0 var(--line-strong); }

.nav-link.is-current {
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ink);
}

/* Page frame */

.main {
  flex: 1;
  padding-top: 56px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
}

h1 {
  margin: 0;
  font-size: 52px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.overline {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}

.more-link {
  margin-left: auto;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.more-link:hover { text-decoration: underline; }

.back-link {
  align-self: flex-start;
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.notice {
  margin: 0;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.notice p { margin: 0; }

.empty { margin: 0; color: var(--muted); }

/* Controls */

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.chip:hover { border-color: var(--ink); }

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
  font-weight: 500;
}

.search {
  width: 100%;
  max-width: 420px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
}

.search::placeholder { color: var(--muted); }

.button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: #FFFFFF;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: #2A2A2E; }

.button.is-light { background: #FFFFFF; color: var(--ink); }
.button.is-light:hover { background: #E6E6E9; }

/* Grids and tiles */

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.grid.is-tight { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.tile {
  --pad-x: 24px;
  --pad-top: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--pad-top) var(--pad-x) 24px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

a.tile:hover .tile-title { text-decoration: underline; }

.tile.is-dark { background: var(--accent); color: #FFFFFF; }
.tile.is-dark .tile-meta { color: #D8D8DB; }

.tile-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tile-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: calc(-1 * var(--pad-top)) calc(-1 * var(--pad-x)) 10px;
  background: #E6E6E9;
}

.tile-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-meta {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.tile-text { margin: 0; font-size: 16px; }

.tile-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  background: #E6E6E9;
  color: #2A2A2E;
}

.tile .tag { background: #FFFFFF; }
.tile.is-dark .tag { background: #2F2F36; color: #FFFFFF; }

/* Status colours. Each pair is checked for 4.5:1 contrast. */
.tag.is-green { background: #DCE9E2; color: #1B4435; }
.tag.is-blue  { background: #DCE6F4; color: #1F4E86; }
.tag.is-amber { background: #F6E6CF; color: #7A4508; }

/* Photo cards (wine, recipes with a photo) */

.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

a.card:hover .tile-title { text-decoration: underline; }

.card-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
}

.card-photo.is-wide { aspect-ratio: 4 / 3; }

.card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.score small { font-size: 13px; font-weight: 500; color: var(--muted); }

/* Next trip */

.hero {
  background: var(--accent);
  color: #FFFFFF;
  border-radius: 12px;
  padding: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 24px 48px;
}

.hero-main {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-title {
  margin: 0;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.countdown {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.countdown-number {
  font-size: 104px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.countdown-number:empty { display: none; }

.countdown-label { font-size: 18px; }

/* One trip, recipe or wine */

.detail {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 56px;
}

.detail-photo {
  flex: 0 1 320px;
  min-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.detail-photo img { display: block; width: 100%; height: auto; }

.detail-main {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts div { min-width: 0; }
.facts .is-wide { grid-column: 1 / -1; }

.facts dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 2px 0 0;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.facts dd.is-big { font-size: 40px; font-weight: 500; line-height: 1.1; }

/* Page content that comes from Notion */

.prose {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-wrap: anywhere;
}

.prose > * { margin: 0; }

.prose h2 { margin-top: 22px; }
.prose h3 { margin-top: 12px; font-size: 22px; font-weight: 600; line-height: 1.25; }
.prose h4 { margin-top: 6px; font-size: 18px; font-weight: 600; }
.prose > :first-child { margin-top: 0; }

.prose p:empty { display: none; }

.prose a { text-decoration: underline; text-underline-offset: 2px; }

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prose li > ul,
.prose li > ol,
.prose li > .nested { margin-top: 8px; }

.prose .nested {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prose .nested > * { margin: 0; }

.prose ul.todos { list-style: none; padding-left: 0; }

.todo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.todo-box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.todo.is-done .todo-box { background: var(--ink); border-color: var(--ink); }
.todo.is-done .todo-text { color: var(--muted); text-decoration: line-through; }

.prose hr {
  width: 100%;
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose blockquote {
  padding-left: 18px;
  border-left: 3px solid var(--ink);
  font-size: 19px;
}

.callout {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--surface);
}

.callout-icon { flex: none; font-size: 22px; line-height: 1.3; }

.callout-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.callout-body > * { margin: 0; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--ink);
}

.prose table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}

.prose th {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose tbody th {
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.prose figure { display: flex; flex-direction: column; gap: 8px; }
.prose figure img { display: block; width: auto; max-height: 560px; border-radius: 12px; }
.prose figcaption { font-size: 15px; color: var(--muted); }

.prose details > summary { cursor: pointer; font-weight: 500; }
.prose details > summary > * { display: inline; }
.prose details > .nested { margin-top: 12px; padding-left: 20px; }

.prose pre {
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  overflow-x: auto;
  font-size: 15px;
}

.prose code { font-size: 0.92em; background: var(--surface); padding: 1px 5px; border-radius: 4px; }

.columns { display: flex; flex-wrap: wrap; gap: 24px; }
.columns > .nested { flex: 1 1 240px; min-width: 0; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); }

.footer-inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 15px;
  color: var(--muted);
}

.footer-inner span:last-child { margin-left: auto; }

/* Phone */

@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav { margin-left: -10px; gap: 0; }
  .nav-link { padding: 0 10px; }
  .main { padding-top: 32px; padding-bottom: 48px; gap: 32px; }
  h1 { font-size: 38px; }
  h2 { font-size: 26px; }
  .hero { padding: 24px; }
  .hero-title { font-size: 34px; }
  .countdown-number { font-size: 80px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .grid.is-tight { grid-template-columns: 1fr; gap: 12px; }
  .tile { --pad-x: 20px; --pad-top: 18px; padding-bottom: 20px; }
  .tile-title { font-size: 20px; }
  .detail { gap: 28px; }
  .detail-photo { flex-basis: 100%; }
  .facts dd.is-big { font-size: 34px; }
  .footer-inner { flex-direction: column; }
  .footer-inner span:last-child { margin-left: 0; }
}

/* Stacked groups inside one page (Coming up, Been, Destination guides) */
.section > .section + .section { margin-top: 24px; }
