@charset "UTF-8";
/* =====================================================================
   TIMBO / COLLAPSIBLE WORKS GALLERY
   01 Section & entry    02 Accordion cover    03 Photo grid
   04 Lightbox           05 Responsive         06 Print / accessibility
   This stylesheet is scoped to works-* classes. Existing styles remain.
   ===================================================================== */

/* 01 / Section & entry ----------------------------------------------- */
.works-section {
    background: var(--white);
    border-top: 1px solid var(--line);
}

.works-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 36px;
}

.works-heading .eyebrow { color: var(--orange-text); }
.works-heading h2 { font-size: clamp(32px, 3.4vw, 46px); }
.works-heading > p { color: var(--muted); font-size: 18px; line-height: 1.9; }

.works-entry { margin-top: 28px; }
.works-entry > a {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: var(--orange);
}
.works-entry > a:hover { color: var(--orange-text); }

/* 02 / Accordion cover ----------------------------------------------- */
.works-accordion {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    scroll-margin-top: calc(var(--header-height) + 24px);
}

.works-summary {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr) 120px 58px;
    align-items: center;
    gap: 30px;
    min-height: 208px;
    padding: 24px 36px 24px 24px;
    list-style: none;
    cursor: pointer;
    transition: background 160ms ease;
}
.works-summary::-webkit-details-marker { display: none; }
.works-summary::marker { content: ""; }
.works-summary:hover { background: var(--sage); }
.works-summary:focus-visible { outline-offset: -5px; }

.works-cover {
    position: relative;
    height: 160px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
}
.works-cover::before {
    content: "";
    width: 124px;
    height: 124px;
    position: absolute;
    border-radius: 50%;
    background: var(--lime);
    opacity: .65;
}
.works-cover img {
    position: relative;
    width: 114px;
    height: 150px;
    object-fit: contain;
}
.works-summary-copy { display: flex; flex-direction: column; gap: 9px; }
.works-summary-kicker {
    font-family: var(--font-latin);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .13em;
    color: var(--muted);
}
.works-summary-copy strong { font-size: 29px; line-height: 1.55; letter-spacing: -.015em; }
.works-summary-description { font-size: 17px; color: var(--muted); }
.works-count { display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--font-latin); font-size: 66px; line-height: 1; font-weight: 700; letter-spacing: -.055em; }
.works-count > span { font-size: 11px; letter-spacing: .18em; line-height: 2; }
.works-toggle-mark {
    display: block;
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--white);
    transition: background 160ms ease;
}
.works-toggle-mark::before, .works-toggle-mark::after {
    content: "";
    width: 20px;
    height: 2px;
    background: currentColor;
    position: absolute;
    top: 28px;
    left: 19px;
}
.works-toggle-mark::after { transform: rotate(90deg); transition: transform 160ms ease; }
.works-accordion[open] .works-toggle-mark::after { transform: rotate(0); }
.works-summary:hover .works-toggle-mark { background: var(--orange-text); }
.works-label-close { display: none; }
.works-accordion[open] .works-label-open { display: none; }
.works-accordion[open] .works-label-close { display: inline; }

/* 03 / Photo grid ---------------------------------------------------- */
.works-content { padding: 32px; border-top: 1px solid var(--line); background: var(--white); }
.works-toolbar, .works-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.works-toolbar { margin-bottom: 24px; }
.works-toolbar > p { color: var(--muted); font-size: 16px; }
.works-close-album {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 18px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    flex-shrink: 0;
}
.works-close-album:hover { background: var(--paper); border-color: var(--ink); }
.works-js-only { display: none; }
.works-enhanced .works-js-only { display: inline-flex; }
.works-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.works-card { margin: 0; min-width: 0; }
.works-photo-link { display: block; border-radius: 14px; }
.works-photo-frame {
    display: block;
    position: relative;
    aspect-ratio: 1.1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.works-photo-frame > img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform 180ms ease; }
