/*
 * Podstrona /cennik (Page/Pricing.twig) - kalkulator pakietu (calc, seg), porownanie (cmp), model
 * kredytow (points, usage), przelicznik z suwakiem (credits), dodatki (addons), start (start-card).
 * Wylacznie var(--*) z tokens.css. Karty cennika, przelacznik, FAQ, kroki sa w app.css.
 */

.section__note--spaced { margin-top: 22px; }

/* ===== Kalkulator "Dobierz plan" ===== */
.calc {
  margin-top: 56px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.calc__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.calc__form { padding: 34px 32px; }

.calc__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.3px;
  color: var(--brand-navy);
}

.calc__lead {
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: pretty;
}

.calc__label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--brand-navy);
}

.seg-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.seg-row--last { margin-bottom: 26px; }

.seg {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--neutral-0);
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.seg:hover { border-color: var(--border-strong); }

.seg:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.seg.is-active {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: var(--text-onDark);
}

.seg--pink.is-active {
  background: var(--brand-pink);
  border-color: var(--brand-pink);
}

.calc__result {
  display: flex;
  flex-direction: column;
  padding: 34px 32px;
  background: var(--brand-navy);
  color: var(--text-onDark);
}

.calc__main {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.calc__intro {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--on-dark-60);
}

.calc__intro b { color: var(--text-onDark); }

.calc__plan { color: var(--brand-green) !important; }

.calc__box {
  display: flex;
  flex-direction: column;
  padding: 8px 18px;
  border: 1px solid var(--brand-pink);
  border-radius: var(--radius-lg);
  background: var(--fill-on-dark);
}

.calc__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  font-size: 13.5px;
  color: var(--on-dark-72);
}

.calc__incl {
  color: var(--text-onDark);
  font-weight: var(--fw-semibold);
}

.calc__val {
  font-weight: var(--fw-bold);
  color: var(--text-onDark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc__val--green { color: var(--brand-green); }

.calc__val--soft {
  font-weight: var(--fw-semibold);
  color: var(--on-dark-85);
}

.calc__hint {
  margin: 0;
  padding: 0 0 11px;
  font-size: 11px;
  color: var(--on-dark-45);
}

.calc__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  font-size: 14.5px;
  font-weight: var(--fw-semibold);
}

.calc__total-val {
  font-size: 32px;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.5px;
  color: var(--brand-green);
  font-variant-numeric: tabular-nums;
}

.calc__cta {
  margin: 20px auto 0;
  padding-left: 36px;
  padding-right: 36px;
}

.calc__fine {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--on-dark-45);
}

.calc__custom-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.4px;
}

.calc__custom-text {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--on-dark-72);
}

.calc__custom .calc__cta { margin-top: 0; }

.calc__footnote {
  margin: 14px 0 0;
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--text-muted);
}

/* ===== Porownanie pakietow ===== */
.cmp {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.cmp__head,
.cmp__row {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  align-items: center;
}

.cmp__head {
  padding: 18px 24px;
  background: var(--surface-page);
  border-bottom: 1px solid var(--border-subtle);
  align-items: end;
}

.cmp__col { text-align: center; }

.cmp__col-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--brand-navy);
}

.cmp__col-name--accent { color: var(--brand-pink); }

.cmp__col-price {
  font-size: 12px;
  color: var(--text-muted);
}

.cmp__wrap { position: relative; }

.cmp__body {
  max-height: 420px;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
}

.cmp.is-open .cmp__body { max-height: 5200px; }

.cmp__row {
  padding: 13px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-card);
}

.cmp__row--head { background: var(--green-tint); }

.cmp__name {
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  color: var(--text-body);
}

.cmp__row--head .cmp__name {
  grid-column: 1 / -1;
  font-weight: var(--fw-bold);
}

.cmp__cell {
  text-align: center;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--brand-navy);
}

.cmp__cell--yes { color: var(--brand-green); }

.cmp__cell--no { color: var(--neutral-400); }

.cmp__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 170px;
  padding-bottom: 18px;
  background: var(--gradient-fade-white);
}

.cmp.is-open .cmp__fade { display: none; }

.cmp__more { box-shadow: var(--shadow-md); }

.cmp__less-wrap {
  display: none;
  justify-content: center;
  padding: 16px 24px 0;
}

.cmp.is-open .cmp__less-wrap { display: flex; }

.cmp__less {
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.cmp__less:hover { color: var(--brand-navy); }

.cmp__foot {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 22px 24px;
  background: var(--surface-page);
}

/* ===== Kredyty: punkty i karta zuzycia ===== */
.credits-lead { margin-bottom: 28px; }

.points {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.points--dark { gap: 22px; }

.points__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.points__check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--green-tint-strong);
  color: var(--brand-green);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}

.points__check--sm {
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.points__body {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--text-body);
}

.points__body b { color: var(--brand-navy); }

.points__title {
  margin: 0 0 5px;
  font-size: 14.5px;
  font-weight: var(--fw-bold);
  color: var(--text-onDark);
}

.points__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--on-dark-60);
}

.usage {
  width: 100%;
  max-width: 500px;
  justify-self: center;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.usage__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--brand-navy);
  color: var(--text-onDark);
  font-size: 13.5px;
  font-weight: var(--fw-bold);
}

.usage__period {
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
  color: var(--on-dark-60);
}

.usage__body { padding: 26px 24px 8px; }

