/* Marketing layer for the homepage and case studies. Loaded after style.css.
   Direction: clean enterprise software site. White canvas, navy for weight, one blue for action. */

.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(34,85,229,0.55); outline-offset: 2px; }
body { font-feature-settings: 'cv11', 'ss01'; }

/* nav polish */
.topnav-inner { max-width: 1200px; padding: 14px 28px; }
.topnav-links a { font-size: 14.5px; }

/* ---------- hero ---------- */
.hx { padding: 72px 0 88px; background:
    radial-gradient(900px 420px at 85% -10%, rgba(34,85,229,0.10), transparent 60%),
    linear-gradient(180deg, #F6F8FB 0%, #FFFFFF 100%); border-bottom: 1px solid var(--line); }
.hx-grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.4fr); gap: 48px; align-items: center; }
.hx h1 { font-size: clamp(36px, 4vw, 54px); line-height: 1.07; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 20px; max-width: 14ch; }
.hx .sub { font-size: 19px; line-height: 1.6; color: var(--muted); margin: 0 0 30px; max-width: 46ch; }
.hx .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hx .cta { padding: 14px 24px; font-size: 15px; }
.hx-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); }
.hx-points li::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23E1F3EC'/%3E%3Cpath d='M4.6 8.3l2.2 2.2 4.6-4.8' fill='none' stroke='%2311805B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* product window */
.win { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-elevated); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #D3DAE5; display: block; }
.win-bar .url { margin-left: 10px; font-size: 12.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 12px; flex: 1; max-width: 420px; }
.win-bar .tag { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.win-body { display: grid; grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr); }
.win-list { border-right: 1px solid var(--line); padding: 14px; }
.win-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.win-sum div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; min-width: 0; }
.win-sum b { display: block; font-size: 20px; line-height: 1.1; }
.win-sum span { font-size: 11.5px; color: var(--muted); }
.mrow { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--text); }
.mrow:hover { background: var(--surface); }
.mrow[aria-pressed="true"] { background: var(--cyan-soft); border-color: #C5D4FA; }
.mrow .dot { width: 8px; height: 8px; border-radius: 50%; }
.mrow .nm { font-size: 12px; font-weight: 600; font-family: 'IBM Plex Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .sc { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.win-graph { padding: 8px 8px 0; background: linear-gradient(#fff, #F9FAFD); }
.win-graph svg { width: 100%; height: auto; display: block; }
.win-detail { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 14px 18px; background: #fff; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 20px; min-height: 120px; }
.win-detail h4 { margin: 0; font-size: 14px; font-family: 'IBM Plex Mono', monospace; }
.win-detail .p { font-size: 12px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; margin: 2px 0 8px; }
.win-detail ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.win-detail li { margin-bottom: 3px; }
.win-detail .nx { font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; }

/* ---------- sections ---------- */
section.sec { padding: 96px 0; border-bottom: 0; }
section.sec.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-h { text-align: center; max-width: 760px; margin: 0 auto 52px; }
.kicker { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--cyan); background: var(--cyan-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.sec-h h2 { font-size: clamp(28px, 3.3vw, 42px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; margin: 0 0 16px; }
.sec-h p { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0; }

.langs { padding: 28px 0; border-bottom: 1px solid var(--line); background: #fff; }
.langs .wrap-wide { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; }
.langs span { font-size: 14px; color: var(--muted); }
.langs b { font-size: 15px; font-weight: 600; color: var(--text); }

/* product tour */
.tour-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.tour-tabs button { font: inherit; font-weight: 600; font-size: 14.5px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.tour-tabs button:hover { color: var(--text); border-color: #B8C3D4; }
.tour-tabs button[aria-selected="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.tour-panel { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 48px; align-items: center; }
.tour-panel h3 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
.tour-panel p { font-size: 16.5px; line-height: 1.65; color: var(--muted); margin: 0 0 16px; }
.tour-panel ul { margin: 0; padding: 0; list-style: none; }
.tour-panel li { padding-left: 26px; position: relative; margin-bottom: 10px; font-size: 15.5px; }
.tour-panel li::before { content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23E8EEFD'/%3E%3Cpath d='M4.6 8.3l2.2 2.2 4.6-4.8' fill='none' stroke='%232255E5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.tour-visual { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; }
.tour-visual .cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tour-visual .pad { padding: 18px; }
.tour-visual svg { width: 100%; height: auto; display: block; }
.tour-visual .module { margin: 0; border: 0; box-shadow: none; }

/* tuner (inside tour) */
.tuner-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.tuner-controls { padding: 22px; border-right: 1px solid var(--line); display: grid; gap: 18px; }
.tuner-controls label { display: block; font-weight: 600; font-size: 14.5px; }
.tuner-controls .val { float: right; font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
.tuner-controls input[type=range] { width: 100%; accent-color: var(--cyan); margin-top: 8px; }
.tuner-controls .hint { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tuner-controls .toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.tuner-controls .toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cyan); }
.tuner-out { padding: 22px; display: flex; flex-direction: column; gap: 14px; background: #FAFBFD; }
.tuner-score { font-size: 64px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.tuner-score small { font-size: 18px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tuner-band { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; width: fit-content; color: #fff; }
.meter { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.meter > i { display: block; height: 100%; }
.tuner-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tuner-table td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.tuner-table td:last-child { text-align: right; font-family: 'IBM Plex Mono', monospace; }
.tuner-foot { padding: 12px 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* stats band */
section.band { background: var(--navy); color: #fff; padding: 72px 0; border: 0; }
.band-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.band-grid > div + div { border-left: 1px solid rgba(255,255,255,0.14); padding-left: 40px; }
.band b { display: block; font-size: clamp(32px, 3.6vw, 46px); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 10px; }
.band p { margin: 0 0 6px; color: #C9D3E4; font-size: 16px; }
.band small { color: #8FA0BC; font-size: 13px; }

/* use cases */
.uc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.uc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px 24px; box-shadow: var(--shadow-card); }
.uc .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--cyan-soft); color: var(--cyan); display: grid; place-items: center; margin-bottom: 18px; }
.uc h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.uc p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }

/* case cards */
.cs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cs-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-card); transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.cs-card:hover { box-shadow: var(--shadow-elevated); border-color: #B8C7EE; transform: translateY(-2px); }
.cs-card .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill.fail { background: #FCEBEC; color: #A8283A; }
.cs-card h3 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 8px; }
.cs-card p { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin: 0 0 22px; flex: 1; }
.cs-card .foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; font-size: 14px; }
.cs-card .foot b { font-size: 17px; letter-spacing: -0.01em; }
.cs-card .foot span { color: var(--cyan); font-weight: 600; }

/* open source cols */
.os-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.os { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.os h3 { font-size: 17px; margin: 0 0 8px; }
.os p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.rv-code { background: var(--navy); color: #CFE0FF; font-family: 'IBM Plex Mono', monospace; font-size: 14px; padding: 16px 20px; border-radius: 10px; overflow-x: auto; margin: 22px 0 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 36px 22px 0; font-size: 17.5px; font-weight: 600; letter-spacing: -0.01em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .a { padding: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 70ch; }
.faq .a a { color: var(--cyan); font-weight: 600; }

/* closing */
section.cta-band { background: linear-gradient(135deg, #0B1B33 0%, #17306B 100%); color: #fff; padding: 84px 0; border: 0; }
.cta-band .inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 12px; max-width: 18ch; }
.cta-band p { margin: 0; color: #C9D3E4; font-size: 17.5px; max-width: 48ch; }
.cta-band .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .cta { padding: 14px 26px; font-size: 15px; }
.cta-band .cta.filled { background: #fff; color: var(--navy); border-color: #fff; box-shadow: none; }
.cta-band .cta.filled:hover { background: #E8EEFD; }
.cta-band .cta.ghost { color: #fff; border-color: rgba(255,255,255,0.4); background: transparent; }

/* ---------- case studies page ---------- */
.cs-head { padding: 72px 0 40px; background: linear-gradient(180deg, #F6F8FB, #fff); border-bottom: 1px solid var(--line); }
.cs-head h1 { font-size: clamp(34px, 4.2vw, 52px); letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 16px; max-width: 18ch; }
.rv-lede { font-size: 18.5px; line-height: 1.6; color: var(--muted); max-width: 62ch; margin: 0 0 24px; }
.cs-honesty { border: 1px solid #F1D68A; background: #FFF8E1; border-radius: 10px; padding: 14px 18px; font-size: 14.5px; color: #5C4300; max-width: 78ch; }
.cs-filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 28px 0 22px; align-items: center; }
.cs-filters > span { font-weight: 600; font-size: 14px; margin-right: 4px; }
.cs-count { margin-left: auto; font-size: 14px; color: var(--muted); }
.cs-filters .filter-btn { border-radius: 999px; }
.case { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 18px; box-shadow: var(--shadow-card); overflow: hidden; scroll-margin-top: 90px; }
.case-top { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; text-align: left; font: inherit; background: transparent; border: 0; padding: 24px 28px; cursor: pointer; color: var(--text); align-items: center; }
.case-top:hover { background: var(--surface); }
.case-top .meta { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.case-top h3 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
.case-top .hl { font-size: 16.5px; margin: 0; max-width: 62ch; color: var(--muted); }
.case-top .cost { font-weight: 700; font-size: 20px; text-align: right; letter-spacing: -0.01em; }
.case-top .toggle { display: block; font-size: 13.5px; font-weight: 600; margin-top: 6px; color: var(--cyan); }
.case-body { display: none; border-top: 1px solid var(--line); }
.case.open .case-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.case-body > div { padding: 24px 28px; }
.case-body > div + div { border-left: 1px solid var(--line); background: var(--surface); }
.case-body h4 { font-size: 14px; margin: 0 0 10px; letter-spacing: 0; }
.case-body ul { margin: 0 0 16px; padding-left: 18px; font-size: 15px; line-height: 1.6; }
.case-body li { margin-bottom: 6px; }
.case-body p { font-size: 15px; line-height: 1.6; margin: 0 0 18px; }
.case-body .src a { color: var(--cyan); font-size: 14px; font-weight: 500; }
.case-body .cant { border-left: 3px solid var(--risk); padding-left: 12px; }
.case-body .can { border-left: 3px solid var(--good); padding-left: 12px; }

@media (max-width: 960px) {
  .hx-grid, .tour-panel, .win-body, .win-detail, .tuner-grid, .case.open .case-body { grid-template-columns: 1fr; }
  .win-list, .tuner-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-body > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .uc-grid, .cs-grid, .os-grid, .band-grid { grid-template-columns: 1fr; }
  .band-grid > div + div { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.14); padding-top: 28px; }
  section.sec { padding: 64px 0; }
  .hx { padding: 44px 0 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ===== v3: dark hero, tinted sections ===== */
.hx { background:
    radial-gradient(800px 460px at 88% -5%, rgba(90,130,255,0.45), transparent 60%),
    radial-gradient(600px 380px at 0% 100%, rgba(120,70,220,0.28), transparent 60%),
    linear-gradient(160deg, #081326 0%, #0F2554 100%);
  border-bottom: 0; position: relative; }
.hx::before { content:''; position:absolute; inset:0; pointer-events:none;
  background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.hx > * { position: relative; }
.hx h1 { color: #fff; }
.hx .sub { color: #B9C7E2; }
.hx-points { color: #B9C7E2; }
.hx .cta.ghost { color: #fff; border-color: rgba(255,255,255,0.4); background: transparent; }
.hx .cta.ghost:hover { background: rgba(255,255,255,0.1); }
.hx .cta.filled { background: #fff; color: #0B1B33; border-color: #fff; box-shadow: none; }
.hx .cta.filled:hover { background: #E8EEFD; }
.hx .win { box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.12); }
section.sec { background: transparent; }
section.sec.alt { background: rgba(255,255,255,0.55); backdrop-filter: blur(2px); border-color: var(--line); }
.langs { background: #fff; }
.cs-head { background: radial-gradient(700px 320px at 85% 0%, rgba(90,130,255,0.4), transparent 65%), linear-gradient(135deg, #081326 0%, #112A5C 100%); border-bottom: 0; }
.cs-head h1 { color: #fff; }
.cs-head .rv-lede { color: #B9C7E2; }
.case-top:hover, .case-body > div + div { background: #F1F5FC; }
.tour-visual .cap, .win-bar { background: #F1F5FC; }
.hx .cta:not(.filled) { color: #fff; border: 1px solid rgba(255,255,255,0.4); background: transparent; }
.hx .cta:not(.filled):hover { background: rgba(255,255,255,0.1); border-color:#fff; }
