/* ==========================================================================
   product.css — Product-specific sections: the hero app preview, the
   invoice lifecycle, the security grid, module spotlights
   and the live pricing table. Loaded after sections.css.
   ========================================================================== */

/* ---- Hero: app preview (CSS-only mock of the client app) ---- */
.hero__visual { position: relative; }
.app-preview {
  position: relative;
  max-width: 600px;
  margin-inline: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: var(--fs-sm);
}
.app-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.app-preview__dots { display: inline-flex; gap: 6px; }
.app-preview__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); display: block; }
.app-preview__url {
  font-size: var(--fs-xs);
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px var(--sp-3);
}
.app-preview__body { padding: var(--sp-4) var(--sp-4) var(--sp-3); }
.app-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.app-preview__title { font-weight: var(--fw-bold); color: var(--ink); }
.app-preview__sub { font-size: var(--fs-xs); color: var(--muted); }
.app-preview__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--brand);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.app-preview__btn svg { width: 14px; height: 14px; }
.app-preview__list { display: grid; gap: var(--sp-2); }
.app-preview__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.app-preview__row-main { display: grid; line-height: 1.5; min-width: 0; }
.app-preview__row-main b { font-weight: var(--fw-semibold); color: var(--ink); }
.app-preview__row-main small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-preview__amount { font-weight: var(--fw-semibold); color: var(--ink-700); white-space: nowrap; }
.app-preview__amount small { color: var(--muted-light); font-weight: var(--fw-regular); }
.app-preview__status {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-pill);
  padding: 2px var(--sp-2);
  white-space: nowrap;
}
.app-preview__status--ok { background: rgba(22, 163, 74, 0.12); color: var(--success-700); }
.app-preview__status--wait { background: rgba(245, 158, 11, 0.14); color: var(--warning-700); }
.app-preview__status--danger { background: rgba(220, 38, 38, 0.1); color: var(--danger-700); }
.app-preview__status--draft { background: var(--surface-2); color: var(--muted); }
.app-preview__status--sent { background: var(--brand-050); color: var(--brand-700); }

.app-preview__timeline {
  border-top: 1px solid var(--line);
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  background: var(--surface);
}
.app-preview__timeline-title { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--sp-2); }
.app-preview__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  position: relative;
}
.app-preview__steps::before,
.app-preview__steps::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset-inline: 12%;
  top: 11px;
  height: 2px;
  background: var(--line-strong);
}
.app-preview__steps::after { background: var(--success); transform-origin: right; }
.app-preview__step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px; text-align: center; }
.app-preview__step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  position: relative;
  z-index: 1;
}
.app-preview__step-dot svg { width: 14px; height: 14px; }
.app-preview__step.is-done .app-preview__step-dot { background: var(--success); border-color: var(--success); }
.app-preview__step-label { font-size: var(--fs-xs); color: var(--ink-700); font-weight: var(--fw-medium); }
.app-preview__step-time { font-size: 0.7rem; color: var(--muted-light); }

.app-preview__badge {
  background: rgba(22, 163, 74, 0.05);
  border: 1px solid rgba(22, 163, 74, 0.16);
  border-radius: var(--radius);
  margin: var(--sp-4);
  padding: var(--sp-2) var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.app-preview__badge--ok svg { width: 28px; height: 28px; color: var(--success); flex: none; }
.app-preview__badge--ok b { display: block; font-size: var(--fs-sm); }
.app-preview__badge--ok small { font-size: var(--fs-xs); color: var(--muted); }

/* Reveal the sample invoice journey once, using the existing scroll observer.
   Animate opacity/transforms only so the card keeps its size throughout. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__visual.is-visible :is(
    .app-preview__head,
    .app-preview__row,
    .app-preview__timeline-title,
    .app-preview__step,
    .app-preview__badge--ok
  ) {
    animation: preview-enter 500ms var(--ease) both;
  }
  .js .hero__visual.is-visible .app-preview__head { animation-delay: 150ms; }
  .js .hero__visual.is-visible .app-preview__row:nth-child(1) { animation-delay: 400ms; }
  .js .hero__visual.is-visible .app-preview__row:nth-child(2) { animation-delay: 650ms; }
  .js .hero__visual.is-visible .app-preview__timeline-title { animation-delay: 900ms; }
  .js .hero__visual.is-visible .app-preview__step:nth-child(1) { animation-delay: 1100ms; }
  .js .hero__visual.is-visible .app-preview__step:nth-child(2) { animation-delay: 1500ms; }
  .js .hero__visual.is-visible .app-preview__step:nth-child(3) { animation-delay: 1900ms; }
  .js .hero__visual.is-visible .app-preview__step:nth-child(4) { animation-delay: 2300ms; }
  .js .hero__visual.is-visible .app-preview__steps::after {
    animation: preview-progress 1200ms linear 1100ms both;
  }
  .js .hero__visual.is-visible .app-preview__badge--ok { animation-delay: 2800ms; }
}

@keyframes preview-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes preview-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 960px) {
  .app-preview { max-width: 560px; }
}
@media (max-width: 480px) {
  .app-preview__row { grid-template-columns: 1fr auto; }
  .app-preview__amount { display: none; }
  .app-preview__steps::before,
  .app-preview__steps::after { inset-inline: 14%; }
}

/* ---- Invoice lifecycle ----
   A numbered rail with a card per step; on narrow screens the rail turns
   vertical and runs beside the cards. */
.lifecycle {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
  position: relative;
}
/* The rail, through the centres of the first and last numbers. */
.lifecycle::before {
  content: "";
  position: absolute;
  inset-inline: 10%;
  top: 21px;
  height: 2px;
  background: linear-gradient(to left, var(--brand), var(--line-strong));
  border-radius: 2px;
}
.lifecycle__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.lifecycle__num {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: var(--fw-bold);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px var(--white);
  position: relative;
  z-index: 1;
}
.lifecycle__step--end .lifecycle__num { background: var(--brand); color: var(--white); }
.lifecycle__card {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.lifecycle__card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-050); }
.lifecycle__step--end .lifecycle__card { border-color: var(--brand-050); background: linear-gradient(180deg, var(--brand-050), var(--white) 60%); }
.lifecycle__head { display: flex; align-items: center; gap: var(--sp-3); }
.lifecycle__icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius);
  background: var(--brand-050);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lifecycle__icon svg { width: 22px; height: 22px; }
