/* ============================================================
   Our History — the Afghan story in North America
   Inherits tokens from home.css (slate / champagne / ivory).
   ============================================================ */

/* ---- opening hook ---- */
.hx-hook { background: var(--slate-deep); padding: clamp(72px,9vw,130px) 40px; position: relative; overflow: hidden; }
.hx-hook__in { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(40px,6vw,80px); align-items: center; }
.hx-hook__text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hx-hook__k { font-family: var(--caps); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--champagne); }
.hx-hook__statement { font-family: var(--serif); font-weight: 500; font-size: clamp(28px,3.8vw,52px); line-height: 1.14; letter-spacing: -.02em; color: var(--ivory); text-wrap: balance; text-align: left; }
.hx-hook__statement em { font-style: italic; color: var(--champagne-soft); }
.hx-hook__note { font-family: var(--serif); font-size: clamp(16px,1.8vw,19px); line-height: 1.65; color: var(--on-dark-mut); max-width: 54ch; }
.hx-exhibit { position: relative; }
.hx-exhibit__frame { display: block; border: 1px solid rgba(199,164,104,.3); border-radius: 8px; overflow: hidden; background: #f3efe4; box-shadow: 0 30px 64px -34px rgba(0,0,0,.85); transition: transform .5s var(--ease), box-shadow .5s; transform: rotate(1.4deg); }
.hx-exhibit__frame:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 38px 76px -34px rgba(0,0,0,.9); }
.hx-exhibit__frame img { display: block; width: 100%; height: auto; }
.hx-exhibit__cap { display: block; font-family: var(--caps); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-mut); margin-top: 16px; line-height: 1.7; }
.hx-exhibit__cap b { color: var(--champagne); font-weight: 500; }
@media (max-width: 820px) { .hx-hook__in { grid-template-columns: 1fr; } .hx-exhibit { max-width: 380px; } }

/* ---- population arc chart ---- */
.hx-chart-sec { background: radial-gradient(ellipse 120% 120% at 50% 100%, var(--slate-lift) 0%, var(--slate-deep) 55%, var(--slate-deeper) 100%); padding: clamp(72px,9vw,128px) 40px; }
.hx-chart-wrap { max-width: var(--maxw); margin: 0 auto; }
.hx-chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-bottom: clamp(36px,4vw,56px); }
.hx-chart-eyebrow { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne); }
.hx-chart-title { font-family: var(--serif); font-weight: 500; font-size: clamp(30px,3.8vw,50px); line-height: 1.04; letter-spacing: -.02em; color: var(--ivory); margin-top: 12px; max-width: 18ch; }
.hx-chart-title em { font-style: italic; font-weight: 400; color: var(--champagne-soft); }
.hx-chart-legend { display: flex; flex-direction: column; gap: 10px; }
.hx-leg { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 15px; color: var(--on-dark-mut); }
.hx-leg__sw { width: 22px; height: 12px; border-radius: 3px; flex: none; }
.hx-leg__sw--band { background: rgba(199,164,104,.22); border: 1px solid rgba(199,164,104,.5); }
.hx-leg__sw--line { height: 0; border-top: 2px solid var(--champagne); border-radius: 0; }

