/**
 * @file        marketing.css
 * @description Styles for the Marketing section (/pages/marketing.php): lifecycle, stage lists, pricing, retainers, FAQ
 *
 * @author      Thomas Dobler - SYNTHETIXMIND LTD
 * @email       tom@synthetixmind.com
 * @company     SYNTHETIXMIND LTD, Paphos, Cyprus
 * @url         https://synthetixmind.com
 *
 * @uid         5b8e2f14-7c3a-4d91-a6e2-0f9b3c7d1e58
 * @version     0.3.0.4
 * @created     2026-10-18
 * @updated     2026-10-18
 *
 * @copyright   (c) 2026 by SYNTHETIXMIND LTD
 * @license     Proprietary — All rights reserved
 */

/* WHY: kept separate from style.css — the local style.css carries an unreleased
 *      mobile-nav block, so editing it would ship that change with the marketing pages.
 *      Only tokens from style.css (--color-*, --space-*, --radius-*) are used here. */

/* ---- Shared section spacing ---- */
.mkt-section { padding: var(--space-xl) 0; }
.mkt-section--beige { background: var(--color-beige); }
.mkt-section--navy { background: var(--color-navy); color: var(--color-text-light); }
.mkt-section--navy h2,
.mkt-section--navy h3 { color: var(--color-text-light); }
.mkt-section--navy .section-intro .lead { color: rgba(242, 244, 246, 0.75); }

/* ---- Hero ---- */
.mkt-hero .subhead { max-width: 760px; margin: 0 auto var(--space-lg); font-size: 1.25rem; }
.mkt-hero .cta-group { margin-bottom: var(--space-md); }
.mkt-hero .btn-outline { color: var(--color-text-light); border-color: rgba(242, 244, 246, 0.6); }
.mkt-hero .btn-outline:hover { background: rgba(242, 244, 246, 0.1); }
.mkt-hero__support { color: rgba(242, 244, 246, 0.7); font-size: 0.95rem; margin: 0; }

