/* Home page ( / ) only: hero artwork, steps, live demo, spectra cards, trust cards. Shared parts are in site.css. */

/* -------------------------------------------------------------------- hero */
.hero { position: relative; padding: 48px 0 72px; overflow-x: clip; isolation: isolate; }

.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 6px; padding-inline: 6px 16px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card-glass);
  font-size: 13.5px; color: var(--muted);
}
.eyebrow__dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--on-grad); background: var(--btn-grad); }
.eyebrow__dot .i { width: 14px; height: 14px; }

.hero__title { margin-top: 22px; font-size: clamp(34px, 4.1vw, 56px); line-height: 1.14; font-weight: 800; letter-spacing: -.025em; }
.hero__title span { display: block; }
html[dir="rtl"] .hero__title { line-height: 1.35; }

.hero__lede { margin-top: 22px; max-width: 54ch; font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.stats { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px 38px; }
.stats div { display: flex; align-items: baseline; gap: 10px; }
.stats dt { font-size: 34px; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats dd { font-size: 14px; color: var(--muted); max-width: 12ch; line-height: 1.4; }

.hero__fig { margin: 0; }
.hero__fig figcaption { margin-top: 6px; text-align: center; font-size: 12.5px; color: var(--muted); }

/* hero artwork (SVG): drawings and axes are always left-to-right, even on a right-to-left page. */
.fig, .mol, .chart, .mini { direction: ltr; }
.fig { width: 100%; height: auto; display: block; overflow: visible; }
.fig .s-accent { stop-color: var(--accent); }
.fig .s-ai { stop-color: var(--ai); }
.fig .panel { fill: var(--card-glass); stroke: var(--border); stroke-width: 1.2; filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--text) 9%, transparent)); }
.fig .chip { fill: var(--hover); }
.fig .mono { font: 600 15px ui-monospace, "Cascadia Mono", Consolas, monospace; fill: var(--text); }
.fig .lbl { font-size: 14px; fill: var(--muted); }
.fig .lbl.strong { font-size: 16px; font-weight: 700; fill: var(--text); }
.fig .bond { fill: none; stroke: var(--text); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 1.3s ease both; }
.fig .ring-in { fill: none; stroke: var(--accent); stroke-width: 2.2; opacity: .85; animation: fade .8s .9s ease both; }
.fig .spark { fill: var(--on-grad); }
.fig .pill-t { font-size: 17px; font-weight: 800; fill: var(--on-grad); }
.fig .tag { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.fig .tag-t { font-size: 13px; font-weight: 600; fill: var(--accent); }
.fig .axis { stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.fig .ticks line { stroke: var(--muted); stroke-width: 1.4; }
.fig .peak { stroke: var(--spec); stroke-width: 4.5; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(1s + var(--i) * .09s); }

.fig .edge { stroke: var(--text); stroke-opacity: .13; stroke-width: 1; }
.fig .flow { fill: none; stroke: url(#gFlow); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 3 11; animation: flow .9s linear infinite; }
.fig .node { fill: var(--surface); stroke: var(--ai); stroke-width: 2; }
.fig .node.on { fill: var(--ai); transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fig .port { fill: var(--accent); }
.fig .port.out { fill: var(--ai); }

/* ------------------------------------------------------------------- steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.step__n {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border-radius: 50%;
  font-weight: 800; font-size: 18px; color: var(--on-grad); background: var(--btn-grad);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.step { padding-top: 26px; }

/* -------------------------------------------------------------------- demo */
.demo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.demo.reveal { transition-delay: 0s; }
.demo__label { font-size: 13px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) !important; margin-bottom: 8px; }
html[dir="rtl"] .demo__label { letter-spacing: 0; text-transform: none; }
.demo__mol { display: flex; flex-direction: column; }
.mol { width: 100%; height: auto; max-height: 300px; display: block; margin-block: auto; }
.mol .bond { fill: none; stroke: var(--text); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.mol .ring-in { fill: none; stroke: var(--text); stroke-width: 2; opacity: .55; }
.mol .halo { fill: color-mix(in srgb, var(--accent) 24%, transparent); stroke: var(--accent); stroke-width: 2.4; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .3s, transform .4s cubic-bezier(.2, 1.4, .4, 1); }
.mol .halo.on { opacity: 1; transform: none; }
.mol .shift { font-size: 17px; font-weight: 800; fill: var(--accent); text-anchor: middle; opacity: 0; transition: opacity .3s; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.mol .shift.on { opacity: 1; }

.readout { margin-top: 10px; padding: 14px 16px; border-radius: 18px; background: var(--hover); min-height: 84px; }
.readout__shift { font-size: 14px !important; color: var(--muted) !important; }
.readout__shift b { margin-inline-start: 6px; font-size: 26px; font-weight: 800; color: var(--accent); }
.readout__role { margin-top: 2px; font-size: 14.5px; color: var(--text); }

.demo__chart { display: flex; flex-direction: column; }
.chart { width: 100%; height: auto; display: block; touch-action: manipulation; }
.chart .axis { stroke: var(--muted); stroke-width: 1.6; }
.chart .tick { stroke: var(--muted); stroke-width: 1.2; }
.chart .tick-t { font-size: 13px; fill: var(--muted); text-anchor: middle; }
.chart .unit { font-size: 13px; fill: var(--muted); text-anchor: end; }
.chart .dpeak { cursor: pointer; outline: none; }
.chart .stick { stroke: var(--spec); stroke-width: 4; stroke-linecap: round; opacity: .55; transition: stroke .25s, stroke-width .25s, opacity .25s; }
.chart .dpeak.on .stick { stroke: var(--accent); stroke-width: 6; opacity: 1; }
.chart .dpeak:hover .stick, .chart .dpeak:focus-visible .stick { opacity: 1; }
.chart .val { font-size: 15px; font-weight: 800; fill: var(--accent); text-anchor: middle; opacity: 0; transition: opacity .25s; }
.chart .dpeak.on .val { opacity: 1; }
.chart .grow { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * .08s); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; direction: ltr; justify-content: center; }
.pill {
  padding: 5px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border); transition: all .2s;
}
.pill:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pill[aria-pressed="true"] { color: var(--accent-contrast); background: var(--accent); border-color: var(--accent); }
.demo__note { margin-top: 14px; font-size: 12.5px !important; line-height: 1.6; }
.demo__more { margin-top: 28px; text-align: center; }

/* ----------------------------------------------------------------- spectra */
.spec .mini { width: 100%; height: 96px; display: block; margin-bottom: 14px; padding: 8px; border-radius: 18px; background: var(--hover); }
.mini .m-axis { stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; }
.mini .m-nmr line { stroke: var(--spec); stroke-width: 4; stroke-linecap: round; }
.mini .m-ir { fill: none; stroke: var(--ir); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.spectra__note { margin: 30px auto 0; max-width: 62ch; text-align: center; color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------- trust */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.span2 { grid-column: span 2; }
.mock-notice {
  margin-top: 18px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; font-size: 14px; font-weight: 500;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 11%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent);
}
.mock-row { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--hover); font-size: 14px; color: var(--muted); }
.na { font-style: italic; color: var(--muted); padding: 2px 10px; border-radius: 999px; border: 1px dashed var(--border); }
.mock-status { margin-top: 18px; display: grid; gap: 8px; }
.mock-status > div { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; background: var(--hover); font-size: 14px; font-weight: 600; }
.mock-status > div > span { margin-inline-end: auto; }
.tag { font-style: normal; font-size: 12.5px; font-weight: 600; padding: 2px 11px; border-radius: 999px; }
.tag--ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.tag--bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.tag--retry { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }

/* --------------------------------------------------------------- animation */
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes flow { to { stroke-dashoffset: -14; } }
@keyframes pulse { 50% { transform: scale(1.28); } }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 1060px) {
  .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero__copy { text-align: center; }
  .hero__lede { margin-inline: auto; }
  .hero__cta, .stats { justify-content: center; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .steps, .bento { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .hero { padding-top: 28px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .stats { gap: 12px 24px; }
  .fig .lbl, .fig .mono, .fig .tag-t { font-size: 17px; }
  .hero > .atom:nth-of-type(-n+4) { display: none; } /* the ones near the headline */
}
