:root {
  --hub-ink: #17342d;
  --hub-muted: #5f716b;
  --hub-deep: #0f4a3d;
  --hub-cream: #f7f1e4;
  --hub-paper: #fffdf7;
  --hub-coral: #ec6d50;
  --hub-sun: #f3bd4f;
  --hub-sky: #d8eeea;
  --hub-line: rgba(23, 52, 45, 0.15);
  --hub-shadow: 0 22px 60px rgba(27, 54, 46, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.content-hub-page {
  margin: 0;
  background:
    radial-gradient(circle at 8% 5%, rgba(243, 189, 79, 0.18), transparent 28rem),
    radial-gradient(circle at 96% 28%, rgba(121, 185, 174, 0.16), transparent 32rem),
    var(--hub-cream);
  color: var(--hub-ink);
  font-family: Inter, system-ui, sans-serif;
}

.content-hub-shell { overflow: clip; }

.hub-kicker,
.hub-card-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--hub-coral);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(520px, 1.15fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  width: min(1460px, calc(100% - 48px));
  min-height: 710px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 7rem) 0;
}

.hub-hero-copy { max-width: 680px; }

.hub-hero h1,
.hub-browse h2,
.hub-card h2,
.hub-empty h2,
.hub-trips-callout h2 {
  font-family: Fraunces, Georgia, serif;
  letter-spacing: -0.045em;
}

.hub-hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(4rem, 7.8vw, 8rem);
  line-height: 0.88;
}

.hub-hero-copy > p:not(.hub-kicker) {
  max-width: 620px;
  margin: 1.7rem 0 0;
  color: rgba(23, 52, 45, 0.78);
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  line-height: 1.7;
}

.hub-hero-action,
.hub-trips-callout > a,
.hub-empty button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2rem;
  border: 1px solid var(--hub-deep);
  border-radius: 999px;
  background: var(--hub-deep);
  padding: 0.85rem 1.35rem;
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hub-hero-action:hover,
.hub-trips-callout > a:hover,
.hub-empty button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 74, 61, 0.18);
}

.hub-hero-stack {
  position: relative;
  min-height: 570px;
}

.hub-hero-tile {
  position: absolute;
  overflow: hidden;
  border: 7px solid rgba(255, 253, 247, 0.96);
  border-radius: 28px;
  box-shadow: var(--hub-shadow);
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}

.hub-hero-tile::after {
  position: absolute;
  z-index: -1;
  inset: 32% 0 0;
  background: linear-gradient(transparent, rgba(7, 28, 22, 0.86));
  content: "";
}

.hub-hero-tile img {
  position: absolute;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.hub-hero-tile:hover img { transform: scale(1.045); }

.hub-hero-tile span {
  position: absolute;
  right: 1.4rem;
  bottom: 1.3rem;
  left: 1.4rem;
  text-wrap: balance;
  font: 700 clamp(1.2rem, 2.1vw, 2rem)/1.05 Fraunces, Georgia, serif;
}

/* Keep the lead title inside the part of the card that is not covered by tile 2. */
.hub-hero-tile-1 span { right: 22%; }

.hub-hero-tile small {
  display: block;
  margin-bottom: 0.45rem;
  font: 800 0.68rem/1 Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hub-hero-tile-1 { inset: 0 28% 25% 0; transform: rotate(-2deg); }
.hub-hero-tile-2 { inset: 6% 0 47% 62%; transform: rotate(3deg); }
.hub-hero-tile-3 { inset: 54% 0 0 48%; transform: rotate(-1.5deg); }

.hub-browse {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.hub-browse-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 470px);
  gap: 2rem;
  align-items: end;
  padding-top: 2rem;
  border-top: 1px solid var(--hub-line);
}

.hub-browse-head h2 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 5.2rem);
  line-height: 0.95;
}

.hub-search {
  display: grid;
  gap: 0.5rem;
}

.hub-search span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hub-search input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 253, 247, 0.92);
  padding: 0 1.2rem;
  color: var(--hub-ink);
  font: 600 1rem Inter, sans-serif;
  box-shadow: 0 10px 30px rgba(23, 52, 45, 0.05);
}

.hub-search input:focus {
  border-color: var(--hub-deep);
  box-shadow: 0 0 0 4px rgba(15, 74, 61, 0.13);
}

