/* The rack page. Same tokens, type and palette as the chart (css/site.css);
   verdigris marks reach (information), bronze marks action (conversion). */

.rackpage { background: radial-gradient(70% 60% at 78% 34%, rgba(207, 148, 85, 0.07), transparent 70%) fixed, var(--obsidian); }
.rackpage main { position: relative; z-index: 2; }

/* ---------- hero ---------- */
.rhero { min-height: 100vh; min-height: var(--screen, 100svh); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: calc(var(--nav-h) + 36px) var(--gutter) 56px; }
.rhero__title { margin: 0; font-family: var(--f-inscr); font-weight: 400; font-size: clamp(64px, 9.5vw, 156px); line-height: 0.9; letter-spacing: 0.01em; text-transform: uppercase; }
.rhero__statement { margin-top: 26px; font-weight: 560; font-variation-settings: "FLAR" 60; font-size: clamp(23px, 2.15vw, 33px); line-height: 1.16; letter-spacing: -0.018em; max-width: 22ch; text-wrap: balance; }
.rhero__lede { margin-top: 18px; color: var(--bone-2); max-width: 52ch; }
.rhero__back { display: inline-flex; gap: 10px; margin-top: 30px; color: var(--bone-2); text-decoration: none; }
.rhero__back:hover { color: var(--bronze-hi); }
.rhero__fig { margin: 0; display: grid; gap: 14px; justify-items: end; }
#rack { display: block; width: 100%; height: min(calc(var(--screen, 100vh) * 0.76), 760px); }
.rhero__fig .figcap { max-width: 44ch; text-align: right; }
.js .rackpage .is-ready [data-reveal], .js .rhero.is-ready [data-reveal] { opacity: 1; transform: none; }

/* ---------- sections ---------- */
.rsec { padding: clamp(90px, 11vw, 150px) var(--gutter) 0; }
.rsec__head { max-width: 780px; }
.rsec__title { margin: 0; font-family: var(--f-inscr); font-weight: 400; font-size: clamp(36px, 4.6vw, 76px); line-height: 0.98; letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
.rsec__statement { margin-top: 24px; font-weight: 560; font-variation-settings: "FLAR" 60; font-size: clamp(21px, 1.9vw, 29px); line-height: 1.2; letter-spacing: -0.016em; max-width: 34ch; text-wrap: balance; }
.rsec__body { margin-top: 16px; color: var(--bone-2); max-width: 60ch; }
.rsec__note { margin-top: 18px; color: var(--bone-3); text-transform: none; letter-spacing: 0.04em; }

/* what each channel is for: verdigris = reach, bronze = action; ring = earlier in the funnel */
.job { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.job--discovery { border: 1.5px solid var(--verd); }
.job--search { background: var(--verd); }
.job--trust { border: 1.5px solid var(--bronze-hi); }
.job--conversion { background: var(--bronze-hi); }
.rlegend { margin-top: 30px; }

.channels { margin-top: 36px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.chan { position: relative; background: rgba(13, 12, 10, 0.92); padding: 24px 22px 22px; display: flex; flex-direction: column; min-height: 100%; }
.chan__code { color: var(--bronze); font-size: 10px; }
.chan__name { margin: 14px 0 0; font-family: var(--f-inscr); font-weight: 400; font-size: 21px; line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; }
.chan__job { display: flex; align-items: center; gap: 9px; margin-top: 10px; color: var(--bone-2); font-size: 10px; text-transform: none; letter-spacing: 0.06em; }
.chan__how { margin: 16px 0 0; display: grid; gap: 12px; border-top: 1px solid var(--hair-2); padding-top: 14px; }
.chan__how dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone-3); }
.chan__how dd { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: var(--bone-2); }
.chan__status { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 8px; font-size: 9.5px; color: var(--bone-3); }
.chan__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--bone-3); }
.chan[data-status="live"] .chan__status { color: var(--verd); }
.chan[data-status="live"] .chan__status::before { background: var(--verd); border-color: var(--verd); box-shadow: 0 0 0 3px rgba(111, 179, 160, 0.16); }

/* ---------- one idea, thirty posts ---------- */
.tree { margin: 40px 0 0; }
.tree__svg { display: block; width: 100%; height: auto; overflow: visible; }
.tree__svg .tl { fill: none; stroke: var(--verd); stroke-opacity: 0.55; stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(0.23, 1, 0.32, 1); transition-delay: var(--d, 0ms); }
.tree.is-in .tree__svg .tl { stroke-dashoffset: 0; }
.tree__svg .tn { opacity: 0; transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1); transition-delay: var(--d, 0ms); }
.tree.is-in .tree__svg .tn { opacity: 1; }
.tree__svg .tn-name { font-family: var(--f-sans); font-weight: 600; font-size: 15px; fill: var(--bone); }
.tree__svg .tn-sub { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; fill: var(--bone-3); text-transform: uppercase; }
.tree__svg .tn-count { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; fill: var(--bronze-hi); }
.tree__sum { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; color: var(--bone-3); text-transform: none; letter-spacing: 0.04em; font-size: 12px; }
.tree__sum span { color: var(--bone-2); }
.tree__sum b { color: var(--bronze-hi); font-weight: 500; }
.tree__sum em { font-style: normal; color: var(--bone-4); margin-left: 8px; }

