/* OPC Router page. Ported from Figma Make OPCRouterLandingPage.tsx, OPCRouterHeroWorkflow.tsx and OPCRouterHowItWorks.tsx.
   Sections use Tailwind utility classes (CDN in base layout); this file covers the section wrap, the two animated
   components (inline styles in Figma, kept in px so they match the design) and a few Tailwind v4 behaviours. */

.or-page { background: #fff; }

/* Section content width matches the top nav: 1440px + 32px gutters */
.or-page .or-wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
@media (max-width: 639px) { .or-page .or-wrap { padding-left: 16px; padding-right: 16px; } }

/* Tailwind v4 (used by Figma) makes [hidden] win over display utilities */
.or-page [hidden] { display: none !important; }
.or-page h1, .or-page h2, .or-page h3, .or-page p, .or-page figure, .or-page blockquote { margin-top: 0; }
.or-page h1, .or-page h2, .or-page h3 { font-family: inherit; }
.or-page input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Rich-text panels (pricing) */
.or-page .orx-rt p { font-size: 16px; line-height: 1.625; margin: 0; }
.or-page .orx-rt p + p { margin-top: .75rem; }

/* Screenshot viewer */
.or-page .ord-dialog::backdrop, .ord-dialog::backdrop { background: rgba(2, 6, 23, .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ---------------------------------------------------------------- Hero workflow (OPCRouterHeroWorkflow, dark theme) */
.orh { --ink: #14382c; position: relative; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; border-radius: 20px; padding: 20px;
  background: #f3eddf; border: 1.5px solid #d8d0be; box-shadow: 0 32px 60px -24px rgba(4,23,17,.65), 0 0 0 1px rgba(186,220,228,.08);
  font-family: inherit; box-sizing: border-box; line-height: 1.5; }
.orh *, .orh *::before, .orh *::after { box-sizing: border-box; }
.orh[data-mode="compact"], .orh[data-mode="stack"] { padding: 14px; }
.orh-grid { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(20,56,44,.19) 1px, transparent 1px); background-size: 22px 22px; }
.orh-head { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.orh-title { font-size: 13.5px; font-weight: 700; color: #14382c; }
.orh-btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 8px; cursor: pointer; background: transparent; border: 1px solid #d8d0be; color: #4d6056; }
.orh-btn span { display: flex; }
.orh-btn:focus-visible { outline: 2px solid #14382c; outline-offset: 2px; }
.orh-in { --accent: #3d6b50; --soft: #e0eadd; }
.orh-out { --accent: #14382c; --soft: #dce7df; }

/* Endpoint graphic (logo tile or icon tile) */
.orh-g { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 6px; overflow: hidden;
  background: var(--soft); color: var(--accent); transition: background-color .3s, color .3s; }
.orh-g.has-logo { width: 32px; height: 32px; padding: 2px; background: #fff; }
.orh-g img { display: block; width: 100%; height: 100%; object-fit: contain; }
.orh-g svg { width: 14px; height: 14px; }
.orh[data-mode="compact"] .orh-g { width: 22px; height: 22px; }
.orh[data-mode="compact"] .orh-g.has-logo { width: 28px; height: 28px; }
.is-lit > .orh-g:not(.has-logo) { background: var(--accent); color: #fafbf5; }

/* Wide / compact stage */
.orh-stage { position: relative; display: flex; height: 340px; align-items: stretch; justify-content: space-between; }
.orh[data-mode="compact"] .orh-stage { height: 310px; }
.orh[data-mode="stack"] .orh-stage { display: none; }
.orh-wires { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.orh-wires path { transition: stroke .3s; }
@keyframes orh-flow { to { stroke-dashoffset: -20; } }
.orh-idle { animation: orh-flow 1.6s linear infinite; }
.orh-col { position: relative; z-index: 1; width: 24%; display: flex; flex-direction: column; justify-content: space-between; }
.orh[data-mode="compact"] .orh-col { width: 26%; }
.orh-colhead { font-size: 13px; font-weight: 700; height: 20px; color: var(--accent); }
.orh-col.orh-out .orh-colhead { text-align: right; }
.orh-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px; border-radius: 10px;
  background: #fffcf5; border: 1.5px solid #d8d0be; transition: background-color .3s, border-color .3s, box-shadow .3s; }
.orh-col.orh-out .orh-row { flex-direction: row-reverse; }
.orh[data-mode="compact"] .orh-row { gap: 7px; height: 36px; padding: 0 8px; }
.orh-row.is-lit { background: var(--soft); border-color: var(--accent); }
.orh-in .orh-row.is-lit { box-shadow: 0 0 20px rgba(61,107,80,.33); }
.orh-out .orh-row.is-lit { box-shadow: 0 0 20px rgba(20,56,44,.33); }
.orh-label { min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orh[data-mode="compact"] .orh-label { font-size: 13px; }

/* Engine card */
.orh-engine { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 13px; padding: 16px; border-radius: 18px; background: #e8eee4;
  border: 2px solid #9db5a4; box-shadow: 0 0 40px rgba(50,97,107,.25), 0 4px 24px rgba(0,0,0,.2); width: 36%; align-self: center; }
.orh[data-mode="compact"] .orh-engine { gap: 10px; padding: 12px; width: 38%; }
.orh[data-mode="stack"] .orh-engine { width: auto; align-self: auto; }
.orh-engine-head { display: flex; align-items: center; gap: 9px; }
.orh-engine-ico { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: #32616b; color: #fafbf5; flex-shrink: 0; }
.orh-engine-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.orh[data-mode="compact"] .orh-engine-name { font-size: 15px; }
.orh-trigger { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 11px; background: #fffcf5; border: 1.5px solid #ccd5c7;
  transition: background-color .25s, border-color .25s, box-shadow .25s; }
.orh[data-mode="compact"] .orh-trigger { padding: 7px 9px; }
.orh-trigger-ico { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; background: #eee5cf; color: #6a5c37;
  transition: transform .2s, background-color .25s, color .25s; }
.is-armed .orh-trigger { border-color: #6a5c37; }
.is-armed .orh-trigger-ico { background: #6a5c37; color: #fafbf5; }
.is-firing .orh-trigger { background: #eee5cf; box-shadow: 0 0 24px rgba(106,92,55,.4); }
.is-firing .orh-trigger-ico { transform: scale(1.12); }
.orh-trigger-label { font-size: 12px; font-weight: 700; color: #6a5c37; line-height: 1.1; }
.orh-trigger-text { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orh[data-mode="compact"] .orh-trigger-text { font-size: 13px; }
.orh-logic-label { font-size: 12px; font-weight: 700; color: #32616b; margin-bottom: 6px; }
.orh-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.orh-pill { font-size: 13px; font-weight: 600; line-height: 1.2; padding: 4px 9px; border-radius: 999px; background: #fffcf5; color: var(--ink); border: 1px solid #ccd5c7;
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s; }
.orh[data-mode="compact"] .orh-pill { font-size: 12px; padding: 4px 8px; }
.orh-pill.is-lit { background: #32616b; color: #fafbf5; border-color: #32616b; box-shadow: 0 0 14px rgba(50,97,107,.4); }

/* Stack (narrow) layout */
.orh-stack { display: none; position: relative; }
.orh[data-mode="stack"] .orh-stack { display: block; }
.orh-stack-engine { margin: 10px 0; }
.orh-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.orh-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; padding: 5px 9px; border-radius: 999px;
  background: var(--soft); color: var(--ink); transition: background-color .3s, color .3s; }
.orh-chip .orh-g, .orh-chip .orh-g.has-logo { width: 24px; height: 24px; }
.orh-chip.is-lit { background: var(--accent); color: #fafbf5; }
.orh-caption { position: relative; margin: 14px 0 0; min-height: 38px; font-size: 14px; line-height: 1.5; text-align: center; color: #4d6056; }
@media (prefers-reduced-motion: reduce) { .orh-idle { animation: none; } }

/* ---------------------------------------------------------------- Workflow explorer (OPCRouterHowItWorks WorkflowExplorer) */
.ohw { border-radius: 18px; border: 1px solid #d6dfeb; background: #fff; overflow: hidden; box-shadow: 0 20px 40px -28px rgba(8,47,90,.35); line-height: 1.5; }
.ohw *, .ohw *::before, .ohw *::after { box-sizing: border-box; }
.ohw-tabs { display: flex; overflow-x: auto; background: #f8fafc; border-bottom: 1px solid #d6dfeb; }
.ohw-tab { flex: 1 0 auto; padding: 14px 18px; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; background: transparent; color: #475569;
  border: 0; border-bottom: 3px solid transparent; }
.ohw-tab:hover { color: #082f5a; }
.ohw-tab[aria-selected="true"] { background: #fff; color: #1d4ed8; border-bottom-color: #1d4ed8; }
.ohw-panel { padding: 24px; }
.ohw[data-vertical="1"] .ohw-panel { padding: 16px; }
.ohw-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ohw-bar-title { display: flex; align-items: center; gap: 8px; color: #082f5a; font-size: 14px; font-weight: 700; }
.ohw-ctrl { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; cursor: pointer; background: #fff; border: 1px solid #d6dfeb; color: #082f5a; }
.ohw-ctrl span { display: flex; }
.ohw-ctrl:hover { background: #f1f5f9; }
.ohw-node:focus-visible, .ohw-tab:focus-visible, .ohw-ctrl:focus-visible, .ohw-link:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }

.ohw-pipeline { display: flex; flex-direction: row; align-items: stretch; }
.ohw[data-vertical="1"] .ohw-pipeline { flex-direction: column; }
.ohw-node { position: relative; flex: 1 1 0; min-width: 0; text-align: left; cursor: pointer; font: inherit; padding: 12px 14px; border-radius: 12px; background: #fff;
  border: 2px solid #d6dfeb; box-shadow: 0 1px 2px rgba(8,47,90,.06); transition: background-color .3s, border-color .3s, box-shadow .3s, transform .3s; }
.ohw[data-compact="1"] .ohw-node { padding: 10px; }
.ohw[data-vertical="1"] .ohw-node { flex: 0 0 auto; }
.ohw-node.is-done { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.ohw-node.is-active { background: var(--soft); border-color: var(--accent); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 67%, transparent); transform: translateY(-2px); }
.ohw-node-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ohw-node-top.ohw-split { justify-content: space-between; gap: 0; margin-bottom: 8px; }
.ohw-role { font-size: 11px; font-weight: 700; color: var(--accent); }
.ohw-done { display: none; }
.ohw-node-top:not(.ohw-split) .ohw-done { margin-left: auto; }
.ohw-node.is-done .ohw-done { display: flex; }
.ohw-node-main { display: flex; align-items: center; gap: 8px; }
.ohw-node-ico { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; background: var(--soft); transition: background-color .3s; }
.ohw[data-compact="1"] .ohw-node-ico { width: 28px; height: 28px; }
.ohw-node.is-active .ohw-node-ico { background: var(--accent); }
.ohw-node-title { font-size: 14px; font-weight: 700; color: #082f5a; line-height: 1.2; }
.ohw[data-compact="1"] .ohw-node-title { font-size: 13px; }
.ohw-node-sys { font-size: 12px; color: #475569; line-height: 1.3; margin-top: 2px; }
.ohw[data-compact="1"]:not([data-vertical="1"]) .ohw-node-sys { font-size: 11.5px; }
.ohw-link-line { position: relative; flex: 0 0 auto; width: 56px; display: flex; align-items: center; justify-content: center; }
.ohw[data-compact="1"] .ohw-link-line { width: 30px; }
.ohw[data-vertical="1"] .ohw-link-line { width: 100%; height: 28px; }
.ohw-line { position: absolute; top: 50%; left: 0; right: 0; height: 2px; margin-top: -1px; background: #d6dfeb; transition: background-color .3s; }
.ohw[data-vertical="1"] .ohw-line { top: 0; bottom: 0; left: 30px; right: auto; width: 2px; height: auto; margin-top: 0; }
.ohw[data-vertical="1"][data-compact="1"] .ohw-line { left: 27px; }
.ohw-link-line.is-on .ohw-line { background: var(--next); opacity: .55; }
.ohw-packet { display: none; position: absolute; width: 12px; height: 12px; border-radius: 999px; background: var(--next); top: 50%; margin-top: -6px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--next) 20%, transparent), 0 0 14px var(--next); }
.ohw-link-line.is-moving .ohw-packet { display: block; }
.ohw[data-vertical="1"] .ohw-packet { left: 25px; margin-top: 0; }
.ohw[data-vertical="1"][data-compact="1"] .ohw-packet { left: 22px; }
.ohw-hint { margin: 10px 0 0; font-size: 12.5px; color: #475569; }
.ohw-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; margin-top: 20px; align-items: start; }
.ohw[data-two="1"] .ohw-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; }
.ohw-inspector { border-radius: 14px; background: #082f5a; color: #fff; padding: 18px; min-height: 196px; display: flex; flex-direction: column; }
.ohw-insp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ohw-insp-title { font-size: 13px; font-weight: 700; }
.ohw-insp-count { font-size: 12px; color: #bcd0ea; }
.ohw-insp-role { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ohw-insp-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ohw-insp-name { font-size: 14px; font-weight: 700; }
.ohw-insp-note { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: #dbe6f4; }
.ohw-data { margin: 0; margin-top: auto; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: #e8f0fb; white-space: pre-wrap; overflow-x: auto;
  animation: ohw-in .35s ease-out; }
@keyframes ohw-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ohw-title { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 700; color: #082f5a; }
.ohw-summary { margin: 0 0 14px; font-size: 15.5px; line-height: 1.6; color: #475569; }
.ohw-outcomes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.ohw-outcomes li { display: flex; gap: 8px; font-size: 14.5px; line-height: 1.5; color: #334155; margin: 0; }
.ohw-check { flex-shrink: 0; margin-top: 3px; width: 18px; height: 18px; border-radius: 999px; background: #ecfdf3; display: flex; align-items: center; justify-content: center; }
.ohw-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; font-weight: 700; color: #1d4ed8; text-decoration: none; }
.ohw-link:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .ohw-data { animation: none; } }
