/* Homepage-only presentation rules. */

.opi-hero {
  background: linear-gradient(135deg, var(--opi-near-black) 0%, #43295a 100%);
  color: #FFFFFF;
  padding: 2.5rem 2rem;
  border-bottom: 4px solid var(--opi-gold);
  margin: -1.5rem -0.8rem 0 -0.8rem;
  border-radius: 4px 4px 0 0;
}

.opi-hero h1 {
  color: #FFFFFF;
  border-bottom: 0;
  /* Hero copy wraps only between words. Material sets overflow-wrap:
     break-word globally, which lets a title word split mid-glyph once it no
     longer fits its line box. Declaring the invariant here is only safe while
     the longest word still fits, so the two rules move together. */
  overflow-wrap: normal;
  /* The release proof paints the hero offline, so the webfonts never arrive and
     the stack falls through to system-ui — DejaVu Sans on Linux, roughly 16%
     wider than the macOS fallback. "Foundations" measures 6.96x its font size
     there, and the line box is the viewport less 80px of hero padding, so the
     viewport term has to stay under ~10.8vw at the 320px floor. 9vw holds that
     with headroom and leaves the desktop size unchanged. */
  font-size: clamp(1.5rem, 9vw, 2.4rem);
  margin: 0 0 0.5rem 0;
  padding: 0;
}

.opi-hero .opi-hero-eyebrow {
  color: var(--opi-gold);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.opi-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  max-width: 65ch;
  margin: 0;
}

.opi-page-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 -0.8rem 2rem;
  padding: 0.6rem 2rem 0.7rem;
  background: var(--opi-bg-soft);
  border: 1px solid var(--opi-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
}

.opi-page-tools__label {
  flex: 0 0 auto;
  color: var(--opi-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.opi-page-tools__actions {
  display: flex;
  flex: 1 1 14rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.md-typeset .opi-page-tools__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.4rem 0.6rem;
  color: var(--opi-link-color);
  background: var(--opi-bg);
  border: 1px solid var(--opi-link-color);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  word-break: normal;
}

.md-typeset .opi-page-tools__link:hover {
  color: var(--opi-link-hover);
  background: var(--opi-nav-accent-bg);
  border-color: var(--opi-link-color);
  text-decoration: none;
}

.md-typeset .opi-page-tools__link:focus-visible,
.md-typeset .opi-page-tools__link.focus-visible {
  color: var(--opi-link-hover);
  outline: 3px solid var(--opi-link-color);
  outline-offset: 2px;
  text-decoration: none;
}

.opi-page-tools__icon,
.opi-page-tools__icon svg {
  display: block;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
}

@media (max-width: 360px) {
  .opi-page-tools {
    padding-inline: 1rem;
  }

  .opi-page-tools__label,
  .opi-page-tools__actions {
    flex-basis: 100%;
  }

  .md-typeset .opi-page-tools__link {
    flex: 1 1 0;
    min-width: 0;
    gap: 0.3rem;
    padding-inline: 0.4rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .opi-page-tools__icon {
    display: none;
  }
}

@media (forced-colors: active) {
  .md-typeset .opi-page-tools__link:focus-visible {
    outline-color: CanvasText;
  }
}

@media print {
  .opi-page-tools {
    display: none;
  }
}