.works-photo-link:hover .works-photo-frame { border-color: var(--ink); }
.works-photo-link:hover .works-photo-frame > img { transform: scale(1.035); }
.works-magnify {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-latin);
    font-size: 23px;
    line-height: 1;
}
.works-card-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 2px 0; font-size: 17px; font-weight: 700; }
.works-card-action { color: var(--muted); font-size: 13px; font-weight: 400; }
.works-bottom { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.works-note { color: var(--muted); font-size: 15px; line-height: 1.8; }

/* Never substitute another work when an original photo cannot load. */
.works-photo-state { display: none; position: absolute; inset: 0; place-items: center; text-align: center; font-size: 14px; line-height: 1.8; color: var(--muted); padding: 15px; }
.works-state-error { display: none; }
.works-enhanced .works-photo-frame:not(.is-loaded) > img { opacity: 0; }
.works-enhanced .works-photo-frame:not(.is-loaded) .works-photo-state { display: grid; }
.works-photo-frame.is-unavailable .works-state-loading { display: none; }
.works-photo-frame.is-unavailable .works-state-error { display: inline; }
.works-photo-frame.is-unavailable .works-magnify { display: none; }
.works-network-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; margin-bottom: 24px; border-left: 3px solid var(--orange); background: #fff5eb; color: var(--ink); font-size: 15px; }
.works-network-notice button { flex-shrink: 0; min-height: 42px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 8px 12px; font-size: 14px; }

/* 04 / Lightbox ------------------------------------------------------ */
body.works-dialog-open { overflow: hidden; }
.works-dialog { width: min(1060px, calc(100% - 40px)); max-width: 1060px; max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 24px 100px rgb(0 0 0 / 30%); }
.works-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.works-dialog::backdrop { background: rgb(24 27 23 / 83%); }
.works-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 26px; border-bottom: 1px solid var(--line); background: var(--paper); }
.works-dialog-kicker { font-family: var(--font-latin); font-size: 11px; letter-spacing: .13em; font-weight: 700; color: var(--muted); }
.works-dialog-header h2 { margin-top: 3px; font-size: 23px; line-height: 1.5; }
.works-dialog-close { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 91px; min-height: 44px; padding: 7px 14px; background: #fff; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; line-height: 1.5; }
.works-dialog-close > span:first-child { font-family: var(--font-latin); font-size: 26px; line-height: 1; }
.works-dialog-stage { display: grid; place-items: center; position: relative; min-height: 220px; height: min(610px, calc(100dvh - 236px)); padding: 20px; background: #fff; touch-action: pan-y pinch-zoom; }
.works-dialog-image { display: block; width: 100%; height: 100%; max-height: min(570px, calc(100dvh - 276px)); object-fit: contain; }
.works-dialog-loading, .works-dialog-error { position: absolute; inset: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; color: var(--muted); font-size: 17px; }
.works-dialog-error p:first-child { font-weight: 700; color: var(--ink); }
.works-dialog-error button { border: 1px solid var(--line); background: var(--paper); padding: 10px 15px; margin-top: 4px; border-radius: 8px; font-size: 15px; }
.works-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 26px; border-top: 1px solid var(--line); }
.works-dialog-navigation { display: flex; align-items: center; justify-content: center; gap: 18px; }
.works-dialog-navigation button { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-family: var(--font-latin); font-size: 26px; }
.works-dialog-navigation button:hover { background: var(--lime); }
.works-dialog-navigation > p { font-family: var(--font-latin); font-size: 18px; text-align: center; min-width: 65px; }
.works-original-link { font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }

/* 05 / Responsive ---------------------------------------------------- */
@media (min-width: 850px) and (max-width: 1199px) {
    .site-nav { gap: 17px; }
    .site-nav > a:not(.button) { font-size: 13px; }
}
@media (max-width: 1023px) {
    .works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .works-summary { grid-template-columns: 120px minmax(0, 1fr) 78px 48px; gap: 22px; padding: 22px; }
    .works-cover { height: 146px; }
    .works-summary-copy strong { font-size: 26px; }
    .works-count { font-size: 54px; }
    .works-toggle-mark { width: 48px; height: 48px; }
    .works-toggle-mark::before, .works-toggle-mark::after { left: 14px; top: 23px; }
    .works-heading > p { font-size: 17px; }
}
@media (max-width: 767px) {
    .works-section { padding-block: 54px; }
    .works-heading { display: block; margin-bottom: 26px; }
    .works-heading h2 { font-size: 31px; }
    .works-heading > p { margin-top: 18px; font-size: 17px; }
    .works-wide-break { display: none; }
    .works-summary { grid-template-columns: 84px minmax(0, 1fr) 40px; min-height: 158px; gap: 14px; padding: 18px 16px; }
    .works-cover { height: 115px; border-radius: 11px; }
    .works-cover img { width: 75px; height: 105px; }
    .works-cover::before { width: 80px; height: 80px; }
    .works-count { display: none; }
    .works-summary-kicker { font-size: 10px; letter-spacing: .05em; }
    .works-summary-copy { gap: 7px; }
    .works-summary-copy strong { font-size: 22px; }
    .works-summary-description { font-size: 14px; line-height: 1.65; }
    .works-toggle-mark { width: 40px; height: 40px; }
    .works-toggle-mark::before, .works-toggle-mark::after { width: 16px; left: 12px; top: 19px; }
    .works-content { padding: 22px 18px; }
    .works-toolbar { align-items: flex-start; gap: 12px; }
    .works-toolbar > p { font-size: 15px; }
    .works-toolbar .works-close-album { padding-inline: 12px; font-size: 13px; }
    .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 13px; }
    .works-photo-frame > img { padding: 8px; }
    .works-card-caption { padding-top: 10px; font-size: 15px; }
    .works-card-action { font-size: 11px; }
    .works-photo-state { font-size: 12px; padding: 8px; }
    .works-magnify { width: 27px; height: 27px; font-size: 21px; right: 7px; bottom: 7px; }
    .works-bottom { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
    .works-note { font-size: 14px; }
    .works-network-notice { display: block; padding: 14px; font-size: 14px; }
    .works-network-notice button { margin-top: 12px; }
    .works-entry > a { font-size: 15px; }
    .works-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 15px; }
    .works-dialog-header { padding: 14px 16px; }
    .works-dialog-header h2 { font-size: 20px; }
    .works-dialog-kicker { font-size: 10px; }
    .works-dialog-close { padding-inline: 11px; min-width: 83px; }
    .works-dialog-stage { padding: 12px; height: min(490px, calc(100dvh - 260px)); min-height: 180px; }
    .works-dialog-image { max-height: min(466px, calc(100dvh - 284px)); }
    .works-dialog-footer { flex-direction: column; gap: 14px; padding: 14px 16px 19px; }
    .works-dialog-error, .works-dialog-loading { font-size: 15px; }
    .works-original-link { font-size: 14px; }
}
@media (max-width: 389px) {
    .works-summary { grid-template-columns: 67px minmax(0, 1fr) 34px; gap: 10px; padding: 15px 12px; }
    .works-cover { height: 99px; }
    .works-cover img { width: 62px; height: 91px; }
    .works-summary-copy strong { font-size: 19px; }
    .works-summary-kicker { font-size: 9px; }
    .works-summary-description { font-size: 13px; }
    .works-toggle-mark { width: 34px; height: 34px; }
    .works-toggle-mark::before, .works-toggle-mark::after { left: 9px; top: 16px; }
    .works-content { padding: 20px 12px; }
    .works-grid { gap: 18px 10px; }
    .works-card-caption { font-size: 14px; }
    .works-card-action { font-size: 10px; }
}
@media (max-height: 530px) and (min-width: 600px) {
    .works-dialog-header { padding-block: 9px; }
    .works-dialog-footer { padding-block: 9px; }
    .works-dialog-stage { height: calc(100dvh - 190px); min-height: 150px; padding: 8px; }
    .works-dialog-image { max-height: calc(100dvh - 206px); }
}

/* 06 / Print & reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .works-summary, .works-toggle-mark, .works-toggle-mark::after, .works-photo-frame img { transition: none; }
}
@media print {
    .works-dialog, .works-toggle-mark, .works-close-album, .works-network-notice, .works-magnify { display: none !important; }
    .works-section { padding-block: 28px; }
    .works-summary { min-height: auto; padding: 16px; }
    .works-cover { height: 100px; }
    .works-cover img { max-height: 95px; }
    .works-accordion { overflow: visible; }
    .works-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .works-card { break-inside: avoid; }
}
