/* Resources hub (resources.php). Site plan: compact type band with large topic tiles; set piece: a pinned horizontal
   filmstrip of the resources with a progress line. Backgrounds: blush opener → ink filmstrip → crimson portal → white help → wine footer. */

/* ---------- Opener ---------- */
.rh { position: relative; background: var(--blush); padding: calc(var(--head-h) + clamp(26px, 4.6vh, 54px)) 0 clamp(40px, 6vh, 64px); overflow: clip; }
.rh__ruling { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(117,21,35,.07) 31px, rgba(117,21,35,.07) 32px); animation: rh-drift 20s linear infinite; }
.rh__ruling::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(14px, 3.2vw, 52px); width: 1px; background: rgba(163,24,62,.38); }
@keyframes rh-drift { to { background-position: 0 32px; } }
.rh__oval { position: absolute; right: -14vw; top: -30%; width: min(1100px, 76vw); overflow: visible; pointer-events: none; }
.rh__oval ellipse { fill: none; stroke: rgba(163,24,62,.14); stroke-width: 1.4; }
.rh__oval .dash { stroke: rgba(163,24,62,.3); stroke-dasharray: 3 12; animation: dash-turn 46s linear infinite; }
.rh .wrap { position: relative; }
.rh__head { margin-bottom: clamp(24px, 4vh, 40px); }
.rh__title { font-size: clamp(2.5rem, min(4.6vw, 8.4vh), 4.6rem); line-height: 1.03; margin-bottom: clamp(12px, 2vh, 20px); }
.rh__lede { color: var(--ink); margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.tile { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-content: center; min-height: clamp(108px, 14vh, 136px); padding: 18px 58px 18px 18px; background: #fff; border-top: 3px solid var(--crimson); color: var(--ink); text-decoration: none; box-shadow: 0 14px 30px rgba(34,9,15,.07); isolation: isolate; overflow: hidden; }
.tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--highlight); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); }
.tile:hover::before, .tile:focus-visible::before { transform: scaleY(1); }
.tile::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(260px circle at var(--lx, 50%) var(--ly, 50%), rgba(255,255,255,.4), transparent 60%); opacity: 0; transition: opacity .4s; }
.tile:hover::after { opacity: 1; }
.tile__icon { grid-row: 1 / span 2; width: 40px; height: 40px; align-self: center; overflow: visible; }
.tile__icon path, .tile__icon rect, .tile__icon circle, .tile__icon ellipse { fill: none; stroke: var(--crimson); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.motion:not(.motion-fail) .tile__icon > * { stroke-dashoffset: 1; }
.tile__t { font-family: var(--serif); font-size: clamp(1.25rem, 1.6vw, 1.5rem); line-height: 1.12; }
.tile__h { font-size: .95rem; color: var(--ink-soft); font-weight: 600; margin-top: 4px; }
.tile__go { position: absolute; right: 0; bottom: 0; width: 42px; height: 42px; display: grid; place-items: center; background: var(--claret); color: #fff; transition: background .3s; }
.tile__go svg { width: 18px; }
.tile:hover .tile__go { background: var(--crimson); }
.tile:hover .tile__go svg { animation: arrow-run .6s var(--ease); }
.motion:not(.motion-fail) [data-rh-in], .motion:not(.motion-fail) [data-tiles] > li { opacity: 0; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .rh__title { font-size: clamp(2.1rem, 9.4vw, 2.7rem); }
  .tiles { gap: 8px; }
  .tile { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 14px 14px 46px; }
  .tile__icon { grid-row: auto; width: 30px; height: 30px; margin-bottom: 8px; }
  .tile__t { font-size: 1.12rem; }
  .tile__h { font-size: .9rem; }
  .tile__go { width: 36px; height: 36px; }
}

/* ---------- Filmstrip: pinned, travels sideways ---------- */
.film { position: relative; background: var(--ink-blue); color: var(--on-dark); overflow: clip; }
.film::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(255,255,255,.04) 35px, rgba(255,255,255,.04) 36px); animation: film-drift 22s linear infinite; }
@keyframes film-drift { to { background-position: 0 36px; } }
.film__pin { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--head-h) + 20px) 0 clamp(24px, 4vh, 40px); }
.film__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 40px; margin-bottom: clamp(18px, 3vh, 34px); }
.film h2 { color: #fff; }
.film__count { margin: 0; font-weight: 600; color: var(--on-dark-soft); font-size: 1.05rem; }
.film__count b { font-family: var(--serif); font-weight: 400; font-size: 2.4rem; color: var(--highlight); margin-right: 4px; }
.film__view { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.film__view::-webkit-scrollbar { display: none; }
.film__view:focus-visible { outline-offset: -3px; }
.film__track { list-style: none; margin: 0; display: flex; gap: clamp(18px, 2.2vw, 34px); width: max-content; padding: 6px max(var(--gutter), calc((100vw - 1320px) / 2)) 10px; }
.fr { flex: none; width: clamp(290px, 38vw, 580px); scroll-snap-align: start; scroll-margin-left: max(var(--gutter), calc((100vw - 1320px) / 2)); }
.fr__link { display: block; color: inherit; text-decoration: none; }
.fr__media { position: relative; height: min(46vh, 420px); overflow: hidden; background: #0B141E; border-top: 3px solid var(--crimson); }
.fr__media img { position: absolute; left: -6%; top: 0; width: 112%; max-width: none; height: 100%; object-fit: cover; transition: filter .6s var(--ease); }
.fr:first-child .fr__media img { object-position: 50% 20%; }
.fr__link:hover .fr__media img { filter: saturate(1.12) contrast(1.04); }
.fr__body { position: relative; padding: 18px 0 0; }
.fr__body h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2vw, 1.95rem); line-height: 1.1; color: #fff; margin-bottom: 8px; }
.fr__body p { color: var(--on-dark-soft); margin-bottom: 12px; }
.fr__go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--highlight); background: linear-gradient(currentColor, currentColor) no-repeat 0 85% / 0 1.5px; transition: background-size .4s var(--ease); }
.fr__go svg { width: 16px; transition: transform .35s var(--ease); }
.fr__link:hover .fr__go { background-size: 100% 1.5px; }
.fr__link:hover .fr__go svg { transform: translateX(4px); }
.film__rule { margin-top: clamp(14px, 2.4vh, 26px); }
.film__bar { position: relative; height: 3px; background: rgba(255,255,255,.14); }
.film__bar span { position: absolute; inset: 0; background: var(--crimson); transform-origin: left; transform: scaleX(.143); }
.film__ticks { list-style: none; margin: 0; padding: 10px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.film__ticks li { position: relative; padding-top: 6px; font-weight: 600; font-size: .92rem; color: rgba(217,198,203,.6); transition: color .4s; }
.film__ticks li::before { content: ''; position: absolute; left: 0; top: -13px; width: 2px; height: 10px; background: rgba(255,255,255,.35); }
.film__ticks li.is-on { color: var(--highlight); }
.film__ticks li.is-past { color: var(--on-dark); }
.film.is-pinned .film__view { overflow: visible; overflow-x: clip; scroll-snap-type: none; }
/* No motion: every resource on show as a grid, not a strip that runs off the screen */
.no-js .film__view, .rm .film__view, .motion-fail .film__view { overflow: visible; scroll-snap-type: none; }
.no-js .film__track, .rm .film__track, .motion-fail .film__track { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); width: auto; padding-inline: var(--gutter); max-width: 1320px; margin-inline: auto; box-sizing: content-box; }
.no-js .fr, .rm .fr, .motion-fail .fr { width: auto; }
.no-js .film__rule, .rm .film__rule, .motion-fail .film__rule { display: none; }
.film.is-pinned .film__track { will-change: transform; }
@media (max-width: 900px) {
  .film__pin { min-height: 0; padding: 64px 0 48px; }
  .fr { width: min(84vw, 420px); }
  .fr__media { height: min(36vh, 260px); }
  .film__ticks { display: none; }
}

