/* ==========================================================================
   Onyx Insights public website: the pages behind the header menus (Platform, Solutions, Resources, Company, Pricing).
   Loaded after /assets/next/next.css (tokens, buttons, chips) and /marketing/homepage/home.css (type, sections, header,
   footer), so this file holds only what those two do not: the dropdown menus and the page layouts.
   Every colour is a token. Nothing here moves under prefers-reduced-motion, and every page reads without script.
   ========================================================================== */

/* ---------- Header menus ---------- */
.hm-nav-in { position: relative; }
.hm-links { align-self: stretch; align-items: stretch; }
.hm-item { display: flex; align-items: center; }
.hm-links .hm-top { align-self: center; }
.hm-toggle {
  display: none; align-items: center; justify-content: center; width: 24px; height: 36px; margin-left: -6px; padding: 0;
  background: transparent; border: 0; border-radius: var(--r-ctl); color: var(--ink-3); cursor: pointer; font-size: 12px;
}
.js .has-drop .hm-toggle { display: inline-flex; }
.hm-toggle:hover { color: var(--ink); }
.hm-toggle .ph { transition: transform 0.2s var(--hm-ease); }
.hm-item.is-open .hm-toggle .ph { transform: rotate(180deg); }

.hm-drop {
  display: none; position: absolute; top: 100%; left: var(--hm-gutter); right: var(--hm-gutter); z-index: 40;
  max-width: 980px; padding: 24px; background: var(--s1); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-panel); box-shadow: var(--shadow-pop);
}
.hm-item--narrow { position: relative; }
.hm-item--narrow > .hm-drop { left: 0; }
.hm-drop--narrow { right: auto; width: min(420px, calc(100vw - 2 * var(--hm-gutter))); }
.hm-item.is-open > .hm-drop { display: block; }
@media (hover: hover) {
  .hm-item.has-drop:hover > .hm-drop, .hm-item.has-drop:focus-within > .hm-drop { display: block; }
}
.hm-drop-cols { --cols: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px 28px; }
.hm-drop--narrow .hm-drop-cols { --cols: 1; }
.hm-drop-h { margin: 0 0 6px; padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); }
.hm-drop-list a {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; min-height: 0;
  padding: 9px 10px; border-radius: var(--r-ctl); color: var(--ink); text-align: left; transition: background 0.12s;
}
.hm-drop-list a:hover, .hm-drop-list a:focus-visible { background: var(--s2); }
.hm-drop-t { font-size: 14.5px; font-weight: 550; letter-spacing: -0.01em; }
.hm-drop-d { font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.hm-drop-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--hairline); font-size: 14px; color: var(--ink-2);
}
.hm-drop-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 550; }
.hm-drop-foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Page header ---------- */
.pg-crumbs { padding-top: 28px; font-size: 14px; color: var(--ink-3); }
.pg-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pg-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ink-4); }
.pg-crumbs a { color: var(--ink-2); }
.pg-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.pg-hero { padding-block: clamp(36px, 5vw, 72px) clamp(40px, 6vw, 88px); }
.pg-hero-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.pg-hero-in--solo { grid-template-columns: minmax(0, 1fr); }
.pg-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent); }
.pg-eyebrow .ph { font-size: 17px; }
.pg-hero .hm-h1 { max-width: 20ch; text-wrap: balance; }
.pg-hero .hm-lead { margin-top: 20px; max-width: 54ch; }
.pg-hero .hm-actions { margin-top: 28px; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pg-glance { padding: 24px; background: var(--s1); border: 1px solid var(--hairline); border-radius: var(--r-panel); }
.pg-glance h2 { margin-bottom: 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); }
.pg-glance li { display: flex; gap: 12px; padding-block: 11px; border-top: 1px solid var(--hairline); font-size: 15.5px; line-height: 1.4; color: var(--ink); }
.pg-glance li:first-child { border-top: 0; padding-top: 0; }
.pg-glance li:last-child { padding-bottom: 0; }
.pg-glance .ph { flex: none; margin-top: 2px; font-size: 18px; color: var(--accent); }

