/* safety-and-security.css - the Safety and Security page: sub-headings, photo rows, table cells that keep their line breaks */

/* ── heading ── */
.sp-heading { margin-top: 1.6rem; margin-bottom: -0.3rem; }
.sp-heading-title { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
.sp-heading--h3 .sp-heading-title { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.sp-heading--h4 .sp-heading-title { font-size: 1.1rem; }
.sp-heading--h3 { margin-top: 2.2rem; }

/* ── photos: a row's width is its photos' ratios at 24rem tall, so one photo is not blown up; they shrink together on a narrow screen ── */
.sp-photos { display: flex; flex-direction: column; gap: 1rem; }
.sp-photo-row {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: calc(var(--sum) * 24rem + 1rem);
    margin-inline: auto;
}
.sp-photo {
    flex: var(--ar) 1 0;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    aspect-ratio: var(--ar);
}

/* ── tags: hidden until the people button is pressed; then avatars, one opens to name and role ── */
.sp-photo { overflow: visible; }
.sp-photo > img { border-radius: inherit; }
.sp-tags { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.sp-tag { position: absolute; width: 0; height: 0; }
.sp-tag.is-lit { z-index: 1; }
.sp-tag-pill {
    position: absolute;
    top: -16px;
    left: -16px;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.92);
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22), 0 6px 18px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    scale: 0.4;
    transform-origin: 16px 50%;
    transition: opacity 0.3s ease, scale 0.5s var(--apple-ease, ease), background 0.35s ease, padding 0.45s var(--apple-ease, ease), visibility 0s linear 0.3s;
}
.sp-tag.is-flip .sp-tag-pill { left: auto; right: -16px; flex-direction: row-reverse; transform-origin: calc(100% - 16px) 50%; }
.show-tags .sp-tag-pill { opacity: 1; visibility: visible; scale: 1; pointer-events: auto; transition-delay: 0s; }
.show-tags .sp-tag.is-lit .sp-tag-pill {
    translate: var(--shift, 0px) 0;
    padding-right: 13px;
    background: rgba(20, 24, 20, 0.62);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
            backdrop-filter: blur(12px) saturate(1.4);
}
.show-tags .sp-tag.is-flip.is-lit .sp-tag-pill { padding-right: 2px; padding-left: 13px; }
.sp-tag-face { all: unset; display: block; border-radius: 50%; cursor: pointer; }
.sp-tag-face:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sp-photo .sp-tag-avatar {
    display: grid; place-items: center;
    width: 28px; height: 28px; flex: none;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 22%;
    background: #c9d3c6;
    color: #1B1B18;
    font-size: 0.62rem; font-weight: 700;
}
.sp-tag-words {
    display: grid;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    line-height: 1.25;
    color: #fff;
    text-decoration: none;
    font-family: 'Quicksand', sans-serif;
    transition: max-width 0.5s var(--apple-ease, ease), opacity 0.25s ease, margin 0.5s var(--apple-ease, ease), visibility 0s linear 0.5s;
}
.sp-tag.is-lit .sp-tag-words { max-width: 16em; opacity: 1; visibility: visible; margin-left: 8px; transition-delay: 0s; }
.sp-tag.is-flip.is-lit .sp-tag-words { margin-left: 0; margin-right: 8px; text-align: right; }
.sp-tag-name { font-size: 0.76rem; font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.sp-tag-words:hover .sp-tag-name { text-decoration-color: currentColor; }
.sp-tag-role { font-size: 0.64rem; opacity: 0.78; }
.sp-tag-words:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

/* the people button: how many are tagged; pressed while the tags show */
.sp-people-btn {
    position: absolute;
    z-index: 4;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 11px 0 9px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(20, 24, 20, 0.5);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
            backdrop-filter: blur(10px) saturate(1.4);
    color: #fff;
    font: 600 0.74rem/1 'Quicksand', sans-serif;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}
.sp-people-btn svg { width: 15px; height: 15px; display: block; }
.sp-people-btn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.92); color: #1B1B18; }
.sp-people-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html[data-reduce-motion] :is(.sp-tag-pill, .sp-tag-words, .sp-people-btn) { transition: none; }

/* ── viewable (Outreach): a click opens the photo viewer; the corner button (.reel-zoom-btn, image-reel.css) shows on hover and focus ── */
.sp-photo.is-viewable { cursor: zoom-in; }
@media (hover: hover) {
    .sp-photo.is-viewable:hover .sp-zoom-btn { opacity: 1; }
}

/* ── tables: a hazard or lab per line, headers free to wrap ── */
.content-table td,
.content-table th { white-space: pre-line; }
.content-table thead th { white-space: normal; }

/* ── links in the text take the text colour, underlined ── */
.project-text a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.project-text a:hover { text-decoration-thickness: 2px; }