.hub-topic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.3rem;
}

.hub-topic-filters button {
  min-height: 44px;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: var(--hub-paper);
  padding: 0.65rem 1rem;
  color: var(--hub-ink);
  font: 800 0.88rem Inter, sans-serif;
  cursor: pointer;
}

.hub-topic-filters button:hover,
.hub-topic-filters button.is-active {
  border-color: var(--hub-deep);
  background: var(--hub-deep);
  color: #fff;
}

.hub-result-count {
  margin: 1.25rem 0 1.5rem;
  color: var(--hub-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.7rem);
}

.hub-card {
  overflow: hidden;
  border: 1px solid var(--hub-line);
  border-radius: 25px;
  background: var(--hub-paper);
  box-shadow: 0 14px 40px rgba(23, 52, 45, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hub-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hub-shadow);
}

.hub-card[hidden] { display: none; }

.hub-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--hub-sky);
}

.hub-card-media::after {
  position: absolute;
  inset: 65% 0 0;
  background: linear-gradient(transparent, rgba(8, 28, 22, 0.62));
  content: "";
}

.hub-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.hub-card:hover .hub-card-media img { transform: scale(1.035); }

.hub-image-credit {
  position: absolute;
  z-index: 1;
  right: 0.75rem;
  bottom: 0.65rem;
  left: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.62rem;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hub-image-credit a { color: inherit; }

.hub-card-body {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.hub-card-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
  margin-bottom: 1.35rem;
}

.hub-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding-top: 0.35rem;
  color: var(--hub-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.hub-share-toggle {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: var(--hub-paper);
  color: var(--hub-deep);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.hub-share-toggle:hover { transform: translateY(-2px); }

.hub-share-toggle[aria-expanded="true"] {
  border-color: var(--hub-deep);
  background: var(--hub-deep);
  color: #fff;
}

.hub-share-toggle svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.35;
}

.hub-share-tray {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.15rem;
  border: 1px solid var(--hub-line);
  border-radius: 17px;
  background: color-mix(in srgb, var(--hub-paper) 90%, var(--hub-sky));
  padding: 0.9rem;
}

.hub-share-tray[hidden] { display: none; }

.hub-share-tray > strong {
  color: var(--hub-ink);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hub-share-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hub-share-options button,
.hub-share-options a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: var(--hub-paper);
  padding: 0.55rem 0.8rem;
  color: var(--hub-ink);
  font: 800 0.72rem/1 Inter, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.hub-share-options button:hover,
.hub-share-options a:hover {
  border-color: var(--hub-deep);
  color: var(--hub-deep);
}

.hub-share-status {
  margin: 0;
  color: var(--hub-deep);
  font-size: 0.74rem;
  font-weight: 800;
}

.hub-share-status[hidden] { display: none; }

.hub-card-eyebrow { margin-bottom: 0.55rem; }

.hub-card h2 {
  margin: 0;
  font-size: clamp(1.75rem, 2.6vw, 2.6rem);
  line-height: 1.02;
}

.hub-card h2 a { color: inherit; text-decoration: none; }

.hub-card-body > p:not(.hub-card-eyebrow) {
  margin: 1rem 0 1.5rem;
  color: var(--hub-muted);
  line-height: 1.65;
}

.hub-card-link {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: auto;
  color: var(--hub-deep);
  font-weight: 800;
  text-decoration: none;
}

.hub-card-link span { transition: transform 160ms ease; }
.hub-card-link:hover span { transform: translateX(4px); }

.hub-empty {
  border: 1px solid var(--hub-line);
  border-radius: 25px;
  background: var(--hub-paper);
  padding: clamp(2rem, 6vw, 5rem);
  text-align: center;
}

.hub-empty[hidden] { display: none; }
.hub-empty h2 { margin: 0; font-size: clamp(2rem, 4vw, 4rem); }
.hub-empty p { color: var(--hub-muted); }
.hub-empty button { margin-top: 1rem; }

.hub-trips-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto clamp(4rem, 8vw, 8rem);
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 10%, rgba(243, 189, 79, 0.22), transparent 24rem),
    var(--hub-deep);
  padding: clamp(2rem, 5vw, 5rem);
  color: #fff;
}

.hub-trips-callout .hub-kicker { color: #f8cf70; }

.hub-trips-callout h2 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.96;
}

.hub-trips-callout p:not(.hub-kicker) {
  max-width: 720px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.65;
}

.hub-trips-callout > a {
  border-color: #fff;
  background: #fff;
  color: var(--hub-deep);
  white-space: nowrap;
}

.hub-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--hub-line);
  padding: 2rem max(24px, calc((100% - 1460px) / 2));
  color: var(--hub-muted);
  font-size: 0.86rem;
}

