/* Card of an offer: the .plan, .glow, .spot, .pill, .price, .feat, .todo, .act and .btn rules of the Unisson
   « Tarifs » model, selectors moved into the shadow tree, colours read from the --pack-* tokens. The host is the grid
   item of bythium-pack-plans; the article fills it, so the actions sit at the bottom of every card. The white inner
   ring of the primary button is --bythium-on-brand-primary, white in both themes as in the model. The masks only read
   alpha, so any opaque token stands in for the model's black. Gradients blend in sRGB, as the model's hex colours do.
   The base sheet's link rules are restated. Motion only under no-preference: the featured card rises 10 px from
   1100 px, as the model does when motion is allowed. */
:host {
  display: block;
  min-inline-size: 0;
  color: var(--pack-ink);
  font:
    16px / 1.6 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-feature-settings: normal;
  letter-spacing: normal;
  vertical-align: baseline;
  -webkit-font-smoothing: antialiased;
  /* The host carries the offer's anchor (« #p-pro »): clear of the sticky header. */
  scroll-margin-block-start: 90px;
}
:host([hidden]) {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[part="name"],
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--pack-focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* The lit card and its spotlight. */
.glow {
  position: relative;
  border-radius: 18px;
  background: var(--pack-panel);
  border: 1px solid var(--pack-line);
  box-shadow: var(--pack-shadow);
}
.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(in srgb 140deg, var(--pack-c1), transparent 35%, transparent 65%, var(--pack-c2));
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(var(--pack-ink) 0 0) content-box,
    linear-gradient(var(--pack-ink) 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(var(--pack-ink) 0 0) content-box exclude,
    linear-gradient(var(--pack-ink) 0 0);
}
.spot {
  overflow: hidden;
}
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--pack-a1), var(--pack-a2) 45%, transparent 75%);
}
.spot:hover::before {
  opacity: 0.35;
}
.spot > *,
::slotted(*) {
  position: relative;
}

.plan {
  display: flex;
  flex-direction: column;
  block-size: 100%;
  padding: 28px 26px 26px;
  border-radius: 22px;
  backdrop-filter: blur(14px);
}
.featured {
  background: radial-gradient(ellipse at 50% -10%, var(--pack-a2), transparent 60%), var(--pack-panel);
  box-shadow:
    0 0 0 1px var(--pack-line2) inset,
    0 0 70px -18px var(--pack-a2),
    var(--pack-shadow);
}
.featured::after {
  opacity: 1;
  background: linear-gradient(in srgb 140deg, var(--pack-c1), var(--pack-c2) 50%, var(--pack-c3));
}

/* Head: name and badges. */
.ph {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
[part="name"] {
  font:
    800 26px / 1.15 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  letter-spacing: -0.03em;
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 24px;
  padding: 0 9px;
  border-radius: 99px;
  font:
    700 11px / 1 ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pill.pro {
  color: var(--pack-btnink);
  background: linear-gradient(in srgb 120deg, var(--pack-btn1), var(--pack-btn2));
}
.pill.target {
  color: var(--pack-link);
  border: 1px dashed var(--pack-line2);
  background: var(--pack-panel2);
}
.pill.free {
  color: var(--pack-ink);
  border: 1px solid var(--pack-line2);
  background: var(--pack-panel2);
}
.pill.free b {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--pack-c3);
  box-shadow: 0 0 10px var(--pack-c3);
}

/* Price. */
.price {
  margin-block-start: 22px;
  font:
    800 clamp(30px, 3.2vw, 40px) / 1.05 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  letter-spacing: -0.035em;
}
.price.free {
  inline-size: fit-content;
  padding-block-end: 0.06em;
  background: linear-gradient(in srgb 100deg, var(--pack-wm1), var(--pack-wm3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price.tbd {
  font-size: clamp(26px, 2.6vw, 32px);
}
[part="price-note"] {
  margin-block-start: 6px;
  font:
    600 12.5px / 1.5 ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  color: var(--pack-mut);
}
[part="summary"] {
  margin-block-start: 16px;
  color: var(--pack-mut);
  font-size: 15.5px;
}

/* Included items. */
[part="includes"] {
  margin-block-start: 22px;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--pack-line);
  font:
    700 12px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pack-mut);
}
[part="features"] {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 15px;
}
[part="feature"] {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
}
.ok {
  display: grid;
  place-items: center;
  inline-size: 22px;
  block-size: 22px;
  margin-block-start: 1px;
  border-radius: 7px;
  color: var(--pack-c3);
  background: var(--pack-panel2);
  box-shadow: 0 0 0 1px var(--pack-line2) inset;
}
[part="feature"] .pill {
  margin-inline-start: 6px;
  vertical-align: 1px;
  min-block-size: 20px;
  padding: 0 7px;
  font-size: 10.5px;
}
small {
  display: block;
  color: var(--pack-mut);
  font-size: 13.5px;
  margin-block-start: 2px;
}

/* The dashed box of an offer still to be defined. */
[part="todo"] {
  margin-block-start: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px dashed var(--pack-line2);
  background: var(--pack-panel2);
  color: var(--pack-mut);
  font-size: 15px;
}
[part="todo"] strong {
  display: block;
  margin-block-end: 4px;
  color: var(--pack-ink);
  font:
    700 13px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.04em;
}

/* Action and its note, at the bottom. */
[part="actions"] {
  margin-block-start: auto;
  padding-block-start: 26px;
  display: grid;
  gap: 10px;
}
[part="cta-note"] {
  font-size: 13px;
  color: var(--pack-mut);
  text-align: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  inline-size: 100%;
  min-block-size: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font:
    700 15px Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  text-decoration: none;
  cursor: pointer;
  color: var(--pack-btnink);
  background: linear-gradient(in srgb 120deg, var(--pack-btn1), var(--pack-btn2) 60%, var(--pack-btn3));
  background-size: 160% 100%;
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--bythium-on-brand-primary) 18%, transparent) inset,
    0 10px 30px -10px var(--pack-a2),
    0 0 28px -6px var(--pack-a1);
  white-space: nowrap;
}
.btn:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--bythium-on-brand-primary) 30%, transparent) inset,
    0 14px 36px -10px var(--pack-a2),
    0 0 40px -4px var(--pack-a1);
}
.btn.ghost {
  color: var(--pack-ink);
  background: var(--pack-panel2);
  box-shadow: 0 0 0 1px var(--pack-line2) inset;
  backdrop-filter: blur(10px);
}

@media (max-width: 1150px) {
  .plan {
    padding: 24px 20px 22px;
  }
}
@media (max-width: 700px) {
  .plan {
    padding: 22px 18px 20px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .spot::before {
    transition: opacity 0.3s;
  }
  .btn {
    transition:
      background-position 300ms,
      transform 200ms,
      box-shadow 300ms;
  }
}
@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
  .featured {
    transform: translateY(-10px);
  }
}
/* Forced colours: the gradients and the lights are dropped, the card and the buttons keep a visible edge. */
@media (forced-colors: active) {
  .glow::after,
  .spot::before {
    display: none;
  }
  .glow,
  .btn,
  .pill {
    border: 1px solid CanvasText;
  }
  .price.free {
    background: none;
    color: CanvasText;
  }
}
