/* ============================================================================
   /pricing — plans page layout
   ----------------------------------------------------------------------------
   The LAYOUT and component shapes come from the /preview-b-final reference:
   a dark split hero with an embossed "artifact" price card, a row of plan
   cards with one featured, a payment-trust strip, and a disclosure FAQ.

   The PALETTE and TYPE do NOT come from the preview. Every colour here resolves
   to a production token from assets/css/styles.css (--color-primary*, the
   dark-theme surfaces, --color-text*, --color-border*), and the type is
   Montserrat via --font-family. No teal, no coral, no Source Serif, no
   JetBrains Mono.

   SCOPING: every rule is prefixed with `body.pricing-v2`. Class names like
   .plan, .price-card, .faq-item, .section and .pricing-page already exist in
   the global styles.css for other pages; the body-class prefix outranks those
   (0,2,x vs 0,1,x) without editing them.
   ========================================================================== */

body.pricing-v2 {
  /* Page-local roles, all resolved from production tokens. */
  --pr-field:        var(--color-surface-darker);   /* dark field — Vitrine teal-dark */
  --pr-field-2:      #051f23;
  --pr-accent:       var(--color-primary-light);    /* reads on the dark field */
  --pr-accent-glow:  rgba(42, 138, 146, 0.22);
  --pr-on-dark:      var(--color-on-dark);
  --pr-on-dark-dim:  rgba(241, 237, 227, 0.74);
  --pr-on-dark-line: rgba(241, 237, 227, 0.16);
  --pr-paper:        var(--color-bg);
  --pr-paper-2:      var(--color-bg-light);
  --pr-line:         var(--color-border-light);
  --pr-ease:         var(--ease);
  --pr-col:          clamp(20rem, 92vw, 74rem);

  background: var(--color-bg);
}

body.pricing-v2 .col {
  width: var(--pr-col);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 28px);
}
body.pricing-v2 .section { padding: clamp(48px, 7vh, 88px) 0; }

/* ── Split hero ─────────────────────────────────────────────────────────── */
body.pricing-v2 .shero {
  position: relative; overflow: clip;
  color: var(--pr-on-dark);
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(63, 141, 147, 0.28), transparent 52%),
    radial-gradient(90% 80% at -5% 110%, rgba(7, 51, 56, 0.7), transparent 60%),
    linear-gradient(160deg, var(--color-primary-darker) 0%, var(--pr-field) 55%, var(--pr-field-2) 100%);
}
body.pricing-v2 .shero::before {
  content: ''; position: absolute; right: -8%; bottom: -35%; width: 58%; height: 125%;
  background: radial-gradient(ellipse at center, rgba(63, 141, 147, 0.14), transparent 64%);
  pointer-events: none;
}
body.pricing-v2 .shero__grid {
  position: relative; z-index: 1;
  display: grid; gap: 30px; align-items: center;
  padding-block: clamp(44px, 8vh, 92px) clamp(48px, 8vh, 96px);
}
@media (min-width: 900px) {
  body.pricing-v2 .shero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 60px; }
}

