/*
 * Page-specific styles for /products/grfx.
 *
 * Port of the design's inline <style> block in `Imaginando GRFX.html`.
 * Same convention as the DLYM / K7D / TKFX / UBRIDGE product pages —
 * the product-detail chrome (.product-nav, .sec-head, .hero, .req-grid,
 * .help-grid…) is duplicated here intentionally. Hoist into
 * /style.css once the relevant block recurs.
 *
 * 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.
 *
 * GRFX-only chrome:
 *   .triangle-vis  — hero/section centrepiece, draggable handle + grain
 *                    particle canvas. JS in /pages/grfx.js.
 *   .press / .pcard — magazine-style 1.4fr+1fr+1fr review grid where
 *                    the first card just gets more horizontal room.
 *                    All three cards share the same surface, type
 *                    scale and quote-mark glyph — no "featured"
 *                    background tint or larger quote on the first
 *                    card. Differs from DLYM/K7D's .rev-grid (3-col
 *                    equal) only in the column ratios.
 *   .artist-quote  — accent-tinted standout quote panel under .press.
 *   .rack          — FX-rack lanes inside one of the engine tiles.
 *   .tri-demo      — 2-col layout that wraps the Harmonic Triangle
 *                    interactive (left = copy + wow table, right = vis).
 *
 * Palette (GRFX is moodier/cinematic vs DLYM/K7D):
 *   --accent   #5fe3d4 (turquoise)
 *   --accent-2 #b48bff (violet, used for grain accents)
 */

/* ============================================================
 * Local palette override — GRFX runs darker than the global
 * tokens. Card surface is bumped to a near-black with cool tint.
 * ============================================================ */
.grfx-card,
.product-nav,
.ftile,
.pcol,
.demo-banner,
.sblock,
.req,
.hcard,
.artist-quote,
.tri-demo {
  /* Use the global card token but fall back to the GRFX local */
  --grfx-card: var(--card, #0a0a12);
}

:root {
  --grfx-accent-2: #b48bff;
}
html[data-theme="light"],
:root[data-theme="light"] {
  --grfx-accent-2: #7a4ad9;
}

/* ============================================================
 * Section heading override — product-detail scale.
 * ============================================================ */
.sec-head { margin-bottom: 48px; flex-wrap: wrap; }
.sec-head h2 {
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.95;
  max-width: none;
  margin: 8px 0 0;
}
.sec-head h2 em { 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 — GRFX tint + visual only. Chrome is shared (`.phero-*` in
 * public/style.css, via +productHero — refs #444). GRFX keeps its
 * deeper padding, two-tone gradient (accent + grfx-accent-2), 1.05fr
 * split, 1100px collapse and wider copy columns.
 * ============================================================ */
.phero { padding: 48px 0 96px; }
.phero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 70% 35%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 50% at 12% 85%, color-mix(in oklab, var(--grfx-accent-2) 10%, transparent), transparent 60%);
}
.phero-grid { grid-template-columns: 1fr 1.05fr; }
.phero h2 { max-width: 22ch; }
.phero .lede { max-width: 50ch; }
@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). GRFX uses it unchanged; the spec column
 * is unified to 120px there (was 124px here — a 4px imperceptible nudge). */

/* ============================================================
 * ENGINE — feature mosaic (6 tiles, spans 7/5/5/7/7/5)
 * ============================================================ */
.ftile {
  position: relative;
  border: 0.5px solid var(--line);
  border-radius: 18px;
  background: var(--grfx-card);
  padding: 28px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  min-height: 340px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.ftile:hover { border-color: var(--line-strong); }
.ftile.featured {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 8%, var(--grfx-card)), var(--grfx-card));
  border-color: color-mix(in oklab, var(--accent) 30%, var(--line));
}
.ftile.warm {
  background: linear-gradient(180deg, color-mix(in oklab, var(--grfx-accent-2) 6%, var(--grfx-card)), var(--grfx-card));
}
.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.015em;
  line-height: 1.1;
  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: 52ch; }
