/* GERBALGO landing v2: the interactive / sample-data pieces.
   hero signal card · scrollytelling visuals · demo dashboard (js/algo-demo.js) · phone mock.
   EVERYTHING styled here shows SAMPLE data and is labelled so on the page. No P&L anywhere. */

/* ---------- hero signal card ---------- */
.ga-sig { position: relative; border: 1px solid rgba(238,234,225,.14); border-radius: 18px; padding: 1.15rem 1.2rem 1.2rem;
  background: rgba(18,16,14,.78); backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); color: #EEEAE1; max-width: 460px; justify-self: end; width: 100%; }
.ga-sig-top { display: flex; align-items: center; gap: .55rem; font-size: .8125rem; color: #B7AFA2; }
.ga-sig-top .dot { width: 8px; height: 8px; border-radius: 50%; background: #5FC98A; box-shadow: 0 0 0 4px rgba(95,201,138,.15); }
.ga-sig-top .ga-sample { margin-left: auto; color: #FF8A3D; }
.ga-sig-px { display: flex; align-items: baseline; gap: .6rem; margin: .9rem 0 .2rem; }
.ga-sig-px b { font: 600 1.75rem/1 var(--f-text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ga-sig-px small { font-size: .75rem; color: #8F877B; }
.ga-sig-chart { width: 100%; height: 92px; margin: .4rem 0 .8rem; overflow: visible; }
.ga-sig-chart .px { fill: none; stroke: #CFC8BA; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ga-sig-chart .en, .ga-sig-chart .sp { stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .4s; }
.ga-sig-chart .en { stroke: #FF8A3D; } .ga-sig-chart .sp { stroke: #E2705F; }
.ga-sig[data-k="2"] .en, .ga-sig[data-k="3"] .en, .ga-sig[data-k="4"] .en,
.ga-sig[data-k="2"] .sp, .ga-sig[data-k="3"] .sp, .ga-sig[data-k="4"] .sp { opacity: 1; }
.ga-sig-steps { list-style: none; display: grid; gap: .3rem; }
.ga-sig-steps li { display: grid; grid-template-columns: 18px 1fr; gap: .6rem; align-items: center; font-size: .875rem; color: #6F685E; transition: color .35s; }
.ga-sig-steps li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(238,234,225,.2); box-sizing: border-box; transition: background .35s, border-color .35s; }
.ga-sig-steps li.on { color: #EEEAE1; }
.ga-sig-steps li.on::before { background: var(--burn); border-color: transparent; }
.ga-sig-steps li.now::before { box-shadow: 0 0 0 4px rgba(224,96,31,.2); }
.ga-sig-steps small { color: #8F877B; font-variant-numeric: tabular-nums; }
.ga-sig-foot { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid rgba(238,234,225,.1); font-size: .75rem; color: #8F877B; }

/* ---------- scrolly visual 1: market character (illustration) ---------- */
.rg { width: 100%; height: 100%; }
.rg text { font: 500 12px var(--f-text); fill: var(--bone-3); }
@media (max-width: 640px) { .rg text { font-size: 19px; } }
.rg .ax { stroke: var(--line); }
.rg .sc { opacity: 0; transition: opacity .55s var(--ease); }
[data-step="1"] .rg .s1, [data-step="2"] .rg .s2, [data-step="3"] .rg .s3 { opacity: 1; }
.rg .z1 { fill: rgba(95,201,138,.12); } .rg .z2 { fill: rgba(238,234,225,.06); } .rg .z3 { fill: rgba(242,112,31,.12); }
.rg .ln { fill: none; stroke: var(--bone-2); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease); }
.ga-stage.gf-seen .rg .ln { stroke-dashoffset: 0; }
.rg .ln2 { fill: none; stroke: var(--bone-2); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.rg .lab text { font-weight: 600; text-anchor: middle; }
.rg .div { stroke: var(--gold-hi); stroke-width: 1.6; stroke-dasharray: 6 5; }
.rg .tag { fill: #9ee8b0; font-weight: 600; } .rg .tag.bad { fill: #f4b3a8; }
.rg .mk { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .35s var(--ease), transform .35s var(--ease); }
[data-step="2"] .rg .mk { opacity: 1; transform: none; }
.rg .mk circle { stroke-width: 1.6; } .rg .mk path { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rg .ok circle { fill: #0f231a; stroke: #5FC98A; } .rg .ok path { stroke: #9ee8b0; }
.rg .x circle { fill: #2a1210; stroke: #E5604A; } .rg .x path { stroke: #f4b3a8; }
.rg .zr { fill: rgba(229,96,74,.10); }
.rg .ey path, .rg .ey circle { fill: none; stroke: #9ee8b0; stroke-width: 1.6; }
.rg .eye2 path { fill: none; stroke: #f4b3a8; stroke-width: 1.8; stroke-linecap: round; }
.rg .ln3 { fill: none; stroke: var(--bone-2); stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
[data-step="3"] .rg .ln3 { stroke-dashoffset: 0; }
.ga-cap { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1rem; font-size: .8125rem; color: var(--bone-3); }

/* ---------- scrolly visual 2: signal path ---------- */
.gp-path { list-style: none; position: relative; display: grid; gap: .55rem; }
.gp-path li { position: relative; display: grid; grid-template-columns: 2.4rem 1fr auto; gap: .8rem; align-items: center; padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--ink-0); color: var(--bone-3); transition: border-color .4s, color .4s, background .4s, transform .4s var(--ease); }
.gp-path .k { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: var(--ink-2); font-size: .8125rem; color: var(--bone-3); transition: background .4s, color .4s; }
.gp-path b { display: block; font-weight: 600; color: inherit; font-size: .9375rem; }
.gp-path small { font-size: .75rem; }
.gp-path .who { font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-3); }
.gp-path li.done { color: var(--bone-2); }
.gp-path li.done .k { background: var(--em-soft); color: var(--gold-hi); }
.gp-path li.now { color: var(--bone); border-color: var(--em-border); background: var(--ink-1); transform: translateX(6px); }
.gp-path li.now .k { background: var(--burn); color: #0A0605; }
.gp-card { margin-top: .9rem; border: 1px dashed var(--em-border); border-radius: 12px; padding: .75rem .9rem; font-size: .8125rem; color: var(--bone-2);
  opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.gp-card.on { opacity: 1; transform: none; }
.gp-card b { color: var(--bone); font-variant-numeric: tabular-nums; }
.side { font-size: .6875rem; font-weight: 700; letter-spacing: .1em; padding: .15rem .5rem; border-radius: 99px; margin-right: .4rem; }
.side.l { color: #9ee8b0; background: #0f231a; border: 1px solid #1f4a36; }
.side.s { color: #f4b3a8; background: #2a1210; border: 1px solid #5c2a22; }

/* ---------- demo: browser frame + phone ---------- */
.ga-demo { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.ga-browser { border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: var(--ink-1); box-shadow: 0 40px 90px -40px rgba(0,0,0,.7); }
.ga-browser-bar { display: flex; align-items: center; gap: .45rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--ink-2); }
.ga-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.ga-browser-bar span { margin-left: .6rem; flex: 1; min-width: 0; font-size: .75rem; color: var(--bone-3); background: var(--ink-1); border-radius: 999px; padding: .3rem .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-demo-note { margin-top: .9rem; }

/* the reused dashboard (class names fixed by js/algo-demo.js) */
.dm { display: flex; flex-direction: column; height: 500px; font-family: var(--f-text); }
.dm-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dm-top b { color: var(--text); font-weight: 700; letter-spacing: .18em; }
.dm-top .sim { color: var(--gold-hi); border: 1px dashed var(--em-border); border-radius: 999px; padding: 2px 8px; letter-spacing: .12em; white-space: nowrap; }
.dm-top button { margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--soft); border-radius: 999px; font: 500 11px var(--f-text); padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.dm-top button:hover { color: var(--text); border-color: var(--em); }
.dm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); }
.dm-side { border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.dm-side button { text-align: left; background: none; border: 0; font: 500 13px var(--f-text); color: var(--soft); padding: 9px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dm-side button:hover { color: var(--text); background: var(--em-soft); }
.dm-side button[aria-selected="true"] { color: #0A0605; background: var(--burn); }
.dm-side .nb { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 99px; font-size: 10px; background: var(--ink-0); color: var(--gold-hi); }
.dm-main { padding: 14px 16px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-width: 0; }
.dm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dm-card { text-align: left; background: var(--ink-0); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); font-family: var(--f-text); min-width: 0; transition: border-color .2s; }
.dm-card:hover { border-color: var(--em-border); }
.dm-card[aria-pressed="true"] { border-color: var(--em); background: var(--em-soft); }
.dm-card em { display: block; font-style: normal; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dm-card strong { display: block; font-size: 17px; font-weight: 600; margin: 3px 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-card small { font-size: 11px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-card small.ok { color: var(--grn); } .dm-card small.warn { color: var(--gold-hi); }
.dm-stage { min-height: 0; overflow-y: auto; animation: dmIn .3s ease; }
.dm-rows { display: grid; gap: 4px; font-size: 12.5px; }
.dm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--ink-0); border: 0; color: var(--soft); font: inherit; text-align: left; width: 100%; animation: dmIn .35s ease both; }
button.dm-row { cursor: pointer; } button.dm-row:hover { background: var(--em-soft); }
.dm-row b { color: var(--text); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dm-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-h { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin: 2px 0 6px; }
.dm-state { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); padding: 9px 11px; border-radius: 8px; background: var(--ink-0); margin-bottom: 10px; }
.dm-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.dm-state.on i { background: var(--grn); box-shadow: 0 0 0 3px rgba(95,201,138,.18); }
.dm-why { border: 1px solid var(--em-border); border-radius: 10px; padding: 14px; background: var(--em-soft); }
.dm-why h4 { font: 600 17px var(--f-text); margin-bottom: 10px; color: var(--text); }
.dm-why dl { display: grid; gap: 8px; font-size: 13px; }
.dm-why dt { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
.dm-why dd { color: var(--soft); }
.dm-link { margin-top: 12px; background: none; border: 0; color: var(--gold-hi); font: 600 12px var(--f-text); cursor: pointer; padding: 0; }
.dm-steps { display: grid; gap: 5px; }
.dm-step { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--soft); padding: 7px 9px; border-radius: 8px; background: var(--ink-0); }
.dm-step .ck { width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid var(--em-border); display: grid; place-items: center; font-size: 10px; color: transparent; }
.dm-step.done .ck { background: var(--burn); border-color: transparent; color: #0A0605; }
.dm-step.done > span { color: var(--text); }
.dm-acks { display: grid; gap: 5px; margin: 4px 0 2px 26px; }
.dm-ack { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--soft); cursor: pointer; line-height: 1.45; }
.dm-ack input { accent-color: var(--gold); margin-top: 2px; width: 15px; height: 15px; flex: 0 0 auto; cursor: pointer; }
.dm-arm { margin-top: 8px; background: var(--burn); color: #0A0605; border: 0; border-radius: 999px; font: 600 12px var(--f-text); padding: 9px 16px; cursor: pointer; }
.dm-arm:disabled { opacity: .35; cursor: not-allowed; }
.dm-arm.off { background: transparent; color: var(--soft); border: 1px solid var(--line-2); }
.dm-note { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.dm-chart { position: relative; height: 120px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.dm-chart svg { position: absolute; inset: 20px 6px 6px 6px; width: calc(100% - 12px); height: calc(100% - 26px); }
.dm-chart > span { position: absolute; left: 10px; top: 6px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dm-chart .px { fill: none; stroke: var(--soft); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.dm-chart .en { stroke: var(--gold-hi); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.dm-chart .st { stroke: var(--red); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.dm-legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); margin: -2px 0 8px; }
.dm-legend i { display: inline-block; width: 14px; border-top: 1.5px dashed var(--gold-hi); vertical-align: middle; margin-right: 5px; }
.dm-legend .s i { border-color: var(--red); }
@keyframes dmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* phone mock with sample notifications */
.ga-phone { position: relative; width: 100%; max-width: 300px; aspect-ratio: 9 / 18.5; border-radius: 42px; padding: 12px; background: #050404;
  border: 1px solid rgba(238,234,225,.16); box-shadow: 0 40px 90px -40px rgba(0,0,0,.8), inset 0 0 0 2px #1d1a17; justify-self: center; }
.ga-phone-scr { position: relative; height: 100%; border-radius: 32px; overflow: hidden; color: #EEEAE1;
  background: radial-gradient(120% 70% at 50% 0%, rgba(224,96,31,.35), transparent 60%), linear-gradient(180deg, #1a1210, #0b0908); }
.ga-phone-scr::before { content: ''; position: absolute; top: 9px; left: 50%; width: 86px; height: 24px; margin-left: -43px; border-radius: 20px; background: #000; }
.ga-phone-time { text-align: center; padding-top: 52px; font: 300 3.2rem/1 var(--f-text); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ga-phone-date { text-align: center; font-size: .8125rem; color: rgba(238,234,225,.7); margin-top: .3rem; }
.ga-ntfs { position: absolute; left: 10px; right: 10px; bottom: 16px; display: flex; flex-direction: column-reverse; gap: 8px; }
.ga-ntf { border-radius: 18px; padding: 10px 12px; background: rgba(40,34,30,.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: .75rem; line-height: 1.4;
  animation: ntfIn .55s var(--ease) both; }
.ga-ntf .h { display: flex; align-items: center; gap: 6px; font-size: .6875rem; color: rgba(238,234,225,.65); margin-bottom: 2px; }
.ga-ntf .h i { width: 16px; height: 16px; border-radius: 5px; background: var(--burn); }
.ga-ntf .h span { margin-left: auto; }
.ga-ntf b { color: #fff; font-weight: 600; }
.ga-phone-tag { position: absolute; top: 46%; left: 50%; transform: translateX(-50%); }
@keyframes ntfIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 1080px) { .ga-demo { grid-template-columns: minmax(0, 1fr); } .ga-phone { max-width: 260px; } }
@media (max-width: 900px) { .ga-sig { justify-self: stretch; max-width: none; } }
@media (max-width: 640px) {
  .dm { height: auto; min-height: 520px; }
  .dm-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .dm-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .dm-side button { padding: 7px 10px; font-size: 12px; flex: none; }
  .dm-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .dm-card { padding: 8px; } .dm-card strong { font-size: 14px; }
  .dm-top { font-size: 10px; gap: 6px; padding: 10px 12px; }
  .dm-row { flex-wrap: wrap; row-gap: 2px; }
  .dm-row span { white-space: normal; }
}
@media (max-width: 900px) {
  .gp-path { gap: .35rem; }
  .gp-path li { grid-template-columns: 2rem 1fr auto; padding: .45rem .6rem; gap: .6rem; }
  .gp-path .k { width: 2rem; height: 2rem; font-size: .75rem; }
  .gp-path small { display: none; }
  .gp-path li.now { transform: none; }
  .gp-card { margin-top: .5rem; padding: .5rem .7rem; font-size: .75rem; }
  .ga-stage-body { padding: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .ga-ntf, .dm-row, .dm-stage { animation: none !important; } .gp-path li.now { transform: none; } }
