/* PimBox — public pages (landing, legal, contact).
   Self-hosted only: no CDN, no webfonts, so a strict CSP (style-src/font-src 'self') holds.

   Design note: these tokens are the SAME system as app.css, on purpose. The signed-in product is
   a slate canvas with a copper action colour and a mono face for identifiers - app.css calls it
   "a catalogue/packaging product, not another cornflower-blue dashboard". This page used to be a
   navy page with a cornflower-blue accent, i.e. precisely the look the product defines itself
   against, so a visitor met one brand before signing up and a different one after. It now shares
   the app's palette, its dark-only theme and its identifier motif.

   A PIM is a system of identifiers, so the mono face carries them: eyebrows, section labels,
   prices, offer ids, EANs and SKUs. Everything else stays quiet. */

:root {
  --bg: #0c1116;
  --bg-deep: #080c10;
  --surface: #131a21;
  --fg: #e6edf3;
  --muted: #8b9aa7;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  --accent: #e0913f;
  --accent-hover: #eda558;
  --on-accent: #1a1207;
  --sky: #7cb3e8;
  --ok: #5bd6a0;

  --radius: 10px;
  --radius-lg: 14px;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Dark only, matching the app: native controls, scrollbars and autofill follow. */
  color-scheme: dark;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.6; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: 680px; }

/* Mono labels: the "catalogue record" cue, used for eyebrows and section kickers. */
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 0.75rem;
  margin: 0 0 0.9rem;
}

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 1.25rem; max-width: 1100px; margin: 0 auto; flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--fg); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
/* min-width: 0 lets this shrink below max-content, which is what allows its own flex-wrap to put
   the buttons on a second row on a narrow phone instead of widening the header. */
.nav nav {
  display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap;
  min-width: 0; justify-content: flex-end;
}
/* Plain nav links are muted; the buttons keep their own colours. Without :not() this descendant
   selector (0,1,2) outranks .btn--solid (0,1,0) and the primary CTA renders muted-on-copper. */
.nav nav a:not(.btn) { color: var(--muted); }
.nav nav a:not(.btn):hover { color: var(--fg); text-decoration: none; }

.btn {
  display: inline-block; padding: 0.55rem 1.05rem; border-radius: var(--radius);
  font-weight: 600; border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { text-decoration: none; }
.btn--solid { background: var(--accent); color: var(--on-accent); }
.btn--solid:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 0.8rem 1.5rem; font-size: 1.05rem; }

/* Same focus ring as the signed-in app (app.css): one treatment across the whole product. The
   offset puts it on the page background rather than on a button fill, which is what keeps it
   visible on the copper CTA. */
a:focus-visible, summary:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
@supports not selector(:focus-visible) {
  a:focus, summary:focus, button:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
}

/* Skip link, ported from the app shell so both halves of the product behave the same. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 0.6rem 1rem; background: var(--accent); color: var(--on-accent);
  font-weight: 650; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Hero: copy on the left, the signature record on the right. */
.hero { padding: 4.5rem 0 4rem; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem; align-items: center;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0 0 1rem; letter-spacing: -0.02em; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0; }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.cta-note { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0; }

/* Signature: scattered marketplace identifiers collapsing into one product record. This is
   literally what the product does, so it is the hero rather than a decorative gradient. */
.merge { display: grid; gap: 0.75rem; }
.merge-label {
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
}
.merge-scatter { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-family: var(--mono); font-size: 0.75rem; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.25rem 0.6rem; white-space: nowrap;
}
.chip span { color: var(--muted); }
.merge-arrow { color: var(--accent); text-align: center; line-height: 1; font-size: 1.1rem; }
.record {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;
}
.record-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
  padding-bottom: 0.7rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--line);
}
.record-head strong { font-size: 1rem; }
.record-head .badge {
  font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ok); white-space: nowrap;
}
.record dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0; }
.record dt {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.record dd { font-family: var(--mono); font-size: 0.8rem; margin: 0; }

/* Sections */
.section { padding: 4rem 0; }
.section--alt { background: var(--bg-deep); border-block: 1px solid var(--line); }
.section h2 { font-size: 1.55rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.section-intro { color: var(--muted); margin: 0 0 2rem; max-width: 60ch; }

/* Cards. Features go two across so a sentence gets a comfortable line rather than five short
   ones; pricing stays four across on a wide screen. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.cards--features { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.feature, .plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.feature h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.feature p { color: var(--muted); margin: 0; }

/* Steps: the numbering encodes a real sequence (connect -> import -> merge -> publish), so it
   stays; laid across the row instead of one narrow column with dead space beside it. */
.steps {
  list-style: none; padding: 0; margin: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem 1.25rem;
}
.steps li { margin: 0; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--accent);
  letter-spacing: 0.1em; margin-bottom: 0.5rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--line);
}
.steps li strong { display: block; margin-bottom: 0.25rem; font-size: 0.98rem; }
.steps li span { color: var(--muted); }

