/* site\assets\css\pages\growth-calculator.css: Growth Calculator (src\pages\growth-calculator.mjs; the rocket's flight
   is site\assets\js\pages\growth-calculator.js). Places and sizes its parts; the bands, frames, footage, doors and
   picker are design\components.css's, the calculator's mechanics calc.css's. */

/* ---------- hero: a letterbox: the words centered on the forest, then the owner's hands on a phone by a bright
   window as a wide strip, the week filling in glass over its dark right side ---------- */
.ch { padding-bottom: 0; }
.ch__head { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1.15rem; text-align: center; }
.ch__title { max-width: 16ch; font-size: var(--fs-h1); line-height: 1.04; }
.ch__line { max-width: 34rem; font-size: var(--fs-lead); line-height: 1.5; color: var(--c-on-ink-soft); }
.ch__doors { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.75rem; margin-top: .35rem; }
.ch__book { color: var(--c-on-ink); }
.ch__strip { position: relative; height: clamp(380px, 32vw, 460px); margin-top: clamp(2rem, 1rem + 2.5vw, 3.25rem); }
.ch__footage { inset: 0 -1px -1px; }
.ch__footage > video, .ch__footage > img { object-position: 38% 55%; max-width: none; }
.ch__stop { z-index: 6; }
/* the week near the strip's top, so it stands whole on the first screen */
.ch .ch__stage { top: 24px; right: max(var(--gutter), calc((100% - var(--max-w)) / 2)); width: min(420px, 36%); }
@media (max-width: 759px) {
  /* the phone: the hands in a strip, the week standing under it and on it for more than half its height */
  .ch__strip { height: auto; padding-top: 200px; }
  .ch__footage { inset: 0 -1px auto; height: 381px; }
  .ch__footage > video, .ch__footage > img { object-position: 30% 50%; }
  .ch .ch__stage { position: relative; inset: auto; translate: none; width: auto; margin: 0 var(--gutter); min-height: 300px; }
  .ch__stop { top: 148px; right: 12px; }
  .ch__doors { flex-direction: column; }
}

/* ---------- worth: the calculator, its picture the logo's rocket on its year (the home page's look) ---------- */
.worth__box {
  --calc-fill: var(--c-brand); --calc-thumb-edge: var(--c-brand); --calc-track: var(--c-line); --calc-focus: var(--c-accent);
  --calc-font: var(--font-ui); --calc-font-figure: var(--font-display); --calc-value-size: 1.3rem;
  --calc-total-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.5rem); --calc-figure-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem);
  display: grid; gap: clamp(1.5rem, 3vw, 3rem); padding: clamp(1.25rem, .8rem + 2vw, 2.5rem); border: 1px solid var(--c-line); border-radius: var(--radius-l);
  background: var(--c-paper); box-shadow: var(--shadow-l);
}
.worth__controls { display: grid; align-content: center; }
.worth__controls .calc-sliders { gap: 1.75rem; }
.worth__box .calc-slider__label { font-weight: 700; }
.worth__box .calc-slider__value { font-family: var(--font-display); font-weight: 800; color: var(--c-brand-text); }
.worth__box .calc-scale { font-size: var(--fs-xs); color: var(--c-ink-soft); }
.worth__result { display: grid; gap: 1rem; min-width: 0; }
.worth__box .calc-total { display: grid; gap: .2rem; margin: 0; }
.worth__box .calc-total__value { font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--c-ink); }
.worth__box .calc-total__label { font-family: var(--font-ui); font-weight: 700; color: var(--c-ink-soft); }
.worth__picture { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 8.6; border-radius: var(--radius-l); background: var(--c-ink); }
.worth__box .calc-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.worth__box .calc-figure { display: grid; gap: .15rem; margin: 0; padding: .85rem 1rem; border-radius: var(--radius-m); background: var(--c-paper-alt); }
.worth__box .calc-figure__value { font-weight: 800; letter-spacing: -.015em; color: var(--c-brand-text); }
.worth__box .calc-figure__label { font-size: var(--fs-small); color: var(--c-ink-soft); }
.worth__box .calc-note { font-size: var(--fs-xs); color: var(--c-ink-soft); }
@media (min-width: 1000px) { .worth__box { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); align-items: center; } }
@media (max-width: 599px) { .worth__picture { aspect-ratio: 4 / 3.1; } }

