/* ==========================================================================
   History — masonry timeline (history.html only)
   Rebuilt 2026-08-11: two independent flowing stacks either side of a
   centre spine. Each side just stacks its own cards with a tight, uniform
   gap — no row-based alignment, no reserving height for the opposite side.
   Deliberately uses its own .htl-* namespace — see prior note: inheriting
   the legacy .timeline classes would mean an override war with ~30
   !important rules in density-review.css / modern-refresh.css.
   ========================================================================== */

.about-detail-history .reveal{
  opacity:0;
  transform:translateY(26px);
  transition:opacity .8s var(--ease-editorial,ease),transform .8s var(--ease-editorial,ease);
}
.about-detail-history .reveal.in-view{opacity:1;transform:none}

.about-detail-history .history{
  background:#fff!important;
  color:var(--aurum-ink);
  padding-top:clamp(38px,4.5vw,66px);
  padding-bottom:clamp(38px,4.5vw,66px);
}
.about-detail-history .history .section-head h2{color:var(--aurum-ink)}
.about-detail-history .history .section-head h2 em{color:var(--aurum-red)}
.about-detail-history .history .section-head .lead{
  max-width:620px;
  color:rgba(25,22,19,.62);
  font-size:clamp(17px,1.35vw,21px);
}

/* ---- Frame: two columns + a centre spine laid behind them ---- */
.history-timeline{
  --htl-gap-half:clamp(26px,3.4vw,46px);
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:calc(var(--htl-gap-half) * 2);
  margin-top:clamp(22px,2.4vw,34px);
}
.history-timeline::before{
  content:"";
  position:absolute;
  top:0;bottom:0;left:50%;
  width:2px;margin-left:-1px;
  background:linear-gradient(180deg,rgba(224,172,38,0),var(--aurum-gold) 4%,var(--aurum-gold) 96%,rgba(224,172,38,0));
}

/* Each side flows independently — its own height, its own gap, no
   awareness of the opposite column at all. */
.htl-col{display:flex;flex-direction:column;gap:clamp(14px,1.6vw,22px)}
.htl-col--right{margin-top:clamp(46px,7vw,110px)} /* stagger start so the two stacks don't lock-step */

/* ---- Card: image first, full width, everything else stacked below ---- */
/* 2026-08-16: client referenced a "3D interactive timeline" component and
   asked for that kind of behaviour without touching the existing card/
   column/spine structure or spacing — added as pure `transform` (mouse-
   tracked tilt, set via --htl-tilt-x/y custom properties from subpage.js's
   mousemove listener) plus a hover glow on the connector node, since
   transform/box-shadow never affect layout, only how a card already in
   place looks and moves. */
.htl-card{
  --htl-tilt-x:0deg;
  --htl-tilt-y:0deg;
  position:relative;
  display:block;
  padding:clamp(14px,1.4vw,16px);
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(25,22,19,.09);
  box-shadow:0 14px 34px rgba(25,22,19,.08);
  transform:perspective(900px) rotateX(var(--htl-tilt-x)) rotateY(var(--htl-tilt-y));
  transition:transform .2s var(--ease-editorial,ease),box-shadow .45s var(--ease-editorial,ease);
}
.htl-card:hover{
  transform:translateY(-4px) perspective(900px) rotateX(var(--htl-tilt-x)) rotateY(var(--htl-tilt-y));
  box-shadow:0 26px 60px rgba(25,22,19,.14);
}

/* Connector + node — attached to the card itself so its vertical position
   always tracks that specific card (percentage-based, so it lands in the
   card's own upper third regardless of how tall the card is). Left-column
   cards reach right toward the spine; right-column cards reach left. */