.usage__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.usage__label {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.usage__value {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}

.usage__big {
  font-size: 26px;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.3px;
  color: var(--brand-navy);
  white-space: nowrap;
}

.usage__of {
  font-size: 13px;
  color: var(--text-muted);
}

.usage__pct { text-align: right; }

.usage__pct .usage__label { margin-bottom: 0; }

.usage__pct-num {
  font-size: 18px;
  font-weight: var(--fw-extrabold);
  color: var(--brand-green);
}

.usage__bar {
  display: flex;
  gap: 3px;
  margin: 20px 0 10px;
}

.usage__bar-used {
  flex: 62;
  height: 9px;
  border-radius: 5px 2px 2px 5px;
  background: var(--brand-green);
}

.usage__bar-rest {
  flex: 38;
  height: 9px;
  border-radius: 2px 5px 5px 2px;
  background: var(--surface-sunken);
}

.usage__scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.usage__rows { padding: 6px 24px 24px; }

.usage__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.usage__row-val {
  text-align: right;
  font-weight: var(--fw-semibold);
  color: var(--brand-navy);
}

/* ===== Przelicznik kredytow (navy) ===== */
.credits-section { padding: 96px 0; }

.grid--split-credits {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
}

.credits { width: 100%; }

.credits__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}

.credits__label {
  font-size: 13.5px;
  font-weight: var(--fw-semibold);
  color: var(--on-dark-60);
}

.credits__amount {
  font-size: 19px;
  font-weight: var(--fw-extrabold);
  color: var(--text-onDark);
}

.credits__unit {
  font-size: 12px;
  color: var(--on-dark-45);
}

.credits__range {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.credits__range:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.credits__range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: var(--line-on-dark-strong);
}

.credits__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8.5px;
  border-radius: var(--radius-full);
  border: 2px solid var(--neutral-0);
  background: var(--brand-pink);
  box-shadow: var(--shadow-accent);
}

.credits__range::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: var(--line-on-dark-strong);
}

.credits__range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--neutral-0);
  background: var(--brand-pink);
}

.credits__scale {
  position: relative;
  height: 18px;
  margin-bottom: 34px;
  font-size: 11.5px;
  color: var(--on-dark-45);
}

.credits__mark {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.credits__mark--1 { left: 2%; }
.credits__mark--2 { left: 21%; }
.credits__mark--3 { left: 47%; }
.credits__mark--4 { left: 74%; }
.credits__mark--5 { left: 98%; }

.credits__results {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.credits__caption {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--on-dark-55);
}

.credits__time {
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.3px;
  line-height: 1;
  color: var(--brand-green);
}

.credits__cost-wrap { text-align: right; }

.credits__cost {
  font-size: 26px;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.3px;
  color: var(--text-onDark);
}

/* ===== Dodatki ===== */
.eyebrow--row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow__status {
  padding: 5px 13px;
  border: 1.5px solid var(--brand-pink);
  border-radius: 9px;
  background: var(--pink-tint);
  font-size: 13px;
  font-weight: var(--fw-bold);
  color: var(--brand-pink);
}

.addons__title {
  max-width: 760px;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

.addons__lead {
  margin-top: 0;
  font-size: 15px;
  line-height: 1.8;
}

.addons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 32px;
  margin: 48px 0 44px;
}

.addon__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--green-tint-strong);
  color: var(--brand-green);
}

.addon__title {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: var(--fw-bold);
  color: var(--brand-navy);
}

.addon__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ===== Start (CTA na bialym) ===== */
.start { padding: 96px 0; }

.start__copy { padding-bottom: 32px; }

.start__lead {
  max-width: 480px;
  margin: 0 0 30px;
}

.start__copy .section__title { margin-bottom: 16px; }

.start-card {
  width: 100%;
  max-width: 460px;
  justify-self: end;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.start-card__head {
  margin: 0;
  padding: 16px 24px;
  background: var(--brand-navy);
  color: var(--text-onDark);
  font-size: 13.5px;
  font-weight: var(--fw-bold);
}

.start-card__body { padding: 26px 24px 28px; }

/* Animowana "iskra" na linii krokow (mockup: tillio-flow) */
.step-list--flow .step-list__item::before { overflow: hidden; }

.step-list--flow .step-list__item::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  width: 2px;
  height: 24px;
  border-radius: 2px;
  background: var(--brand-pink);
  animation: tillio-flow 2.6s linear infinite;
}

.step-list--flow .step-list__item:nth-child(2)::after { animation-delay: 1.3s; }

.step-list--flow .step-list__item:last-child::after { display: none; }

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .calc__grid { grid-template-columns: 1fr; }

  .calc__form,
  .calc__result { padding: 26px 20px; }

  .cmp__head,
  .cmp__row { grid-template-columns: 1.4fr repeat(3, 1fr); }

  .grid--split-credits {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .credits-section { padding: 64px 0; }

  .addons { grid-template-columns: 1fr 1fr; }

  .start { padding: 64px 0; }

  .start__copy { padding-bottom: 0; }

  .start-card { justify-self: stretch; max-width: none; }

  .usage { max-width: none; }
}

@media (max-width: 620px) {
  .cmp__head,
  .cmp__row {
    gap: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .cmp__name { font-size: 12px; }

  .cmp__cell { font-size: 11.5px; }

  .cmp__col-name { font-size: 12.5px; }

  .cmp__col-price { font-size: 10.5px; }

  .cmp__fade { height: 140px; }

  .addons {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .credits__results { flex-direction: column; align-items: flex-start; }

  .credits__cost-wrap { text-align: left; }

  .calc__total-val { font-size: 28px; }
}