.hx-chart { position: relative; }
.hx-chart svg { width: 100%; height: auto; max-height: 60vh; display: block; overflow: visible; }
.hx-grid line { stroke: rgba(199,164,104,.12); stroke-width: 1; }
.hx-axis text { font-family: var(--caps); font-size: 10px; letter-spacing: .12em; fill: var(--on-dark-mut); text-transform: uppercase; }
.hx-yval text { font-family: var(--caps); font-size: 9.5px; letter-spacing: .08em; fill: var(--on-dark-mut); }
.hx-band { fill: rgba(199,164,104,.16); }
.hx-line { fill: none; stroke: var(--champagne); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.hx-dot { fill: var(--champagne); }
.hx-dot-h { fill: var(--slate-deep); stroke: var(--champagne); stroke-width: 2; }
.hx-mark line { stroke: rgba(236,233,226,.28); stroke-width: 1; stroke-dasharray: 3 4; }
.hx-mark text { font-family: var(--caps); font-size: 10px; letter-spacing: .14em; fill: var(--champagne-soft); text-transform: uppercase; }
.hx-anno-n { font-family: var(--serif); font-weight: 500; fill: var(--champagne-soft); letter-spacing: -.01em; }
.hx-anno-l { font-family: var(--caps); letter-spacing: .14em; fill: var(--on-dark-mut); text-transform: uppercase; }

/* interactive key-moment dots + tooltip */
.hx-dot-key { fill: var(--slate-deep); stroke: var(--champagne); stroke-width: 2.5; transition: r .25s var(--ease), fill .25s; }
.hx-dot-key.is-on { fill: var(--champagne); r: 8; }
.hx-chart { position: relative; }
.hx-tip { position: absolute; z-index: 5; transform: translate(-50%, -100%); width: 250px; padding: 16px 18px; background: linear-gradient(180deg, rgba(30,51,64,.98), rgba(20,34,42,.98)); border: 1px solid rgba(199,164,104,.32); border-radius: 12px; box-shadow: 0 24px 50px -26px rgba(0,0,0,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s var(--ease), visibility .2s; display: flex; flex-direction: column; gap: 6px; }
.hx-tip.is-on { opacity: 1; visibility: visible; }
.hx-tip--right { transform: translate(-10%, -100%); }
.hx-tip__yr { font-family: var(--caps); font-size: 10px; letter-spacing: .18em; color: var(--champagne); }
.hx-tip__t { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.1; color: var(--ivory); }
.hx-tip__d { font-family: var(--serif); font-size: 14px; line-height: 1.5; color: var(--on-dark-mut); }
/* reveal: scroll-scrubbed left-to-right wipe (driven by JS clip) */
.hx-band, .hx-line, .hx-chart .hx-dot-h, .hx-chart .hx-mark { opacity: 1; }
.hx-anno { opacity: 0; transition: opacity .5s var(--ease); }
.hx-chart-foot { font-family: var(--serif); font-size: 15px; line-height: 1.6; color: var(--on-dark-mut); margin-top: clamp(24px,3vw,36px); max-width: 70ch; }
.hx-chart-foot em { color: var(--champagne-soft); font-style: italic; }

/* ---- era timeline ---- */
.hx-eras { background: var(--slate-deep); padding: clamp(72px,9vw,128px) 40px; }
.hx-eras__in { max-width: 940px; margin: 0 auto; }
.hx-eras__head { margin-bottom: clamp(40px,5vw,64px); }
.hx-eras__eyebrow { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne); }
.hx-eras__title { font-family: var(--serif); font-weight: 500; font-size: clamp(32px,4vw,54px); line-height: 1.04; letter-spacing: -.02em; color: var(--ivory); margin-top: 12px; }
.hx-eras__title em { font-style: italic; font-weight: 400; color: var(--champagne-soft); }

.hx-tl { position: relative; padding-left: clamp(26px,4vw,56px); }
.hx-tl::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(to bottom, var(--champagne) 0%, rgba(199,164,104,.5) 16%, rgba(199,164,104,.22) 100%); }
.hx-step { position: relative; padding: clamp(26px,3vw,40px) 0; border-top: 1px solid rgba(199,164,104,.14); }
.hx-step:first-child { border-top: none; padding-top: 6px; }
.hx-step__node { position: absolute; left: calc(-1 * clamp(26px,4vw,56px) + 1px); top: clamp(30px,3.2vw,44px); width: 14px; height: 14px; border-radius: 999px; border: 2px solid rgba(199,164,104,.5); background: var(--slate-deep); }
.hx-step:first-child .hx-step__node { top: 10px; }
.hx-step--key .hx-step__node { border-color: var(--champagne); background: var(--champagne); box-shadow: 0 0 0 5px rgba(199,164,104,.14); }
.hx-step__yr { font-family: var(--caps); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne); }
.hx-step__title { font-family: var(--serif); font-weight: 500; font-size: clamp(24px,2.8vw,36px); line-height: 1.1; letter-spacing: -.01em; color: var(--ivory); margin-top: 8px; }
.hx-step__title em { font-style: italic; font-weight: 400; color: var(--champagne-soft); }
.hx-step__body { font-family: var(--serif); font-size: clamp(17px,1.9vw,20px); line-height: 1.66; color: var(--on-dark-mut); margin-top: 12px; max-width: 64ch; }
.hx-step__body em { color: var(--champagne-soft); font-style: italic; }

