/* Software page. OpticalModeler gets a dark, cinematic panel drawn from its own renders (beam colours:
   cyan, violet, coral); the other tools return to the site's light Horizon cards. */
.om { --om-bg: #0b1016; --om-panel: #111a22; --om-line: rgba(255, 255, 255, .09); --om-text: #e7edf2; --om-muted: #9aabba;
  --om-cyan: #6fe3ff; --om-violet: #b48cff; --om-coral: #ff6f7d; --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* wider than the text column, never wider than the window */
  width: min(1568px, calc(100vw - 32px)); margin: 8px calc((100% - min(1568px, calc(100vw - 32px))) / 2) 0;
  background: var(--om-bg); color: var(--om-text); border-radius: 28px; overflow: hidden; isolation: isolate; }
.om h2, .om h3 { color: #fff; }

/* stage */
.om-stage { position: relative; min-height: clamp(560px, 68vh, 740px); display: flex; align-items: center; overflow: hidden; }
.om-backdrop { position: absolute; inset: 0 0 0 28%; z-index: -2; }
.om-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); transform: translate3d(0, var(--om-shift, 0px), 0) scale(var(--om-zoom, 1.02)); }
.om-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), rgba(111, 227, 255, .14), transparent 60%); mix-blend-mode: screen; }
.om-copy { position: relative; max-width: 640px; padding: 72px clamp(28px, 6vw, 88px); }
.om-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 6px 14px 6px 10px; border: 1px solid var(--om-line); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--om-muted); font-size: 14px; font-weight: 500; backdrop-filter: blur(6px); }
.om-pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgba(61, 220, 151, .5); }
.om h2#om-title { font-size: clamp(48px, 6.4vw, 88px); line-height: 1; letter-spacing: -.045em; font-weight: 650; margin: 0; }
.om-tagline { margin: 16px 0 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.02em; color: #cfd9e2; }
.om-tagline span { background: linear-gradient(90deg, var(--om-cyan), var(--om-violet) 55%, var(--om-coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.om-beam { display: block; width: min(100%, 520px); height: auto; margin: 22px 0 20px; overflow: visible; }
.om-beam-line { fill: none; stroke: url(#om-beam-gradient); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(111, 227, 255, .7)); }
.om-photon { fill: #fff; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px var(--om-cyan)); opacity: 0; }
.om-lede { margin: 0; color: #b9c7d3; font-size: 18px; line-height: 1.65; max-width: 560px; }
.om-stats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 26px 0 0; }
.om-stats li { padding: 6px 12px; border: 1px solid var(--om-line); border-radius: 999px; background: rgba(255, 255, 255, .03); font-size: 14px; color: #c9d5df; }
.om-stats li:first-child { border-color: rgba(255, 214, 102, .35); color: #ffe08a; }
.om-stats b { font-variant-numeric: tabular-nums; color: #fff; }
.om-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.om-button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; background: #fff; color: #0b1016; font-weight: 600; font-size: 16px; text-decoration: none; }
.om-button:hover { color: #0b1016; background: #e6f8ff; }
.om-terminal { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 6px 6px 16px; border: 1px solid var(--om-line); border-radius: 14px; background: rgba(0, 0, 0, .35); font: 14px/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; backdrop-filter: blur(6px); max-width: 100%; }
.om-prompt { color: var(--om-cyan); }
.om-terminal code { color: #e7edf2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.om-copy-button { flex: none; min-height: 36px; padding: 6px 12px; border: 1px solid var(--om-line); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #e7edf2; font: 600 13px var(--font, system-ui); }
.om-copy-button:hover { background: rgba(255, 255, 255, .12); }
.om-copy-button.is-done { color: #3ddc97; border-color: rgba(61, 220, 151, .45); }

/* body */
.om-body { padding: 24px clamp(28px, 6vw, 88px) 72px; }
.om-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; margin-bottom: 26px; }
.om-section-heading h3, .om-verdicts h3 { font-size: 30px; letter-spacing: -.03em; margin: 0; }
.om-section-heading p { margin: 0; color: var(--om-muted); font-size: 17px; }
.om-modes { padding-top: 48px; border-top: 1px solid var(--om-line); }
.om-tablist { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--om-line); border-radius: 999px; background: rgba(255, 255, 255, .03); }
.om-tablist button { position: relative; z-index: 1; min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--om-muted); font-size: 15px; font-weight: 600; }
.om-tablist button[aria-selected=true] { color: #0b1016; }
.om-tablist button:focus-visible { outline: 2px solid var(--om-cyan); outline-offset: 2px; }
.om-tab-indicator { position: absolute; z-index: 0; border-radius: 999px; background: linear-gradient(90deg, #dff7ff, #fff); opacity: 0; }
.om-modes:not(.is-tabs) .om-tab-indicator { display: none; }
.om-panel { padding: 26px 0 4px; }
.om-modes:not(.is-tabs) .om-panel { border-top: 1px solid var(--om-line); padding: 16px 0; }
.om-goal { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--om-cyan); }
.om-panel p:last-child { margin: 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; letter-spacing: -.02em; color: #fff; max-width: 900px; }

.om-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.om-pillar { position: relative; padding: 28px 26px; border: 1px solid var(--om-line); border-radius: 20px; background: var(--om-panel); overflow: hidden; }
.om-pillar::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--om-cyan); box-shadow: 0 0 14px var(--om-cyan); transform-origin: left; }
.om-pillar:nth-child(2)::before { background: var(--om-violet); box-shadow: 0 0 14px var(--om-violet); }
.om-pillar:nth-child(3)::before { background: var(--om-coral); box-shadow: 0 0 14px var(--om-coral); }
.om-pillar-index { font: 500 13px ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--om-muted); }
.om-pillar h3 { font-size: 22px; margin: 10px 0 10px; }
.om-pillar p { margin: 0; font-size: 16px; color: #b9c7d3; }

.om-renders { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 16px; margin-top: 56px; }
.om-render { margin: 0; min-width: 0; }
.om-render-wide { grid-row: span 2; }
.om-render .gallery-image { display: block; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--om-line); }
.om-render img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.om-render-wide img { aspect-ratio: auto; min-height: 100%; }
.om-render-wide .gallery-image { height: calc(100% - 38px); }
.om-render figcaption { padding-top: 10px; font-size: 14px; color: var(--om-muted); }
.om-render figcaption b { color: #e7edf2; font-weight: 600; }

.om-verdicts { margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--om-line); }
.om-verdicts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin: 24px 0 0; }
.om-verdicts dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--om-line); }
.om-verdicts dd { margin: 0; color: #b9c7d3; font-size: 16px; }
.om-chip { display: inline-block; padding: 4px 10px; border-radius: 8px; font: 600 12px ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .04em; border: 1px solid currentColor; }
.om-pass { color: #3ddc97; } .om-partial { color: #f5b84b; } .om-unverified { color: #8aa0b3; } .om-blocked { color: var(--om-coral); }
.om-note { margin: 26px 0 0; font-size: 14px; color: var(--om-muted); max-width: 760px; }

/* other tools */
.tool-section { margin-top: 96px; }
.tool-section .section-heading, .bench-section .section-heading { margin-bottom: 30px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tool-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--page); }
.tool-shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.tool-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tool-copy { padding: 26px 28px 28px; }
.tool-meta { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tool-card h3 { font-size: 26px; margin: 0 0 10px; }
.tool-card h3 a { text-decoration: none; }
.tool-card h3 a span { color: var(--accent); }
.tool-copy > p:not(.tool-meta) { margin: 0; font-size: 17px; color: var(--muted); }
.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.tool-tags li { padding: 4px 11px; border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--ink); }

.bench-section { margin-top: 88px; }
.bench-section .section-heading { align-items: baseline; }
.bench-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.bench-list > a { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 4px 16px; padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none; }
.bench-lang { grid-column: 1; font-size: 13px; color: var(--muted); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.bench-list h3 { grid-column: 1; margin: 0; font-size: 22px; }
.bench-list p { grid-column: 1; margin: 0; font-size: 16px; color: var(--muted); }
.bench-arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--accent); }

/* motion */
@media (prefers-reduced-motion: no-preference) {
  .om-backdrop img { transition: transform 1.6s var(--ease-out); }
  .om:not(.is-in) .om-backdrop img { --om-zoom: 1.1; }
  .om-pulse { animation: om-pulse 2.4s ease-out infinite; }
  @keyframes om-pulse { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
  .om-copy > * { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out), filter .8s var(--ease-out); }
  .om.is-in .om-copy > * { opacity: 1; transform: none; filter: none; }
  .om.is-in .om-copy > :nth-child(2) { transition-delay: .08s; } .om.is-in .om-copy > :nth-child(3) { transition-delay: .16s; } .om.is-in .om-copy > :nth-child(4) { transition-delay: .24s; }
  .om.is-in .om-copy > :nth-child(5) { transition-delay: .32s; } .om.is-in .om-copy > :nth-child(6) { transition-delay: .4s; } .om.is-in .om-copy > :nth-child(7) { transition-delay: .48s; }
  .om-beam-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .om.is-in .om-beam-line { animation: om-draw 1.4s var(--ease-out) .5s forwards; }
  @keyframes om-draw { to { stroke-dashoffset: 0; } }
  .om.is-in .om-photon { animation: om-photon 3.6s cubic-bezier(.45, 0, .55, 1) 2s infinite; }
  @keyframes om-photon { 0% { transform: translateX(0); opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(600px); opacity: 0; } }
  .om-tab-indicator { transition: left .5s var(--ease-out), width .5s var(--ease-out), top .5s var(--ease-out), opacity .3s; }
  .om-tablist button { transition: color .3s; }
  .om-panel:not([hidden]) { animation: om-panel .5s var(--ease-out); }
  @keyframes om-panel { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
  .om-pillar::before { transform: scaleX(0); transition: transform 1.1s var(--ease-out) .2s; }
  .om-pillar.is-visible::before { transform: none; }
  .om-pillar { transition: border-color .3s, transform .5s var(--ease-out); }
  .om-pillar:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .18); }
  .om-render .gallery-image img { transition: transform 1s var(--ease-out); }
  .om-render .gallery-image:hover img { transform: scale(1.04); }
  .om-button, .om-copy-button { transition: background-color .25s, color .25s, transform .25s var(--ease-out), border-color .25s; }
  .om-button:hover { transform: translateY(-1px); }
  .om-button:active, .om-copy-button:active { transform: scale(.96); }
  .tool-card { transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out), border-color .3s; }
  .tool-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(18, 38, 58, .09); border-color: #c9d6e0; }
  .tool-shot img { transition: transform 1.1s var(--ease-out); }
  .tool-card:hover .tool-shot img { transform: scale(1.03); }
  .bench-list h3 { transition: color .3s, transform .5s var(--ease-out); }
  .bench-list > a:hover h3 { color: var(--accent); transform: translateX(6px); }
  .bench-arrow { transition: transform .5s var(--ease-out); }
  .bench-list > a:hover .bench-arrow { transform: translate(3px, -3px); }
}
.cross-page-arrival .om-copy > * { opacity: 1; transform: none; filter: none; transition: none; }

/* layout */
@media (max-width: 1000px) {
  .om-pillars { grid-template-columns: 1fr; }
  .om-renders { grid-template-columns: 1fr 1fr; }
  .om-render-wide { grid-column: 1 / -1; grid-row: auto; }
  .om-render-wide .gallery-image { height: auto; }
  .om-render-wide img { aspect-ratio: 16 / 9; }
  .om-verdicts dl { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .om { width: calc(100vw - 24px); margin-inline: calc((100% - (100vw - 24px)) / 2); border-radius: 22px; }
  .om-stage { flex-direction: column; align-items: stretch; min-height: 0; }
  .om-backdrop { position: relative; inset: auto; height: 240px; z-index: 0; }
  .om-backdrop img { -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .om-copy { padding: 0 22px 40px; margin-top: -40px; }
  .om-body { padding: 8px 22px 48px; }
  .om-modes { padding-top: 36px; }
  .om-section-heading h3, .om-verdicts h3 { font-size: 26px; }
  .om-tablist { border-radius: 18px; }
  .om-renders { grid-template-columns: 1fr; }
  .om-verdicts dl > div { grid-template-columns: 1fr; gap: 8px; }
  .om-terminal { width: 100%; }
  .tool-grid, .bench-list { grid-template-columns: 1fr; }
  .tool-section { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { .om-photon { display: none; } }
