/* Story header — a full-bleed slideshow of early New Paris behind the
   headline. The photographs make the premise ("this started as the town
   telephone company") without a caption on any single one; a directional
   shade keeps the copy legible bottom-left. */
.story-header {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(92vh, 900px);
    overflow: hidden;
    background: #141414;
}

.story-slideshow { position: absolute; inset: 0; background: #141414; }
.story-slideshow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    opacity: 0;
    transition: opacity 1.4s ease;
}
/* shown before/without the slideshow script; about.js then drives opacity inline */
.story-slideshow img:first-child { opacity: 1; }

.story-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 20, 20, .84) 0%, rgba(20, 20, 20, .62) 34%, rgba(20, 20, 20, .16) 72%, rgba(20, 20, 20, .04) 100%),
        linear-gradient(0deg, rgba(20, 20, 20, .74) 0%, rgba(20, 20, 20, 0) 58%);
}

.story-header-inner {
    position: relative;
    z-index: 1;
    width: var(--shell);
    margin-inline: auto;
    padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px);
    color: var(--paper);
}
.story-header .header-title {
    max-width: 15ch;
    color: var(--paper);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 700;
    line-height: 1.04;
}
.story-header .header-subtitle {
    max-width: 560px;
    margin-top: 22px;
    color: rgba(242, 242, 242, .9);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.65;
}
/* The 125th-anniversary mark above the headline. The mark is a mask; inside
   it, a sky-blue base carries two layers of drifting light — saturated brand
   blue pools and white highlights — on offset clocks (11s and 14s), so the
   fill keeps shifting without an obvious loop. Everything is clipped to the
   mark itself; nothing glows onto the photographs. */
.story-anniversary {
    position: relative;
    width: clamp(140px, 16vw, 210px);
    aspect-ratio: 1000 / 564;
    margin-bottom: clamp(24px, 3vw, 34px);
    overflow: hidden;
    background: var(--sky);
    -webkit-mask: url('../images/125-years-mark.webp') center / contain no-repeat;
    mask: url('../images/125-years-mark.webp') center / contain no-repeat;
}
.story-anniversary::before,
.story-anniversary::after {
    content: '';
    position: absolute;
    inset: -40%;
    pointer-events: none;
}
.story-anniversary::before {
    background:
        radial-gradient(22% 34% at 26% 40%, var(--blue), transparent),
        radial-gradient(26% 38% at 72% 62%, var(--blue), transparent),
        radial-gradient(18% 26% at 56% 20%, var(--blue-dark), transparent);
    animation: anniversary-drift-a 11s ease-in-out infinite alternate;
}
.story-anniversary::after {
    background:
        radial-gradient(16% 24% at 64% 36%, var(--paper), transparent),
        radial-gradient(14% 22% at 32% 74%, var(--paper), transparent),
        radial-gradient(20% 28% at 86% 80%, var(--blue), transparent);
    animation: anniversary-drift-b 14s ease-in-out infinite alternate;
}
@keyframes anniversary-drift-a {
    0% { transform: translate(-24%, -12%) rotate(0deg); }
    50% { transform: translate(14%, 14%) rotate(22deg); }
    100% { transform: translate(26%, -14%) rotate(-10deg); }
}
@keyframes anniversary-drift-b {
    0% { transform: translate(22%, 12%) rotate(0deg) scale(1); }
    50% { transform: translate(-18%, -10%) rotate(-20deg) scale(1.15); }
    100% { transform: translate(-26%, 14%) rotate(12deg) scale(.92); }
}
@media (prefers-reduced-motion: reduce) {
    .story-anniversary::before,
    .story-anniversary::after { animation: none; }
}

.story-photo-note {
    max-width: 560px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(242, 242, 242, .24);
    color: rgba(242, 242, 242, .74);
    font-size: .92rem;
    line-height: 1.6;
}

.story-nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 28px;
}
.story-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(242, 242, 242, .38);
    border-radius: var(--radius-pill);
    background: rgba(20, 20, 20, .42);
    color: var(--paper);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.story-nav-btn:hover {
    background: rgba(20, 20, 20, .72);
    border-color: var(--paper);
}
.story-nav-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 820px) {
    .story-header { min-height: min(88vh, 720px); }
}

.story-intro { padding: var(--section-y) 0; }
.story-intro-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 11%; }
.story-intro h2 { max-width: 700px; font-size: clamp(2.25rem, 3.9vw, 3.65rem); font-weight: 700; }
.story-intro-grid > div { padding-top: 10px; }
.story-intro p { margin-bottom: 22px; color: var(--ink-soft); font-size: 1.08rem; }
@media (max-width: 850px) {
    .story-intro-grid { grid-template-columns: 1fr; gap: 38px; }
}

/* --- Story photographs --------------------------------------------------
   Three pictures of the actual work beside the story copy. Photographs, not
   a captioned process. */
.story-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.5vw, 18px);
    margin-top: 54px;
}

.story-photos figure { margin: 0; }

.story-photos img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* --- Meet the team ------------------------------------------------------
   Rendered from the `employees` collection by about.js. */
.team-section { padding: var(--section-y) 0; background: var(--surface); }

.team-heading {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 11%;
    margin-bottom: 52px;
}

.team-heading h2 {
    max-width: 690px;
    font-size: clamp(2.25rem, 3.8vw, 3.55rem);
    font-weight: 700;
}

.team-heading p { padding-top: 10px; color: var(--ink-soft); font-size: 1.08rem; }

.team-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 30px 18px;
}

.team-member { display: flex; flex-direction: column; }

.team-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 18px;
    background: var(--paper);
    border-top: 4px solid var(--blue);
    overflow: hidden;
}

.team-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    transition: opacity .24s ease;
}

.team-photo img.is-loaded { opacity: 1; }

.team-member-skeleton { pointer-events: none; }

.team-member-skeleton .team-photo,
.team-member-skeleton > span {
    background: linear-gradient(100deg, var(--paper) 30%, rgba(255, 255, 255, .72) 50%, var(--paper) 70%);
    background-size: 240% 100%;
    animation: team-skeleton 1.35s ease-in-out infinite;
}

.team-member-skeleton > span {
    display: block;
    width: 62%;
    height: 16px;
    margin-top: 3px;
}

.team-member-skeleton > span:last-child {
    width: 42%;
    height: 12px;
    margin-top: 9px;
}

@keyframes team-skeleton {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .team-photo img { transition: none; }
    .team-member-skeleton .team-photo,
    .team-member-skeleton > span { animation: none; }
}

/* Fallback when no photo is set: initials rather than a broken image. */
.team-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--ink-soft);
}

.team-member h3 { font-size: 1.02rem; font-weight: 700; }

.team-title {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: .88rem;
}

.team-years {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--rule);
    color: var(--ink-soft);
    font-size: .86rem;
}

.team-years strong {
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.team-loading {
    grid-column: 1 / -1;
    padding: 26px 0;
    color: var(--ink-soft);
    border-top: 1px solid var(--rule);
}

@media (max-width: 1250px) {
    .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .story-photos { grid-template-columns: 1fr; }
    .story-photos img { aspect-ratio: 16 / 9; }
    .team-heading { grid-template-columns: 1fr; gap: 22px; }
    .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; }
}

@media (max-width: 600px) {
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
}