/* source citation under a data point */
.hx-cite { font-family: var(--serif); font-size: 13.5px; line-height: 1.55; color: var(--on-dark-mut); margin-top: 16px; }
.hx-cite b { font-family: var(--caps); font-weight: 500; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--champagne); margin-right: 9px; }
.hx-cite a { color: var(--champagne-soft); border-bottom: 1px solid rgba(199,164,104,.28); transition: border-color .25s; }
.hx-cite a:hover { border-bottom-color: var(--champagne); }
.hx-cite__sep { opacity: .45; margin: 0 7px; }

/* inline figure callout inside a step */
.hx-fig { display: flex; gap: 18px; align-items: flex-start; margin-top: 22px; padding: 20px 24px; border: 1px solid rgba(199,164,104,.22); border-radius: 12px; background: linear-gradient(168deg, rgba(199,164,104,.06), rgba(0,0,0,.05)); }
.hx-fig__mono { flex: none; width: 46px; height: 46px; border-radius: 999px; border: 1px solid rgba(199,164,104,.4); display: flex; align-items: center; justify-content: center; font-family: var(--caps); font-size: 16px; letter-spacing: .04em; color: var(--champagne); }
.hx-fig__name { font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--ivory); }
.hx-fig__role { font-family: var(--caps); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--champagne); margin-top: 4px; }
.hx-fig__bio { font-family: var(--serif); font-size: 15.5px; line-height: 1.55; color: var(--on-dark-mut); margin-top: 8px; }

/* archival photo as a right-hand column within a timeline step */
.hx-step::after { content: ""; display: block; clear: both; }
.hx-step:has(.hx-photo) { display: grid; grid-template-columns: 1fr min(340px, 38%); column-gap: clamp(28px,3.5vw,52px); align-items: start; }
.hx-step:has(.hx-photo) > .hx-step__node { grid-row: 1 / 2; }
.hx-step:has(.hx-photo) > :not(.hx-photo):not(.hx-step__node) { grid-column: 1; }
.hx-photo { grid-column: 2; grid-row: 1 / 100; align-self: center; margin: 0; border: 1px solid rgba(199,164,104,.24); border-radius: 10px; overflow: hidden; background: var(--slate-deeper); }
.hx-photo img { display: block; width: 100%; height: auto; filter: saturate(.94) contrast(1.02); }
.hx-photo figcaption { font-family: var(--caps); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-mut); line-height: 1.7; padding: 14px 18px; border-top: 1px solid rgba(199,164,104,.16); }
.hx-photo figcaption b { color: var(--champagne); font-weight: 500; }
.hx-photo figcaption a { color: var(--champagne-soft); border-bottom: 1px solid rgba(199,164,104,.3); }
.hx-photo--portrait { justify-self: center; max-width: 280px; }
.hx-photo--light { background: var(--cream); }
.hx-photo--light img { filter: none; padding: 16px 16px 8px; }
.hx-photo--light figcaption { color: var(--ink-mut); border-top-color: rgba(43,74,92,.16); }
.hx-photo--light figcaption b { color: var(--champagne-deep); }
.hx-photo--light figcaption a { color: var(--champagne-deep); border-bottom-color: rgba(169,138,85,.4); }
@media (max-width: 700px) { .hx-step:has(.hx-photo) { display: block; } .hx-photo, .hx-photo--portrait { width: 100%; max-width: 100%; margin: 22px 0 0; } }

/* a figure or stat promoted to a right-hand aside column */
.hx-step--aside { display: grid; grid-template-columns: 1fr min(360px, 40%); column-gap: clamp(28px,3.5vw,52px); align-items: center; }
.hx-step--aside > .hx-step__node { grid-row: 1 / 2; }
.hx-step--aside > :not(.hx-fig):not(.hx-stat):not(.hx-photo):not(.hx-step__node) { grid-column: 1; align-self: start; }
.hx-step--aside > .hx-fig, .hx-step--aside > .hx-stat, .hx-step--aside > .hx-photo { grid-column: 2; grid-row: 1 / 100; align-self: center; margin-top: 0; }
.hx-step--aside > .hx-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: clamp(26px,3vw,38px) clamp(28px,3vw,36px); border-radius: 0 12px 12px 0; }
.hx-step--aside > .hx-stat .hx-stat__n { font-size: clamp(52px,6.5vw,84px); }
.hx-step--aside > .hx-stat .hx-stat__l { font-size: 11px; }
.hx-step--aside > .hx-stat .hx-stat__arrow { font-size: 26px; margin: 4px 0; }
@media (max-width: 700px) { .hx-step--aside { display: block; } .hx-step--aside > .hx-fig, .hx-step--aside > .hx-stat { margin-top: 22px; } }

