/* Landing-page polish, loaded after the kit.
   The kit sizes every section to a whole screen, which left 190px of empty ground in each. Here sections are
   as tall as their content, with one steady rhythm between them, and the product mocks fill their panels. */

:root { --padt: 72px; --padb: 56px; --head-gap: 40px; }
@media (max-width: 639px) { :root { --padt: 64px; --padb: 48px; --head-gap: 28px; } }

/* ---------- sections: content height, even rhythm ---------- */
main > section:not(.hero), footer.closing {
  height: auto !important; min-height: 0 !important;
  padding: var(--padt) 0 var(--padb) !important;
  display: block !important;
}
main > section:not(.hero) > .wrap, footer.closing > .wrap { height: auto !important; min-height: 0 !important; }
main > section:not(.hero) > .wrap { display: block !important; }
footer.closing { padding-bottom: var(--s-6) !important; }
footer.closing > .wrap { display: grid !important; grid-template-rows: auto auto !important; row-gap: var(--s-9) !important; }
section[id] { scroll-margin-top: 0; }

/* ---------- hero ---------- */
main > .hero { height: auto !important; min-height: 0 !important; padding: calc(var(--nav) + 48px) 0 var(--padb) !important; }
main > .hero > .wrap { height: auto !important; display: block !important; }
.hero-text.hero__grid { grid-template-rows: auto !important; align-items: center; align-content: center; }
.hero--collage .hero__text { align-self: center; }
.hero__art { height: 560px; }
/* the cursor-spotlight moment makes every child of the frame position:relative; the collage needs them absolute */
.hero__art.mo-cs > .ly-piece, .hero__art.mo-cs > .loop-pause { position: absolute; }
.hero__art .d-win__body { min-height: 0; }
.hero__art .d-side svg, .d-side svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.hero__art .d-side .is-on svg { opacity: 1; }
.hero__art > .ly-piece--note { left: var(--s-6); bottom: var(--s-6); }
.hero__art.mo-cs > .loop-pause { left: auto !important; right: var(--s-4) !important; top: var(--s-4) !important; bottom: auto !important; }
@media (max-width: 1023px) {
  .hero-text.hero__grid { align-items: stretch; }
  .hero__art { height: 520px; flex: none; margin-top: var(--s-6); }
}
@media (max-width: 639px) {
  main > .hero { padding-top: calc(var(--nav) + 32px) !important; }
  .hero__art { height: 360px; margin-top: var(--s-5); }
}

