/* ============================================================================
   Informed Software Solutions — AI Advisory & Integration page styles
   ----------------------------------------------------------------------------
   Page-specific styles for ai-advisory.html ONLY. Loaded AFTER the shared
   cascade (tokens.css → base.css → components.css → product.css → this).
   The page reuses the product-page shell (body.product-page) with the brand
   brass-amber accent; body.theme-ai scopes the rules below. Shared product.css
   is FROZEN — add AI-page-only rules here. Tokens only, no raw hex.
   ========================================================================== */

body.theme-ai {
  --product-accent: var(--beacon-500);
  --product-accent-2: var(--beacon-400);
  --product-accent-text: var(--beacon-400); /* AA on the dark grounds */
  --ai-line: rgba(143, 168, 194, 0.22);     /* navy-300 hairline on vignettes */
}

/* ===========================================================================
   HERO — the visual is an inline illustration rather than a product UI mock.
   =========================================================================== */
.theme-ai .ai-fig {
  background-color: var(--navy-900);
}

.theme-ai .ai-fig svg {
  height: auto;
  aspect-ratio: 16 / 11;
}

.theme-ai .ai-fig__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  fill: var(--navy-300);
}

.theme-ai .ai-fig__label--accent {
  fill: var(--beacon-400);
  font-size: 10px;
}

/* The hero's secondary action is a text link beside the button. */
.theme-ai .product-hero__actions .link-arrow {
  color: var(--text);
}

.theme-ai .product-hero__actions .link-arrow:hover {
  color: var(--accent-text);
}

/* ===========================================================================
   PROCESS — four numbered steps. One column on phones, two at 600px, four in
   a row at 960px, joined by a hairline along the top edge.
   =========================================================================== */
.theme-ai .ai-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7) var(--space-6);
  margin-top: var(--space-2);
}

.theme-ai .ai-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-strong);
}

.theme-ai .ai-step__index {
  font-size: var(--fs-kicker);
  letter-spacing: var(--ls-tag);
  color: var(--product-accent-text);
}

.theme-ai .ai-step__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-variation-settings: 'opsz' 36, 'wght' var(--fw-display);
  line-height: 1.1;
  color: var(--heading);
}

.theme-ai .ai-step__body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
}

@media (min-width: 600px) {
  .theme-ai .ai-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .theme-ai .ai-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ===========================================================================
   FEATURE-ROW VIGNETTES — dark inline-SVG panels on the media side.
   =========================================================================== */
.theme-ai .ai-vignette {
  background-color: var(--navy-900);
  border-color: var(--ai-line);
}

.theme-ai .ai-vignette svg {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
}

/* Small-print qualifier under the worked example. */
.theme-ai .ai-note {
  font-family: var(--font-mono);
  font-size: var(--fs-kicker);
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ===========================================================================
   CTA BAND — the page is not .theme-operations, so the shared .btn-ghost
   would read navy-on-navy here. Re-tone it for the dark band.
   =========================================================================== */
.theme-ai .product-cta .btn-ghost {
  color: var(--paper);
  border-color: rgba(143, 168, 194, 0.45);
  background-color: transparent;
}

.theme-ai .product-cta .btn-ghost:hover {
  color: var(--beacon-400);
  border-color: var(--beacon-400);
  background-color: color-mix(in srgb, var(--beacon-400) 10%, transparent);
}

/* ===========================================================================
   EXAMPLE SWITCHER — three illustrative examples shown one at a time.
   Until js/ai-examples.js adds .is-ready the panels are plain stacked feature
   rows and the tab bar is hidden, so the content is complete without JS.
   Once ready, the panels share ONE grid cell: the block takes the height of
   the tallest panel, so switching never changes the page height.
   =========================================================================== */
.theme-ai .ai-examples {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.theme-ai .ai-examples__bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
}

.theme-ai .ai-examples.is-ready .ai-examples__bar {
  display: flex;
}

.theme-ai .ai-examples__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.theme-ai .ai-examples__tab {
  padding: var(--space-2) var(--space-5);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-soft);
  background-color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.theme-ai .ai-examples__tab:hover {
  color: var(--heading);
  border-color: var(--navy-300);
}

.theme-ai .ai-examples__tab[aria-selected="true"] {
  color: var(--beacon-400);
  border-color: var(--beacon-400);
  background-color: color-mix(in srgb, var(--beacon-400) 10%, transparent);
}

.theme-ai .ai-examples__nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-ai .ai-examples__count {
  min-width: 3.5em;
  text-align: center;
  font-size: var(--fs-kicker);
  letter-spacing: var(--ls-tag);
  color: var(--text-soft);
}

.theme-ai .ai-examples__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: var(--fs-body);
  color: var(--text);
  background-color: var(--navy-800);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.theme-ai .ai-examples__arrow:hover {
  color: var(--beacon-400);
  border-color: var(--beacon-400);
  background-color: var(--navy-700);
}

.theme-ai .ai-examples__tab:focus-visible,
.theme-ai .ai-examples__arrow:focus-visible {
  outline: 2px solid var(--beacon-400);
  outline-offset: 3px;
}

/* Stacked fallback (no JS): same rhythm as the shared .feature-rows. */
.theme-ai .ai-examples__track {
  display: flex;
  flex-direction: column;
  gap: var(--section-py-sm);
}

.theme-ai .ai-examples.is-ready .ai-examples__track {
  display: grid;
  gap: 0;
  overflow: clip;
  touch-action: pan-y;
}

.theme-ai .ai-examples.is-ready .ai-examples__panel {
  grid-area: 1 / 1;
  align-self: start;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out),
    visibility 0s linear 0.45s;
}

.theme-ai .ai-examples.is-ready .ai-examples__panel.is-before { transform: translateX(-56px); }
.theme-ai .ai-examples.is-ready .ai-examples__panel.is-after  { transform: translateX(56px); }

.theme-ai .ai-examples.is-ready .ai-examples__panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out),
    visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  .theme-ai .ai-examples.is-ready .ai-examples__panel,
  .theme-ai .ai-examples.is-ready .ai-examples__panel.is-active {
    transition: none;
    transform: none;
  }
}