/* population stat badge inside a step */
.hx-stat { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-top: 20px; padding: 14px 20px; border-left: 2px solid var(--champagne); background: rgba(199,164,104,.05); border-radius: 0 8px 8px 0; }
.hx-stat__n { font-family: var(--serif); font-weight: 500; font-size: clamp(26px,3vw,34px); line-height: 1; color: var(--ivory); }
.hx-stat__l { font-family: var(--caps); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne); }
.hx-stat__arrow { color: var(--champagne); font-size: 22px; }

/* ---- notable figures grid ---- */
.hx-figs { background: var(--cream); color: var(--ink); padding: clamp(72px,9vw,128px) 40px; }
.hx-figs__in { max-width: var(--maxw); margin: 0 auto; }
.hx-figs__head { margin-bottom: clamp(36px,4vw,52px); }
.hx-figs__eyebrow { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne-deep); }
.hx-figs__title { font-family: var(--serif); font-weight: 500; font-size: clamp(30px,3.8vw,50px); line-height: 1.04; letter-spacing: -.02em; color: var(--ink); margin-top: 12px; }
.hx-figs__title em { font-style: italic; font-weight: 400; color: var(--champagne-deep); }
.hx-figs__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px,1.8vw,22px); }
.hx-figc { display: flex; flex-direction: column; gap: 10px; padding: clamp(26px,2.6vw,32px); background: #fff; border: 1px solid rgba(43,74,92,.14); border-radius: 14px; transition: transform .45s var(--ease), box-shadow .45s, border-color .45s; }
.hx-figc:hover { transform: translateY(-5px); box-shadow: 0 26px 52px -34px rgba(43,74,92,.55); border-color: rgba(169,138,85,.4); }
.hx-figc__yr { font-family: var(--caps); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--champagne-deep); }
.hx-figc__rule { width: 26px; height: 1px; background: var(--champagne-deep); opacity: .6; }
.hx-figc__name { font-family: var(--serif); font-weight: 500; font-size: clamp(22px,2.2vw,27px); line-height: 1.08; color: var(--ink); }
.hx-figc__role { font-family: var(--caps); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne-deep); }
.hx-figc__bio { font-family: var(--serif); font-size: 15.5px; line-height: 1.55; color: var(--ink-mut); margin-top: 4px; }

/* ---- settlement hubs ---- */
.hx-hubs { background: var(--slate-deep); padding: clamp(72px,9vw,128px) 40px; }
.hx-hubs__in { max-width: var(--maxw); margin: 0 auto; }
.hx-hubs__head { margin-bottom: clamp(36px,4vw,52px); max-width: 60ch; }
.hx-hubs__eyebrow { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne); }
.hx-hubs__title { font-family: var(--serif); font-weight: 500; font-size: clamp(30px,3.8vw,50px); line-height: 1.04; letter-spacing: -.02em; color: var(--ivory); margin-top: 12px; }
.hx-hubs__title em { font-style: italic; font-weight: 400; color: var(--champagne-soft); }
.hx-hubs__sub { font-family: var(--serif); font-size: clamp(17px,1.9vw,20px); line-height: 1.6; color: var(--on-dark-mut); margin-top: 16px; }
.hx-hubs__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px,1.4vw,16px); }
.hx-hub { padding: clamp(20px,2.2vw,26px); border: 1px solid rgba(199,164,104,.18); border-radius: 12px; background: linear-gradient(168deg, rgba(255,255,255,.03), rgba(0,0,0,.05)); display: flex; flex-direction: column; gap: 6px; transition: border-color .4s, transform .4s; }
.hx-hub:hover { border-color: rgba(199,164,104,.4); transform: translateY(-3px); }
.hx-hub--home { background: linear-gradient(168deg, rgba(199,164,104,.1), rgba(0,0,0,.05)); border-color: rgba(199,164,104,.4); }
.hx-hub__city { font-family: var(--serif); font-weight: 500; font-size: clamp(19px,2vw,23px); line-height: 1.08; color: var(--ivory); }
.hx-hub__region { font-family: var(--caps); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-mut); }
.hx-hub__tag { font-family: var(--caps); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--champagne); margin-top: 4px; }