.lifecycle__title { font-size: 1.02rem; font-weight: var(--fw-semibold); margin: 0; line-height: 1.5; }
.lifecycle__text { color: var(--muted); font-size: var(--fs-sm); line-height: 1.9; margin: 0; }
/* Pinned to the bottom so the chips line up across the row. */
.lifecycle__states {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
}
.lifecycle__states-label { font-size: 0.72rem; color: var(--muted-light); margin-inline-end: var(--sp-1); }
.lifecycle__state {
  font-size: 0.72rem;
  color: var(--brand-700);
  background: var(--brand-050);
  border-radius: var(--radius-pill);
  padding: 2px var(--sp-2);
}
.lifecycle__note {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--brand-050);
  color: var(--ink-700);
  font-size: var(--fs-sm);
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  max-width: 880px;
  margin-inline: auto;
}
.lifecycle__note svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 3px; }
@media (max-width: 1024px) {
  .lifecycle { grid-template-columns: 1fr; gap: var(--sp-4); max-width: 640px; margin-inline: auto; }
  .lifecycle::before {
    inset-inline: auto;
    inset-inline-start: 21px;
    top: 22px;
    bottom: 22px;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--brand), var(--line-strong));
  }
  .lifecycle__step { flex-direction: row; align-items: flex-start; }
  .lifecycle__card:hover { transform: none; }
}

/* ---- Security grid ---- */
.security { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.security__card { display: flex; gap: var(--sp-3); }
.security__card .icon-badge { flex: none; margin-bottom: 0; width: 46px; height: 46px; }
.security__card .icon-badge svg { width: 22px; height: 22px; }
.security__card h3 { font-size: 1.05rem; font-weight: var(--fw-semibold); margin-bottom: var(--sp-1); }
.security__card p { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 960px) { .security { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .security { grid-template-columns: 1fr; } }

/* ---- Module spotlights (features page) ---- */
.module {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-8);
  align-items: center;
  padding-block: var(--sp-7);
  border-bottom: 1px solid var(--line);
}
.module:last-of-type { border-bottom: 0; }
.module--flip .module__text { order: 2; }
.module__eyebrow { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--brand-600); font-weight: var(--fw-semibold); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.module__eyebrow svg { width: 20px; height: 20px; }
.module__title { font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.module__lead { color: var(--muted); margin-bottom: var(--sp-4); }
.module__points { display: grid; gap: var(--sp-2); }
.module__points li { display: flex; gap: var(--sp-2); align-items: flex-start; color: var(--ink-700); font-size: var(--fs-sm); }
.module__points svg { width: 20px; height: 20px; color: var(--success); flex: none; margin-top: 3px; }
.module__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--sp-5);
}
.module__panel-title { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--sp-3); }
.module__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.module__chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--ink-700);
}
.module__chip--accent { border-color: var(--brand-050); background: var(--brand-050); color: var(--brand-700); font-weight: var(--fw-semibold); }
.module__kv { display: grid; gap: var(--sp-2); }
.module__kv div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
}
.module__kv div span:last-child { color: var(--muted); }
@media (max-width: 900px) {
  .module { grid-template-columns: 1fr; gap: var(--sp-5); }
  .module--flip .module__text { order: 0; }
}

/* ---- Home showcase: product mocks beside the text (reuses .module rows) ---- */
.showcase__row { grid-template-columns: 1fr 1fr; padding-block: var(--sp-7); }
.showcase__visual { min-width: 0; }
.showcase__window { width: 100%; max-width: 520px; margin-inline: auto; box-shadow: var(--shadow); }
.showcase__body { padding: var(--sp-4); display: grid; gap: var(--sp-3); }
.showcase__body .module__panel-title { margin: 0; }
.showcase__actions { margin-top: var(--sp-5); }

