/* Shared Cosy page components (docs/design.md, Part B). Used by the blog and,
   later, the jobs board, homepage and landing pages. Tokens only; layout uses
   CSS grid so pages without Bootstrap (the blog) can load it. */

/* Visible keyboard focus everywhere (docs/design.md, Focus). Loaded before page CSS
   so the ring is present even where main.css arrives late; white on the pink footer. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--outline);
  outline-offset: 3px;
}

.footer :focus-visible {
  outline-color: var(--color-white);
}

/* Text for screen readers only (pages without Bootstrap's .visually-hidden). */
.site-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* ── Hero: soft pink wash, breadcrumb, eyebrow, title, lead, mascot ── */
.site-hero {
  padding: calc(60px + var(--space-10)) 0 var(--space-11);
  background: var(--gradient-hero-wash);
  color: var(--body-foreground);
}

.site-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-9);
  align-items: center;
}

.site-hero-copy {
  max-width: 820px;
  min-width: 0;
}

.site-breadcrumb ol {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  font-size: 14.4px;
  color: var(--muted-foreground);
}

.site-breadcrumb li {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-breadcrumb li:last-child {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-2);
  color: var(--subtle-foreground);
}

.site-breadcrumb a {
  color: var(--eyebrow);
  font-weight: 700;
  text-decoration: none;
}

.site-breadcrumb a:hover {
  color: var(--foreground);
}

.site-eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--eyebrow);
  font-size: 13.12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-hero-title {
  margin: 0 0 var(--space-6);
  color: var(--foreground);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.site-hero-title--article {
  font-size: 56px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.site-hero-lead {
  max-width: 720px;
  margin: 0;
  color: var(--body-foreground);
  font-size: 18px;
  line-height: 1.7;
}

.site-hero-meta {
  margin: var(--space-5) 0 0;
  color: var(--muted-foreground);
  font-size: 14.4px;
  line-height: 1.6;
}

.site-hero-meta span + span::before {
  content: "·";
  margin: 0 var(--space-2);
}

.site-hero-mascot {
  display: block;
  width: 280px;
  height: auto;
}

/* ── Sections and section heads ── */
.site-section {
  padding: var(--space-12) 0;
  background: var(--background);
}

.site-section--muted {
  background: var(--muted);
}

.site-section-head {
  max-width: 760px;
  margin: 0 0 var(--space-9);
}

.site-section-head--centred {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.site-section-head--centred .site-section-lead {
  max-width: 790px;
  margin-right: auto;
  margin-left: auto;
}

.site-section-title {
  margin: 0 0 var(--space-3);
  color: var(--foreground);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.site-section-lead {
  margin: 0;
  color: var(--body-foreground);
  font-size: 18px;
  line-height: 1.7;
}

/* ── Cards ── */
.site-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-7);
}

.site-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 12px 32px rgba(22, 36, 71, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(22, 36, 71, 0.1);
}

/* Cards whose only actions are inside them (not a whole-card link) do not lift. */
.site-card--static:hover {
  transform: none;
  box-shadow: 0 12px 32px rgba(22, 36, 71, 0.06);
}

/* ── Primary button (pages without main.css) ── */
.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-button:hover {
  background: var(--primary-accent);
  color: var(--primary-foreground);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Text link: navy bold with a trailing arrow ── */
.site-text-link {
  display: inline;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.site-text-link:hover {
  color: var(--eyebrow);
  text-decoration: none;
}

.site-text-link span {
  display: inline;
}

.site-text-link span[aria-hidden="true"] {
  margin-left: 6px;
}

/* ── Closing mascot CTA ── */
.mascot-cta {
  padding: var(--space-12) 0;
  background: var(--gradient-hero-wash);
}

.mascot-cta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-9);
  align-items: center;
}

.mascot-cta-copy {
  max-width: 640px;
}

.mascot-cta-copy p {
  margin: 0 0 var(--space-7);
  color: var(--body-foreground);
  font-size: 18px;
  line-height: 1.7;
}

.mascot-cta-mascot {
  display: block;
  width: 260px;
  height: auto;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
  .site-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .site-hero-title {
    font-size: 56px;
  }

  .site-hero-title--article {
    font-size: 48px;
  }

  .site-hero-mascot,
  .mascot-cta-mascot {
    width: 200px;
  }
}

@media (max-width: 767px) {
  .site-hero {
    padding: calc(60px + var(--space-8)) 0 var(--space-10);
  }

  .site-hero-row,
  .mascot-cta-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }

  .site-eyebrow {
    font-size: 14px;
  }

  .site-hero-title {
    font-size: 40.8px;
  }

  .site-hero-title--article {
    font-size: 40px;
  }

  .site-hero-lead,
  .site-section-lead,
  .mascot-cta-copy p {
    font-size: 17px;
  }

  .site-hero-mascot,
  .mascot-cta-mascot {
    width: 150px;
  }

  .site-section,
  .mascot-cta {
    padding: 64px 0;
  }

  .site-section-head {
    margin-bottom: var(--space-7);
  }

  .site-section-title {
    font-size: 32px;
  }

  .site-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .site-button {
    font-size: 15px;
  }
}