/* ---------- pricing ---------- */
.pricing-grid { align-items: center; row-gap: var(--s-6); }
.order { gap: var(--s-6); }
.order__field { display: grid; gap: var(--s-3); }
.receipt { padding: var(--s-6); gap: 0; }
.receipt .d-card__row { padding-bottom: var(--s-3); }
.receipt .ln { padding: 14px 0; font-size: 15px; }
.receipt .ln b { font-size: 16px; }
.receipt .ln--total { color: var(--p-ink); }
.receipt .ln--total b { font: 600 28px/1 var(--font-text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.receipt .btn { margin-top: var(--s-4); }
.pricing-rows { margin-top: var(--s-8); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s-6); row-gap: var(--s-5); padding: 0; list-style: none; }
.pricing-rows > li { display: block; min-height: 0; border-top: 1px solid var(--line); border-bottom: 0; padding: var(--s-4) 0 0 !important; }
.pricing-rows .rows__name { display: block; font-weight: 600; margin-bottom: var(--s-2); }
.pricing-rows p { margin: 0; color: var(--muted); }
@media (max-width: 899px) { .pricing-rows { grid-template-columns: 1fr; margin-top: var(--s-7); } }
@media (max-width: 639px) { .pricing-rows { display: grid !important; } }

/* ---------- product mocks: centred and full size in their panels ---------- */
.panel--mock { display: grid !important; place-items: center; padding: clamp(24px, 3vw, 44px); min-height: 0 !important; height: auto !important; }
.panel--mock::before, .panel--mock::after { display: none; }
.mock { width: 100%; max-width: 460px; }
.mock .d-card { padding: 20px 22px; font-size: 15px; }
.mock .d-card h5 { font-size: 15px; }
.mock .d-card p { font-size: 14px; }
.mock .d-note__line { font-size: 14px; padding: 9px 0; }
.mock .d-week > span i { height: 84px; }
.mock .d-week { gap: 8px; margin-top: 14px; }
.mock .d-bars { height: 128px; gap: 6px; }
.mock .d-stat { font-size: 32px; }
.mock .d-code { font-size: 32px; padding: 12px 0 8px; }
.mock .d-receipt .ln { padding: 10px 0; }

/* features: 2 x 2, equal panels */
.features-grid { row-gap: var(--s-8); align-items: start; }
#features .panel--mock { min-height: 300px !important; --p-h: 0px; }
@media (max-width: 639px) { .features-grid { row-gap: var(--s-7); } #features .panel--mock { min-height: 0 !important; padding: 20px; } }

/* how it works: three cards with panels flush to the same line */
#how .open-cards { align-items: stretch; row-gap: var(--s-5); }
#how .panel--mock { min-height: 220px !important; padding: 20px; }
#how .mock { max-width: 340px; }
#how .mock .d-card { padding: 16px 18px; font-size: 14px; }
#how .mock .d-code { font-size: 26px; }

/* ---------- figures: three across, number over its label ---------- */
#scale .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-7); align-items: start; }
#scale .stats > .stat { grid-column: auto; display: flex; flex-direction: column; gap: var(--s-3); border-top: 1px solid var(--line); padding-top: var(--s-5); }
#scale .stat .t-stat { order: 1; font-size: clamp(56px, 7.5vw, 104px); line-height: 1; letter-spacing: -0.04em; }
#scale .stat .t-small { order: 2; margin: 0; }
@media (max-width: 639px) {
  #scale .stats { grid-template-columns: 1fr; gap: var(--s-5); margin-top: var(--s-6); }
  #scale .stat .t-stat { font-size: 64px; }
}

/* ---------- faq ---------- */
#faq .faq { row-gap: 0; }
@media (min-width: 1024px) { #faq .faq > .faq__item:nth-child(odd) { padding-right: var(--s-7); } #faq .faq > .faq__item:nth-child(even) { padding-left: var(--s-4); } }
#faq .faq > .faq__item { padding-block: var(--s-5); }
#faq .faq > .faq__item:nth-child(-n+2) { padding-top: var(--s-5); }

/* ---------- closing ---------- */
.closing__cta.close--type > .btn--xl { align-self: flex-start !important; width: min(100%, 480px) !important; }
.closing__links { gap: var(--s-6); }

.mock .d-card > p { margin: 2px 0 8px; }

#how .open-cards .card > .panel.panel--mock { background-color: color-mix(in oklab, var(--p-ink) 5%, var(--p-surface)) !important; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--p-ink) 9%, transparent); }

/* a narrow desktop: the hero window loses its side bar and hours column so no row is squeezed or cut */
@media (min-width: 1024px) and (max-width: 1439px) {
  .hero__art .d-side { display: none; }
  .hero__art .d-win__body { grid-template-columns: 1fr; }
  .hero__art .d-row { grid-template-columns: 36px minmax(0, 1fr) auto !important; }
  .hero__art .d-row .num { display: none; }
}

/* the hero frame is dark in both themes, so the mock inside it always uses the dark tokens */
.hero__art { --p-surface: #0d0d0d; --p-ink: #fff; --p-muted: #a6a6a6; color: #fff; }

/* light theme: white cards on a pale lavender panel */
:root:not(.dark) .mock .d-card, :root:not(.dark) .receipt { background: #fff; }

/* ---------- alignment pass ---------- */
/* card headers: title and chip share one centre line and keep clear of the rule underneath */
.d-card__row { align-items: center; padding-bottom: 10px; }
.d-card__row > h5, .d-card__row > .d-title { margin: 0; line-height: 22px; }
.d-card__row > .d-chip, .d-card__row > .d-stat { margin: 0; }
.d-card__row + p { margin-top: 0; }
.d-chip { line-height: 1; padding-bottom: 1px; }
/* hero window: rows end on the same right edge as the button above them, hours read as one unit */
.d-row { padding-inline: 0; }
.d-row .num { word-spacing: -0.3em; }
/* the Today card sits wholly below the window, on its left edge, instead of straddling its border */
.hero__art { height: 600px; }
.hero__art.mo-cs > .ly-piece--note { left: var(--s-8); bottom: 40px; }
@media (max-width: 1023px) { .hero__art { height: 560px; } .hero__art.mo-cs > .ly-piece--note { left: var(--s-6); bottom: 32px; } }
@media (max-width: 639px) { .hero__art { height: 360px; } }
.d-receipt .ln, .receipt .ln { align-items: center; }