body.pricing-v2 .shero .eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(63, 141, 147, 0.12); color: var(--pr-accent);
  border: 1px solid rgba(63, 141, 147, 0.32);
  font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 15px; border-radius: var(--radius-full); margin: 0 0 22px;
}
body.pricing-v2 .shero .eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--pr-accent); box-shadow: 0 0 0 4px var(--pr-accent-glow);
}
body.pricing-v2 .shero h1 {
  font-family: var(--font-family); font-weight: 700; color: var(--pr-on-dark);
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: -0.022em;
  margin: 0; max-width: 18ch; text-wrap: balance;
}
/* The accent word carries an underline stroke so the eye lands on it. */
body.pricing-v2 .shero h1 em {
  position: relative; font-style: normal; color: var(--pr-accent); white-space: nowrap;
}
body.pricing-v2 .shero h1 em::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 0.08em;
  background: linear-gradient(90deg, var(--pr-accent), rgba(63, 141, 147, 0.3));
  border-radius: 2px; transform-origin: left; transform: scaleX(0);
  animation: pr-emrule 1s var(--pr-ease) 0.35s forwards;
}
@keyframes pr-emrule { to { transform: scaleX(1); } }
body.pricing-v2 .shero__sub {
  margin: 20px 0 0; max-width: 50ch; color: var(--pr-on-dark-dim);
  font-size: clamp(1rem, 1.4vw, 1.16rem); line-height: 1.6;
}
body.pricing-v2 .shero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ── The artifact: a mini price card embossed into the hero ─────────────── */
body.pricing-v2 .artifact {
  position: relative;
  background: linear-gradient(150deg, var(--color-surface), var(--color-bg-light));
  color: var(--color-text); border-radius: var(--radius-md);
  padding: 26px 26px 22px;
  box-shadow: 0 30px 60px rgba(7, 51, 56, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.7);
  transform: rotate(-1.4deg);
}
body.pricing-v2 .artifact::before {
  content: ''; position: absolute; inset: 9px;
  border: 1px solid rgba(13, 92, 99, 0.3); border-radius: var(--radius-sm); pointer-events: none;
}
body.pricing-v2 .artifact__tag {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-primary-dark);
}
body.pricing-v2 .artifact__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 4px; }
body.pricing-v2 .artifact__big {
  font-family: var(--font-family); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--color-text);
}
body.pricing-v2 .artifact__note { margin: 4px 0 0; font-size: 0.82rem; color: var(--color-text-muted); }
body.pricing-v2 .artifact__line { height: 1px; background: rgba(13, 92, 99, 0.18); margin: 16px 0; }
body.pricing-v2 .artifact dl { margin: 0; display: grid; gap: 9px; }
body.pricing-v2 .artifact dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
body.pricing-v2 .artifact dt { color: var(--color-text-muted); font-size: 0.86rem; }
body.pricing-v2 .artifact dd { margin: 0; font-weight: 700; color: var(--color-text); font-size: 0.92rem; }
@media (prefers-reduced-motion: reduce) {
  body.pricing-v2 .artifact { transform: none; }
  body.pricing-v2 .shero h1 em::after { transform: scaleX(1); animation: none; }
}

/* ── Plan cards ─────────────────────────────────────────────────────────── */
body.pricing-v2 .price-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 20px; margin-top: 8px; align-items: stretch;
}
body.pricing-v2 .plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--pr-paper); color: var(--color-text);
  border: 1px solid var(--color-border-subtle); border-radius: var(--radius-xl);
  padding: 28px 24px 24px; margin: 0; min-width: 0;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
body.pricing-v2 .plan:hover {
  transform: translateY(-4px); border-color: rgba(63, 141, 147, 0.45); box-shadow: var(--shadow-xl);
}
body.pricing-v2 .plan--featured {
  background: var(--pr-field); color: var(--pr-on-dark); border-color: transparent;
  box-shadow: 0 10px 30px rgba(7, 51, 56, 0.22), 0 30px 60px rgba(7, 51, 56, 0.18);
}
body.pricing-v2 .plan--featured:hover { transform: translateY(-6px); }
body.pricing-v2 .plan__tag {
  position: absolute; top: -12px; left: 24px;
  background: var(--color-primary); color: var(--color-text);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-full);
}
body.pricing-v2 .plan__name { display: block; font-weight: 700; font-size: 1.05rem; margin: 0 0 4px; }
body.pricing-v2 .plan__desc {
  margin: 0 0 18px; font-size: 0.9rem; line-height: 1.45; color: var(--color-text-muted); min-height: 2.7em;
}
body.pricing-v2 .plan--featured .plan__desc { color: var(--pr-on-dark-dim); }
body.pricing-v2 .plan__price {
  font-family: var(--font-family); font-weight: 700;
  /* Scales down in a narrow card so "599.00 EUR" stays on one line. */
  font-size: clamp(1.7rem, 2.3vw, 2.15rem); line-height: 1.05; color: var(--color-text);
  white-space: nowrap;
}
body.pricing-v2 .plan--featured .plan__price { color: var(--pr-on-dark); }
/* The unit sits on its own line: inline, it left "6.80 EUR /" with the word
   orphaned onto the next row in every card. */
