.hub {
  --hub-ink: var(--ink-primary, #0F172A);
  --hub-muted: var(--ink-secondary, #475569);
  --hub-line: rgba(15, 23, 42, 0.08);
  --hub-canvas: var(--bg-canvas, #F7F8FA);
  --hub-card: var(--bg-surface, #FFFFFF);
  --hub-hero: var(--bg-dark, #090E1A);
  --hub-hero-ink: #F8FAFC;
  --hub-hero-muted: #CBD5E1;
  --hub-accent: #38BDF8;
  --hub-focus: var(--brand-cobalt, #2553B8);
  --hub-action-ink: #FFFFFF;
  --hub-action-bg: var(--brand-cobalt, #2553B8);
  --hub-action-hover: var(--brand-cobalt-hover, #1D4399);
  --hub-photo-base: #1E293B;
  color: var(--hub-ink);
  background: var(--hub-canvas);
}

.hub--resources {
  --hub-ink: var(--ink-primary, #0F172A);
  --hub-muted: var(--ink-secondary, #475569);
  --hub-line: rgba(15, 23, 42, 0.08);
  --hub-canvas: var(--bg-canvas, #F7F8FA);
  --hub-card: var(--bg-surface, #FFFFFF);
  --hub-hero: #EFF4FC;
  --hub-hero-ink: #0F172A;
  --hub-hero-muted: #475569;
  --hub-accent: var(--brand-cobalt, #2553B8);
  --hub-focus: var(--brand-cobalt, #2553B8);
  --hub-action-ink: #FFFFFF;
  --hub-action-bg: var(--brand-cobalt, #2553B8);
  --hub-action-hover: var(--brand-cobalt-hover, #1D4399);
  --hub-photo-base: #CBD5E1;
}

.hub-hero {
  background: var(--hub-hero);
  color: var(--hub-hero-ink);
}

.hub-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(24px, 5vw, 76px);
  padding-block: clamp(34px, 5vw, 76px);
}

.hub-hero-copy {
  min-width: 0;
}

.hub-hero-copy::before {
  display: block;
  content: "";
  width: clamp(38px, 5vw, 72px);
  height: 5px;
  margin-bottom: clamp(14px, 2vw, 26px);
  background: var(--hub-accent);
}

.hub-hero-copy h1 {
  margin: 0 0 clamp(12px, 2vw, 25px);
  color: var(--hub-hero-ink);
  font-size: clamp(3rem, 6.2vw, 6.6rem);
  letter-spacing: -.065em;
  line-height: .98;
  overflow-wrap: break-word;
}

.hub-hero-copy p {
  max-width: 39ch;
  margin: 0;
  color: var(--hub-hero-muted);
  font-size: clamp(1rem, 1.45vw, 1.27rem);
}

.hub-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: clamp(19px, 3.1vw, 37px);
}

.hub-action, .hub-jump-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 46px;
  font-weight: 700;
}

.hub-action {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--hub-action-bg);
  color: var(--hub-action-ink);
}

.hub-action:hover {
  background: var(--hub-action-hover);
  color: var(--hub-action-ink);
}

.hub-jump-link {
  color: var(--hub-hero-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hub-jump-link:hover {
  color: var(--hub-accent);
}

.hub-hero-actions a:focus-visible {
  outline-color: var(--hub-accent);
}

.hub-hero-figure {
  min-width: 0;
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--hub-photo-base);
  box-shadow: var(--shadow-md);
}

.hub--resources .hub-hero-figure {
  border-color: var(--hub-line);
}

.hub-hero-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hub-hero-figure figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(9, 14, 26, 0.8);
  color: #F8FAFC;
  font-size: .75rem;
}

.hub-section {
  padding-block: clamp(32px, 4.4vw, 65px);
}

.hub-section--journal {
  padding-top: 0;
}

.hub-section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(12px, 2vw, 24px);
}

.hub-section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hub-line);
}

.hub-section-heading h2 {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.45rem, 3vw, 2.7rem);
  line-height: 1.12;
  overflow-wrap: break-word;
}

.hub-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}

.hub-grid--journal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-grid--discover {
  grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.hub-grid--discover > :first-child {
  grid-row: span 2;
}

.hub-card {
  min-width: 0;
}

.hub-entry {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--hub-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--hub-card);
  box-shadow: var(--shadow-xs);
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.hub-entry:hover {
  color: var(--hub-ink);
  border-color: var(--brand-cobalt-border, rgba(37, 83, 184, 0.35));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.hub-entry:focus-visible {
  outline-color: var(--hub-focus);
}

.hub-card-media {
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: var(--hub-photo-base);
}

.hub-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.hub-entry:hover .hub-card-image {
  transform: scale(1.035);
}

.hub-card-copy {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: clamp(13px, 1.7vw, 25px);
  padding-right: clamp(34px, 4vw, 58px);
}

.hub-card-copy h3 {
  margin: 0 0 5px;
  font-size: clamp(1rem, 1.65vw, 1.43rem);
  overflow-wrap: break-word;
}

.hub-card-copy p {
  margin: 0;
  color: var(--hub-muted);
  font-size: .92rem;
  line-height: 1.56;
  overflow-wrap: anywhere;
}

.hub-card-arrow {
  position: absolute;
  right: clamp(12px, 1.6vw, 24px);
  top: clamp(12px, 1.6vw, 24px);
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--hub-muted);
  transition: transform 180ms ease;
}

.hub-entry:hover .hub-card-arrow {
  transform: translateX(4px);
}

.hub-grid--discover > :first-child .hub-entry {
  --hub-card: #0F172A;
  --hub-ink: #F8FAFC;
  --hub-muted: #CBD5E1;
  --hub-line: rgba(255, 255, 255, 0.12);
  --hub-focus: var(--hub-accent);
  color: var(--hub-ink);
}

.hub-grid--discover > :first-child .hub-card-media {
  aspect-ratio: 2.55 / 1;
}

.hub-grid--discover > :not(:first-child) .hub-entry {
  display: grid;
  grid-template-columns: minmax(0, .42fr) minmax(0, .58fr);
  align-items: stretch;
}

.hub-grid--discover > :not(:first-child) .hub-card-media {
  aspect-ratio: auto;
}

.hub-grid--discover > :not(:first-child) .hub-card-copy {
  align-content: center;
}

.hub-section--booking {
  --hub-ink: #F8FAFC;
  --hub-muted: #CBD5E1;
  --hub-line: rgba(255, 255, 255, 0.12);
  --hub-card: #111827;
  --hub-photo-base: #1E293B;
  --hub-accent: #38BDF8;
  --hub-focus: var(--hub-accent);
  background: #090E1A;
  color: var(--hub-ink);
}

.hub-grid--booking {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-grid--booking .hub-card-media {
  position: relative;
  aspect-ratio: 2.2 / 1;
}

.hub-card-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 3px 9px;
  background: var(--public-dark);
  color: var(--hub-ink);
  font-size: .75rem;
}

main:has(.hub) + .site-footer {
  margin-top: 0;
}

@media (max-width: 1000px) {
  .hub-grid--journal,
  .hub-grid--applications {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hub-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .hub-hero-copy h1 {
    font-size: clamp(2.75rem, 9.8vw, 4.8rem);
  }

  .hub-hero-image {
    aspect-ratio: 2 / 1;
  }
}

@media (max-width: 580px) {
  .hub-hero-inner {
    padding-block: 28px;
  }

  .hub-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .hub-grid--discover > :first-child {
    grid-row: auto;
  }

  .hub-grid--discover > :not(:first-child) .hub-entry,
  .hub-grid--journal .hub-entry,
  .hub-grid--applications .hub-entry {
    display: grid;
    grid-template-columns: minmax(0, .34fr) minmax(0, .66fr);
  }

  .hub-grid--journal .hub-card-media,
  .hub-grid--applications .hub-card-media {
    aspect-ratio: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-card-image, .hub-card-arrow {
    transition: none;
  }

  .hub-entry:hover :is(.hub-card-image, .hub-card-arrow) {
    transform: none;
  }
}
