/* =========================================================
   Multi-page additions: dropdown, solutions, solution pages, demos
   Loaded after styles.css on every page.
   ========================================================= */

/* ---------- Nav dropdown ---------- */
.nav__links .dd { position: relative; }
.dd__btn { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; }
.dd__btn:hover, .dd:focus-within .dd__btn, .dd.is-open .dd__btn, .dd__btn.is-current { color: var(--text); }
.dd__btn svg { width: 12px; height: 12px; transition: transform .2s; fill: none; stroke: currentColor; stroke-width: 2; }
.dd.is-open .dd__btn svg, .dd:hover .dd__btn svg { transform: rotate(180deg); }
.dd__menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
  width: 320px; padding: 10px; border-radius: 16px; display: grid; gap: 2px;
  background: rgba(13, 26, 43, .97); border: 1px solid var(--line); backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
}
.dd__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.dd:hover .dd__menu, .dd:focus-within .dd__menu, .dd.is-open .dd__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav__links .dd__menu a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; color: var(--text); }
.dd__menu a:hover, .dd__menu a[aria-current="page"] { background: rgba(235,181,74,.09); }
.dd__menu a b { font-weight: 600; font-size: 14.5px; }
.dd__menu a span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__links { gap: 26px; }
.mobile-menu .mm__label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding: 16px 4px 4px; }
.mobile-menu a.mm__sub { padding-left: 14px; }
@media (max-width: 1060px) { .nav .icon-link { display: none; } }

