/* Marketing-page overrides, loaded only when pagename is not under docs/.
 *
 * The RTD sidebar is hidden here and the content area becomes a normal,
 * centred marketing page. Docs pages keep the stock RTD sidebar.
 */

.wy-nav-side,
.wy-nav-top {
  display: none !important;
}

.wy-nav-content-wrap {
  margin-left: 0 !important;
  background: var(--am-bg);
}

.wy-nav-content {
  max-width: 100%;
  padding: 0;
  background: var(--am-bg);
}

.rst-content {
  max-width: var(--am-shell);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* RTD 2.0 renders the page breadcrumbs in this wrapper. */
.rst-content > div[role="navigation"] {
  display: none;
}

.rst-content a {
  color: var(--am-accent-dark);
}

.rst-content a:hover {
  color: var(--am-accent);
}

/* Hero */
.am-hero {
  margin: 0 0 3rem;
  padding: 3.75rem 3rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--am-bg) 55%, #fdf3d0 100%);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
}

/* Centre the homepage title. */
body:has(.am-hero-media) .rst-content h1 {
  text-align: center;
}

/* Match the video width to the section rules (the yellow "What we do" line). */
.am-hero-media {
  width: 100%;
  margin: 0 auto 2rem;
  background: #000;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(33, 37, 41, 0.12);
}

.am-hero-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
}

.am-hero h1 {
  max-width: 52rem;
  margin: 0 0 1rem;
  font-size: 2.6rem;
  line-height: 1.15;
}

.am-hero p {
  max-width: 46rem;
  margin: 0 0 1.5rem;
  font-size: 1.12rem;
  line-height: 1.65;
}