.hub-footer a { color: var(--hub-deep); font-weight: 800; text-decoration: none; }
.hub-footer p { margin: 0; }

html[data-theme="dark"] body.content-hub-page {
  --hub-ink: #f5f1e8;
  --hub-muted: #bac8c3;
  --hub-deep: #67c2a8;
  --hub-cream: #0d1714;
  --hub-paper: #15231f;
  --hub-line: rgba(234, 245, 239, 0.14);
  --hub-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .hub-hero-copy > p:not(.hub-kicker) { color: var(--hub-muted); }
html[data-theme="dark"] .hub-topic-filters button.is-active { color: #0d1714; }
html[data-theme="dark"] .hub-trips-callout { background: #173b31; }

html[data-theme="dark"] body.content-hub-page .hub-share-toggle {
  border-color: var(--hub-line) !important;
  background: var(--hub-paper) !important;
  color: var(--hub-deep) !important;
}

html[data-theme="dark"] body.content-hub-page .hub-share-toggle:is(:hover, [aria-expanded="true"]) {
  border-color: #78d6b0 !important;
  background: #78d6b0 !important;
  background-image: none !important;
  color: #08231a !important;
}

html[data-theme="dark"] body.content-hub-page .hub-share-tray {
  background: #1b2d31;
}

html[data-theme="dark"] body.content-hub-page .hub-share-options :is(button, a) {
  border-color: #7d8b88 !important;
  background: #142327 !important;
  color: #e6ecea !important;
}

html[data-theme="dark"] body.content-hub-page .hub-share-options :is(button, a):hover {
  border-color: #78d6b0 !important;
  color: #a8e7cc !important;
}

html[data-theme="dark"] body.content-hub-page .hub-hero-action,
html[data-theme="dark"] body.content-hub-page .hub-trips-callout > a,
html[data-theme="dark"] body.content-hub-page .hub-empty button {
  border-color: #78d6b0 !important;
  background: #78d6b0 !important;
  background-image: none !important;
  color: #08231a !important;
}

html[data-theme="dark"] body.content-hub-page .hub-hero-action:is(:hover, :focus-visible),
html[data-theme="dark"] body.content-hub-page .hub-trips-callout > a:is(:hover, :focus-visible),
html[data-theme="dark"] body.content-hub-page .hub-empty button:is(:hover, :focus-visible) {
  border-color: #8be0be !important;
  background: #8be0be !important;
  color: #08231a !important;
}

@media (max-width: 1050px) {
  .hub-hero { grid-template-columns: 1fr; padding-top: 4rem; }
  .hub-hero-stack { min-height: 520px; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hub-hero,
  .hub-browse,
  .hub-trips-callout { width: min(100% - 28px, 1460px); }
  .hub-hero { min-height: 0; gap: 2.5rem; padding: 3.5rem 0 4rem; }
  .hub-hero h1 { font-size: clamp(3.5rem, 17vw, 5.4rem); }
  .hub-hero-stack { min-height: 450px; }
  .hub-hero-tile { border-width: 5px; border-radius: 20px; }
  .hub-hero-tile-1 { inset: 0 18% 37% 0; }
  .hub-hero-tile-1 span { right: 34%; }
  .hub-hero-tile-2 { inset: 30% 0 22% 55%; }
  .hub-hero-tile-3 { inset: 66% 20% 0 4%; }
  .hub-browse-head,
  .hub-trips-callout { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card-body { min-height: 0; }
  .hub-topic-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.4rem; }
  .hub-topic-filters button { flex: 0 0 auto; }
  .hub-trips-callout > a { justify-self: start; }
  .hub-footer { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hub-card,
  .hub-card-media img,
  .hub-hero-tile img,
  .hub-card-link span,
  .hub-hero-action,
  .hub-trips-callout > a,
  .hub-empty button { transition: none; }
}