body.pricing-v2 .plan__price small {
  display: block; white-space: normal;
  font-size: 0.9rem; font-weight: 500; color: var(--color-text-muted); margin: 6px 0 0;
}
body.pricing-v2 .plan--featured .plan__price small { color: var(--pr-on-dark-dim); }
body.pricing-v2 .plan__per { margin: 6px 0 0; font-size: 0.84rem; color: var(--color-text-muted); }
body.pricing-v2 .plan--featured .plan__per { color: var(--pr-on-dark-dim); }
body.pricing-v2 .plan__list {
  list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 11px; flex: 1;
}
body.pricing-v2 .plan__list li {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  list-style: none; margin: 0; font-size: 0.9rem; line-height: 1.45; color: var(--color-text-secondary);
}
body.pricing-v2 .plan--featured .plan__list li { color: var(--pr-on-dark); }
body.pricing-v2 .plan__list svg {
  width: 14px; height: 14px; padding: 3px; box-sizing: content-box; border-radius: 50%;
  background: rgba(63, 141, 147, 0.12); color: var(--color-primary-dark); margin-top: 1px;
}
body.pricing-v2 .plan--featured .plan__list svg { background: rgba(63, 141, 147, 0.2); color: var(--pr-accent); }
body.pricing-v2 .plan .btn { width: 100%; justify-content: center; margin-top: auto; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
body.pricing-v2 .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-family); font-weight: 700; font-size: 0.95rem;
  border-radius: var(--radius-sm); border: 0; cursor: pointer; text-decoration: none;
  padding: 14px 26px;
  transition: transform var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}
body.pricing-v2 .btn-primary {
  background: var(--color-primary-dark); color: var(--color-on-dark); box-shadow: var(--shadow-primary);
}
body.pricing-v2 .btn-primary:hover:not(:disabled) {
  background: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow-primary-lg);
}
body.pricing-v2 .btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
body.pricing-v2 .btn-outline {
  border: 1.5px solid var(--color-border); color: var(--color-primary-dark); background: transparent;
}
body.pricing-v2 .btn-outline:hover { border-color: var(--color-primary); background: var(--color-primary-bg); }
/* On the featured (dark) card and in the hero, an outline needs a light edge. */
body.pricing-v2 .plan--featured .btn-outline,
body.pricing-v2 .shero .btn-outline-light {
  border: 1.5px solid rgba(238, 243, 243, 0.34); color: var(--pr-on-dark); background: transparent;
}
body.pricing-v2 .plan--featured .btn-outline:hover,
body.pricing-v2 .shero .btn-outline-light:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(238, 243, 243, 0.6); }
body.pricing-v2 .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(63, 141, 147, 0.45); }

/* The pack a guest picked before being sent to log in, marked on their return. */
body.pricing-v2 .plan--resumed {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(63, 141, 147, 0.24), var(--shadow-xl);
}
@media (prefers-reduced-motion: no-preference) {
  body.pricing-v2 .plan--resumed { animation: pr-resumed 1.6s ease-out 1; }
}
@keyframes pr-resumed {
  0%   { box-shadow: 0 0 0 0 rgba(63, 141, 147, 0.5), var(--shadow-xl); }
  100% { box-shadow: 0 0 0 3px rgba(63, 141, 147, 0.24), var(--shadow-xl); }
}

/* ── "Need more?" line — the largest pack, below the grid ───────────────── */
body.pricing-v2 .price-more { margin-top: 30px; text-align: center; }
body.pricing-v2 .price-more p {
  margin: 0; font-size: 0.96rem; line-height: 1.6; color: var(--color-text-muted);
}
body.pricing-v2 .price-more strong { color: var(--color-text); }
/* A button, because it starts a purchase — styled as the reference's link. */
body.pricing-v2 .price-more__link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--color-primary-dark);
}
body.pricing-v2 .price-more__link:hover { text-decoration: underline; }
body.pricing-v2 .price-more__link:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(63, 141, 147, 0.4); border-radius: var(--radius-sm);
}
body.pricing-v2 .price-more.plan--resumed {
  box-shadow: none; border-radius: var(--radius-sm);
  outline: 3px solid rgba(63, 141, 147, 0.35); outline-offset: 8px;
}

