/* Variation B · Tabs. The real app in the hero, the problem on an indigo band, then one tab
   per stage of the product: a short title, three points and the screen that proves them. */

:root {
  --ink: #271c5f;
  --ground: #ffffff;
  --ground-alt: #f5f6fb;
  --radius-lg: 16px;
  --section-pad: clamp(4.5rem, 8vw, 7rem);
}

/* ---------- Hero ---------- */

.hero__copy {
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}

.hero__title {
  max-width: 17ch;
}

.hero__sub {
  max-width: 40rem;
}

.hero__actions,
.hero__trust {
  justify-content: center;
}

.hero__media {
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
  padding-bottom: var(--section-pad);
}

/* ---------- Problem band ---------- */

/* Four matched pairs: the usual way on the left, Plepto on the right. */
.pairs {
  max-width: 58rem;
  margin-inline: auto;
}

.pairs__head,
.pairs__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.5rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.pairs__head {
  padding-bottom: 0.875rem;
  color: var(--lilac-2);
  font-size: 0.875rem;
  font-weight: 650;
}

.pairs__head span:last-child {
  grid-column: 3;
  color: var(--white);
}

.pairs__list li {
  padding: 1.125rem 0;
  border-top: 1px solid var(--indigo-line);
}

.pairs__old,
.pairs__new {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  line-height: 1.35;
}

.pairs__old {
  color: var(--lilac-2);
}

.pairs__old .icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--lilac-3);
}

.pairs__new {
  color: var(--white);
  font-weight: 620;
}

.pairs__new .icon {
  width: 1.25rem;
  height: 1.25rem;
  padding: 0.1875rem;
  border-radius: 50%;
  background: var(--ai);
  color: var(--white);
  stroke-width: 2.5;
}

.pairs__arrow {
  justify-self: center;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--window-dot);
}

.js .is-seen .pairs__list li {
  animation: pair-in 0.6s var(--ease-out) both;
}

.js .is-seen .pairs__list li:nth-child(2) {
  animation-delay: 0.08s;
}

.js .is-seen .pairs__list li:nth-child(3) {
  animation-delay: 0.16s;
}

.js .is-seen .pairs__list li:nth-child(4) {
  animation-delay: 0.24s;
}

@keyframes pair-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 700px) {
  .pairs__head {
    display: none;
  }

  .pairs__list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .pairs__arrow {
    justify-self: start;
    margin-left: 0.25rem;
    transform: rotate(90deg);
  }
}

/* ---------- Product tabs ---------- */

.tabs__bar {
  position: sticky;
  top: var(--nav-height);
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--ground);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__bar::-webkit-scrollbar {
  display: none;
}

.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  padding: 1rem 1.25rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.tabs__tab .icon {
  width: 1.0625rem;
  height: 1.0625rem;
}

.tabs__tab:hover {
  color: var(--ink);
}

.tabs__tab[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.tabs__tab[aria-selected="true"] .icon {
  color: var(--accent);
}

@media (max-width: 700px) {
  .tabs__bar {
    justify-content: flex-start;
  }

  .tabs__tab {
    padding-inline: 0.875rem;
  }
}

.tabs__title {
  color: var(--ink);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.tabs__body {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.tabs__points {
  display: grid;
  gap: 1.25rem;
}

.tabs__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.4;
}

.tabs__points .icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.0625rem;
  color: var(--accent);
}

.tabs__points .is-first {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 650;
}

@media (max-width: 960px) {
  .tabs__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .tabs__points {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.75rem;
  }
}

/* ---------- Follow-ups, approval, learning ---------- */

.duo-flat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  max-width: 64rem;
  margin-inline: auto;
}

.is-muted {
  opacity: 0.9;
}

.reply-window {
  max-width: 52rem;
  margin-inline: auto;
}