/* ---------- Service stories ---------- */
.pg-read { max-width: 720px; }
.pg-read .hm-h2 { margin-bottom: 18px; text-wrap: balance; }
.pg-read p { margin-bottom: 16px; color: var(--ink-2); font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.pg-read p:last-child { margin-bottom: 0; }
.pg-story-label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.pg-story-disclaimer { color: var(--ink-3); font-size: 13px; line-height: 1.55; max-width: 62ch; }
.pg-story-card { text-decoration: none; color: inherit; }

/* ---------- Page sections ---------- */
.pg-sec { padding-block: clamp(48px, 6vw, 88px); border-top: 1px solid var(--hairline); }
.pg-sec--band { background: var(--s1); }
.pg-sec .hm-head { margin-bottom: clamp(24px, 3vw, 40px); }
.pg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pg-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--s1); border: 1px solid var(--hairline); border-radius: var(--r-panel); }
.pg-sec--band .pg-card { background: var(--canvas); }
.pg-card h3 { font-size: 19px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.pg-card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; text-wrap: pretty; }
.pg-card-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent); font-size: 22px; }

/* linked cards: the pattern that makes every click land on a page of its own */
a.pg-card { transition: border-color 0.12s, background 0.12s, transform 0.4s var(--hm-ease); }
a.pg-card:hover, a.pg-card:focus-visible { border-color: var(--accent-line); background: var(--s2); transform: translateY(-2px); }
.pg-card-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 550; color: var(--ink); }
a.pg-card:hover .pg-card-go .ph { transform: translateX(3px); }
.pg-card-go .ph { transition: transform 0.3s var(--hm-ease); }

.pg-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.pg-split .hm-head { margin-bottom: 0; position: sticky; top: calc(var(--hm-nav-h) + 32px); }
.pg-steps { counter-reset: step; display: grid; gap: 0; }
.pg-steps li { counter-increment: step; position: relative; padding: 0 0 28px 56px; }
.pg-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--hairline-strong); border-radius: 50%; background: var(--s1); font-family: var(--font-mono); font-size: 14px; color: var(--ink-2);
}
.pg-steps li::after { content: ""; position: absolute; left: 17px; top: 42px; bottom: 6px; width: 1px; background: var(--hairline); }
.pg-steps li:last-child { padding-bottom: 0; }
.pg-steps li:last-child::after { display: none; }
.pg-steps h3 { font-size: 18px; letter-spacing: -0.02em; font-weight: 600; padding-top: 5px; }
.pg-steps p { margin-top: 6px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; max-width: 60ch; text-wrap: pretty; }

.pg-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 32px; }
.pg-facts div { padding: 14px 0; border-top: 1px solid var(--hairline); }
.pg-facts dt { font-size: 13px; color: var(--ink-3); }
.pg-facts dd { margin: 3px 0 0; font-size: 15.5px; color: var(--ink); }
.pg-list { display: grid; gap: 0; }
.pg-list li { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--hairline); color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.pg-list li:first-child { border-top: 0; }
.pg-list .ph { flex: none; margin-top: 3px; color: var(--accent); font-size: 17px; }
.pg-list b { color: var(--ink); font-weight: 550; }

.pg-cta { padding-block: clamp(56px, 7vw, 104px); background: var(--accent-soft); border-top: 1px solid var(--accent-line); }
.pg-cta-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 48px; }
.pg-cta h2 { max-width: 22ch; }
.pg-cta p { margin-top: 12px; max-width: 52ch; color: var(--ink-2); font-size: 17px; line-height: 1.5; }

/* ---------- Index pages (Platform, Solutions, Resources, Company) ---------- */
.pg-group + .pg-group { margin-top: clamp(40px, 5vw, 64px); }
.pg-group > h2 { margin-bottom: 18px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); }
.pg-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--hairline); border-radius: var(--r-panel); overflow: hidden; background: var(--s1); }
.pg-flow li { padding: 22px; border-left: 1px solid var(--hairline); }
.pg-flow li:first-child { border-left: 0; }
.pg-flow b { display: block; margin-bottom: 6px; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.pg-flow span { display: block; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

/* ---------- Workspace tour ---------- */
.pg-tour { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pg-tour a { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--s1); border: 1px solid var(--hairline); border-radius: var(--r-panel); transition: border-color 0.12s, background 0.12s; }
.pg-tour a:hover, .pg-tour a:focus-visible { border-color: var(--accent-line); background: var(--s2); }
.pg-tour h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -0.02em; font-weight: 600; }
.pg-tour h3 .ph { color: var(--accent); font-size: 20px; }
.pg-tour p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.pg-tour .pg-card-go { padding-top: 4px; }

/* ---------- Pricing ---------- */
.pricing-billing { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pricing-billing-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.pricing-billing-label {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-ctl); background: var(--s1);
  color: var(--ink-2); font-weight: 550; cursor: pointer;
}
.pricing-billing-input:checked + .pricing-billing-label { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }
.pricing-billing-input:focus-visible + .pricing-billing-label { outline: 2px solid var(--accent); outline-offset: 2px; }
.pricing-offer .plan-price-year { display: none; }
.pricing-offer:has(#pricing-bill-year:checked) .plan-price-month { display: none; }
.pricing-offer:has(#pricing-bill-year:checked) .plan-price-year { display: inline; }
.pg-table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r-panel); background: var(--s1); }
.pg-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.pg-table th, .pg-table td { padding: 14px 18px; text-align: left; border-top: 1px solid var(--hairline); vertical-align: top; }
.pg-table thead th { border-top: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-3); }
.pg-table tbody th { font-weight: 500; color: var(--ink-2); }
.pg-table td { color: var(--ink); }
.pg-note { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-3); max-width: 70ch; }