.htl-card::before{
  content:"";
  position:absolute;top:30%;
  width:var(--htl-gap-half);height:2px;
  background:rgba(224,172,38,.55);
  z-index:1;
}
.htl-card::after{
  content:"";
  position:absolute;top:30%;
  width:15px;height:15px;margin-top:-7.5px;
  border-radius:50%;
  background:#fff;
  border:3px solid var(--aurum-gold);
  box-shadow:0 0 0 5px #fff;
  transition:transform .3s var(--ease-editorial,ease),box-shadow .3s var(--ease-editorial,ease);
  z-index:2;
}
.htl-card:hover::after{
  transform:scale(1.4);
  box-shadow:0 0 0 5px #fff,0 0 16px 4px rgba(224,172,38,.5);
}
.htl-col--left .htl-card::before{right:calc(-1 * var(--htl-gap-half))}
.htl-col--left .htl-card::after{right:calc(-1 * var(--htl-gap-half) - 7.5px)}
.htl-col--right .htl-card::before{left:calc(-1 * var(--htl-gap-half))}
.htl-col--right .htl-card::after{left:calc(-1 * var(--htl-gap-half) - 7.5px)}

/* ---- Media: full-width landscape banner, image on top ---- */
.htl-media{
  position:relative;
  display:grid;
  place-items:center;
  aspect-ratio:16/9;
  width:100%;
  margin-bottom:clamp(8px,1vw,10px);
  border-radius:9px;
  overflow:hidden;
}
.htl-media::after{
  content:"A";
  position:absolute;left:50%;top:50%;
  transform:translate(-50%,-52%) rotate(-8deg);
  font-size:clamp(40px,4vw,56px);
  font-weight:700;line-height:.7;
  color:rgba(255,255,255,.17);
  pointer-events:none;
}
.htl-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.htl-media--photo::after{display:none}
.htl-media--red{background:var(--aurum-red)}
.htl-media--gold{background:var(--aurum-gold)}
.htl-media--teal{background:var(--aurum-teal)}
.htl-media--gold::before{color:rgba(23,21,20,.8)}
.htl-media--gold::after{color:rgba(23,21,20,.12)}

/* ---- Body: year badge / heading / description, tightly stacked ---- */
.htl-body{padding:0}
/* 2026-08-16: client feedback — the year is the single most important
   piece of information on each card (this is a chronological timeline,
   after all) and it was rendered as a 9.5px uppercase badge, easy to miss
   entirely next to the h3 title. Given real display weight here — the same
   heading face used everywhere else on the site, sized to read as a small
   headline of its own — while keeping the pill shape so it still reads as
   a "badge" and not a fourth heading level. */
.htl-date{
  display:inline-block;
  margin-bottom:8px;
  padding:4px 14px;
  border-radius:999px;
  background:rgba(205,32,38,.08);
  color:var(--aurum-red);
  font-family:"Cabinet Grotesk",var(--font-primary),Arial,sans-serif;
  font-size:clamp(19px,1.7vw,25px);
  font-weight:700;
  letter-spacing:-.02em;
  text-transform:none;
}
.htl-body h3{
  margin:0 0 8px;
  font-size:clamp(16px,1.35vw,21px);
  line-height:1.12;letter-spacing:-.025em;
  color:var(--aurum-ink);
}
.htl-body p{
  margin:0 0 7px;
  font-size:13px;line-height:1.5;
  color:rgba(25,22,19,.66);
}
.htl-body p:last-of-type{margin-bottom:0}

.htl-link{
  display:inline-flex;align-items:center;gap:9px;
  margin-top:14px;
  font-size:12px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;
  color:var(--aurum-red);
}
.htl-link span{transition:transform .25s var(--ease-editorial,ease)}
.htl-link:hover span{transform:translateX(4px)}

/* ---- Mobile: single chronological column, spine on the left ---- */
@media(max-width:900px){
  .history-timeline{display:block;margin-top:26px;padding-left:44px}
  .history-timeline::before{left:15px;margin-left:0}
  .htl-col{gap:14px}
  .htl-col--right{margin-top:0}
  .htl-card::before{left:-30px;right:auto;width:22px}
  .htl-card::after{left:-37.5px;right:auto}
  .htl-col--left .htl-card::before,.htl-col--right .htl-card::before{left:-30px;right:auto}
  .htl-col--left .htl-card::after,.htl-col--right .htl-card::after{left:-37.5px;right:auto}
}
@media(max-width:520px){
  .history-timeline{padding-left:34px}
  .history-timeline::before{left:11px}
}

@media(prefers-reduced-motion:reduce){
  .about-detail-history .reveal{opacity:1;transform:none;transition:none}
  .htl-card,.htl-card:hover{transform:none;transition:none}
}
