/*
 * Page-specific styles for /products/frms.
 *
 * Port of the design's inline <style> block in `Imaginando FRMS.html`.
 * FRMS runs against the dark global theme with the lime global --accent,
 * so the product-detail shell here is the SAME chrome as DRC (.product-nav,
 * .hero, .sec-head, .ov-*, .mosaic/.ftile, .tpl-trailer,
 * .audio-shell, .exp-grid, .quotes-wall, .test-grid, .pricing-grid,
 * .split-edu, .req-grid, .help-grid). Kept self-contained per the
 * established per-product-page convention — see the hoist note in
 * docs/redesign/PROGRESS.md.
 *
 * Already in /style.css (intentionally NOT duplicated):
 *   :root tokens, html/body/a/button resets, ::selection, .mono, .wrap,
 *   .btn / .btn.primary / .btn.ghost / .btn .arrow, .section, .reveal.
 *
 * FRMS-only chrome:
 *   --frms-2                  — secondary lighter-green accent used in
 *                                 the engine grain visuals.
 *   .fv-cloud / .fv-svg       — per-`kind` grain visuals inside the
 *                                 engine mosaic tiles.
 *   .ftile.featured           — accent-tinted first engine tile.
 *   .ways / .way              — 3-step workflow cards with demo SVGs.
 */

/* ============================================================
 * Local accents / card token. --accent is the global lime; --frms-2
 * is the lighter secondary green the grain visuals use.
 * ============================================================ */
.product-nav,
.ftile,
.exp,
.tut,
.pcol,
.demo-banner,
.sblock,
.req,
.hcard,
.tpl-trailer,
.way {
  --frms-card: var(--card, #0e0e12);
}
main { --frms-2: #8aff86; }
:root[data-theme="light"] main { --frms-2: #4e8a1e; }
/* The grain (.ftile .vis) and workflow (.way .demo) visuals are drawn for a
 * dark stage — accent strokes over faint cream reference traces. Over a light
 * card the translucent-black stage turns pale grey and those low-opacity
 * traces wash out, so pin the viz boxes to a solid dark in light mode and keep
 * the artwork legible. */
:root[data-theme="light"] .ftile .vis,
:root[data-theme="light"] .way .demo {
  background: #0e0e12;
  border-color: rgba(0, 0, 0, 0.18);
}

/* ============================================================
 * Section heading override — product-detail scale.
 * ============================================================ */
.sec-head { margin-bottom: 48px; flex-wrap: wrap; }
.sec-head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 8px 0 0;
  text-wrap: balance;
}
.sec-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.sec-head .meta {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  max-width: 30ch;
}

/* ============================================================
 * HERO
 * ============================================================ */
/* ============================================================
 * HERO — FRMS tint + visual only. Chrome is shared (`.phero-*` in
 * public/style.css, via +productHero — refs #444). FRMS keeps its
 * two-tone gradient (accent + frms-2), 1100px collapse and its
 * softer-cornered, inset-lit shot.
 * ============================================================ */
.phero-bg {
  background:
    radial-gradient(ellipse 70% 60% at 75% 30%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 50% at 15% 80%, color-mix(in oklab, var(--frms-2) 12%, transparent), transparent 60%);
}
@media (max-width: 1100px) {
  .phero-grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .hero-img-col { margin-top: 0; }
}

/* OVERVIEW — the `.ov-*` block is now shared in public/style.css
 * (Product "Overview" section). FRMS uses it unchanged. */

/* ============================================================
 * ENGINE — 12-col feature mosaic (7 tiles).
 * ============================================================ */
.ftile {
  position: relative;
  border: 0.5px solid var(--line);
  border-radius: 16px;
  background: var(--frms-card);
  padding: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.ftile:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.ftile .ix { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-faint); }
.ftile h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
.ftile h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.ftile p { margin: 0; color: var(--fg-dim); font-size: 14px; line-height: 1.55; text-wrap: pretty; max-width: 42ch; }
.ftile .vis {
  margin-top: auto;
  height: 140px;
  border-radius: 10px;
  border: 0.5px solid var(--line);
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.35);
}
.ftile.featured {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 14%, var(--frms-card)), var(--frms-card));
  border-color: color-mix(in oklab, var(--accent) 32%, var(--line));
}
.ftile.warm {
  background: linear-gradient(180deg, color-mix(in oklab, var(--frms-2) 7%, var(--frms-card)), var(--frms-card));
}


/* ============================================================
 * FEATURE GRAIN VISUALS (.fv-*) — one per engine-tile `kind`.
 * Accent strokes/fills, dim reference traces, no JS.
 * ============================================================ */
/* SVG presentation attributes can't resolve var()/color-mix(), so all
 * grain-visual colours are driven by these classes (same approach as
 * DRC's instrument visuals), keeping them theme-aware. */
