/* ============================================
   Components — nav, cards, buttons, badges
   ============================================ */

/* ---------- Top header ---------- */

.top-nav {
  background: var(--color-white);
  color: var(--text-brand);
  padding: var(--space-16) var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(0, 1, 61, 0.06);
}

.top-nav__mark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.top-nav__mark img {
  height: 36px;
  width: auto;
  transition: transform var(--dur-fast) var(--ease-out);
}

.top-nav__mark:hover img { transform: scale(1.05); }

.top-nav__title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 2.25rem);  /* up to 36px */
  letter-spacing: 0.01em;
  color: var(--text-brand);
  line-height: 1;
}

@media (max-width: 480px) {
  .top-nav { padding-block: var(--space-12); }
  .top-nav__mark img { height: 30px; }
}

/* ---------- Tab bar (Brand Guide / Applications) ---------- */

.tab-bar {
  display: inline-flex;
  padding: 6px;
  background: var(--color-brand-dark-blue);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-m);
  gap: 8px;
}

.tab-bar__tab {
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-inverse);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

/* Hover on the INACTIVE tab: low-opacity white overlay + white text */
.tab-bar__tab:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--color-white);
}

/* Active state stays brand blue + white */
.tab-bar__tab.is-active {
  background: var(--color-brand-blue);
  color: var(--text-inverse);
}

/* ---------- Page hero ---------- */

.hero {
  background: var(--surface-header);
  color: var(--text-inverse);
  padding-block: var(--space-56) var(--space-40);
}

/* Match the `.container` pattern so hero text left-aligns with body content */
.hero__inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: var(--page-gutter);
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  align-items: flex-start;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text-inverse);
  margin: 0;
}

/* ---------- Go back pill ---------- */

.back-btn {
  /* CTA · Figtree Bold 18/1 */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px 12px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-cta);
  line-height: var(--lh-cta);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast);
}

.back-btn:hover {
  background: var(--color-white);
  color: var(--text-brand);
}

.back-btn svg { width: 16px; height: 16px; }

/* ---------- Small pill CTA (Download all logos, View Figma File, etc.) ---------- */

.pill-cta {
  /* CTA · Figtree Bold 18/1 */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-blue);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-cta);
  line-height: var(--lh-cta);
  text-decoration: none;
  border: 1px solid var(--color-brand-blue);   /* same colour as bg — invisible until hover */
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast);
}

/* Hover · soft-blue bg (#EEF0FF) with 1px brand-blue stroke */
.pill-cta:hover {
  background: var(--color-soft-blue);
  color: var(--color-brand-blue);
}
.pill-cta:active { transform: translateY(1px); }
.pill-cta svg { width: 20px; height: 20px; }

/* ---------- Navy rule callout ---------- */

.rule-note {
  background: var(--color-brand-dark-blue);
  color: var(--color-white);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 1.125rem;   /* 18px */
  line-height: 1.5;
}

.rule-note strong {
  font-weight: 700;
  color: var(--color-brand-light-blue);
}

.rule-note em {
  font-style: normal;
  font-size: 1.125rem;   /* 18px */
  opacity: 0.9;
  display: block;
}

.rule-note em + em,
.rule-note > em:not(:first-child) {
  margin-top: 6px;
  font-size: 1rem;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .rule-note {
    font-size: 1rem;
    padding: 14px 18px;
  }
  .rule-note em { font-size: 1rem; }
}

/* ---------- Card ---------- */

.card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  box-shadow: var(--shadow-s);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med);
}

.card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}

.card--dark {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}

.card--soft { background: var(--color-soft-blue); }
.card--pale { background: var(--color-brand-pale); }

.card__title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--space-4);
}

.card__sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Hub cards (Home) */
.hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  background: var(--surface-card);
  box-shadow: var(--shadow-s);
  border: 2px solid transparent;
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  will-change: transform;
}

.hub-card:hover,
.hub-card:focus-visible {
  background: var(--color-brand-blue);
  border-color: var(--color-brand-blue);
  box-shadow: 0 18px 40px -12px rgba(2, 86, 255, 0.35), 0 4px 12px -4px rgba(0, 1, 61, 0.12);
  transform: translateY(-4px);
}

.hub-card:hover .hub-card__title,
.hub-card:focus-visible .hub-card__title {
  color: var(--color-white);
}

.hub-card:hover .hub-card__arrow,
.hub-card:focus-visible .hub-card__arrow {
  color: var(--color-white);
}

.hub-card:focus-visible {
  outline: 3px solid var(--color-brand-dark-blue);
  outline-offset: 3px;
}

.hub-card:active {
  transform: translateY(-1px);
  transition-duration: 80ms;
}

.hub-card__thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-soft-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hub-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-card__title {
  /* H4 · Figtree Bold 28/34 · matches Figma design system */
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-h4);
  line-height: var(--lh-heading);
  letter-spacing: 0;
  color: var(--text-brand);
  transition: color var(--dur-fast) var(--ease-out);
}

.hub-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

.hub-card__arrow {
  color: var(--color-brand-blue);
  line-height: 0;
  display: inline-flex;
  align-items: center;
  transition: transform var(--dur-med) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.hub-card__arrow svg {
  width: 32px;
  height: 32px;
  display: block;
}

.hub-card:hover .hub-card__arrow {
  transform: translateX(6px);
  color: var(--color-white);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hub-card,
  .hub-card__title,
  .hub-card__arrow {
    transition: none;
  }
  .hub-card:hover,
  .hub-card:hover .hub-card__arrow {
    transform: none;
  }
}

/* ---------- Section wrapper ---------- */

.section {
  padding-block: var(--space-56);
}

.section__header {
  margin-bottom: var(--space-32);
}

.section__eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: var(--space-8);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1;
  color: var(--text-primary);
}

.section__desc {
  margin-top: var(--space-12);
  max-width: 65ch;
  color: var(--text-secondary);
}

/* ---------- Button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: var(--fs-cta);
  line-height: 1;
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
  cursor: pointer;
}

.btn--primary {
  background: var(--color-brand-blue);
  color: var(--text-inverse);
}
.btn--primary:hover { background: var(--color-brand-dark-blue); }

.btn--dark {
  background: var(--color-brand-dark-blue);
  color: var(--text-inverse);
}
.btn--dark:hover { background: var(--color-black); }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-strong);
}
.btn--ghost:hover { background: var(--color-brand-dark-blue); color: var(--text-inverse); }

.btn--sm { padding: 8px 16px; font-size: 0.9rem; }

/* ---------- Badge ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--color-brand-pale);
  color: var(--text-primary);
}

.badge--pass { background: var(--color-brand-mint); color: #0a4d2f; }
.badge--fail { background: var(--color-brand-red); color: var(--text-inverse); }
.badge--warn { background: var(--color-brand-honey); color: var(--text-primary); }

/* ---------- Rule preview (do / don't) ---------- */

.rule {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-16);
  border-radius: var(--radius-md);
  background: var(--color-white);
}

.rule__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule--do .rule__icon { background: var(--color-brand-mint); }
.rule--dont .rule__icon { background: var(--color-brand-red); color: var(--text-inverse); }

/* ---------- What Not To Do card ---------- */

.dont-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-16);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--dur-fast);
}

.dont-card:hover { border-color: var(--color-brand-red); }

.dont-card__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-light-grey);
  position: relative;
}

.dont-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dont-card__x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-brand-red);
  color: var(--text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 2;
  box-shadow: var(--shadow-s);
}

.dont-card__label {
  margin-top: var(--space-12);
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Footer ---------- */
/* Footer removed from the site — kept the markup for easy re-enable later */
.site-footer { display: none; }