.rk { --rk-gut: 72px; --rk-r: 44px; --rk-top: 40px; --rk-bot: 46px; position: absolute; inset: 0; color: var(--c-on-ink); }
.rk::before { content: ''; position: absolute; z-index: -1; top: -45%; right: -25%; width: 95%; height: 150%; background: radial-gradient(closest-side, var(--c-glow), transparent); }
.rk__stop { top: 12px; right: 12px; }
.rk__plot { position: absolute; top: var(--rk-top); right: var(--rk-r); bottom: var(--rk-bot); left: var(--rk-gut); }
/* the scale of tens: its lines span the gutter too, so each label sits inside its line; the dash starts at the plot */
.rk__grid { position: absolute; top: var(--rk-top); right: var(--rk-r); bottom: var(--rk-bot); left: 0; }
.rk__line { position: absolute; left: 0; right: 0; bottom: calc(var(--at) * 100%); }
.rk__line::after { content: ''; position: absolute; top: 0; right: 0; left: var(--rk-gut); border-top: 1px dashed var(--c-line-ink-strong); }
.rk__val { position: absolute; top: 0; right: calc(100% - var(--rk-gut) + 12px); font-family: var(--font-ui); font-size: var(--fs-xs); font-weight: 700; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--c-on-ink-soft); transform: translateY(-50%); }
.rk__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rk__ahead { fill: none; stroke: var(--c-line-ink-strong); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; stroke-linejoin: round; }
.rk__trail { fill: none; stroke: var(--c-brand-on-ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.rk__pad { position: absolute; left: -12px; bottom: -3px; width: 30px; height: 4px; border-radius: 2px; background: var(--c-on-ink-soft); opacity: .55; }
.rk__month {
  position: absolute; left: calc(var(--m) / 12 * 100%); bottom: calc(var(--y, 0) * 100%); width: 10px; height: 10px; margin: 0 0 -5px -5px;
  border-radius: 50%; background: var(--c-brand-on-ink); box-shadow: 0 0 0 3px var(--c-ink); opacity: 0; transform: scale(.4);
}
.rk__month[data-kit-on] { opacity: 1; transform: scale(calc(.4 + .6 * var(--kit-in, 1))); }
.rk__ship {
  position: absolute; left: calc(var(--rk-x, 1) * 100%); bottom: calc(var(--rk-y, .6) * 100%); width: 64px; height: 40px; margin: 0 0 -20px -34px;
  color: var(--c-accent-on-ink); transform: rotate(calc(var(--rk-angle, -20) * 1deg)); transform-origin: 34px 20px;
}
.rk__ship svg { display: block; overflow: visible; }
.rk__body { fill: var(--c-ink-2); stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.rk__fin { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rk__port { fill: var(--c-brand-on-ink); }
.rk__flame { fill: var(--c-accent); }
/* the axis spans the whole picture, so a month's label centered under its point never runs out of it */
.rk__axis { position: absolute; right: 0; bottom: 14px; left: 0; height: 16px; }
.rk__axis span { position: absolute; top: 0; left: calc(var(--rk-gut) + (100% - var(--rk-gut) - var(--rk-r)) * var(--f)); font-family: var(--font-ui); font-size: var(--fs-xs); font-weight: 600; line-height: 1; white-space: nowrap; color: var(--c-on-ink-soft); transform: translateX(-50%); }
.rk__axis span:nth-child(1) { --f: calc(1 / 12); }
.rk__axis span:nth-child(2) { --f: .5; }
.rk__axis span:nth-child(3) { --f: 1; }
@media (prefers-reduced-motion: no-preference) {
  .rk[data-moving] .rk__ship { transition: left .36s linear, bottom .36s linear, transform .36s linear; }
  .rk[data-moving] .rk__month { transition: left .36s linear, bottom .36s linear; }
}
@media (max-width: 599px) {
  .rk { --rk-gut: 60px; --rk-r: 30px; --rk-top: 34px; --rk-bot: 40px; }
  .rk__axis { bottom: 12px; }
  .rk__ship { transform: rotate(calc(var(--rk-angle, -20) * 1deg)) scale(.82); }
}

/* ---------- next: two framed photos side by side, each with its scene in glass and its door under it ---------- */
.cn__ways { display: grid; gap: clamp(2.5rem, 1.5rem + 3vw, 3.5rem) 2rem; }
.cn__way { display: grid; align-content: start; gap: 1.4rem; min-width: 0; }
.cn__media { position: relative; height: 560px; }
.cn__footage { inset: -1px; }
.cn__footage--plan > img { object-position: 50% 30%; }
.cn__footage--chat > img { object-position: 0% 40%; }
.cn__stop { z-index: 6; }
/* the plan's bars low at the left, over the table and the papers; the chat's phone at the left, over the plant */
.cn .cn__stage--plan { left: 3%; bottom: 4%; width: min(300px, 54%); }
.cn .cn__stage--chat { top: 50%; left: 4%; width: 310px; translate: 0 -50%; }
.cn__words { display: grid; justify-items: start; gap: .9rem; }
.cn__title { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); line-height: 1.2; }
@media (min-width: 1000px) { .cn__ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 759px) {
  /* the phone: each photo's faces in a strip (--peek), its scene standing under it and on it (--over) */
  .cn__media { height: auto; padding-top: var(--peek); }
  .cn__footage { inset: -1px -1px auto; height: calc(var(--peek) + var(--over) + 1px); }
  .cn__footage--plan > img { object-position: 52% 18%; }
  .cn__footage--chat > img { object-position: 47% 30%; }
  .cn .cn__stage { position: relative; inset: auto; translate: none; }
  .cn .cn__stage--plan { width: auto; margin: 0 10px 10px; min-height: 260px; }
  .cn .cn__stage--chat { width: min(310px, 88%); margin: 0 auto 12px; min-height: 440px; }
  .cn__stop { top: calc(var(--peek) - 52px); right: 12px; }
}

/* ---------- close: the words centered on the forest, then the shop owner at her door as a wide band, the month's new
   clients in glass over her lit shop window ---------- */
.cclose { padding-bottom: 0; }
.cclose__head { display: grid; justify-items: center; gap: 1.1rem; text-align: center; }
.cclose__title { font-size: var(--fs-h2); line-height: 1.08; }
.cclose__line { font-size: var(--fs-lead); color: var(--c-on-ink-soft); }
.cclose__head .cta { align-items: center; }
.cclose__picker { width: min(100%, 560px); text-align: left; }
.cclose__band { position: relative; height: clamp(460px, 40vw, 600px); margin-top: clamp(2rem, 1rem + 3vw, 3.5rem); }
.cclose__footage { inset: 0 -1px -1px; }
.cclose__footage > img { object-position: 50% 40%; max-width: none; }
.cclose__stop { z-index: 6; }
.cclose .cclose__stage { left: 21%; bottom: 7%; width: min(340px, 30%); }
@media (max-width: 759px) {
  .cclose__band { height: auto; padding-top: 230px; }
  .cclose__footage { inset: 0 -1px auto; height: 431px; }
  .cclose__footage > img { object-position: 74% 30%; }
  .cclose .cclose__stage { position: relative; left: auto; bottom: auto; width: auto; margin: 0 var(--gutter); min-height: 300px; }
}
