/* The pricing page. Builds on site.css (colours, type, nav, buttons, FAQ, footer).
   Two plans, Free and Pro. Pro wears the honey of the waffle, as the closing plate does on every page. */

.pp-hero {
  padding: 84px 0 0;
  text-align: center;
}

.pp-top h1 {
  max-width: 980px;
  margin-inline: auto;
  font-size: clamp(44px, 5.600vw, 86px);
  line-height: 0.98;
}

.pp-top h1 em {
  margin: 0;
  padding: 0;
  background: none;
}

/* The same hand-drawn stroke as under the home page's headline. */
.pp-under {
  position: relative;
  white-space: nowrap;
}

.pp-under svg {
  position: absolute;
  bottom: -0.12em;
  left: -2%;
  width: 104%;
  height: 0.3em;
  overflow: visible;
}

.pp-lede {
  max-width: 600px;
  margin: 26px auto 0;
  font-size: 20px;
  line-height: 1.45;
}

/* Yearly or monthly: the switch itself is in site.css. */
.pp-seg {
  margin-top: 36px;
}

/* -- The two plans -- */
.pp-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1060px;
  margin: 52px auto 0;
  text-align: left;
}

.pp-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 40px 44px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #fff;
}

.pp-pro {
  border-color: #e0a437;
  background:
    radial-gradient(110% 70% at 100% 0%, #ffd27c, transparent 62%),
    linear-gradient(172deg, #fff1cb, #ffe1a0);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.6);
}

/* Waffle pockets, pressed into the top corner and fading out. */
.pp-pro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--waffle) 100% 0 / 76px 76px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 48% 40% at 100% 0%, #000 25%, transparent 100%);
}

.pp-plan > * {
  position: relative;
}

.pp-name {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 46px;
  line-height: 1;
}

.pp-name span {
  padding: 5px 11px;
  border: 1px solid rgb(138 82 0 / 0.38);
  border-radius: 999px;
  color: #5a3600;
  font-family: var(--sans);
  font-size: 13.500px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.pp-for {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
}

.pp-price {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 44px;
}

.pp-price b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 104px;
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.03em;
}

.pp-price span {
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 15.500px;
  line-height: 1.4;
}

.pp-price span i {
  display: block;
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
}

/* The monthly price, crossed out beside the yearly one. */
.pp-price s {
  align-self: flex-start;
  margin-right: -6px;
  color: #8a6a2e;
  font: 400 42px/1 var(--serif);
  letter-spacing: -0.02em;
  text-decoration-thickness: 2px;
}

.pp-price s[hidden] {
  display: none;
}

.pp-price strong,
.pp-switch {
  display: block;
  color: #5a3600;
  font-weight: 700;
}

.pp-switch {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--amber-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pp-pro .pp-for,
.pp-pro .pp-price span {
  color: #6b4a14;
}

.pp-plan .btn {
  width: 100%;
  margin-top: 36px;
}

.pp-list {
  display: grid;
  gap: 14px;
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16.500px;
  line-height: 1.35;
}

.pp-pro .pp-list {
  border-top-color: rgb(138 82 0 / 0.2);
}

.pp-list .lead {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pp-pro .pp-list .lead {
  color: #6b4a14;
}

.pp-list li:not(.lead) {
  display: flex;
  gap: 12px;
}

.pp-list .ic {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--amber-deep);
  stroke-width: 2.4;
}

.pp-fine {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 14.500px;
}

/* -- Free and Pro, compared: an open table, with Pro's column in honey from top to bottom -- */
.cp {
  padding: 136px 0 56px;
}

.cp h2 {
  text-align: center;
  font-size: clamp(38px, 4.600vw, 66px);
}

.cp-table {
  max-width: 1060px;
  margin: 44px auto 0;
  font-size: 16px;
  line-height: 1.35;
}

.cp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
}

.cp-row > * {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 74px;
  padding: 16px 30px;
  border-bottom: 1px solid var(--line);
  color: var(--body);
}

.cp-row > :first-child {
  padding-left: 0;
  color: var(--ink);
  font-weight: 600;
}

.cp-row > :first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14.500px;
  font-weight: 400;
}

.cp-row > :last-child {
  border-bottom-color: rgb(138 82 0 / 0.14);
  background: var(--amber-tint);
  color: var(--ink);
  font-weight: 600;
}

/* Plan names stay in view, tucked under the floating top bar. */
.cp-head {
  position: sticky;
  top: 62px;
  z-index: 3;
  /* Lets go of the top a few rows before the table ends, so it never sits over the last rows. */
  margin-bottom: 240px;
}

.cp-head + .cp-row {
  margin-top: -240px;
}

.cp-head > * {
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 14px;
  min-height: 0;
  padding-block: 26px 18px;
  border-bottom-color: var(--line-strong);
  background: var(--paper);
}

.cp-head > :last-child {
  border-radius: 22px 22px 0 0;
  border-bottom-color: rgb(138 82 0 / 0.24);
  background: var(--amber-tint);
}

.cp-head b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.cp-head small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.cp-head > :last-child small {
  color: #6b4a14;
}

/* A group's title sits in the first column; the honey column runs on behind it. */
.cp-group > * {
  min-height: 0;
  padding-block: 44px 14px;
}