/* ---------- Social & contact meta ---------- */
.icon-link { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); transition: color .2s, border-color .2s; }
.icon-link:hover { color: var(--text); border-color: var(--gold); }
.icon-link svg { width: 17px; height: 17px; fill: currentColor; }
.contact__meta { display: grid; gap: 10px; margin-top: 28px; color: var(--muted); font-size: 15px; font-style: normal; }
.contact__meta a { color: var(--text); }
.contact__meta a:hover { color: var(--gold); }
.contact__meta .row { display: flex; gap: 12px; align-items: flex-start; }
.contact__meta svg { width: 18px; height: 18px; flex: none; margin-top: 3px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact__meta svg.fill { fill: var(--gold); stroke: none; }
.footer__addr { margin-top: 18px; font-size: 14px; color: var(--muted); max-width: 270px; font-style: normal; line-height: 1.6; }
.footer__social { display: flex; gap: 10px; margin-top: 16px; }
.footer__legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Solutions (home) ---------- */
.solutions { background: linear-gradient(180deg, var(--ink) 0%, #0d1b2d 100%); }
.sol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sol {
  position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(255,255,255,.025); transition: transform .35s, border-color .35s;
}
.sol:hover { transform: translateY(-6px); border-color: rgba(235,181,74,.45); }
.sol__art { height: 190px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 50% 60%, rgba(38,64,90,.7), #0d1a2b 75%); }
.sol__art svg { width: 100%; height: 100%; }
.sol__body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sol__kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.sol h3 { font-size: 22px; }
.sol p { color: var(--muted); font-size: 15px; flex: 1; }
.sol__more { margin-top: 8px; font-weight: 600; color: var(--gold); display: inline-flex; gap: 8px; align-items: center; }
.sol__more::after { content: "\2192"; transition: transform .25s; }
.sol:hover .sol__more::after { transform: translateX(5px); }
@media (max-width: 960px) { .sol-grid { grid-template-columns: 1fr; } .sol__art { height: 170px; } }

/* art animations (pure SVG/CSS) */
.art-scan { animation: scan 2.4s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateX(0); } to { transform: translateX(170px); } }
.art-belt { animation: belt 3s linear infinite; }
@keyframes belt { to { transform: translateX(-60px); } }
.art-spin { transform-origin: 160px 95px; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.art-dash { stroke-dasharray: 6 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.art-blink { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Solution page hero ---------- */
.phero { position: relative; padding: 150px 0 100px; overflow: hidden; }
.phero__bg { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 60% at 85% 20%, rgba(235,181,74,.12), transparent 60%), radial-gradient(ellipse 50% 60% at 10% 100%, rgba(176,9,30,.14), transparent 60%); }
.phero__grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.phero .hero__title { font-size: clamp(34px, 4.6vw, 56px); max-width: 17ch; }
.crumbs { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { margin: 0 8px; opacity: .5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chip { font-family: var(--mono); font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: #c3d0de; background: rgba(255,255,255,.03); }
@media (max-width: 900px) { .phero { padding: 120px 0 70px; } .phero__grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Demo stage ---------- */
.stage { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #0d1a2b; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); }
.stage canvas { width: 100%; display: block; }
.stage__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stage__bar .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stage__stats div { padding: 12px 14px; display: grid; gap: 2px; }
.stage__stats div + div { border-left: 1px solid var(--line); }
.stage__stats span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.stage__stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.stage__stats .ok { color: #6fdc9b; }
.stage__stats .ng { color: #ff8a93; }
.stage__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.stage__controls .lbl { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-right: 4px; }
.seg { font: inherit; font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: all .2s; }
.seg:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.seg[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
@media (max-width: 520px) {
  .stage__stats { grid-template-columns: repeat(2, 1fr); }
  .stage__stats div:nth-child(3) { border-left: 0; }
  .stage__stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.pipe { position: relative; padding: 26px 20px; border: 1px solid var(--line); background: var(--card); }
.pipe:first-child { border-radius: 18px 0 0 18px; }
.pipe:last-child { border-radius: 0 18px 18px 0; }
.pipe + .pipe { border-left: 0; }
.pipe__n { font-family: var(--mono); font-size: 12px; color: var(--gold); }
.pipe h3 { font-size: 17px; margin: 8px 0 6px; }
.pipe p { font-size: 14px; color: var(--muted); }
.pipe + .pipe::before { content: ""; position: absolute; left: -8px; top: 30px; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--ink); z-index: 1; }
@media (max-width: 960px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipe, .pipe:first-child, .pipe:last-child { border-radius: 0; border-left: 1px solid var(--line); }
  .pipe:first-child { border-radius: 18px 18px 0 0; }
  .pipe:last-child { border-radius: 0 0 18px 18px; }
  .pipe + .pipe { border-top: 0; }
  .pipe + .pipe::before { left: 20px; top: -8px; }
}

/* ---------- Split block ---------- */
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.panel-list { display: grid; gap: 12px; padding: 0; margin: 0; }
.panel-list li { list-style: none; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.panel-list b { display: block; margin-bottom: 4px; }
.panel-list span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .split2 { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Simulation app (JuliaHub page) ---------- */
.sim { display: grid; grid-template-columns: 240px 1fr; }
.sim__ctl { padding: 18px; border-right: 1px solid var(--line); display: grid; gap: 18px; align-content: start; }
.sim__ctl label { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.sim__ctl .lt { display: flex; justify-content: space-between; gap: 8px; }
.sim__ctl output { font-family: var(--mono); color: var(--text); }
.sim__ctl input[type="range"] { width: 100%; accent-color: var(--gold); }
.sim__plot { padding: 14px; min-width: 0; }
.sim__plot canvas { height: 240px; }
@media (max-width: 700px) { .sim { grid-template-columns: 1fr; } .sim__ctl { border-right: 0; border-bottom: 1px solid var(--line); } }

.legal-note { font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.cta-band { text-align: center; padding: 100px 0; background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(176,9,30,.18), transparent 60%); border-top: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); max-width: 20ch; margin: 0 auto; }
.cta-band p { color: var(--muted); margin: 16px auto 30px; max-width: 560px; font-size: 17px; }
.cta-band .hero__cta { justify-content: center; margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .art-scan, .art-belt, .art-spin, .art-dash, .art-blink { animation: none; }
}

/* demo canvases */
#inspect { height: 300px; }
#twin { height: 340px; touch-action: pan-y; }
@media (max-width: 520px) { #inspect { height: 260px; } #twin { height: 280px; } }