body.pricing-v2 .price-trust {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px;
  margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--pr-line);
}
body.pricing-v2 .price-trust img { height: 26px; width: auto; opacity: 0.82; }
body.pricing-v2 .price-trust span { font-size: 0.9rem; color: var(--color-text-muted); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
body.pricing-v2 .eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 0.9rem; color: var(--color-primary-dark); margin: 0 0 var(--spacing-md);
}
body.pricing-v2 .faq .eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--color-primary-dark); }
body.pricing-v2 .faq-list { max-width: 980px; margin-top: 20px; }
/* The global .faq-item is a rounded card with its own border, shadow, hover
   state and a 600px max-width, from the pages that use it as a boxed accordion.
   Inherited here it turned every row into a narrow bordered box instead of the
   full-width hairline rules this layout uses. Reset the whole box. */
body.pricing-v2 .faq-item {
  width: 100%; max-width: none;
  border: 0; border-top: 1px solid var(--pr-line); border-radius: 0;
  background: transparent; box-shadow: none; overflow: visible;
  padding: 0; margin: 0; transition: none;
}
body.pricing-v2 .faq-item:last-child { border-bottom: 1px solid var(--pr-line); }
body.pricing-v2 .faq-item:hover { border-color: var(--pr-line); box-shadow: none; }
body.pricing-v2 .faq-q {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 18px; padding: 22px 0; font-weight: 700; font-size: 1.08rem; line-height: 1.35; color: var(--color-text);
}
body.pricing-v2 .faq-q::-webkit-details-marker { display: none; }
body.pricing-v2 .faq-chev { flex: none; width: 20px; height: 20px; position: relative; }
body.pricing-v2 .faq-chev::before,
body.pricing-v2 .faq-chev::after {
  content: ''; position: absolute; background: var(--color-primary-dark);
  transition: transform 0.24s var(--pr-ease), opacity 0.24s var(--pr-ease);
}
body.pricing-v2 .faq-chev::before { top: 9px; left: 0; width: 20px; height: 2px; }
body.pricing-v2 .faq-chev::after { left: 9px; top: 0; width: 2px; height: 20px; }
body.pricing-v2 .faq-item[open] .faq-chev::after { transform: scaleY(0); opacity: 0; }
/* The global .faq-answer is half of a JS accordion: `max-height: 0; overflow:
   hidden`, expanded only by `.faq-question[aria-expanded=true] + .faq-answer`.
   This layout uses <details>, which has no .faq-question, so every answer stayed
   collapsed to zero height even with the row open. Undo the whole mechanism —
   and the boxed border/background the other .faq-answer rule adds. */
/* Visibility is driven by <details open>, not by a class. The two global
   .faq-answer rules fight that from both sides — one is `display: none` (opened
   by a `.open` class this markup never sets), the other is a `max-height: 0`
   accordion keyed on `.faq-question[aria-expanded]`. Both have to be undone, but
   `display` must stay tied to [open] or every answer renders permanently open. */
body.pricing-v2 .faq-answer {
  display: none;
  max-height: none; overflow: visible;
  border: 0; background: transparent; border-radius: 0; box-shadow: none;
  padding: 0 0 24px; margin: 0; width: auto;
  color: var(--color-text-muted); max-width: 72ch; font-size: 1rem; line-height: 1.6;
}
body.pricing-v2 .faq-item[open] > .faq-answer { display: block; }
body.pricing-v2 .faq-answer p { margin: 0; font-size: 1rem; color: inherit; line-height: 1.6; }
body.pricing-v2 .faq-answer a { color: var(--color-primary-dark); text-decoration: underline; }

/* ── Entrance ───────────────────────────────────────────────────────────── */
body.pricing-v2 [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--pr-ease), transform 0.6s var(--pr-ease); }
body.pricing-v2 [data-reveal].is-in { opacity: 1; transform: none; }
body.pricing-v2 [data-reveal-d="2"] { transition-delay: 0.08s; }
body.pricing-v2 [data-reveal-d="3"] { transition-delay: 0.16s; }
body.pricing-v2 [data-reveal-d="4"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  body.pricing-v2 [data-reveal] { opacity: 1; transform: none; transition: none; }
  body.pricing-v2 .plan:hover, body.pricing-v2 .btn-primary:hover:not(:disabled) { transform: none; }
}

/* ── Dark theme ─────────────────────────────────────────────────────────── */

/* In light mode the featured card stands out by being dark. On a dark page that
   reads as nothing, so it takes a lifted surface and an accent edge instead —
   this selector has to be at least as specific as the .plan rule above, which
   would otherwise flatten it back to the same fill. */