@media (max-width: 800px) {
  .duo-flat {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Closing band ---------- */

.closing.section--band {
  --closing-ink: #ffffff;
  --closing-text: #c7c2e8;
}

.closing.section--band .btn--primary {
  background: var(--white);
  color: var(--brand);
}

.closing.section--band .btn--primary:hover {
  background: var(--lilac-wash);
}

.closing.section--band .btn--secondary {
  border-color: rgb(255 255 255 / 0.35);
  background: transparent;
  color: var(--white);
}

.closing.section--band .btn--secondary:hover {
  border-color: var(--white);
}

/* Each sentence of a two-sentence title keeps its own line. */
h2 .line {
  display: block;
}

/* The walkthrough reads best a little narrower than the page, so the whole frame fits one screen. */
.hero__media .frame {
  max-width: 65rem;
  margin-inline: auto;
}

/* ---------- Learning: four things Plepto learns, each with its proof ---------- */

.learnrow {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.learnrow .section-head {
  margin: 0;
}

.ledger {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 48px -36px rgb(39 28 95 / 0.35);
}

.ledger__row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: 1.125rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
}

.ledger__row + .ledger__row {
  border-top: 1px solid var(--line);
}

.ledger__n {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: var(--action-wash);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.ledger__text h3 {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ledger__text p {
  margin-top: 0.125rem;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.ledger__proof {
  justify-self: end;
}

.proof {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}

.proof .icon {
  width: 0.9375rem;
  height: 0.9375rem;
}

.proof--signal {
  border: 1px solid var(--signal-line);
  background: var(--signal-wash);
  color: var(--signal-ink);
}

.proof--bar {
  display: grid;
  gap: 0.25rem;
  justify-items: end;
  padding: 0;
}

.proof__bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 9rem;
  height: 1.75rem;
  padding: 0 0.625rem;
  border-radius: 6px;
  background: var(--brand);
  color: var(--white);
  font-size: 0.75rem;
}

.proof--bar small {
  color: var(--text-3);
  font-size: 0.6875rem;
  font-weight: 600;
}

.proof--edit {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ai-ink);
}

.proof--edit s {
  color: var(--text-3);
  font-weight: 500;
  text-decoration-color: var(--danger);
}

.proof--edit .icon {
  color: var(--text-3);
}

.proof--next {
  border: 1px solid var(--ok-line);
  background: var(--ok-wash);
  color: var(--ink);
}

.proof--next .icon {
  color: var(--ok);
  stroke-width: 2.5;
}

@media (max-width: 1180px) {
  .learnrow {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ledger__row {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    padding: 1.125rem 1.125rem;
  }

  .ledger__n {
    width: 2.5rem;
    height: 2.5rem;
  }

  .ledger__proof {
    grid-column: 2;
    justify-self: start;
  }

  .proof {
    white-space: normal;
  }

  .proof--bar {
    justify-items: start;
  }
}

.proof--edit {
  flex-wrap: wrap;
}

.proof--edit s,
.proof--edit span {
  white-space: nowrap;
}

.proof__bar small {
  color: var(--lilac);
  font-size: 0.75rem;
  font-weight: 550;
}

/* The four rows read as one flow: a line joins the numbers, and the proofs arrive in order. */
.ledger__row {
  position: relative;
}

.ledger__row:not(:first-child)::before,
.ledger__row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.5rem + 1.375rem - 1px);
  width: 2px;
  background: var(--action-line);
  transform-origin: center top;
}

.ledger__row:not(:first-child)::before {
  top: 0;
  height: calc(50% - 1.375rem);
}

.ledger__row:not(:last-child)::after {
  top: calc(50% + 1.375rem);
  height: calc(50% - 1.375rem);
}

.js [data-reveal]:not(.is-seen) .ledger__proof,
.js [data-reveal]:not(.is-seen) .ledger__row::before,
.js [data-reveal]:not(.is-seen) .ledger__row::after {
  opacity: 0;
}

.js .is-seen .ledger__proof {
  animation: proof-in 0.5s var(--ease-out) both;
}

.js .is-seen .ledger__row::before,
.js .is-seen .ledger__row::after {
  animation: line-in 0.3s var(--ease-out) both;
}

.js .is-seen .ledger__row:nth-child(1) .ledger__proof { animation-delay: 0.2s; }
.js .is-seen .ledger__row:nth-child(1)::after { animation-delay: 0.45s; }
.js .is-seen .ledger__row:nth-child(2)::before { animation-delay: 0.6s; }
.js .is-seen .ledger__row:nth-child(2) .ledger__proof { animation-delay: 0.75s; }
.js .is-seen .ledger__row:nth-child(2)::after { animation-delay: 1s; }
.js .is-seen .ledger__row:nth-child(3)::before { animation-delay: 1.15s; }
.js .is-seen .ledger__row:nth-child(3) .ledger__proof { animation-delay: 1.3s; }
.js .is-seen .ledger__row:nth-child(3)::after { animation-delay: 1.55s; }
.js .is-seen .ledger__row:nth-child(4)::before { animation-delay: 1.7s; }
.js .is-seen .ledger__row:nth-child(4) .ledger__proof { animation-delay: 1.85s; }

@keyframes proof-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
}

@keyframes line-in {
  from {
    opacity: 1;
    transform: scaleY(0);
  }
}

/* On phones the numbers sit at the top of each row, so the connecting line is left out. */
@media (max-width: 640px) {
  .ledger__row::before,
  .ledger__row::after {
    display: none;
  }
}

/* ---------- Phones: the five tabs fit in one row ---------- */

@media (max-width: 560px) {
  .tabs__bar {
    justify-content: stretch;
    gap: 0;
  }

  .tabs__tab {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 0.875rem 0.25rem;
    font-size: 0.875rem;
  }

  .tabs__tab .icon {
    display: none;
  }
}