.showcase__statuses { display: grid; gap: var(--sp-2); }
.showcase__statuses li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.showcase__status-note { color: var(--muted); font-size: var(--fs-xs); text-align: end; }

.showcase__search {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--white);
  border: 1.5px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: 0 0 0 3px var(--brand-050);
  color: var(--ink);
}
.showcase__search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.showcase__results { display: grid; gap: var(--sp-2); }
.showcase__result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
}
.showcase__result-id { grid-column: 1; font-weight: var(--fw-semibold); text-align: start; }
.showcase__result-title { grid-column: 1; color: var(--muted); font-size: var(--fs-xs); }
.showcase__result-vat { grid-column: 2; grid-row: 1; font-size: var(--fs-xs); color: var(--ink-700); white-space: nowrap; }
.showcase__result .app-preview__status { grid-column: 2; grid-row: 2; justify-self: end; }

/* Phone frame with a mini version of the app's phone home page. */
.phone {
  width: min(100%, 280px);
  margin-inline: auto;
  padding: 10px;
  background: var(--ink);
  border-radius: 34px;
  box-shadow: var(--shadow-lg);
}
.phone__screen {
  display: grid;
  gap: var(--sp-3);
  align-content: start;
  min-height: 340px;
  padding: var(--sp-4) var(--sp-3) var(--sp-3);
  background: var(--surface);
  border-radius: 26px 26px 0 0;
}
.phone__hello { font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--ink); }
.phone__taxpayer {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.phone__avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-050);
  color: var(--brand-600);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
}
.phone__taxpayer-text { display: grid; line-height: 1.5; min-width: 0; }
.phone__taxpayer-text small { color: var(--muted); font-size: 0.7rem; }
.phone__taxpayer-text b { font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.phone__kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.phone__kpi {
  display: grid;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.phone__kpi b { font-size: 1.25rem; line-height: 1.2; }
.phone__kpi span { font-size: 0.7rem; line-height: 1.5; color: var(--muted); }
.phone__kpi--draft b { color: var(--muted); }
.phone__kpi--wait b { color: var(--warning-700); }
.phone__kpi--ok b { color: var(--success-700); }
.phone__kpi--danger b { color: var(--danger-700); }
.phone__caption { font-size: 0.7rem; color: var(--muted); text-align: center; }
.phone__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: var(--sp-2) var(--sp-2) var(--sp-3);
  background: var(--white);
  border-radius: 0 0 26px 26px;
}
.phone__tab { flex: 1 1 0; min-width: 0; text-align: center; font-size: 0.6rem; color: var(--muted); white-space: nowrap; }
.phone__tab.is-active { color: var(--brand-600); font-weight: var(--fw-semibold); }
.phone__fab {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-inline: var(--sp-1);
  border-radius: 50%;
  background: var(--brand-600);
  color: var(--white);
}
.phone__fab svg { width: 20px; height: 20px; }

/* The features not shown as a row: icon + title + one line, no boxes. */
.showcase__more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}
.showcase__more-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.showcase__more-item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.showcase__more-item b { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.showcase__more-item small { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: var(--lh-snug); }
.showcase__more-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--brand-050);
  color: var(--brand-600);
}
.showcase__more-icon svg { width: 20px; height: 20px; }
.showcase__more > .btn { flex: none; }
@media (max-width: 900px) {
  .showcase__row { grid-template-columns: 1fr; }
  .showcase__more { flex-direction: column; align-items: stretch; }
  .showcase__more-list { grid-template-columns: 1fr; gap: var(--sp-4); }
  .showcase__window { margin-inline: auto; }
}

/* ---- Live pricing ---- */
.pricing-model { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-bottom: var(--sp-7); }
@media (max-width: 860px) { .pricing-model { grid-template-columns: 1fr; } }
.pricing-group + .pricing-group { margin-top: var(--sp-7); }
.pricing-group__title { font-size: var(--fs-h3); margin-bottom: var(--sp-2); text-align: center; }
.pricing-group__sub { color: var(--muted); text-align: center; margin-bottom: var(--sp-5); font-size: var(--fs-sm); }
.price-card__meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.price-card__ribbon { position: absolute; inset-block-start: -13px; inset-inline-start: 50%; transform: translateX(50%); }
.pricing-empty {
  text-align: center;
  padding: var(--sp-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  max-width: 720px;
  margin-inline: auto;
}
.pricing-note { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin-top: var(--sp-5); }

/* ---- Compact checklist (used on legal/about pages) ---- */
.checklist { display: grid; gap: var(--sp-3); }
.checklist li { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); background: var(--surface); border-radius: var(--radius); }
.checklist svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 2px; }

/* ---- Pricing facts (unit price, gift credit, VAT) ---- */
.pricing-facts { margin-bottom: var(--sp-7); }
.fact-card { display: grid; gap: var(--sp-1); text-align: center; }
.fact-card__k { font-size: var(--fs-sm); color: var(--muted); }
.fact-card__v { font-size: 1.5rem; font-weight: var(--fw-bold); color: var(--brand-700); }
.fact-card__s { font-size: var(--fs-xs); color: var(--muted-light); }
