/* ==========================================================================
   How We Work section, options (Alex, 2026-11-10): the three steps, read left
   to right, with imagery.

   Sources: run 1's three-column step matrix (.w-matrix, website/what-we-do.html);
   run 1's step imagery (website/assets/img/); run 2's Home heading scale;
   the board's Terrava b04 image panels. Copy is the intro deck's step slide.
   Photographs are concept imagery, unlicensed.
   ========================================================================== */

.how { --how-gap: clamp(12px, 1.3vw, 20px); --how-g1: #C9C8C5; --how-g4: #61635C; background: var(--bg); color: var(--ink); padding: clamp(24px, 3vw, 48px) 0 clamp(88px, 10vw, 156px); }
.how-wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* heading: label, line, and a note low on the right, as the section above */
.how-head { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 4.6vw, 72px); }
.how-lead { display: grid; gap: 22px; justify-items: start; }
.how-h2 { margin: 0; font-family: var(--logo); font-weight: 400; font-size: clamp(34px, 4.3vw, 66px); line-height: 1.06; letter-spacing: -.034em; text-wrap: balance; }
.how-note { margin: 0; font-size: 15.5px; line-height: 1.62; color: var(--how-g4); text-wrap: pretty; }

/* every photograph runs black and white, to sit with the hero */
.how img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); }

/* ---------- the three steps across the page ---------- */
.how-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--how-gap); }
.how-photo { aspect-ratio: 4 / 3.9; overflow: hidden; background: #E9E9E7; }

/* the line that runs left to right through the steps */
.how-seg { position: relative; display: block; height: 1px; width: calc(100% + var(--how-gap)); margin: 22px 0 20px; background: var(--line); }
.how-step:last-child .how-seg { width: 100%; }
.how-seg i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(var(--f, 1)); transform-origin: 0 50%; }
.how-seg::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; background: var(--ink); }
.how-step:last-child .how-seg::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); transform: rotate(45deg); opacity: var(--f, 1); }

.how-meta { display: flex; justify-content: space-between; gap: 16px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: .02em; color: var(--how-g4); }
.how-step h3 { margin: 14px 0 0; font-family: var(--logo); font-weight: 400; font-size: clamp(28px, 2.7vw, 40px); line-height: 1.1; letter-spacing: -.028em; }
.how-aim { margin: 10px 0 0; max-width: 40ch; font-size: 16px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.how-get { margin: 18px 0 0; padding-right: 16px; font-size: 14px; line-height: 1.5; color: var(--how-g4); }
.how-get b { display: block; margin-bottom: 3px; font-weight: 500; color: var(--ink); }

/* a step's words come up as the line reaches it */
.how-js .how-step h3, .how-js .how-step .how-aim, .how-js .how-step .how-get, .how-js .how-step .how-get b, .how-js .how-step .how-meta { transition: color .35s linear; }
.how-js .how-step:not(.on) h3, .how-js .how-step:not(.on) .how-aim, .how-js .how-step:not(.on) .how-get, .how-js .how-step:not(.on) .how-get b, .how-js .how-step:not(.on) .how-meta { color: var(--how-g1); }

/* ---------- option 2: one wide photograph across all three steps ---------- */
.how-pano { position: relative; height: clamp(280px, 50vh, 500px); overflow: hidden; background: #111; }
.how-pano::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 42%); }
.how-pano-cols { z-index: 1; position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--how-gap); }
.how-pano-cols span { position: relative; padding: clamp(14px, 1.6vw, 24px); font-family: var(--logo); font-weight: 300; font-size: clamp(48px, 7.4vw, 116px); line-height: 1; letter-spacing: -.04em; color: #fff; }
.how-pano-cols span + span::before { content: ""; position: absolute; left: calc(var(--how-gap) / -2); top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .42); }
.how-steps--under .how-seg { margin-top: 0; }

/* ---------- option 3: three image panels; the open one widens ---------- */
.how-acc { --how-t: 6s; display: flex; gap: var(--how-gap); height: clamp(480px, 78vh, 700px); }
.how-pn { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; color: #fff; background: #111; transition: flex-grow .75s cubic-bezier(.2, .7, .2, 1); }
.how-pn.is-on { flex-grow: 3.1; }
.how-pn img { position: absolute; inset: 0; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.how-pn.is-on img { transform: scale(1.03); }
.how-pn::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .46) 42%, rgba(0, 0, 0, .1) 68%, rgba(0, 0, 0, .34) 100%); }
.how-pn-hit { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; cursor: pointer; }
.how-pn-hit:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.how-pn-in { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(16px, 1.7vw, 26px); pointer-events: none; }
.how-pn-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: .02em; color: rgba(255, 255, 255, .88); }
.how-pn h3 { margin: 0; font-family: var(--logo); font-weight: 400; font-size: clamp(26px, 2.5vw, 38px); line-height: 1.08; letter-spacing: -.03em; }
.how-pn-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .6s cubic-bezier(.2, .7, .2, 1), opacity .3s linear; }
.how-pn-more > div { overflow: hidden; min-height: 0; }
.how-pn.is-on .how-pn-more { grid-template-rows: 1fr; opacity: 1; transition-delay: .12s; }
.how-pn-body { width: min(520px, 42vw); padding-top: 10px; }
.how-pn-body p { margin: 0; font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.how-pn-body ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.how-pn-body li { padding: 4px 9px; border: 1px solid rgba(255, 255, 255, .42); font-size: 12.5px; line-height: 1.3; }
.how-pn-body .how-pn-get { margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, .82); }
.how-pn-body .how-pn-get b { font-weight: 500; color: #fff; }

/* the timer on the open panel, running left to right */
.how-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 2px; background: rgba(255, 255, 255, .24); opacity: 0; }
.how-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.how-acc.is-auto .how-pn.is-on .how-bar { opacity: 1; }
.how-acc.is-auto .how-pn.is-on .how-bar i { animation: how-bar var(--how-t) linear forwards; }
@keyframes how-bar { to { transform: scaleX(1); } }

/* ---------- phones: the steps stack, each with its own line ---------- */
@media (max-width: 767px) {
  .how-head { grid-template-columns: minmax(0, 1fr); }
  .how-steps, .how-pano-cols { gap: 36px; }
  .how-steps { grid-template-columns: minmax(0, 1fr); }
  .how-seg, .how-step:last-child .how-seg { width: 100%; }
  .how-step .how-seg::after { display: none; }
  .how-photo { aspect-ratio: 4 / 3.6; }
  .how-pano { height: 44vh; margin-bottom: 26px; }
  .how-pano-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .how-pano-cols span { font-size: 42px; padding: 12px; }
  .how-acc { flex-direction: column; height: auto; }
  .how-pn, .how-pn.is-on { flex: none; height: 520px; }
  .how-pn-hit { display: none; }
  .how-pn-more { grid-template-rows: 1fr; opacity: 1; }
  .how-pn-body { width: 100%; }
  .how-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .how-pn, .how-pn img, .how-pn-more { transition: none; }
  .how-pn.is-on img { transform: none; }
  .how-bar { display: none; }
}