.cp-group > :first-child {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.cp-tight > * {
  min-height: 58px;
  padding-block: 12px;
}

.cp-tight > :first-child {
  font-weight: 500;
}

.cp-row:last-child > * {
  border-bottom: 0;
}

.cp-row:last-child > :last-child {
  border-radius: 0 0 22px 22px;
}

.cp-end > * {
  min-height: 22px;
  padding-block: 0;
}

.cp-y {
  width: 19px;
  height: 19px;
  color: var(--ink);
  stroke-width: 2.3;
}

.cp-row > :last-child .cp-y {
  color: var(--amber-deep);
}

.cp-n {
  color: var(--faint);
}

.cp-note {
  max-width: 1060px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 15.500px;
  text-align: center;
}

.cp-note a {
  color: var(--ink);
  font-weight: 600;
}

.pp-page .faq {
  padding-top: 72px;
}

/* The page arrives as two blocks: the words, then the two plans together. Nothing moves under the pointer. */
.pp-top,
.pp-plans,
.pp-fine {
  animation: settle 700ms var(--ease) both;
}

.pp-plans,
.pp-fine {
  animation-delay: 140ms;
}

@media (prefers-reduced-motion: reduce) {
  .pp-top,
  .pp-plans,
  .pp-fine {
    animation: none;
  }
}

@media (max-width: 900px) {
  .pp-hero {
    padding-top: 48px;
  }

  .pp-lede {
    font-size: 18px;
  }

  .pp-plans {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-top: 36px;
  }

  .pp-plan {
    padding: 30px 26px 34px;
    border-radius: 24px;
  }

  .pp-price {
    margin-top: 32px;
  }

  .pp-price b {
    font-size: 84px;
  }

  .pp-plan .btn {
    margin-top: 28px;
  }
}

/* Narrow: the same table, tighter, without the second line under each name. */
@media (max-width: 760px) {
  .cp {
    padding-top: 88px;
  }

  .cp-table {
    margin-top: 28px;
    font-size: 14px;
  }

  .cp-row {
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 0.9fr));
  }

  .cp-row > * {
    min-height: 58px;
    padding: 12px;
  }

  .cp-row > :first-child small {
    display: none;
  }

  .cp-head {
    top: 58px;
  }

  .cp-head > * {
    flex-direction: column;
    gap: 4px;
    padding-block: 18px 12px;
  }

  .cp-head b {
    font-size: 26px;
  }

  .cp-head small {
    font-size: 13px;
    white-space: nowrap;
  }

  .cp-head > :last-child,
  .cp-row:last-child > :last-child {
    border-radius: 16px 16px 0 0;
  }

  .cp-row:last-child > :last-child {
    border-radius: 0 0 16px 16px;
  }

  .cp-group > * {
    min-height: 0;
    padding-block: 30px 10px;
  }

  .cp-group > :first-child {
    font-size: 24px;
  }

  .cp-tight > * {
    min-height: 50px;
  }

  .cp-end > * {
    min-height: 16px;
    padding-block: 0;
  }
}

/* ---------- The table of everything, closed until asked for ---------- */
.cp-fold {
  margin-top: 36px;
}

.cp-fold summary {
  display: flex;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

.cp-fold summary::-webkit-details-marker {
  display: none;
}

.cp-fold summary .btn {
  height: 52px;
  padding: 0 28px;
  font-size: 17px;
}

.cp-fold .cp-shut,
.cp-fold[open] .cp-open {
  display: none;
}

.cp-fold[open] .cp-shut {
  display: inline;
}

.cp-fold .cp-table {
  margin-top: 36px;
}

/* ---------- The comparison as one boxed table: plan names and a way in at the top, a band for each group,
   one line to a feature, a round tick where a plan has it ---------- */
.cp .cp-table {
  max-width: 1040px;
  margin: 44px auto 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fffdf9;
}

.cp .cp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  border: 0;
}

.cp .cp-row > * {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 22px;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--body);
  font: 400 15.500px/1.35 var(--sans);
  text-align: center;
}

.cp .cp-row > :first-child {
  justify-content: flex-start;
  border-left: 0;
  color: var(--ink);
  font-weight: 500;
  text-align: left;
}

.cp .cp-row > :first-child small {
  display: none;
}

.cp .cp-head > * {
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  border-top: 0;
}

.cp .cp-head > :first-child {
  color: var(--muted);
  font-size: 14.500px;
  font-weight: 400;
}

.cp .cp-head b {
  color: var(--ink);
  font: 600 17px/1 var(--sans);
  letter-spacing: 0;
}

.cp .cp-head small {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cp-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

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

.cp .cp-group > * {
  min-height: 0;
  padding: 11px 22px;
  border-left: 0;
  background: var(--paper-2);
}

.cp .cp-group > :first-child {
  color: var(--muted);
  font: 600 12.500px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp .cp-end {
  display: none;
}

.cp .cp-y {
  width: 28px;
  height: 28px;
  padding: 7px;
  border-radius: 50%;
  background: #dff0e3;
  color: var(--green);
  stroke-width: 2.6;
}

.cp .cp-n {
  color: var(--faint);
}

@media (max-width: 720px) {
  .cp .cp-row {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  }

  .cp .cp-row > * {
    min-height: 50px;
    padding: 10px 10px;
    font-size: 13.500px;
  }

  .cp .cp-head > * {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px 8px;
  }

  .cp .cp-head small {
    margin: 0;
  }

  .cp-go {
    font-size: 13.500px;
  }

  .cp .cp-group > * {
    padding: 9px 10px;
  }
}

/* The boxed table undoes what the earlier one did: its head no longer sticks, and a cell is one row, not a column. */
.cp .cp-head {
  position: static;
  margin-bottom: 0;
}

.cp .cp-head + .cp-row {
  margin-top: 0;
}

.cp .cp-row > * {
  flex-direction: row;
}

.cp .cp-row > :first-child {
  padding-left: 22px;
}

.cp .cp-head > * {
  align-items: center;
  padding-block: 12px;
  background: #fffdf9;
}

.cp .cp-row:not(.cp-head):not(.cp-group) > :last-child {
  font-weight: 400;
}

@media (max-width: 720px) {
  .cp .cp-row > :first-child {
    padding-left: 10px;
  }
}
