/* =========================================================================
   JHS Premium Layer (.jhs-p)
   Used by the Media section: hover-preview index lists, a video wall, a
   masonry gallery, and a two-column FAQ. Motion is opt-in and additive —
   jhs-experience.js wires the pointer effects only when a fine pointer is
   present, so touch devices get the static layout.
   ========================================================================= */

.jhs-p {
    --ink: #001c54;
    --ink-soft: #0b2559;
    --body: #37415c;
    --muted: #6b748d;
    --accent: #fec001;
    --line: #e3e8f2;
    --card: #ffffff;

    font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.jhs-p section { position: relative; }
.jhs-p-pad { padding: 92px 0; }
.jhs-p-pad-sm { padding: 62px 0; }
.jhs-p-light { background: #fff; }
.jhs-p-tint { background: #f6f7fa; }
.jhs-p-ink { background: var(--ink); color: rgba(255, 255, 255, .8); }

/* ---- 1. Masthead ---- */
.jhs-p-masthead {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 60px;
    align-items: end;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--line);
}

.jhs-p-eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--accent);
}

.jhs-p-title {
    margin: 0;
    font-size: clamp(2rem, 1.3rem + 2.8vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -1.2px;
    font-weight: 800;
    color: var(--ink);
}

.jhs-p-intro { margin: 0; font-size: 16.5px; line-height: 1.8; font-weight: 500; }
.jhs-p-ink .jhs-p-title { color: #fff; }
.jhs-p-ink .jhs-p-intro { color: rgba(255, 255, 255, .78); }
.jhs-p-ink .jhs-p-masthead { border-bottom-color: rgba(255, 255, 255, .16); }

/* ---- 2. Index list with cursor-following preview ---- */
.jhs-p-index { margin-top: 8px; }

.jhs-p-row {
    position: relative;
    display: grid;
    grid-template-columns: 128px 1fr auto;
    gap: 30px;
    align-items: center;
    padding: 30px 4px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: padding .45s cubic-bezier(.22, .61, .36, 1), border-color .35s ease;
}

.jhs-p-row:hover { padding-left: 22px; border-color: var(--accent); }

.jhs-p-row::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width .55s cubic-bezier(.22, .61, .36, 1);
}

.jhs-p-row:hover::after { width: 100%; }

.jhs-p-row-meta {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
}

.jhs-p-row h3 {
    margin: 0;
    font-size: clamp(1.15rem, 1rem + .5vw, 1.5rem);
    line-height: 1.3;
    font-weight: 800;
    color: var(--ink);
    transition: color .3s ease;
}

.jhs-p-row:hover h3 { color: var(--ink-soft); }
.jhs-p-row p { margin: 8px 0 0; font-size: 15px; line-height: 1.7; font-weight: 500; color: var(--muted); }

.jhs-p-row-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    transition: background .35s ease, border-color .35s ease, transform .35s ease;
}

.jhs-p-row:hover .jhs-p-row-go { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }

/* the floating thumbnail follows the pointer across the list */
.jhs-p-peek {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 170px;
    border-radius: 14px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(.9) rotate(-3deg);
    transition: opacity .3s ease, transform .35s cubic-bezier(.22, .61, .36, 1);
    box-shadow: 0 30px 60px rgba(0, 28, 84, .28);
    z-index: 40;
}

.jhs-p-peek img { width: 100%; height: 100%; object-fit: cover; }
.jhs-p-peek.is-on { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1) rotate(-3deg); }

/* ---- 3. Feature card ---- */
.jhs-p-feature {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 0;
    margin-bottom: 54px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
}

.jhs-p-feature figure { margin: 0; overflow: hidden; }
.jhs-p-feature img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    transition: transform 1s cubic-bezier(.22, .61, .36, 1);
}
.jhs-p-feature:hover img { transform: scale(1.05); }
.jhs-p-feature-body { padding: 44px 46px; display: flex; flex-direction: column; justify-content: center; }
.jhs-p-feature-body h2 {
    margin: 14px 0 14px;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
    line-height: 1.22;
    font-weight: 800;
    color: var(--ink);
}
.jhs-p-feature-body p { margin: 0 0 24px; font-size: 16px; line-height: 1.78; font-weight: 500; }

/* ---- 4. Video wall ---- */
.jhs-p-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.jhs-p-video {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .45s cubic-bezier(.22, .61, .36, 1), box-shadow .45s ease;
}
.jhs-p-video:hover { transform: translateY(-6px); box-shadow: 0 28px 54px rgba(0, 28, 84, .14); }
.jhs-p-video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.jhs-p-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.jhs-p-video-body { padding: 24px 26px 28px; }
.jhs-p-video-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--muted);
}
.jhs-p-video-meta b { color: var(--ink); }
.jhs-p-video-body h3 { margin: 0 0 16px; font-size: 18px; line-height: 1.4; font-weight: 800; color: var(--ink); }

.jhs-p-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
    transition: gap .3s ease;
}
.jhs-p-link:hover { gap: 16px; color: var(--ink); }

/* ---- 5. Masonry gallery ---- */
.jhs-p-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 190px;
    gap: 16px;
}

.jhs-p-shot {
    position: relative;
    display: block;
    grid-column: span 1;
    grid-row: span 1;
    border-radius: 16px;
    overflow: hidden;
    background: #eef1f7;
}

.jhs-p-shot.is-w2 { grid-column: span 2; }
.jhs-p-shot.is-h2 { grid-row: span 2; }

.jhs-p-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s cubic-bezier(.22, .61, .36, 1), filter .5s ease;
}