.am-hero .am-eyebrow {
  margin-bottom: 0.75rem;
  color: var(--am-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.am-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Section rhythm */
.rst-content > section > h1,
.rst-content > section > h2 {
  margin-top: 2.5rem;
}

.rst-content h1 {
  font-size: 2.15rem;
}

.rst-content h2 {
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--am-gold);
  font-size: 1.6rem;
}

.rst-content h3 {
  font-size: 1.25rem;
}

/* Latest posts (generated by the amarula_blog extension) */
.am-latest-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.am-latest-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  box-shadow: 0 2px 10px rgba(33, 37, 41, 0.06);
  color: var(--am-text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rst-content a.am-latest-card,
.rst-content a.am-latest-card:link,
.rst-content a.am-latest-card:visited,
.rst-content a.am-latest-card:hover {
  color: var(--am-text);
  text-decoration: none;
}

.am-latest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(33, 37, 41, 0.12);
}

.rst-content a.am-latest-card:hover h3 {
  color: var(--am-accent-dark);
}

.am-latest-date {
  color: var(--am-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.am-latest-card h3 {
  margin: 0.5rem 0;
  color: var(--am-heading);
  font-size: 1.1rem;
}

.am-latest-card p {
  flex: 1;
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.am-latest-more {
  color: var(--am-accent-dark);
  font-weight: 600;
}

/* Client / partner logo wall */
.am-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  padding: 0.75rem;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
}

.am-logo-item img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Testimonials */
.am-testimonial {
  height: 100%;
  padding: 1.5rem;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  box-shadow: 0 2px 10px rgba(33, 37, 41, 0.06);
}

.am-testimonial .am-testimonial-photo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 0 1rem;
  border-radius: 50%;
  object-fit: cover;
}

.am-testimonial p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.am-testimonial p:last-child {
  margin-bottom: 0;
  color: var(--am-heading);
}

/* sphinx-design cards and buttons */
.sd-card {
  height: 100%;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  box-shadow: 0 2px 10px rgba(33, 37, 41, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(33, 37, 41, 0.12);
}

.sd-card-body {
  padding: 1.35rem;
}

.sd-card-title {
  color: var(--am-heading);
  font-family: "Klavika", "Ubuntu", "Segoe UI", sans-serif;
  font-size: 1.12rem;
}

.sd-btn {
  border-radius: 4px;
  font-weight: 600;
}

.sd-btn-primary {
  background: var(--am-accent) !important;
  border-color: var(--am-accent) !important;
  color: #fff !important;
}

.sd-btn-primary:hover {
  background: var(--am-accent-dark) !important;
  border-color: var(--am-accent-dark) !important;
}

.sd-btn-secondary {
  background: var(--am-heading) !important;
  border-color: var(--am-heading) !important;
  color: #fff !important;
}

.sd-btn-outline {
  border-color: var(--am-heading) !important;
  color: var(--am-heading) !important;
}

/* Simple content blocks used by the homepage. */
.am-section-intro {
  max-width: 52rem;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.am-highlight {
  padding: 1.25rem 1.5rem;
  background: #fff8e1;
  border-left: 4px solid var(--am-gold);
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
}

/* Contact page office cards */
.am-office-card {
  border-top: 4px solid var(--am-gold);
}

.am-office-card .sd-card-img-top {
  height: 200px;
  object-fit: cover;
  object-position: center;
}

.am-office-card .sd-card-title {
  color: var(--am-accent);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.am-office-address {
  color: var(--am-text);
  font-family: "Ubuntu", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.97rem;
  line-height: 1.75;
}

.am-office-address .line-block {
  margin: 0;
}

.am-office-address strong {
  color: var(--am-heading);
}

.am-contact .rst-content h3 {
  margin-top: 2.25rem;
  padding-left: 0.65rem;
  border-left: 4px solid var(--am-gold);
  color: var(--am-heading);
  font-size: 1.3rem;
}

/* Forms */
.am-quote-panel {
  max-width: 720px;
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem 1.4rem;
  background: #fff8e1;
  border-left: 5px solid var(--am-gold);
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
}

.am-quote-panel p {
  margin: 0 0 0.7rem;
}

.am-quote-panel p:first-child {
  color: var(--am-heading);
  font-size: 1.15rem;
}

.am-quote-panel p:last-child {
  margin-bottom: 0;
}

.am-quote-panel .am-contact-quote {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
}

.am-contact-quote {
  margin: 0.35rem 0 1.25rem;
  padding: 0.7rem 1.25rem;
  font-weight: 700;
}

.am-contact-quote.sd-btn {
  background: var(--am-gold) !important;
  border-color: var(--am-gold) !important;
  color: var(--am-heading) !important;
}

.am-contact-quote.sd-btn:hover,
.am-contact-quote.sd-btn:focus-visible {
  background: var(--am-gold-soft) !important;
  border-color: var(--am-gold-soft) !important;
}

.ama-form-wrap {
  max-width: 720px;
  margin: 1.5rem 0 2rem;
}

.ama-form-pending {
  padding: 0.9rem 1rem;
  background: #fff8e1;
  border-left: 4px solid var(--am-gold);
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
  font-size: 0.95rem;
}

.ama-form fieldset {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.ama-form fieldset[disabled] {
  opacity: 0.65;
}

.ama-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--am-heading);
  font-size: 0.92rem;
  font-weight: 600;
}

.ama-field input,
.ama-field select,
.ama-field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: var(--am-surface);
  border: 1px solid #d9d1c8;
  border-radius: 4px;
  color: var(--am-text);
  font: inherit;
  font-weight: 400;
}

.ama-field input:focus,
.ama-field select:focus,
.ama-field textarea:focus {
  border-color: var(--am-accent);
  outline: 3px solid rgba(253, 203, 14, 0.4);
  outline-offset: 0;
}

.ama-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--am-text);
  font-size: 0.9rem;
  font-weight: 400;
}

.ama-check input {
  margin-top: 0.2rem;
}

.ama-submit {
  justify-self: start;
  padding: 0.7rem 1.25rem;
  background: var(--am-accent);
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
}

.ama-submit:hover,
.ama-submit:focus-visible {
  background: var(--am-accent-dark);
}

.ama-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.ama-form-status {
  min-height: 1.4rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.ama-form-status--success {
  padding: 0.75rem 0.9rem;
  background: #edf7ed;
  border-left: 4px solid #2e7d32;
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
  color: #1b5e20;
}

.ama-form-status--error {
  padding: 0.75rem 0.9rem;
  background: #fff3f2;
  border-left: 4px solid #b3261e;
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
  color: #8c1d18;
}

.ama-form-status:focus {
  outline: 3px solid rgba(253, 203, 14, 0.4);
  outline-offset: 2px;
}

.ama-hp {
  position: absolute;
  left: -9999px;
}

@media (max-width: 768px) {
  .rst-content {
    padding: 1.5rem 1rem 3rem;
  }

  .am-hero {
    padding: 2.25rem 1.5rem;
  }

  .am-hero-media {
    box-shadow: 0 6px 18px rgba(33, 37, 41, 0.1);
  }

  .am-hero h1 {
    font-size: 2rem;
  }

  .am-hero p {
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------------ */
/* Blog archive (rendered by _ext/amarula_blog.py)                     */
/* ------------------------------------------------------------------ */

.am-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.am-blog-archive [hidden] {
  display: none !important;
}

/* Before blog.js runs, show the first 12 grid cards (plus the featured
   card) so the page paints without a flash of the full archive. */
html.am-js
  .am-blog-grid:not(.am-blog-grid--ready)
  > .am-blog-card:nth-child(n + 13) {
  display: none;
}

/* Featured post */
.am-blog-featured {
  display: block;
  margin: 0 0 2rem;
  overflow: hidden;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  box-shadow: 0 8px 28px rgba(33, 37, 41, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.am-blog-featured-link {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.rst-content a.am-blog-featured-link,
.rst-content a.am-blog-featured-link:link,
.rst-content a.am-blog-featured-link:visited,
.rst-content a.am-blog-featured-link:hover {
  color: var(--am-text);
  text-decoration: none;
}

.am-blog-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(33, 37, 41, 0.14);
}

.am-blog-featured .am-blog-thumb {
  height: 100%;
  min-height: 280px;
  aspect-ratio: auto;
}

.am-blog-featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
}

.am-blog-featured h2 {
  margin: 0.55rem 0 0.75rem;
  padding: 0;
  border: 0;
  font-size: 1.65rem;
  line-height: 1.2;
}

.am-blog-featured p {
  margin: 0 0 1rem;
  color: var(--am-text);
  font-size: 0.98rem;
  line-height: 1.65;
}

.rst-content a.am-blog-featured-link:hover h2 {
  color: var(--am-accent-dark);
}

.am-blog-eyebrow {
  color: var(--am-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Shared card media */
.am-blog-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #2a2220;
}

.am-blog-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.am-blog-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(253, 203, 14, 0.2),
      transparent 45%
    ),
    linear-gradient(135deg, #2a2220, var(--am-heading) 60%, #5a2410);
}

.am-blog-thumb--placeholder img {
  width: auto;
  height: auto;
  max-width: 58%;
  max-height: 52%;
  object-fit: contain;
}

/* Grid cards */
.am-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.am-blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  box-shadow: 0 2px 10px rgba(33, 37, 41, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.am-blog-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.rst-content a.am-blog-card-link,
.rst-content a.am-blog-card-link:link,
.rst-content a.am-blog-card-link:visited,
.rst-content a.am-blog-card-link:hover {
  color: var(--am-text);
  text-decoration: none;
}

.am-blog-card:hover,
.am-blog-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(33, 37, 41, 0.12);
}

.rst-content a.am-blog-card-link:hover h3 {
  color: var(--am-accent-dark);
}

.am-blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
}

.am-blog-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.5rem 0 0.55rem;
  color: var(--am-heading);
  font-size: 1.05rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.am-blog-card p {
  display: -webkit-box;
  overflow: hidden;
  flex: 1;
  margin: 0 0 0.8rem;
  color: var(--am-text);
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.am-blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--am-muted);
  font-size: 0.78rem;
}

.am-blog-meta time {
  color: var(--am-muted);
}

.am-blog-badge {
  display: inline-block;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.am-blog-badge--company {
  background: #fdf3d0;
  color: #6f4500;
}

.am-blog-badge--news {
  background: #e6f0fa;
  color: #1d4f7a;
}

.am-blog-badge--events {
  background: #fbe8e1;
  color: #9a2b0a;
}

.am-blog-more {
  margin-top: auto;
  color: var(--am-accent-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

/* Filter/search toolbar and status */
.am-blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 0.85rem;
}

.am-blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.am-blog-chip {
  padding: 0.48rem 0.85rem;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: 999px;
  color: var(--am-heading);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.am-blog-chip:hover {
  border-color: var(--am-accent);
  color: var(--am-accent-dark);
}

.am-blog-chip[aria-pressed="true"] {
  background: var(--am-heading);
  border-color: var(--am-heading);
  color: #ffffff;
}

.am-blog-chip-count {
  opacity: 0.72;
}

.am-blog-search {
  margin-left: auto;
}

.am-blog-search input {
  width: 240px;
  max-width: 100%;
  padding: 0.52rem 0.7rem;
  background: var(--am-surface);
  border: 1px solid #d9d1c8;
  border-radius: 4px;
  color: var(--am-text);
  font: inherit;
  font-size: 0.9rem;
}

.am-blog-search input:focus {
  border-color: var(--am-accent);
  outline: 3px solid rgba(253, 203, 14, 0.4);
  outline-offset: 0;
}

.am-blog-status {
  margin: 0 0 1.25rem;
  color: var(--am-muted);
  font-size: 0.9rem;
}

.am-blog-empty {
  margin: 2rem 0;
  padding: 1.25rem;
  background: var(--am-surface);
  border: 1px dashed var(--am-border);
  border-radius: var(--am-radius);
  color: var(--am-muted);
  text-align: center;
}

/* Load more */
.am-blog-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 2rem 0 0;
}

.am-blog-load-more {
  padding: 0.7rem 1.4rem;
  background: var(--am-heading);
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
}

.am-blog-load-more:hover,
.am-blog-load-more:focus-visible {
  background: var(--am-accent);
}

/* Responsive */
@media (max-width: 1024px) {
  .am-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .am-blog-featured-link {
    grid-template-columns: 1fr;
  }

  .am-blog-featured .am-blog-thumb {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .am-blog-featured-body {
    padding: 1.5rem;
  }

  .am-blog-search {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .am-blog-search input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .am-blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .am-blog-card,
  .am-blog-featured,
  .am-blog-card:hover,
  .am-blog-featured:hover {
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/* Team roster (rendered by _ext/amarula_team.py)                      */
/* ------------------------------------------------------------------ */

.am-team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.am-team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  box-shadow: 0 2px 10px rgba(33, 37, 41, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.am-team-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.rst-content a.am-team-card-link,
.rst-content a.am-team-card-link:link,
.rst-content a.am-team-card-link:visited,
.rst-content a.am-team-card-link:hover {
  color: var(--am-text);
  text-decoration: none;
}

.am-team-card:hover,
.am-team-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(33, 37, 41, 0.12);
}

.am-team-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee9e3;
}

.am-team-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.am-team-photo--placeholder {
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(253, 203, 14, 0.22),
      transparent 45%
    ),
    linear-gradient(135deg, #2a2220, var(--am-heading) 60%, #5a2410);
  color: var(--am-gold);
  font-family: "Klavika", "Ubuntu", "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

.am-team-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem 1.1rem 1.15rem;
}

.am-team-name {
  display: block;
  color: var(--am-heading);
  font-family: "Klavika", "Ubuntu", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.am-team-role {
  display: block;
  margin-top: 0.35rem;
  color: var(--am-accent-dark);
  font-size: 0.84rem;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .am-team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .am-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .am-team-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .am-team-card,
  .am-team-card:hover {
    transform: none;
    transition: none;
  }
}

/* Blog post and team profile media inserted from front matter. */
.rst-content .am-post-date {
  margin: 0 0 0.75rem;
  color: var(--am-accent-dark);
  font-size: 0.9rem;
}

.rst-content img.am-post-hero,
.rst-content .am-post-hero {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
  border-radius: var(--am-radius);
}

.rst-content .am-post-hero-figure {
  margin: 0 0 1.5rem;
}

.rst-content .am-post-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--am-radius);
}

.rst-content .am-post-hero-figure figcaption {
  margin-top: 0.5rem;
  color: var(--am-muted);
  font-size: 0.88rem;
}

.rst-content img.am-team-profile-photo,
.rst-content .am-team-profile-photo {
  display: block;
  width: auto;
  max-width: min(400px, 100%);
  height: auto;
  margin: 0 0 1.25rem;
  border-radius: var(--am-radius);
}

.rst-content .am-team-profile-photo-figure {
  margin: 0 0 1.25rem;
}

.rst-content .am-team-profile-photo-figure figcaption {
  max-width: 400px;
  margin-top: 0.4rem;
  color: var(--am-muted);
  font-size: 0.88rem;
}

.rst-content .am-team-profile-role {
  margin: 0 0 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--am-gold);
  color: var(--am-heading);
  font-family: "Klavika", "Ubuntu", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 520px) {
  .rst-content img.am-team-profile-photo,
  .rst-content .am-team-profile-photo {
    max-width: 100%;
  }
}

/* ------------------------------------------------------------------ */
/* Training course pages                                              */
/* ------------------------------------------------------------------ */

.am-trainer {
  display: flow-root;
}

.rst-content .am-trainer img.align-right {
  float: right;
  width: 180px;
  height: 180px;
  object-fit: cover;
  margin: 0 0 1rem 1.5rem;
  border: 3px solid var(--am-gold);
  border-radius: 50%;
}

@media (max-width: 520px) {
  .rst-content .am-trainer img.align-right {
    float: none;
    display: block;
    margin: 0 0 1rem;
  }
}

.rst-content img.am-course-hero {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
}

.rst-content figure:has(> img.am-course-hero) {
  margin: 0 0 1.75rem;
}

.rst-content figure:has(> img.am-course-hero) figcaption {
  margin-top: 0.4rem;
  color: var(--am-muted);
  font-size: 0.88rem;
}

/* Search page. The marketing layout hides the RTD sidebar, so the search
 * form is rendered in the page body by _templates/search.html. */
.rst-content table.am-table {
  width: 100%;
}

.am-search-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.am-search-page h1 {
  margin: 0 0 0.5rem;
  font-size: 2.25rem;
}

.am-search-intro {
  margin: 0 0 1.5rem;
  color: var(--am-muted);
  font-size: 1.05rem;
}

.am-search-form {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 2rem;
}

.am-search-form input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #fff;
  color: var(--am-heading);
  font: inherit;
  font-size: 1.05rem;
}

.am-search-form input[type="text"]:focus {
  outline: 2px solid var(--am-gold);
  outline-offset: 1px;
  border-color: var(--am-gold);
}

.am-search-form button {
  flex: 0 0 auto;
  padding: 0.85rem 1.4rem;
  border: 0;
  border-radius: var(--am-radius);
  background: var(--am-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.am-search-form button:hover {
  background: var(--am-accent-dark);
}

.am-search-title-suggestions {
  margin: -1rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(33, 37, 41, 0.08);
}

.am-search-title-suggestions[hidden] {
  display: none;
}

.rst-content .am-search-suggestion,
.rst-content .am-search-suggestion:link,
.rst-content .am-search-suggestion:visited {
  display: block;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--am-border);
  color: var(--am-heading);
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
}

.rst-content .am-search-suggestion:last-child {
  border-bottom: 0;
}

.rst-content .am-search-suggestion:hover,
.rst-content .am-search-suggestion.is-active {
  background: var(--am-bg);
  color: var(--am-heading);
  text-decoration: none;
}

.am-search-suggestion-title {
  font-weight: 600;
}

#search-results h2 {
  margin-top: 0;
}

#search-results .search-summary {
  margin: 0 0 1rem;
  color: var(--am-muted);
  font-size: 0.95rem;
}

#search-results ul.search {
  margin: 0;
  padding: 0;
  list-style: none;
}

#search-results ul.search > li {
  margin: 0 0 1.25rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--am-border);
}

#search-results ul.search > li:last-child {
  border-bottom: 0;
}