/* ---------- pipeline ---------- */
.flow { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; position: relative; }
.flow::before { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 1px; background: linear-gradient(90deg, var(--verd), var(--bronze)); opacity: 0.5; }
.flow li { position: relative; padding-top: 24px; color: var(--bone-2); font-size: 14.5px; line-height: 1.5; }
.flow li::before { content: ""; position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--verd); background: var(--obsidian); }
.flow .flow__last::before { border-color: var(--bronze-hi); background: var(--bronze-hi); }
.flow__name { color: var(--bone); margin-bottom: 6px; }

/* ---------- calculator ---------- */
.calc { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.calc__in, .calc__out { background: rgba(13, 12, 10, 0.92); padding: 26px 26px 24px; }
.calc__in { display: grid; gap: 16px; }
.calc__row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px; }
.calc__row span { color: var(--bone-3); font-size: 10px; }
.calc__row output { font-weight: 600; font-variation-settings: "FLAR" 60; font-size: 17px; color: var(--bone); font-variant-numeric: tabular-nums; }
.calc__row input { grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
.calc__row input::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--bronze) var(--fill, 0%), var(--hair) var(--fill, 0%)); }
.calc__row input::-moz-range-track { height: 1px; background: var(--hair); }
.calc__row input::-moz-range-progress { height: 1px; background: var(--bronze); }
.calc__row input::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; margin-top: -7px; border-radius: 50%; background: var(--obsidian); border: 1.5px solid var(--bronze-hi); box-shadow: 0 0 0 4px rgba(207, 148, 85, 0.14); }
.calc__row input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--obsidian); border: 1.5px solid var(--bronze-hi); }
.calc__out { display: flex; flex-direction: column; }
.funnel { display: grid; gap: 18px; }
.funnel__row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 16px; }
.funnel__row span { color: var(--bone-3); font-size: 10px; }
.funnel__row b { font-weight: 560; font-variation-settings: "FLAR" 60; font-size: clamp(24px, 2.4vw, 36px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.funnel__row--end b { color: var(--bronze-hi); }
.funnel__bar { grid-column: 1 / -1; display: block; height: 3px; background: var(--hair-2); position: relative; overflow: hidden; }
.funnel__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--verd); opacity: 0.8; transition: width 0.45s cubic-bezier(0.23, 1, 0.32, 1); }
.funnel__row--end .funnel__bar::after { background: var(--bronze-hi); }
.calc__note { margin-top: auto; padding-top: 22px; color: var(--bone-3); text-transform: none; letter-spacing: 0.04em; }

.why { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.why li { color: var(--bone-2); font-size: 15px; line-height: 1.55; border-top: 1px solid var(--hair); padding-top: 16px; }
.why__name { color: var(--bone); font-weight: 600; font-variation-settings: "FLAR" 60; font-size: 18px; margin-bottom: 6px; }

/* ---------- who it posts for ---------- */
.who { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.who li { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr) minmax(0, 0.7fr); gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--hair-2); color: var(--bone-2); font-size: 15.5px; }
.who__name { font-family: var(--f-inscr); font-size: 19px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bone); }
.who__chan { color: var(--bronze); font-size: 10px; text-align: right; }

/* ---------- rules ---------- */
.rules { list-style: none; margin: 30px 0 0; padding: 0; max-width: 980px; counter-reset: none; }
.rules li { position: relative; padding: 18px 0 18px 30px; border-bottom: 1px solid var(--hair-2); font-weight: 520; font-variation-settings: "FLAR" 60; font-size: clamp(19px, 1.7vw, 25px); line-height: 1.3; letter-spacing: -0.012em; }
.rules li::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 1px; background: var(--bronze); }

/* ---------- close ---------- */
.rsec--close { padding-bottom: clamp(90px, 11vw, 150px); }
.rclose { max-width: 720px; }

/* ---------- reveals ---------- */
.js .rv { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 620ms cubic-bezier(0.23, 1, 0.32, 1), transform 620ms cubic-bezier(0.23, 1, 0.32, 1); transition-delay: calc(var(--n, 0) * 60ms); }
.js .rv.is-in { opacity: 1; transform: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 34px; }
  .flow::before { display: none; }
}
@media (max-width: 959px) {
  .rhero { grid-template-columns: 1fr; align-items: start; padding-top: calc(var(--nav-h) + 28px); }
  #rack { height: min(112vw, 560px); }
  .rhero__fig { justify-items: stretch; }
  .rhero__fig .figcap { text-align: left; }
  .channels, .calc, .why { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; padding-left: 26px; }
  .flow::before { display: block; left: 4px; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; background: linear-gradient(180deg, var(--verd), var(--bronze)); }
  .flow li { padding-top: 0; }
  .flow li::before { left: -26px; top: 5px; }
  .who li { grid-template-columns: 1fr; gap: 6px; }
  .who__chan { text-align: left; }
}
@media (max-width: 959px) {
  /* nothing smaller than 10.5 px on a phone or a tablet, in either orientation */
  .chan__how dt, .chan__status, .chan__code, .chan__job, .who__chan, .calc__row span, .funnel__row span { font-size: 10.5px; }
}
/* Fingertips: 44 px targets without moving anything. */
@media (pointer: coarse) {
  .rhero__back { position: relative; }
  .rhero__back::after { content: ""; position: absolute; inset: -12px -8px; }
  .calc__row input { height: 44px; margin: -11px 0; }
  /* sections fade in where they stand: sliding upward under a thumb reads as a jump */
  .js .rv { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .rv, .tree__svg .tl, .tree__svg .tn { transition: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}