.fv-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fv-svg path { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.fv-svg path.dim { stroke: rgba(244, 241, 234, 0.16); }
.fv-svg .pt { fill: var(--accent); }                 /* env breakpoints */
.fv-svg .dot { fill: var(--accent); }                /* spray / mpe touch */
.fv-svg .dot.alt { fill: var(--frms-2); }
.fv-svg .ring { fill: none; stroke: var(--accent); stroke-opacity: 0.3; } /* mpe halo */
.fv-svg .bar { fill: rgba(244, 241, 234, 0.18); }    /* scrub waveform */
.fv-svg .bar.lit { fill: var(--frms-2); }            /* scrub selection window */
.fv-svg .head { stroke: var(--accent); stroke-width: 1.5; } /* scrub playhead */
.fv-svg .wf { fill: var(--accent); opacity: 0.6; }   /* drop waveform */
.fv-svg .key { fill: rgba(241, 230, 207, 0.85); }    /* mpe / play keyboard */
.fv-svg .key.black { fill: rgba(0, 0, 0, 0.5); }
.fv-svg .cap { fill: var(--fg-dim); }                /* drop filename */
.fv-cloud { position: absolute; inset: 0; }
.fv-cloud span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); opacity: 0.85; }
.fv-cloud span.alt { background: var(--frms-2); box-shadow: 0 0 6px var(--frms-2); }

/* FX mix-bars visual (reused shape; 5 rows for FRMS). */
.fx-vis { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 14px 18px; }
.fx-vis .fx-row { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; }
.fx-vis .fx-row .lab { color: var(--fg-faint); text-transform: uppercase; }
.fx-vis .fx-row .bar { height: 5px; border-radius: 99px; background: rgba(244, 241, 234, 0.08); position: relative; overflow: hidden; }
.fx-vis .fx-row .bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w, 60%);
  background: linear-gradient(90deg, var(--accent), var(--frms-2));
}

/* ============================================================
 * WORKFLOW — 3-step cards with a demo SVG strip each.
 * ============================================================ */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1000px) { .ways { grid-template-columns: 1fr; } }
.way {
  position: relative;
  border: 0.5px solid var(--line);
  border-radius: 18px;
  background: var(--frms-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.way:hover { border-color: var(--accent); transform: translateY(-2px); }
.way .num { font-family: var(--display); font-weight: 500; font-size: 42px; letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.way h3 { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: -0.01em; line-height: 1.15; margin: 0; text-wrap: balance; }
.way h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.way p { margin: 0; color: var(--fg-dim); font-size: 14px; line-height: 1.55; text-wrap: pretty; }
/* Pin the demo to the card bottom (margin-top: auto) so the three visuals
   line up even when one step's copy is a line shorter; the .way `gap` still
   guarantees spacing above it. */
.way .demo { margin-top: auto; height: 90px; border-radius: 8px; background: rgba(0, 0, 0, 0.4); border: 0.5px solid var(--line); position: relative; overflow: hidden; }
.way-demo svg { position: absolute; inset: 0; }
.way-demo .box { fill: rgba(255, 255, 255, 0.03); stroke: color-mix(in oklab, var(--accent) 45%, transparent); }
.way-demo .cap { fill: var(--accent); }
.way-demo .bar { fill: color-mix(in oklab, var(--accent) 50%, transparent); }
.way-demo .bar.lit { fill: var(--frms-2); }
.way-demo .head { stroke: var(--frms-2); stroke-width: 1.5; }
.way-demo .key { fill: rgba(241, 230, 207, 0.85); }
.way-demo .key.black { fill: rgba(0, 0, 0, 0.5); }
.way-demo .dot { fill: var(--accent); }
.way-demo .dot.alt { fill: var(--frms-2); }

/* AUDIO DEMOS — the `.audio-*` / `.sc-frame` block is now shared in
 * public/style.css (Product "Audio demos" section). FRMS uses the
 * inline layout unchanged. */


/* Hue-driven art fallbacks (used when no cover image is provided). */
.a-factory { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 8px, transparent 8px 16px), radial-gradient(circle at 30% 30%, var(--accent), #2a1810 70%); }
.a-cinema  { background: radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 50%, transparent), transparent 50%), radial-gradient(circle at 70% 70%, color-mix(in oklab, var(--frms-2) 40%, transparent), transparent 55%), #090c05; }
.a-organic { background: radial-gradient(ellipse at 50% 80%, color-mix(in oklab, var(--frms-2) 50%, transparent), transparent 60%), radial-gradient(ellipse at 50% 20%, color-mix(in oklab, var(--accent) 35%, transparent), transparent 65%), #060a04; }



/* ============================================================
 * REQUIREMENTS — 4 cards.
 * ============================================================ */
.req-grid { gap: 0; background: var(--frms-card); }
.req-grid .req:nth-child(4n) { border-right: 0; }
@media (max-width: 900px) {
  .req-grid .req:nth-child(2n+1) { border-right: 0.5px solid var(--line); }
  .req-grid .req:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 520px) {
  .req-grid .req { border-right: 0; }
  .req-grid .req:last-child { border-bottom: 0; }
}

/* ============================================================
 * HELP — 3 cards.
 * ============================================================ */
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .help-grid { grid-template-columns: 1fr; } }
.hcard {
  position: relative;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  background: var(--frms-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.25s ease, transform 0.25s ease;
  color: inherit;
}
.hcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.hcard .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 4px;
}
.hcard .icon svg { width: 20px; height: 20px; }
.hcard .kind { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-faint); }
.hcard h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
}
.hcard h4 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.hcard p { margin: 0; color: var(--fg-dim); font-size: 13.5px; line-height: 1.5; flex: 1; }
.hcard .more { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--accent); margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }
.hcard .more .arrow { transition: transform 0.25s ease; }
.hcard:hover .more .arrow { transform: translateX(3px); }
