/* Product layer of the Infinity Labs design system, for small B2B product pages (m3-design-expert, r4, 25/11/2026).
   Sits on top of /apps/web/design-system/styles.css: uses only its tokens and its il- pieces.
   Born from the EUDR web that Tomás approved with a 5 (film line 262). Rules and references: ../SYSTEM.md.
   Use: copy this file next to your page (web/product.css) and load it after styles.css. Pick the product colour with
   one class on <html>: product--forest (EUDR), product--wood, product--ink (default), product--claims.
   PROPOSAL: the --product tokens are not in apps/web/design-system yet; asked to David and Tomás (25/11). */

:root { --product: var(--primary); --product-2: var(--fg-2); --product-soft: var(--surface-2, #F1EFEA); --on-product: #fff; --on-product-2: color-mix(in srgb, #fff 78%, transparent); }
.product--forest { --product: oklch(0.31 0.055 165); --product-2: oklch(0.45 0.08 160); --product-soft: oklch(0.965 0.018 160); --on-product-2: oklch(0.88 0.03 160); }
.product--wood   { --product: oklch(0.33 0.05 50);   --product-2: oklch(0.52 0.08 58);  --product-soft: oklch(0.97 0.014 70);  --on-product-2: oklch(0.88 0.03 60); }
.product--claims { --product: oklch(0.30 0.06 255);  --product-2: oklch(0.48 0.10 255); --product-soft: oklch(0.965 0.015 255); --on-product-2: oklch(0.88 0.03 255); }

body.p-page { margin: 0; background: var(--bg); color: var(--fg-1); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.p-wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6); }

/* 1. Band: header + one line of context + hero, all in the product colour (rules 9, 10, 11). */
.p-band { background: var(--product); color: var(--on-product); }
.p-top .p-wrap { height: 64px; display: flex; align-items: center; gap: var(--space-7); }
.p-top img { height: 22px; display: block; }
.p-top nav { display: flex; gap: var(--space-6); margin-left: auto; align-items: center; }
.p-top nav a:not(.il-btn) { color: var(--on-product-2); text-decoration: none; font-size: 15px; }
.p-top nav a:not(.il-btn):hover { color: var(--on-product); }
.p-context { border-bottom: 1px solid color-mix(in srgb, var(--on-product) 14%, transparent); }
.p-context .p-wrap { height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--on-product-2); }
.p-hero { display: grid; grid-template-columns: 1fr 520px; gap: var(--space-9); padding: var(--space-9) 0 var(--space-10); align-items: start; }
.p-eyebrow { font-size: 15px; color: var(--on-product-2); margin: 0 0 var(--space-3); }
.p-h1 { font-family: var(--font-marca); font-size: 52px; line-height: 1.04; letter-spacing: -.035em; font-weight: 700; margin: 0 0 var(--space-5); color: var(--on-product); }
.p-lead { font-size: 19px; line-height: 1.45; margin: 0 0 var(--space-7); max-width: 30em; color: var(--on-product); }
.p-ask { display: grid; gap: var(--space-4); max-width: 440px; }
.p-band .il-label { color: var(--on-product-2); }
.p-band .p-ask .il-input { height: 48px; font-size: 17px; background: #fff; color: #111; }
.p-facts { margin-top: var(--space-6); font-size: 15px; color: var(--on-product-2); display: flex; gap: var(--space-6); flex-wrap: wrap; }
.p-facts b { color: var(--on-product); font-weight: 600; }

/* 2. Drop zone, for products that read a file (rule 1: the tool is the hero). */
.p-drop { display: block; border: 2px dashed color-mix(in srgb, var(--on-product) 40%, transparent); border-radius: var(--radius-xl); padding: var(--space-8) var(--space-6); text-align: center; cursor: pointer; transition: border-color var(--dur-2, 144ms) ease; max-width: 440px; }
.p-drop:hover, .p-drop.is-over { border-color: var(--on-product); }
.p-drop b { display: block; font-size: 19px; margin-bottom: var(--space-2); color: var(--on-product); }
.p-drop span:not(.il-btn) { display: block; color: var(--on-product-2); font-size: 14px; }
.p-drop .il-btn { margin-top: var(--space-5); }
.p-privacy { font-size: 14px; color: var(--on-product-2); margin-top: var(--space-4); max-width: 440px; }

/* 3. Result card: the product answering, white, on the band (rules 2, 3). Four states: empty, loading, error, done. */
.p-result { background: var(--surface-1); color: var(--fg-1); border-radius: var(--radius-xl); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2); padding: var(--space-7); }
.p-result__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); font-size: 14px; color: var(--fg-3); margin-bottom: var(--space-4); }
.p-result h2 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin: 0 0 var(--space-2); }
.p-result__why { color: var(--fg-2); margin: 0 0 var(--space-4); line-height: 1.45; font-size: 15px; }
.p-result__body { transition: opacity var(--dur-3, 233ms) var(--ease-exp-out, ease-out); }
.p-result__body.is-changing { opacity: .35; }
.p-result .il-label { color: var(--fg-2); }
.p-result .il-btn--primary { background: var(--product); }
.p-result form { display: grid; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.p-result .il-choice { font-size: 14px; color: var(--fg-2); display: flex; }
.p-result .p-big { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; margin: var(--space-2) 0; }
.p-list { margin: 0 0 var(--space-5); padding: 0; list-style: none; counter-reset: d; }
.p-list li { counter-increment: d; display: grid; grid-template-columns: 28px 1fr auto; gap: var(--space-2); padding: var(--space-3) 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.p-list li::before { content: counter(d); font-weight: 700; font-variant-numeric: tabular-nums; }
.p-list span { display: block; color: var(--fg-3); font-size: 14px; }
.p-list .il-num { font-weight: 600; white-space: nowrap; }
/* States. Empty: says what will appear and offers the example. Loading: the brand curve, never a spinner.
   Error: what happened and how to fix it, in one line, next to the action (rule 5). */
.p-state { text-align: left; padding: var(--space-4) 0; }
.p-state h2 { font-size: 22px; }
.p-state p { color: var(--fg-2); line-height: 1.5; margin: 0 0 var(--space-5); }
.p-curve { width: 72px; height: 40px; display: block; margin-bottom: var(--space-4); }
.p-curve path { fill: none; stroke: var(--product); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: p-grow 1600ms var(--ease-exp-out, ease-out) infinite; }
@keyframes p-grow { to { stroke-dashoffset: 0; } }
.p-error { display: flex; gap: var(--space-3); align-items: flex-start; background: var(--error-soft); color: var(--error); border-radius: var(--radius-md, 10px); padding: var(--space-4); font-size: 15px; line-height: 1.45; margin-bottom: var(--space-4); }
.p-error b { display: block; color: var(--fg-1); }
.p-thanks { display: none; } .is-sent .p-thanks { display: block; } .is-sent form { display: none; }

/* 3b. B layout (?layout=wide): the result under the question, full width, every line (mxtoolbox, ssllabs). */
.p-hero--wide { grid-template-columns: 1fr; }
.p-hero--wide .p-result { max-width: none; }

/* 3c. Split bar: how a real total splits, with a legend of figures. The colour says the state (hecho, toca, pausa). */
.p-bars { background: var(--surface-1); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); padding: var(--space-6); }
.p-bars__bar { display: flex; height: 56px; border-radius: var(--radius-md, 10px); overflow: hidden; gap: 2px; margin-bottom: var(--space-5); }
.p-bars__bar span { min-width: 6px; }
.p-bars .is-yes { background: var(--hecho-fill); } .p-bars .is-maybe { background: var(--toca-fill); }
.p-bars .is-no { background: color-mix(in srgb, var(--fg-1) 14%, transparent); } .p-bars .is-done { background: var(--vivo-fill); }
.p-bars__legend { margin: 0; display: grid; gap: var(--space-3); }
.p-bars__legend div { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 15px; border-top: 1px solid var(--line); padding-top: var(--space-3); }
.p-bars__legend dt { color: var(--fg-2); display: flex; align-items: center; gap: var(--space-2); }
.p-bars__legend dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-bars__legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* 4. Sections under the band: proof with a real image, how it works, price, questions (rule 9, D9 in pixel/DIFF.md). */
.p-s { padding: var(--space-9) 0; border-top: 1px solid var(--line); }
/* r6: price and questions share one section in two columns. Four short sections one under the other looked empty (team judge, r5). */
.p-pair .p-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-9); align-items: start; }
.p-pair h2 { font-size: 26px; margin-bottom: var(--space-5); }
.p-pair .p-wrap > div { min-width: 0; } /* r9: without this the price table widened the column and the page overflowed 323 px at 390 (pixel/review.mjs) */
.p-pair .il-table-wrap { overflow-x: auto; }
.p-s h2 { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin: 0 0 var(--space-7); }
.p-proof { background: var(--product-soft); border-top: 0; }
.p-proof .p-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-9); align-items: center; }
.p-proof p { color: var(--fg-2); line-height: 1.55; font-size: 17px; }
.p-proof p.p-note { font-size: 13px; color: var(--fg-3); }
.p-proof .il-stat dd { color: var(--product); }
.p-proof .p-visual { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); }
.p-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); margin: 0; padding: 0; list-style: none; counter-reset: s; }
.p-steps li { counter-increment: s; border-top: 2px solid var(--product); padding-top: var(--space-4); }
.p-steps li::before { content: counter(s); display: block; font-size: 15px; font-weight: 700; margin-bottom: var(--space-2); color: var(--product-2); }
.p-steps b { display: block; font-size: 19px; margin-bottom: var(--space-2); }
.p-steps p { margin: 0; color: var(--fg-2); line-height: 1.5; font-size: 16px; }
.p-note { color: var(--fg-3); font-size: 14px; margin-top: var(--space-4); }
.p-faq details { border-top: 1px solid var(--line); padding: var(--space-4) 0; }
.p-faq details:last-child { border-bottom: 1px solid var(--line); }
.p-faq summary { font-size: 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.p-faq summary::after { content: "+"; color: var(--fg-3); font-weight: 400; }
.p-faq details[open] summary::after { content: "−"; }
.p-faq details p { color: var(--fg-2); line-height: 1.55; margin: var(--space-3) 0 0; max-width: 46em; }

/* 5. Footer in the product colour: who, contact, sources (rule 9). */
.p-foot { background: var(--product); color: var(--on-product-2); }
.p-foot .p-wrap { padding: var(--space-9) var(--space-6) var(--space-8); display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-8); font-size: 14px; line-height: 1.6; }
.p-foot h3 { font-size: 14px; font-weight: 600; color: var(--on-product); margin: 0 0 var(--space-3); }
.p-foot a { color: var(--on-product-2); }
.p-foot img { height: 22px; display: block; margin-bottom: var(--space-4); }
.p-foot .p-legal { grid-column: 1 / -1; border-top: 1px solid color-mix(in srgb, var(--on-product) 14%, transparent); padding-top: var(--space-5); }

@media (prefers-reduced-motion: reduce) { .p-curve path { animation: none; stroke-dashoffset: 0; } .p-result__body, .p-drop { transition: none; } }
@media (max-width: 900px) {
  .p-hero, .p-proof .p-wrap, .p-steps, .p-foot .p-wrap, .p-pair .p-wrap { grid-template-columns: 1fr; } .p-hero { gap: var(--space-7); padding-top: var(--space-7); }
  .p-h1 { font-size: 36px; } .p-top nav a.p-hide-m { display: none; } .p-result { padding: var(--space-5); }
}