/* ---------- Client portal ---------- */
.rportal { overflow: clip; }
.rportal__oval { position: absolute; right: -16vw; top: -40%; width: 70vw; height: 140%; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); box-shadow: inset 0 0 0 40px rgba(255,255,255,.035), inset 0 0 0 80px rgba(255,255,255,.025); animation: wobble 24s ease-in-out infinite alternate; pointer-events: none; }
.rportal__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(60px, 7vw, 120px); align-items: center; }
.rportal h2 { color: #fff; margin-bottom: 18px; }
.rportal__copy .lede { margin-bottom: 20px; }
.rportal__list { font-weight: 600; margin-bottom: 28px; }
.rportal__media { position: relative; margin: 0; }
.rportal__frame { aspect-ratio: 1264 / 848; max-height: var(--media-cap); box-shadow: 22px 22px 0 rgba(0,0,0,.18); }
.rportal__frame img { position: absolute; inset: -6% 0 auto; height: 112%; }
.rportal__card { position: absolute; left: clamp(-56px, -4vw, -30px); bottom: -34px; z-index: 2; width: clamp(220px, 18vw, 270px); padding: 14px 16px 12px; background: #fff; color: var(--ink); border-left: 3px solid var(--crimson); box-shadow: 0 22px 44px rgba(0,0,0,.3); }
.rportal__card p { margin: 0; }
.rportal__ch { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; margin-bottom: 4px !important; border-bottom: 2px solid var(--ink); font-family: var(--serif); font-size: 1.15rem; }
.rportal__ch i { width: 10px; height: 10px; border-radius: 50%; background: #3DBE7E; box-shadow: 0 0 0 0 rgba(61,190,126,.5); animation: rp-pulse 2s infinite; }
@keyframes rp-pulse { 70% { box-shadow: 0 0 0 9px rgba(61,190,126,0); } 100% { box-shadow: 0 0 0 0 rgba(61,190,126,0); } }
.rportal__row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #DCCBD0; font-size: .95rem; }
.rportal__row:last-child { border-bottom: 0; }
.rportal__row span { color: var(--ink-soft); }
.rportal__row b { color: var(--crimson); }
.rportal__cap { left: auto; right: -14px; top: 18px; bottom: auto; border-left: 3px solid var(--highlight); box-shadow: 0 12px 26px rgba(0,0,0,.25); }
@media (max-width: 900px) { .rportal__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .rportal__card { left: 12px; } .rportal__media { margin-bottom: 30px; } .rportal__cap { right: 0; } }

/* ---------- Help ---------- */
.rhelp { overflow: clip; }
.rhelp__grid { display: grid; grid-template-columns: min(380px, 32%) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.rhelp__photo { position: relative; margin: 0; padding: 20px 20px 0 0; width: 100%; }
.rhelp__ring { position: absolute; left: -9%; top: -5%; width: 116%; height: 110%; overflow: visible; pointer-events: none; }
.rhelp__ring ellipse { fill: none; stroke: var(--crimson); stroke-width: 1.5; stroke-dasharray: 5 10; animation: dash-turn 34s linear infinite; opacity: .6; }
.rhelp__photo .frame { aspect-ratio: 4 / 5; max-height: var(--media-cap); }
.rhelp__photo .frame img { position: absolute; inset: -6% 0 auto; height: 112%; }
.motion .rhelp__photo .frame { animation: rh-breathe 9s ease-in-out infinite alternate; }
@keyframes rh-breathe { from { transform: scale(1); } to { transform: scale(1.03); } }
.rhelp__photo .cap { left: -16px; bottom: 26px; border-left: 3px solid var(--crimson); box-shadow: 0 12px 26px rgba(34,9,15,.16); }
.rhelp__copy h2 { margin-bottom: 18px; }
.rhelp__copy .lede { margin-bottom: 26px; }
.rhelp__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 34px 0 0; border-top: 2px solid var(--ink); }
.rhelp__facts > div { padding: 14px 16px 0 0; }
.rhelp__facts > div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.rhelp__facts dt { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--claret); margin-bottom: 4px; }
.rhelp__facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.rhelp__facts a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--crimson), var(--crimson)) no-repeat 0 100% / 100% 1.5px; }
@media (max-width: 900px) { .rhelp__grid { grid-template-columns: minmax(0, 1fr); } .rhelp__photo { width: min(70%, 300px); margin-left: 16px; } }
@media (max-width: 640px) { .rhelp__facts { grid-template-columns: minmax(0, 1fr); } .rhelp__facts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 10px; } .rhelp__facts a { display: inline-flex; min-height: 44px; align-items: center; background-position: 0 80%; } }