/* ---- Lifecycle diagram (static SVG; Sprint 4 adds the Three.js version) ---- */
.lifecycle { max-width: 860px; margin: 0 auto; }
.lifecycle svg { display: block; width: 100%; height: auto; }
.lifecycle__edge { fill: none; stroke: rgba(250, 88, 0, 0.35); stroke-width: 2; }
.lifecycle__flow { fill: none; stroke: var(--color-orange); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 18; animation: lifecycle-flow 2.4s linear infinite; }
.lifecycle__node > circle { fill: #243846; stroke: var(--color-orange); stroke-width: 2; transition: fill 0.2s ease; }
.lifecycle__node text { fill: var(--color-text-light); font-family: var(--font-primary); font-size: 17px; font-weight: 600; text-anchor: middle; }
.lifecycle__node .lifecycle__sub { fill: rgba(242, 244, 246, 0.6); font-size: 12px; font-weight: 500; }
.lifecycle__node:hover > circle,
.lifecycle__node:focus > circle { fill: var(--color-mahogany); }
.lifecycle__node:focus { outline: none; }
.lifecycle__node:focus-visible > circle { stroke: #fff; stroke-width: 3; }
.lifecycle__caption { text-align: center; color: rgba(242, 244, 246, 0.7); font-size: 0.95rem; margin-top: var(--space-md); }

@keyframes lifecycle-flow { to { stroke-dashoffset: -48; } }

/* WHY: motion is decorative only — users who ask for reduced motion get a static diagram. */
@media (prefers-reduced-motion: reduce) {
  .lifecycle__flow { animation: none; stroke-dasharray: none; opacity: 0.6; }
}

/* ---- Services by stage ---- */
.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-lg); }
.stage-card { background: #fff; border: 1px solid var(--color-beige); border-top: 4px solid var(--color-orange); border-radius: var(--radius-lg); padding: var(--space-lg); scroll-margin-top: 100px; display: flex; flex-direction: column; }
.stage-card__phase { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-orange); margin-bottom: 0.25rem; }
.stage-card h3 { margin-bottom: var(--space-md); color: var(--color-navy); }
.stage-card .feature-list { flex-grow: 1; }
.stage-card .feature-list li { font-size: 0.9rem; align-items: flex-start; padding: 0.3rem 0; }
.stage-card__foot { font-size: 0.85rem; color: #6b7280; margin: 0 0 var(--space-md); }

/* ---- Automation & AI ---- */
.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.split-card { background: #fff; border: 1px solid var(--color-beige); border-radius: var(--radius-lg); padding: var(--space-lg); }
.split-card h3 { margin-bottom: var(--space-md); color: var(--color-navy); }
.split-card--human { border-left: 4px solid var(--color-mahogany); }
.split-card--human .feature-list li::before { content: '●'; color: var(--color-mahogany); font-size: 0.7rem; }
.mkt-note { text-align: center; max-width: 720px; margin: var(--space-lg) auto 0; color: #4b5563; font-size: 0.95rem; }

/* ---- Example work ---- */
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-lg); }
.example-card { background: #fff; border: 1px solid var(--color-beige); border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.example-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--color-navy); }
.example-card__body { padding: var(--space-md) var(--space-lg) var(--space-lg); }
.example-card h3 { font-size: 1.1rem; margin-bottom: var(--space-sm); color: var(--color-navy); }
.example-card p { font-size: 0.9rem; color: #4b5563; margin: 0; }
.example-label { position: absolute; top: 0.75rem; right: 0.75rem; background: var(--color-orange); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 9999px; }

/* ---- Pricing (fixed-price products) ---- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-lg); }
.price-card { background: #fff; border: 1px solid var(--color-beige); border-radius: var(--radius-lg); padding: var(--space-lg); display: flex; flex-direction: column; }
.price-card--featured { border: 2px solid var(--color-orange); box-shadow: var(--shadow-lg); }
.price-card h3 { color: var(--color-navy); margin-bottom: 0.25rem; }
.price-card__price { font-size: 1.75rem; font-weight: 700; color: var(--color-orange); margin-bottom: var(--space-md); }
.price-card__price small { font-size: 0.85rem; font-weight: 500; color: #6b7280; }
.price-card .feature-list { flex-grow: 1; }
.price-card .feature-list li { font-size: 0.9rem; align-items: flex-start; padding: 0.3rem 0; }
.price-card .btn { align-self: flex-start; }
.price-card__note { font-size: 0.8rem; color: #6b7280; margin: 0 0 var(--space-md); }

/* ---- Compliance / commercial notes ---- */
.compliance-box { max-width: 860px; margin: var(--space-lg) auto 0; background: #fff; border: 1px solid var(--color-beige); border-left: 4px solid var(--color-navy); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); font-size: 0.9rem; color: #4b5563; }
.compliance-box p { margin: 0.25rem 0; }
.compliance-box a { color: var(--color-orange); font-weight: 600; }

/* ---- Retainers ---- */
.retainer-card .retainer-card__promise { font-weight: 600; color: var(--color-mahogany); margin-bottom: var(--space-md); }
.retainer-card .price-card__price { font-size: 1.1rem; }

/* ---- FAQ (native <details>: keyboard accessible without JS) ---- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: #fff; border: 1px solid var(--color-beige); border-radius: 8px; }
.faq-item summary { cursor: pointer; padding: 1rem 1.5rem; font-weight: 600; color: var(--color-navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--color-orange); font-weight: 700; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 2px; border-radius: 8px; }
.faq-item p { padding: 0 1.5rem 1rem; margin: 0; font-size: 0.92rem; color: #4b5563; }

/* ---- Detail pages (includes/marketing-detail.php) ---- */
.mkt-breadcrumb { font-size: 0.85rem; color: rgba(242, 244, 246, 0.7); margin-bottom: var(--space-md); }
.mkt-breadcrumb a { color: var(--color-beige); text-decoration: underline; }
.mkt-h3 { font-size: 1.35rem; margin-bottom: var(--space-md); color: var(--color-navy); }
.cta-section .btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.cta-section .btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.card-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Lifecycle: Three.js canvas sits over the static SVG once loaded ---- */
.lifecycle__stage { position: relative; }
.lifecycle__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.8s ease; }
.lifecycle.is-3d .lifecycle__stage canvas { opacity: 1; }
.lifecycle.is-3d .lifecycle__edge,
.lifecycle.is-3d .lifecycle__flow { opacity: 0; }

/* ---- Lifecycle: backdrop panel (dot grid + drifting glow), painted behind the SVG ---- */
/* WHY: the backdrop lives in CSS, not in the Three.js canvas, because the canvas sits ON TOP
 *      of the SVG — anything drawn there would cross the stage labels. */
.lifecycle__stage { isolation: isolate; overflow: hidden; border-radius: 24px; border: 1px solid rgba(242, 244, 246, 0.07);
  background: radial-gradient(ellipse 65% 60% at 50% 50%, rgba(250, 88, 0, 0.12), transparent 70%), #17252f; }
.lifecycle__stage::before,
.lifecycle__stage::after { content: ""; position: absolute; pointer-events: none; z-index: 0; }
.lifecycle__stage::before { inset: 0; background: radial-gradient(circle, rgba(242, 244, 246, 0.14) 1px, transparent 1.6px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 85%); }
.lifecycle__stage::after { inset: -25%;
  background: radial-gradient(circle at 30% 40%, rgba(250, 88, 0, 0.16), transparent 32%),
              radial-gradient(circle at 70% 62%, rgba(255, 210, 63, 0.09), transparent 28%);
  animation: lc-drift 16s ease-in-out infinite alternate; }
.lifecycle__stage svg { position: relative; z-index: 1; }
.lifecycle__stage canvas { z-index: 2; }

/* ---- Lifecycle: "working" stage — set by marketing-lifecycle.js when the yellow lead dot arrives ---- */
.lifecycle__node > circle { transition: fill 0.2s ease, stroke 0.35s ease, filter 0.35s ease; }
.lifecycle__node text { transition: opacity 0.35s ease; }
.lifecycle__icon { opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
  fill: none; stroke: #FFD23F; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.lifecycle__icon .lc-fill { fill: rgba(255, 210, 63, 0.18); }
.lifecycle__icon .lc-ghost { stroke: none; }
.lifecycle__node.is-working > circle { stroke: #FFD23F; filter: drop-shadow(0 0 12px rgba(255, 210, 63, 0.55)); }
.lifecycle__node.is-working text { opacity: 0; }
.lifecycle__node.is-working .lifecycle__icon { opacity: 1; }
/* Rotating parts are symmetric groups, so fill-box + center spins them about their own middle. */
.lc-sweep, .lc-gear, .lc-brick, .lc-bar { transform-box: fill-box; transform-origin: center; }
.lc-bar { transform-origin: center bottom; }
.lc-trend { stroke-dasharray: 90; stroke-dashoffset: 90; }
.is-working .lc-sweep { animation: lc-spin 1.1s linear infinite; }
.is-working .lc-gear { animation: lc-spin 2.4s linear infinite; }
.is-working .lc-gear--small { animation: lc-spin 1.4s linear infinite reverse; }
.is-working .lc-brick { animation: lc-drop 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) var(--d, 0s) both; }  /* --d: stagger, set in the markup */
.is-working .lc-bar { animation: lc-grow 0.5s ease-out var(--d, 0s) both; }
.is-working .lc-trend { animation: lc-draw 0.7s 1s ease-out forwards; }

@keyframes lc-spin { to { transform: rotate(360deg); } }
@keyframes lc-drop { from { transform: translateY(-36px); opacity: 0; } }
@keyframes lc-grow { from { transform: scaleY(0); } }
@keyframes lc-draw { to { stroke-dashoffset: 0; } }
@keyframes lc-drift { to { transform: translate(7%, -5%) rotate(10deg); } }

@media (max-width: 600px) {
  .mkt-hero .subhead { font-size: 1.05rem; }
  /* WHY: the long CTA labels overflowed a 360px viewport by ~17px. */
  .mkt-hero .btn-lg,
  .cta-section .btn-lg { white-space: normal; max-width: 100%; text-align: center; }
  .lifecycle__node text { font-size: 20px; }
}