.jhs-p-shot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 28, 84, 0) 45%, rgba(0, 28, 84, .7) 100%);
    opacity: 0;
    transition: opacity .45s ease;
}

.jhs-p-shot-zoom {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    font-size: 14px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .4s ease, transform .4s cubic-bezier(.22, .61, .36, 1);
}

.jhs-p-shot:hover img { transform: scale(1.07); }
.jhs-p-shot:hover::after { opacity: 1; }
.jhs-p-shot:hover .jhs-p-shot-zoom { opacity: 1; transform: translateY(0); }

/* ---- 6. FAQ ---- */
.jhs-p-faq { display: grid; grid-template-columns: 340px 1fr; gap: 66px; align-items: start; }
.jhs-p-faq-side { position: sticky; top: 120px; }
.jhs-p-faq-side h2 { margin: 0 0 14px; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); line-height: 1.2; font-weight: 800; color: var(--ink); }
.jhs-p-faq-side p { margin: 0 0 22px; font-size: 15.5px; line-height: 1.75; font-weight: 500; }

.jhs-p-search { position: relative; }
.jhs-p-search input {
    width: 100%;
    min-height: 52px;
    padding: 13px 18px 13px 46px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.jhs-p-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(254, 192, 1, .2); }
.jhs-p-search i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.jhs-p-search-count { margin: 10px 0 0; font-size: 13.5px; font-weight: 700; color: var(--muted); }

.jhs-p-qa { border-top: 1px solid var(--line); }
.jhs-p-qa[hidden] { display: none; }
.jhs-p-qa summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 26px 0;
    cursor: pointer;
    list-style: none;
    font-size: clamp(1.05rem, .98rem + .3vw, 1.2rem);
    font-weight: 800;
    color: var(--ink);
    transition: color .3s ease;
}
.jhs-p-qa summary::-webkit-details-marker { display: none; }
.jhs-p-qa summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.jhs-p-qa summary > span:first-child { flex: 1; }
.jhs-p-qa[open] summary { color: var(--ink); }
.jhs-p-qa p {
    margin: 0;
    padding: 0 60px 28px 0;
    font-size: 16px;
    line-height: 1.8;
    font-weight: 500;
    color: var(--body);
}
.jhs-p-qa[open] p { animation: jhsPqa .45s cubic-bezier(.22, .61, .36, 1) both; }
@keyframes jhsPqa { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.jhs-p-qa-mark {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.jhs-p-qa-mark::before,
.jhs-p-qa-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 15px;
    height: 2px;
    background: var(--ink);
    transform: translate(-50%, -50%);
    transition: transform .4s cubic-bezier(.22, .61, .36, 1), background .3s ease;
}
.jhs-p-qa-mark::after { transform: translate(-50%, -50%) rotate(90deg); }
.jhs-p-qa[open] .jhs-p-qa-mark::before,
.jhs-p-qa[open] .jhs-p-qa-mark::after { background: var(--accent); }
.jhs-p-qa[open] .jhs-p-qa-mark::after { transform: translate(-50%, -50%) rotate(0); }

.jhs-p-empty { padding: 34px 0; font-size: 16px; font-weight: 600; color: var(--muted); }
.jhs-p-empty[hidden] { display: none; }

/* ---- 7. Magnetic button ---- */
.jhs-p-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 15px 30px;
    border-radius: 12px;
    border: 2px solid var(--ink);
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    will-change: transform;
    transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.jhs-p-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.jhs-p-btn.is-line { background: transparent; color: var(--ink); }
.jhs-p-btn.is-line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.jhs-p-ink .jhs-p-btn.is-line { color: #fff; border-color: rgba(255, 255, 255, .5); }
.jhs-p-ink .jhs-p-btn.is-line:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* ---- 8. Closing band ---- */
.jhs-p-close {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    padding: 46px 50px;
    background: var(--ink);
    border-radius: 22px;
}
.jhs-p-close h2 { margin: 0 0 8px; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.85rem); font-weight: 800; color: #fff; }
.jhs-p-close p { margin: 0; font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .8); }
.jhs-p-close-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.jhs-p-close .jhs-p-btn { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.jhs-p-close .jhs-p-btn:hover { background: #fff; border-color: #fff; }
.jhs-p-close .jhs-p-btn.is-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.jhs-p-close .jhs-p-btn.is-line:hover { background: #fff; color: var(--ink); border-color: #fff; }

@media (max-width: 1199px) {
    .jhs-p-videos { grid-template-columns: repeat(2, 1fr); }
    .jhs-p-mosaic { grid-template-columns: repeat(3, 1fr); }
    .jhs-p-faq { grid-template-columns: 1fr; gap: 34px; }
    .jhs-p-faq-side { position: static; }
}

@media (max-width: 991px) {
    .jhs-p-pad { padding: 62px 0; }
    .jhs-p-masthead { grid-template-columns: 1fr; gap: 24px; align-items: start; }
    .jhs-p-feature { grid-template-columns: 1fr; }
    .jhs-p-feature-body { padding: 32px 28px; }
    .jhs-p-row { grid-template-columns: 1fr auto; gap: 20px; padding: 24px 4px; }
    .jhs-p-row-meta { grid-column: 1 / -1; }
    .jhs-p-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
    .jhs-p-close { flex-direction: column; align-items: flex-start; padding: 34px 30px; }
}

@media (max-width: 575px) {
    .jhs-p-videos { grid-template-columns: 1fr; }
    .jhs-p-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
    .jhs-p-qa p { padding-right: 0; }
    .jhs-p-close-actions { width: 100%; }
    .jhs-p-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .jhs-p-peek { display: none; }
    .jhs-p-qa[open] p { animation: none; }
}
