/* ============================================================
 * Product pages — Formacha One (/formacha-one/) and Leagion AI (/leagion/)
 * Pages keep the Formacha design system (next.css). Only the inside of
 * product pictures takes the product's own palette:
 *   Formacha One → light paper workspace, coral mark
 *   Leagion AI   → black glass, gold hairline
 * Plates keep their product colors in both site themes.
 * ============================================================ */

.product-plate {
  --plate-bg: #f7f7f5;
  --plate-edge: #dedfd9;
  --plate-inner: #e7e8e3;
  --plate-ink: #50534e;
  --plate-mark: #e64a3d;
  --plate-glow: transparent;
  position: relative;
  margin: 0;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--plate-edge);
  border-radius: 14px;
  background: radial-gradient(ellipse at 80% 0%, var(--plate-glow), transparent 60%), var(--plate-bg);
  box-shadow: 0 30px 70px #0000004d, 0 2px 8px #0000002e;
}
.product-plate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--plate-inner);
  background: var(--plate-bg);
}
.product-plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 4px 3px;
  font: 9.5px/1.7 var(--font-mono, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--plate-ink);
}
.product-plate figcaption span:first-child::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: 1px;
  background: var(--plate-mark);
}

/* Formacha One: the product's light workspace, on any page theme. */
.product-plate--one {
  --plate-bg: #f7f7f5;
  --plate-edge: #dcdad3;
  --plate-inner: #e3e4df;
  --plate-ink: #50534e;
  --plate-mark: #e64a3d;
  --plate-glow: #ffffff;
}
[data-theme=light] .product-plate--one { box-shadow: 0 26px 60px #5748372e, 0 2px 8px #57483720; }

/* Leagion AI: black glass with a gold hairline. */
.product-plate--leagion {
  --plate-bg: #050505;
  --plate-edge: rgba(233, 185, 73, .34);
  --plate-inner: rgba(233, 185, 73, .16);
  --plate-ink: #b9a578;
  --plate-mark: #e9b949;
  --plate-glow: rgba(233, 185, 73, .14);
  box-shadow: 0 30px 70px #000a, 0 0 0 1px #000, inset 0 1px 0 rgba(233, 185, 73, .12);
}
[data-theme=light] .product-plate--leagion { box-shadow: 0 26px 60px #1d160b55, inset 0 1px 0 rgba(233, 185, 73, .12); }

.product-plate--tilt { transform: rotate(1.6deg); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.product-plate--tilt:hover { transform: rotate(0deg); }
@media (prefers-reduced-motion: reduce) { .product-plate--tilt, .product-plate--tilt:hover { transform: none; transition: none; } }

/* Product marks — small, used in kickers and the three-brand row. */
.product-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font: 600 13px/1 var(--font-body);
  letter-spacing: -.02em;
}
.product-mark--one { background: #f7f7f5; color: #b43e32; border: 1px solid #dcdad3; font-style: italic; }
.product-mark--digital { background: #211e1b; color: #f4f0e8; border: 1px solid rgba(190,175,154,.3); }
.product-mark--leagion { background: #050505; color: #e9b949; border: 1px solid rgba(233,185,73,.4); }

/* ---------- Formacha One page ---------- */
.f1-hero .hero__headline { max-width: 15ch; }
.formacha-next .f1-hero__meta {
  margin-top: 26px;
  font: 10px/1.7 var(--font-mono, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Module rows: copy + light plate */
.f1-module {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: center;
  padding-block: 44px;
  border-top: 1px solid var(--border);
}
.f1-module:first-of-type { border-top: 0; padding-top: 8px; }
.f1-module--flip .f1-module__copy { order: 2; }
.f1-module .product-plate--narrow { max-width: 420px; justify-self: center; }
.f1-module__num { font: 11px/1.6 var(--font-mono, monospace); color: var(--accent); letter-spacing: .08em; }
.f1-module h3 { font-size: 28px; margin: 14px 0 14px; }
.f1-module p { color: var(--fg-muted); font-size: 15px; }
.f1-module ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.f1-module li { font-size: 14px; line-height: 1.6; padding-left: 20px; position: relative; }
.f1-module li::before { content: ''; position: absolute; left: 0; top: .62em; width: 9px; height: 1px; background: var(--accent); }

/* Workflow chips */
.f1-module .f1-chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 26px 0 0; }
.f1-chips li {
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-ledger);
}
.f1-chips li::before { content: none; }

/* Three ways to work with Formacha */
.f1-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.f1-path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-ledger);
  color: inherit;
  text-decoration: none;
  transition: transform .25s, border-color .25s;
}
.f1-path:hover { transform: translateY(-4px); border-color: var(--accent); }
.f1-path.is-current { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.f1-path h3 { font-size: 24px; margin: 6px 0 0; }
.f1-path p { font-size: 14px; color: var(--fg-muted); margin: 0; flex: 1; }
.f1-path__who { font: 10px/1.7 var(--font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.f1-path__go { font-size: 12px; font-weight: 650; color: var(--fg); }
.f1-path.is-current .f1-path__go { color: var(--accent); }

/* Guard rails */
.f1-rails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.f1-rails .stanza { border-top: 1px solid var(--border); padding-top: 22px; margin-bottom: 26px; }
.f1-rails .stanza h3 { font-size: 20px; margin: 0 0 8px; }
.f1-rails .stanza p { color: var(--fg-muted); margin: 0; }

/* .guarantee p in next.css is more specific; match it. */
.formacha-next .guarantee .f1-cta-note { margin-top: 22px; font: 10px/1.8 var(--font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: #aaa59d; }
.formacha-next .guarantee .f1-cta-note a { color: #f4f0e8; }

@media (max-width: 900px) {
  .f1-module, .f1-module--flip { grid-template-columns: 1fr; gap: 28px; }
  .f1-module--flip .f1-module__copy { order: 0; }
  .f1-paths { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .f1-rails { grid-template-columns: 1fr; }
  .product-plate { padding: 8px; border-radius: 11px; }
  .product-plate--tilt { transform: rotate(1deg); }
  .f1-module h3 { font-size: 24px; }
}

/* ============================================================
 * Holographic product cards — same structure and motion as the
 * homepage Formacha Digital card (next.css .campaign-card + next.js).
 * Formacha One: pearl white. Leagion AI: black and gold.
 * ============================================================ */
.campaign-card--one {
  border-color: #d6d2c8;
  background: radial-gradient(120% 120% at 28% 12%, #ffffff 0%, #f6f4ef 48%, #e7e4dc 100%);
  color: #20211f;
  box-shadow: 0 26px 70px #0000004d, inset 0 1px 0 #fff, inset 0 -1px 0 #0000000f;
}
.campaign-card--one .card-top { color: #50534e; }
.campaign-card--one .card-title span { color: #b43e32; font-style: italic; }
.formacha-next .campaign-card--one .card-message { color: #50534e; }
.campaign-card--one .card-bottom { border-top-color: #20211f1f; color: #686c65; }
.campaign-card--one .holo-foil {
  background: linear-gradient(115deg, #c9b6f0, #f7d6b0, #b6e3dc, #bfd0f5, #f3c1c9, #c9b6f0);
  background-size: 200% 200%;
  background-position: var(--holo-x) var(--holo-y);
  mix-blend-mode: multiply;
  opacity: .42;
}
.campaign-card--one .holo-sparkle {
  background-image: radial-gradient(#9d8cc7 .5px, transparent 1.3px);
  mix-blend-mode: multiply;
  opacity: .22;
}
.campaign-card--one .holo-glare {
  background: radial-gradient(42% 42% at var(--holo-x) var(--holo-y), #ffffffd9, transparent 72%);
  mix-blend-mode: normal;
  opacity: .7;
}

.campaign-card--leagion {
  border-color: rgba(233, 185, 73, .42);
  background: radial-gradient(120% 120% at 30% 12%, #211c10 0%, #0b0a08 52%, #040404 100%);
  color: #f6efdc;
  box-shadow: 0 26px 70px #000a, inset 0 1px 0 rgba(255, 226, 150, .22);
}
.campaign-card--leagion .card-top { color: #d9c79a; }
.campaign-card--leagion .card-title span { color: #e9b949; }
.formacha-next .campaign-card--leagion .card-message { color: #c9bfa6; }
.campaign-card--leagion .card-bottom { border-top-color: rgba(233, 185, 73, .22); color: #b9a578; }
.campaign-card--leagion .holo-foil {
  background: linear-gradient(115deg, #7a5a14, #e9b949, #fff0b8, #b8862a, #5f4b1e, #7a5a14);
  background-size: 200% 200%;
  background-position: var(--holo-x) var(--holo-y);
  mix-blend-mode: screen;
  opacity: .2;
}
.campaign-card--leagion .holo-sparkle { background-image: radial-gradient(#ffe7a3 .5px, transparent 1.3px); opacity: .2; }

.card-orbit--one { border-color: color-mix(in srgb, var(--border) 70%, #e64a3d); }
.card-orbit--leagion { border-color: rgba(233, 185, 73, .32); }
.card-orbit--leagion::before { color: #e9b949; }

/* The product screenshot that used to sit in the hero, now just below it. */
.product-showcase { padding-top: 56px; padding-bottom: 0; }
.product-showcase .product-plate { max-width: 980px; margin-inline: auto; }

/* ---------- Formacha One: what it is ---------- */
.f1-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.f1-pillar {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-ledger);
}
.f1-pillar__num { font: 11px/1.6 var(--font-mono, monospace); letter-spacing: .08em; color: var(--accent); }
.formacha-next .f1-pillar h3 { font-size: 24px; margin: 16px 0 12px; }
.formacha-next .f1-pillar p { font-size: 14px; color: var(--fg-muted); margin: 0; }

/* ---------- Promise table ---------- */
.f1-promise { border-top: 1px solid var(--border); }
.f1-promise__head, .f1-promise__row {
  display: grid;
  grid-template-columns: 200px minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 36px;
}
.f1-promise__head {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font: 9.5px/1.7 var(--font-mono, monospace);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.f1-promise__head span:last-child { color: var(--accent); }
.f1-promise__row { padding: 26px 0; border-bottom: 1px solid var(--border); align-items: start; }
.formacha-next .f1-promise__title { font-size: 19px; line-height: 1.35; margin: 0; }
.formacha-next .f1-promise__them { font-size: 14px; line-height: 1.75; color: var(--fg-muted); margin: 0; }
.formacha-next .f1-promise__us p { font-size: 15px; line-height: 1.75; margin: 0; }
.f1-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font: 9.5px/1.6 var(--font-mono, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.f1-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #5fae84; box-shadow: 0 0 0 3px #5fae8426; flex-shrink: 0; }
.f1-status--next::before { background: #d9a441; box-shadow: 0 0 0 3px #d9a44126; }

/* ---------- Your AI connections ---------- */
.f1-connect { padding: 28px 28px 14px; }
.f1-connect__grid {
  display: grid;
  grid-template-columns: 1fr auto 1.1fr auto 1fr;
  gap: 18px;
  align-items: center;
  color: #20211f;
}
.f1-connect__col { border: 1px solid #e0ded7; border-radius: 10px; background: #fff; padding: 20px; min-width: 0; }
.f1-connect__col--core { background: #fbfaf7; border-color: #e6c9c3; box-shadow: 0 10px 30px #b43e3214; }
.f1-connect__label { display: block; font: 9.5px/1.6 var(--font-mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: #686c65; margin-bottom: 12px; }
.f1-connect__mark { font: 600 22px/1.2 var(--font-body); letter-spacing: -.04em; color: #20211f; margin-bottom: 12px; font-style: italic; }
.f1-connect__mark em { color: #b43e32; font-weight: 500; }
.f1-connect ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.f1-connect li { font-size: 13px; line-height: 1.45; color: #50534e; }
.f1-connect li strong { display: block; font-weight: 650; color: #20211f; font-size: 14px; }
.f1-connect li span { font-size: 12px; color: #686c65; }
.f1-connect__col--core li { padding-left: 16px; position: relative; }
.f1-connect__col--core li::before { content: ''; position: absolute; left: 0; top: .6em; width: 7px; height: 1px; background: #b43e32; }
.f1-connect__arrow { font-size: 20px; color: #b43e32; }
.f1-connect figcaption { margin-top: 12px; }

.f1-prompts { margin-top: 34px; display: grid; grid-template-columns: 200px 1fr; gap: 12px 36px; align-items: start; }
.f1-prompts__label { font: 9.5px/1.7 var(--font-mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); padding-top: 12px; }
.f1-prompts ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.f1-prompts li { font-size: 14px; line-height: 1.5; padding: 11px 16px; border: 1px solid var(--border); border-radius: 12px 12px 12px 3px; background: var(--surface-ledger); }
.formacha-next .f1-prompts p { grid-column: 2; font-size: 13px; color: var(--fg-muted); margin: 6px 0 0; max-width: 70ch; }

@media (max-width: 900px) {
  .f1-pillars { grid-template-columns: 1fr; }
  .f1-promise__head, .f1-promise__row { grid-template-columns: 160px 1fr 1.2fr; gap: 22px; }
  .f1-connect__grid { grid-template-columns: 1fr; }
  .f1-connect__arrow { justify-self: center; transform: rotate(90deg); }
}
@media (max-width: 760px) {
  .f1-promise__head { display: none; }
  .f1-promise__row { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .f1-promise__them::before, .f1-promise__us::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font: 9.5px/1.7 var(--font-mono, monospace);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fg-muted);
  }
  .f1-promise__us::before { color: var(--accent); }
  .f1-connect { padding: 14px 14px 8px; }
  .f1-prompts { grid-template-columns: 1fr; }
  .formacha-next .f1-prompts p { grid-column: 1; }
}