/* ---- hub regions (geographic grouping) ---- */
.hx-regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px,1.8vw,22px); }
.hx-region { border: 1px solid rgba(199,164,104,.18); border-radius: 14px; padding: clamp(24px,2.6vw,32px); background: linear-gradient(168deg, rgba(255,255,255,.03), rgba(0,0,0,.05)); }
.hx-region__h { font-family: var(--caps); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne); padding-bottom: 14px; border-bottom: 1px solid rgba(199,164,104,.22); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hx-region__h span { font-family: var(--serif); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--on-dark-mut); }
.hx-place { padding: 16px 0; border-top: 1px solid rgba(199,164,104,.1); }
.hx-place:first-of-type { border-top: none; }
.hx-place__city { font-family: var(--serif); font-weight: 500; font-size: clamp(20px,2.1vw,24px); line-height: 1.1; color: var(--ivory); }
.hx-place__city em { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne); margin-left: 8px; }
.hx-place__reg { font-family: var(--caps); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-mut); margin-top: 5px; }
.hx-place__note { font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.4; color: var(--champagne-soft); margin-top: 6px; }
.hx-place--home { margin: -4px -10px; padding: 16px 10px; border-radius: 10px; background: linear-gradient(168deg, rgba(199,164,104,.1), rgba(0,0,0,.04)); border-top: none; }
.hx-place--home .hx-place__city { color: var(--champagne-soft); }
@media (max-width: 820px) { .hx-regions { grid-template-columns: 1fr; } }
.hx-map { position: relative; margin-top: 8px; border: 1px solid rgba(199,164,104,.18); border-radius: 16px; overflow: hidden; background: radial-gradient(ellipse 80% 90% at 50% 38%, var(--slate-deep) 0%, var(--slate-deeper) 100%); }
.hx-map svg { width: 100%; height: auto; display: block; }
.hx-map__grat line { stroke: rgba(199,164,104,.06); stroke-width: 1; }
.hx-map__region { font-family: var(--caps); fill: rgba(236,233,226,.05); letter-spacing: .24em; }
.hx-map__edge { font-family: var(--caps); font-size: 10px; letter-spacing: .34em; fill: var(--on-dark-mut); opacity: .45; }
.hx-map__coast { fill: rgba(199,164,104,.05); stroke: rgba(199,164,104,.32); stroke-width: 1.5; stroke-linejoin: round; }
.hx-pin { fill: var(--champagne); }
.hx-pin-ring { fill: none; stroke: var(--champagne); stroke-width: 1.5; opacity: .5; transform-box: fill-box; transform-origin: center; }
.hx-pin--home { animation: hx-pin-pulse 2.8s var(--ease) infinite; }
@keyframes hx-pin-pulse { 0%{ r:7; opacity:.6; } 70%{ r:18; opacity:0; } 100%{ r:18; opacity:0; } }
.hx-mname { font-family: var(--serif); font-weight: 500; font-size: 17px; fill: var(--ivory); }
.hx-mname--home { font-size: 21px; fill: var(--champagne-soft); }
.hx-mreg { font-family: var(--caps); font-size: 8.5px; letter-spacing: .14em; fill: var(--champagne); }
@media (max-width: 700px) { .hx-mname { font-size: 22px; } .hx-mreg { font-size: 12px; } }

/* ---- sourcing note ---- */
.hx-src { max-width: 820px; margin: 0 auto; }
.hx-src__k { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne-deep); }
.hx-src__p { font-family: var(--serif); font-size: clamp(16px,1.8vw,19px); line-height: 1.72; color: var(--ink-mut); margin-top: 14px; }
.hx-src__p em { color: var(--champagne-deep); font-style: italic; }

@media (max-width: 900px) {
  .hx-figs__grid { grid-template-columns: repeat(2, 1fr); }
  .hx-hubs__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .hx-figs__grid { grid-template-columns: 1fr; }
  .hx-hubs__grid { grid-template-columns: repeat(2, 1fr); }
  .hx-chart-legend { flex-direction: row; gap: 18px; }
}