.ftile .tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.ftile .tagrow span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  padding: 3px 8px;
  border: 0.5px solid var(--line);
  border-radius: 999px;
}
.ftile .vis {
  margin-top: auto;
  height: 150px;
  border-top: 0.5px dashed var(--line);
  margin-left: -28px;
  margin-right: -28px;
  position: relative;
  display: grid;
  place-items: stretch;
  /* Clip the oversized SVG. Inline SVGs use
     `preserveAspectRatio="xMidYMid slice"` so the geometry fills the
     entire band and overflow is cropped — intentional "fragment of
     a larger composition" look. */
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, color-mix(in oklab, var(--accent) 6%, transparent), transparent 70%);
}
.ftile .vis.tall { height: 210px; }
.fv-svg { width: 100%; height: 100%; display: block; color: var(--fg-dim); }
.fv-svg path { fill: none; stroke: var(--accent); stroke-width: 1.5; filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 50%, transparent)); }
.fv-svg path.alt { stroke: var(--grfx-accent-2); filter: drop-shadow(0 0 6px color-mix(in oklab, var(--grfx-accent-2) 50%, transparent)); }
.fv-svg text { fill: var(--fg-faint); font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.fv-svg circle { /* allow per-circle fill via attribute */ }

/* FX rack — lives inside .vis.tall on the "rack" tile. CSS lanes,
   no JS. Mirrors the design's FXRack(). */
.rack {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}
.rack .lane {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0.5px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  position: relative;
  overflow: hidden;
}
.rack .lane .lbl { flex-shrink: 0; width: 42px; color: var(--fg); }
.rack .lane .chain { display: flex; gap: 6px; flex: 1; align-items: center; flex-wrap: wrap; }
.rack .lane .chip {
  padding: 5px 9px;
  border: 0.5px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  white-space: nowrap;
}
.rack .lane .chip.dim { border-color: transparent; background: transparent; }
.rack .lane .chip.on {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--accent);
  box-shadow: 0 0 12px color-mix(in oklab, var(--accent) 30%, transparent);
}
.rack .lane .chip.purp {
  background: color-mix(in oklab, var(--grfx-accent-2) 10%, transparent);
  border-color: color-mix(in oklab, var(--grfx-accent-2) 60%, var(--line-strong));
  color: var(--grfx-accent-2);
  width: fit-content;
}
.rack .lane .arrow { color: var(--fg-faint); flex-shrink: 0; }
.rack .lane .pct { margin-left: auto; color: var(--accent); font-size: 9px; }
.rack .lane.send { background: color-mix(in oklab, var(--grfx-accent-2) 4%, transparent); }
.rack .lane.send .lbl { color: var(--grfx-accent-2); }

/* ============================================================
 * HARMONIC TRIANGLE — section + interactive panel
 * ============================================================ */
.tri-demo {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 44px;
  align-items: center;
  border: 0.5px solid var(--line);
  border-radius: 18px;
  background: var(--grfx-card);
  padding: 44px;
  overflow: hidden;
}
@media (max-width: 1000px) { .tri-demo { grid-template-columns: 1fr; padding: 28px; gap: 32px; } }
.tri-copy { display: flex; flex-direction: column; gap: 18px; }
.tri-copy h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.tri-copy h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.tri-copy p { margin: 0; color: var(--fg-dim); font-size: 15px; line-height: 1.6; max-width: 46ch; text-wrap: pretty; }
.tri-wow { display: flex; flex-direction: column; border: 0.5px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 4px; }
.tri-wow .w {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 14px 16px;
  border-top: 0.5px solid var(--line);
}
.tri-wow .w:first-child { border-top: 0; }
.tri-wow .w .wk {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.tri-wow .w .wd { font-size: 13.5px; color: var(--fg-dim); line-height: 1.5; }
.tri-art { position: relative; }
/* Hint sits below the video, anchored to the centre of the .tri-art
 * column. Absolutely positioned so the video fills the column edge to
 * edge without the hint nudging its alignment. */
.tri-art .hint {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  white-space: nowrap;
}
@media (max-width: 1000px) {
  .tri-art .hint {
    position: static;
    transform: none;
    display: block;
    margin-top: 14px;
    text-align: center;
    white-space: normal;
  }
}

/* Inline video panel for Triangle + Modulation. Same chassis,
 * different aspect-ratio for the modulation variant. The dark
 * background + glow stays under the video so it matches the rest of
 * GRFX even in light theme. */
.tri-video {
  position: relative;
  aspect-ratio: 620 / 450;
  border-radius: 18px;
  border: 0.5px solid var(--line-strong);
  overflow: hidden;
  background: #06060c;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.tri-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tri-video.mod-video { aspect-ratio: 550 / 530; }
.tri-video.fx-ar { aspect-ratio: 550 / 530; }
.tri-demo.flip .tri-art { order: -1; }
@media (max-width: 1000px) { .tri-demo.flip .tri-art { order: 0; } }

/* ============================================================
 * REVIEWS — the `.press` grid is now the shared block in
 * public/style.css (Product "Press" section), hydrated from
 * clippings via +productPress. The Pat Pardy featured quote moved
 * into the shared Testimonials section (`.sp-quote` in style.css).
 * ============================================================ */

/* ============================================================
 * REQUIREMENTS — 3 cards
 * ============================================================ */
.req-grid { grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--grfx-card); }
.req-grid .req:last-child { border-right: 0; }
@media (max-width: 900px) {
  .req-grid .req:nth-child(2n+1) { border-right: 0.5px solid var(--line); }
}
@media (max-width: 520px) {
  .req-grid .req { border-right: 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(--grfx-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); }

/* ============================================================
 * EFFECTS — now reuses the shared .tri-demo panel (see Triangle /
 * Modulation above) for consistency: copy heading + body + wow table
 * on the left, a 16:9 video (.tri-video.fx-ar) on the right. The old
 * .fx-layout / .fx-units chip-row styling was retired when the section
 * was folded into the tri-demo chassis.
 * ============================================================ */

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