.pg-faq-one { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.pg-code { margin-top: 32px; }
.pg-code .hm-code { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }


/* ---------- Links from the homepage into the site ---------- */
.hm-learn { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14.5px; font-weight: 550; color: var(--ink); }
.hm-learn:hover { text-decoration: underline; text-underline-offset: 4px; }
.hm-learn .ph { transition: transform 0.3s var(--hm-ease); }
.hm-learn:hover .ph { transform: translateX(3px); }
.industry-card h3 a { color: inherit; }
.industry-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .pg-hero-in { grid-template-columns: minmax(0, 1fr); }
  .pg-grid, .pg-grid--4, .pg-tour { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-split { grid-template-columns: minmax(0, 1fr); }
  .pg-split .hm-head { position: static; margin-bottom: 28px; }
  .pg-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-flow li:nth-child(3) { border-left: 0; }
  .pg-flow li:nth-child(n+3) { border-top: 1px solid var(--hairline); }
}
@media (max-width: 900px) {
  /* inside the folded menu, each section opens in place instead of floating */
  .hm-links { align-items: stretch; }
  .hm-item, .hm-item--narrow { position: static; flex-wrap: wrap; }
  .hm-item > .hm-top { flex: 1; }
  .hm-toggle { width: 44px; height: 48px; margin-left: 0; font-size: 14px; }
  .hm-drop, .hm-drop--narrow {
    position: static; flex: 1 0 100%; width: auto; max-width: none; padding: 0 0 8px 10px; background: transparent;
    border: 0; border-radius: 0; box-shadow: none;
  }
  .hm-item.has-drop:hover > .hm-drop { display: none; }
  .hm-item.is-open > .hm-drop, .hm-item.has-drop:focus-within > .hm-drop { display: block; }
  .hm-drop-cols { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hm-drop-foot { margin-top: 8px; padding-top: 10px; }
  .hm-panel { max-height: calc(100dvh - var(--hm-nav-h)); overflow-y: auto; }
}
@media (max-width: 640px) {
  .pg-grid, .pg-grid--2, .pg-grid--4, .pg-tour, .pg-facts, .pg-flow { grid-template-columns: minmax(0, 1fr); }
  .pg-flow li { border-left: 0; border-top: 1px solid var(--hairline); }
  .pg-flow li:first-child { border-top: 0; }
  .pg-card, .pg-glance { padding: 22px; }
  .pg-cta .hm-actions { width: 100%; }
  .pg-cta .hm-btn { width: 100%; }
  .pg-steps li { padding-left: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  a.pg-card, .pg-card-go .ph, .hm-toggle .ph, .hm-learn .ph { transition: none; }
  a.pg-card:hover, a.pg-card:focus-visible, a.pg-card:hover .pg-card-go .ph, .hm-learn:hover .ph { transform: none; }
}

/* Contact and demo form (/contact) */
.pg-contact-form { display: grid; gap: 1rem; max-width: 36rem; }
.pg-field { display: grid; gap: 0.35rem; }
.pg-field input, .pg-field textarea { font: inherit; padding: 0.6rem 0.75rem; border-radius: var(--r-ctl); border: 1px solid var(--hairline-strong); background: transparent; color: inherit; }
.pg-field input:focus-visible, .pg-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-field [aria-invalid="true"] { border-color: var(--crit); }
.pg-form-error { color: var(--crit); margin: 0; }
.pg-form-status { margin: 0; }