/* Pricing */
.plan { display: flex; flex-direction: column; }
.plan h3 {
  margin: 0; font-size: 0.8rem; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
}
.plan--featured { border-color: var(--accent); }
.plan--free { border-style: dashed; }
.plan .price {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 600; color: var(--fg);
  margin: 0.5rem 0 0.2rem; letter-spacing: -0.02em;
}
.plan .plan-note { font-size: 0.8rem; color: var(--muted); margin: 0 0 1.1rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.25rem; flex: 1 1 auto; }
.plan ul li {
  padding: 0.35rem 0; color: var(--muted); font-size: 0.92rem;
  border-top: 1px solid var(--line);
}
.plan ul li:first-child { border-top: 0; }
.plan .unlimited { color: var(--fg); }
/* An exclusion must not read like a feature. */
.plan .excluded { opacity: 0.72; }
.plan .excluded::before { content: "— "; }
.plan .btn { align-self: stretch; text-align: center; }
.pricing-note { color: var(--muted); font-size: 0.9rem; margin: 1.25rem 0 0; max-width: 70ch; }

/* Roadmap */
.soon { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; max-width: 60ch; }
.soon li { color: var(--muted); padding-left: 1.1rem; position: relative; }
.soon li::before {
  content: "+"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono);
}

/* FAQ: the default disclosure triangle was the one bit of unstyled browser chrome on the page.
   The list is width-constrained here rather than by a centred narrow wrap, so its heading stays
   on the same left gutter as every other section. */
#faq details { max-width: 62ch; }
details { border-bottom: 1px solid var(--line); }
details summary {
  cursor: pointer; font-weight: 600; padding: 1rem 2rem 1rem 0; position: relative;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); color: var(--accent); font-size: 1.1rem;
}
details[open] summary::after { content: "\2212"; }
details summary:hover { color: var(--accent); }
details p { color: var(--muted); margin: 0 0 1rem; max-width: 70ch; }

/* CTA final */
.cta-final {
  padding: 4.5rem 0; text-align: center; background: var(--bg-deep);
  border-top: 1px solid var(--line);
}
.cta-final h2 { margin: 0 0 0.5rem; font-size: 1.55rem; }
.cta-final p { color: var(--muted); margin: 0 0 1.5rem; }

/* Legal / info pages */
.legal h1 { margin-bottom: 0.35rem; }
.legal h2 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--fg); }
.legal ul { padding-left: 1.15rem; margin: 0.5rem 0 1rem; }
.legal li { margin-bottom: 0.5rem; }
.legal li::marker { color: var(--accent); }
.legal .lead { color: var(--fg); font-size: 1.05rem; }
/* Effective-from line and the registry footer: mono, like every other identifier on the site. */
.legal-meta {
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 1.25rem;
}
.legal h1 + .legal-meta { border-top: 0; padding-top: 0; margin-top: 0.75rem; }
.muted { color: var(--muted); }

/* Cookie notice: docked card, not a full-width curtain - it acknowledges necessary cookies rather
   than gating the page, so it stays out of the way of the CTA. */
.cookie-notice {
  position: fixed; z-index: 90; left: 1.25rem; right: 1.25rem; bottom: 1.25rem;
  max-width: 560px; margin-left: auto;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.cookie-notice[hidden] { display: none; }
.cookie-notice__inner {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; flex-wrap: wrap;
}
.cookie-notice__text { margin: 0; flex: 1 1 260px; color: var(--muted); font-size: 0.9rem; }
.cookie-notice__label {
  display: block; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.7rem; color: var(--accent); margin-bottom: 0.3rem;
}
.cookie-notice__ok { flex: 0 0 auto; padding: 0.5rem 1.1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.75rem 0; }
.foot-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.25rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted);
  font-size: 0.9rem;
}
.foot-inner nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot-inner a { color: var(--muted); }
.foot-inner a:hover { color: var(--fg); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 3rem 0; }
  .cookie-notice { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }
  .cookie-notice__ok { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