#search-results ul.search > li > a {
  font-size: 1.1rem;
  font-weight: 700;
}

#search-results .context {
  margin: 0.4rem 0 0;
  color: var(--am-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

#search-results .highlighted {
  padding: 0 0.1em;
  background: var(--am-gold-soft);
  box-shadow: none;
}

@media (max-width: 600px) {
  .am-search-form {
    flex-direction: column;
  }

  .am-search-form button {
    width: 100%;
  }
}

/* Curated links shown on the empty search page. */
.am-search-suggestions {
  margin: 2.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--am-border);
}

.am-search-suggestions h2 {
  margin: 0 0 0.35rem;
}

.am-search-suggestions-intro {
  margin: 0 0 1.25rem;
  color: var(--am-muted);
  font-size: 0.95rem;
}

.rst-content ul.am-search-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The RTD theme gives article lists a disc marker and a left indent. */
.rst-content .section ul.am-search-cards > li,
.rst-content section ul.am-search-cards > li,
.rst-content article ul.am-search-cards > li,
.rst-content ul.am-search-cards > li {
  margin-left: 0;
  list-style: none;
}

.rst-content .am-search-card a,
.rst-content .am-search-card a:link,
.rst-content .am-search-card a:visited {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

.rst-content .am-search-card a:hover {
  border-color: var(--am-gold);
  box-shadow: 0 8px 20px rgba(33, 37, 41, 0.08);
  color: inherit;
  text-decoration: none;
  transform: translateY(-1px);
}

.am-search-card-category {
  color: var(--am-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.am-search-card-title {
  margin-top: 0.4rem;
  color: var(--am-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.am-search-card-description {
  margin-top: 0.4rem;
  color: var(--am-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .rst-content ul.am-search-cards {
    grid-template-columns: 1fr;
  }
}

/* Section shortcuts on the empty search page. */
.am-search-sections {
  margin: 2.25rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--am-border);
}

.am-search-sections h2 {
  margin: 0 0 1.25rem;
}

.rst-content ul.am-search-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rst-content .section ul.am-search-sections-grid > li,
.rst-content section ul.am-search-sections-grid > li,
.rst-content article ul.am-search-sections-grid > li,
.rst-content ul.am-search-sections-grid > li {
  margin-left: 0;
  list-style: none;
}

.rst-content .am-search-section-card,
.rst-content .am-search-section-card:link,
.rst-content .am-search-section-card:visited {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

.rst-content .am-search-section-card:hover {
  border-color: var(--am-gold);
  box-shadow: 0 8px 20px rgba(33, 37, 41, 0.08);
  color: inherit;
  text-decoration: none;
  transform: translateY(-1px);
}

.am-search-section-title {
  color: var(--am-heading);
  font-size: 1rem;
  font-weight: 700;
}

.am-search-section-title::after {
  content: " \2192";
  color: var(--am-accent);
}

.am-search-section-description {
  margin-top: 0.35rem;
  color: var(--am-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Grouped search results. */
.am-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}

.am-search-filters button {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--am-border);
  border-radius: 999px;
  background: #fff;
  color: var(--am-text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.am-search-filters button:hover {
  border-color: var(--am-gold);
}

.am-search-filters button.is-active {
  border-color: var(--am-accent);
  background: var(--am-accent);
  color: #fff;
}

.am-search-filter-count {
  margin-left: 0.3rem;
  font-weight: 400;
  opacity: 0.75;
}

.am-search-group {
  margin: 0 0 1.5rem;
}

/* The grouped list lives inside a <section>, which triggers the RTD theme's
 * article list styling. Keep the results as a plain list. */
.rst-content section.am-search-group ul.search > li,
.rst-content .am-search-group ul.search > li {
  margin-left: 0;
  list-style: none;
}

.rst-content .am-search-group-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.rst-content .am-search-group-count {
  color: var(--am-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.am-search-more {
  margin-top: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #fff;
  color: var(--am-accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.am-search-more:hover {
  border-color: var(--am-gold);
}

.am-search-group[hidden],
#search-results ul.search > li[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Wide desktop layout (>= 1500px)                                     */
/* ------------------------------------------------------------------ */

@media (min-width: 1500px) {
  /* Every marketing page other than blog posts and team profiles uses the
   * same full-width single-column narrative layout. The page type, not the
   * amount of copy, decides the layout. */
  :where(.rst-content [itemprop="articleBody"]) :is(p, blockquote, li) {
    max-width: none;
    font-size: 1.1rem;
    line-height: 1.7;
  }

  /* Blog posts and team profiles keep the narrower reading measure. */
  body:has(.am-post-date) :where(.rst-content [itemprop="articleBody"]) :is(p, blockquote, li),
  body:has(.am-team-profile-role) :where(.rst-content [itemprop="articleBody"]) :is(p, blockquote, li) {
    max-width: var(--am-prose);
    font-size: 1rem;
    line-height: 1.5;
  }

  /* Component copy keeps its own type size inside cards and address blocks. */
  .rst-content .sd-card-text,
  .am-office-address p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .am-blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(325px, 1fr));
  }

  .am-team-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  /* The project index grows from three to four columns. Keeping the cards
   * near their current width avoids stretching the smaller source images. */
  .am-project-grid > * {
    width: 25%;
  }

  /* The three featured projects on the homepage keep their card size so the
   * lower-resolution artwork is not stretched across the whole shell. */
  .am-featured-projects {
    justify-content: center;
  }

  .am-featured-projects > * {
    max-width: 420px;
  }

  /* Search is a focused page, but 760px leaves too much of a 4K display
   * unused. Three result cards fit comfortably in the wider column. */
  .am-search-page {
    max-width: min(1100px, 100%);
  }

  .rst-content ul.am-search-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rst-content ul.am-search-sections-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  /* Team profiles read better with the portrait beside the biography. The
   * text is offset past the float so the 40rem measure starts in the second
   * column instead of being squeezed into the strip beside the portrait. */
  .rst-content [itemprop="articleBody"]:has(.am-team-profile-photo) > section {
    display: flow-root;
  }

  .rst-content img.am-team-profile-photo,
  .rst-content .am-team-profile-photo-figure {
    float: left;
    width: 400px;
    max-width: 35%;
    margin: 0 2rem 1.25rem 0;
  }

  .rst-content .am-team-profile-photo-figure img {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .rst-content [itemprop="articleBody"]:has(.am-team-profile-photo) > section > p {
    margin-left: calc(400px + 2rem);
  }

  /* Use the empty right half of the contact page for the form: intro and
   * quote callout on the left, a two-column form on the right. */
  .am-contact #contact {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: 3rem;
    align-items: start;
  }

  .am-contact #contact > h1 {
    grid-column: 1 / -1;
  }

  .am-contact #contact > .am-contact-intro {
    grid-column: 1;
    grid-row: 2;
  }

  .am-contact .am-contact-intro > .am-quote-panel {
    max-width: none;
  }

  .am-contact #contact > .ama-form-wrap {
    grid-column: 2;
    grid-row: 2;
    max-width: none;
    margin-top: 0;
  }

  .am-contact #contact > section {
    grid-column: 1 / -1;
  }

  .am-contact .ama-form fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .am-contact .ama-field:has(textarea),
  .am-contact .ama-check,
  .am-contact .ama-submit {
    grid-column: 1 / -1;
  }

  /* Put the homepage video beside the intro panel instead of stacking them
   * into one tall column. The first section wraps the hero; the following
   * sections span both columns. */
  .rst-content .document > [itemprop="articleBody"] > section:first-child:has(> .am-hero-media) {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: 2rem;
    align-items: stretch;
  }

  .rst-content .document > [itemprop="articleBody"] > section:first-child:has(> .am-hero-media) > h1,
  .rst-content .document > [itemprop="articleBody"] > section:first-child:has(> .am-hero-media) > section {
    grid-column: 1 / -1;
  }

  .rst-content .document > [itemprop="articleBody"] > section:first-child:has(> .am-hero-media) > .am-hero-media {
    grid-column: 1;
    align-self: stretch;
    margin-bottom: 3rem;
  }

  .rst-content .document > [itemprop="articleBody"] > section:first-child:has(> .am-hero-media) > .am-hero {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    justify-content: center;
    margin-bottom: 3rem;
  }

  /* Keep the panel close to the video's natural height so the split hero
   * does not force the video to crop. */
  body:has(.am-hero-media) .am-hero {
    padding: 1.5rem 2rem;
  }

  body:has(.am-hero-media) .am-hero > p {
    margin-bottom: 1rem;
  }

  body:has(.am-hero-media) .am-hero > p:last-child {
    margin-bottom: 0;
  }

  .am-hero-media video {
    height: 100%;
    max-height: none;
    object-fit: cover;
  }
}

/* Eight service cards make a tidy four-by-two grid once there is room. */
@media (min-width: 1900px) {
  .am-services-grid > * {
    width: 25%;
  }
}
