/* Modular Gallery Long Wall — distinctive magazine templates */

.hlw-modules {
    display: flex;
    flex-direction: column;
    gap: 96px;
    padding: 12px 0 40px;
}

.hlw-module {
    width: 100%;
    position: relative;
}

.hlw-module__eyebrow,
.hlw-module__kicker,
.hlw-module__index,
.hlw-module__ending-kicker,
.hlw-module__ending-year,
.hlw-module__magazine-chapter,
.hlw-module__magazine-mark {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--hlw-muted, #8a8580);
}

.hlw-module__folio {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    color: var(--hlw-ink, #1c1a19);
}

.hlw-module__title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.28rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1.35;
}

.hlw-module__title--sm {
    font-size: 0.92rem;
    letter-spacing: 0.16em;
}

.hlw-module__desc {
    margin: 14px 0 0;
    max-width: 34em;
    font-size: 0.78rem;
    line-height: 1.75;
    letter-spacing: 0.03em;
    color: var(--hlw-muted, #8a8580);
}

.hlw-module__desc--quiet {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.1em;
}

.hlw-module__copy {
    text-align: center;
    margin: 0 0 28px;
}

/* ========== HERO — centered monumental portrait ========== */
.hlw-module--hero .hlw-module__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.hlw-module--hero .hlw-module__hero-meta {
    width: 100%;
    max-width: 520px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.hlw-module--hero .hlw-module__hero-stage {
    position: relative;
    width: min(100%, 520px);
}

.hlw-module--hero .hlw-module__hero-watermark {
    position: absolute;
    top: -0.15em;
    right: -0.05em;
    z-index: 1;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4.5rem, 14vw, 7.5rem);
    line-height: 0.8;
    letter-spacing: -0.04em;
    color: rgba(28, 26, 25, 0.07);
    pointer-events: none;
    user-select: none;
}

.hlw-module--hero .hlw-frame {
    aspect-ratio: 3 / 4;
    box-shadow: 0 24px 60px rgba(28, 26, 25, 0.08);
}

.hlw-module--hero .hlw-module__hero-foot {
    text-align: center;
    max-width: 28em;
}

.hlw-module--hero .hlw-module__hero-foot .hlw-module__desc {
    margin-left: auto;
    margin-right: auto;
}

.hlw-module--hero .hlw-caption {
    justify-content: center;
}

/* ========== HERO_SPLIT — asymmetric editorial duo ========== */
.hlw-module--hero_split .hlw-module__hero-split {
    display: grid;
    grid-template-columns: 28px minmax(0, 1.45fr) minmax(0, 0.95fr);
    gap: 18px 28px;
    align-items: start;
}

.hlw-module--hero_split .hlw-module__hero-split-rail {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 420px;
    padding: 8px 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.62rem;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--hlw-muted, #8a8580);
}

.hlw-module--hero_split .hlw-module__hero-split-main .hlw-frame {
    aspect-ratio: 3 / 4.2;
}

.hlw-module--hero_split .hlw-module__hero-split-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 48px;
}

.hlw-module--hero_split .hlw-module__hero-split-side .hlw-slot:first-of-type {
    width: 88%;
    margin-left: auto;
}

.hlw-module--hero_split .hlw-module__hero-split-side .hlw-slot:last-of-type {
    width: 78%;
}

.hlw-module--hero_split .hlw-module__hero-split-gap {
    height: 1px;
    width: 42%;
    margin: 4px 0 4px auto;
    background: var(--hlw-line, #d8d2c8);
}

.hlw-module--hero_split .hlw-module__hero-split-side .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module--hero_split .hlw-module__hero-split-note {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--hlw-line, #d8d2c8);
    text-align: right;
}

.hlw-module--hero_split .hlw-module__hero-split-note .hlw-module__desc {
    margin-left: auto;
}

/* ========== DOUBLE COLUMN ========== */
.hlw-module__double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding-top: 12px;
}

.hlw-module__double .hlw-frame {
    aspect-ratio: 3 / 4;
}

/* ========== MAGAZINE — chapter spread ========== */
.hlw-module--magazine .hlw-module__magazine {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hlw-module--magazine .hlw-module__magazine-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--hlw-ink, #1c1a19);
    padding-bottom: 10px;
}

.hlw-module--magazine .hlw-module__magazine-giant {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    line-height: 0.85;
    letter-spacing: 0.08em;
    color: var(--hlw-ink, #1c1a19);
}

.hlw-module--magazine .hlw-module__magazine-body {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    min-height: 420px;
}

.hlw-module--magazine .hlw-module__magazine-media {
    position: relative;
}

.hlw-module--magazine .hlw-module__magazine-media::after {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1px solid var(--hlw-line, #d8d2c8);
    z-index: -1;
    pointer-events: none;
}

.hlw-module--magazine .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module--magazine .hlw-module__magazine-copy {
    padding: 8px 4px 8px 12px;
}

.hlw-module--magazine .hlw-module__magazine-rule {
    width: 36px;
    height: 1px;
    margin: 0 0 22px;
    background: var(--hlw-accent, #a89a7a);
}

.hlw-module--magazine .hlw-module__magazine-mark {
    margin-top: 28px;
}

/* ========== WHITESPACE ========== */
.hlw-module__whitespace {
    padding: 80px 0 56px;
}

.hlw-module__whitespace-frame {
    max-width: 48%;
    margin: 0 auto;
}

.hlw-module__whitespace-frame .hlw-frame {
    aspect-ratio: 3 / 4;
}

/* ========== COLLAGE — scattered board, not equal grid ========== */
.hlw-module--collage .hlw-module__collage-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    margin-bottom: 28px;
    align-items: end;
}

.hlw-module--collage .hlw-module__collage-head .hlw-module__title {
    grid-column: 1 / -1;
}

.hlw-module--collage .hlw-module__collage-board {
    position: relative;
    min-height: 520px;
    background:
        linear-gradient(90deg, rgba(216, 210, 200, 0.35) 1px, transparent 1px) 0 0 / 33.333% 100%,
        linear-gradient(rgba(216, 210, 200, 0.25) 1px, transparent 1px) 0 0 / 100% 33.333%;
    padding: 24px 12px 40px;
}

.hlw-module--collage .hlw-module__collage-piece {
    position: absolute;
    background: var(--hlw-paper, #fffcf8);
    padding: 8px 8px 18px;
    box-shadow: 0 10px 28px rgba(28, 26, 25, 0.08);
}

.hlw-module--collage .hlw-module__collage-piece .hlw-caption {
    margin-top: 6px;
}

.hlw-module--collage .hlw-module__collage-piece--1 {
    width: 42%;
    top: 4%;
    left: 2%;
    z-index: 3;
    transform: rotate(-2.2deg);
}

.hlw-module--collage .hlw-module__collage-piece--2 {
    width: 28%;
    top: 8%;
    right: 6%;
    z-index: 2;
    transform: rotate(3deg);
}

.hlw-module--collage .hlw-module__collage-piece--3 {
    width: 24%;
    top: 38%;
    left: 38%;
    z-index: 4;
    transform: rotate(-1deg);
}

.hlw-module--collage .hlw-module__collage-piece--4 {
    width: 34%;
    bottom: 8%;
    left: 8%;
    z-index: 2;
    transform: rotate(1.8deg);
}

.hlw-module--collage .hlw-module__collage-piece--5 {
    width: 30%;
    bottom: 12%;
    right: 10%;
    z-index: 3;
    transform: rotate(-3deg);
}

.hlw-module--collage .hlw-module__collage-piece--6 {
    width: 22%;
    top: 52%;
    right: 28%;
    z-index: 1;
    transform: rotate(2.4deg);
}

.hlw-module--collage .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module--collage .hlw-module__collage-piece--1 .hlw-frame {
    aspect-ratio: 3 / 4;
}

.hlw-module--collage .hlw-module__collage-piece--3 .hlw-frame {
    aspect-ratio: 1 / 1;
}

/* ========== BANNER ========== */
.hlw-module__banner .hlw-frame {
    aspect-ratio: 16 / 7;
}

/* ========== ENDING — closing colophon ========== */
.hlw-module--ending .hlw-module__ending {
    padding: 48px 0 24px;
}

.hlw-module--ending .hlw-module__ending-frame {
    max-width: 420px;
    margin: 0 auto;
    padding: 56px 28px 48px;
    text-align: center;
    border: 1px solid var(--hlw-line, #d8d2c8);
    background:
        linear-gradient(var(--hlw-paper, #fffcf8), var(--hlw-paper, #fffcf8)) padding-box,
        linear-gradient(180deg, rgba(255, 252, 248, 0.4), rgba(243, 238, 232, 0.9));
}

.hlw-module--ending .hlw-module__ending-brand {
    margin: 18px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.2rem;
    font-weight: 500;
    letter-spacing: 0.48em;
    text-indent: 0.48em;
}

.hlw-module--ending .hlw-module__ending-rule {
    width: 1px;
    height: 52px;
    margin: 26px auto;
    background: var(--hlw-accent, #a89a7a);
}

.hlw-module--ending .hlw-module__ending-thanks {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    line-height: 1.7;
}

.hlw-module--ending .hlw-module__desc {
    margin: 16px auto 0;
    max-width: 22em;
}

.hlw-module--ending .hlw-module__ending-year {
    margin-top: 36px;
}

/* Mobile must NOT reflow module internals.
   The 790px canvas is scaled by harmony-long-wall.js instead. */

/* ========== NEW TEMPLATES (append only — do not alter rules above) ========== */

/* --- Portrait Stack --- */
.hlw-module__portrait-stack {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 8px 12px 48px;
}

.hlw-module__portrait-stack-head {
    text-align: center;
}

.hlw-module__portrait-stack-lead {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.hlw-module__portrait-stack-lead .hlw-frame {
    aspect-ratio: 3 / 4;
}

.hlw-module__portrait-stack-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.hlw-module__portrait-stack-pair .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module__portrait-stack-wide {
    max-width: 620px;
    margin: 8px auto 0;
    width: 100%;
}

.hlw-module__portrait-stack-wide .hlw-frame {
    aspect-ratio: 16 / 9;
}

/* --- Editorial Spread --- */
.hlw-module__editorial {
    padding: 8px 8px 48px;
}

.hlw-module__editorial-top {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    align-items: start;
}

.hlw-module__editorial-media .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module__editorial-copy {
    padding-top: 28px;
}

.hlw-module__editorial-rule {
    width: 48px;
    height: 1px;
    margin: 18px 0;
    background: var(--hlw-accent, #a89a7a);
}

.hlw-module__editorial-mark {
    margin-top: 28px;
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    color: var(--hlw-muted, #8a8580);
}

.hlw-module__editorial-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 36px;
    max-width: 560px;
}

.hlw-module__editorial-bottom .hlw-frame {
    aspect-ratio: 5 / 4;
}

/* --- Asymmetry --- */
.hlw-module__asymmetry {
    padding: 8px 8px 48px;
}

.hlw-module__asymmetry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.hlw-module__asymmetry-board {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    grid-template-rows: auto auto;
    gap: 22px 28px;
    align-items: start;
}

.hlw-module__asymmetry-tl {
    grid-column: 1;
    grid-row: 1;
    width: 78%;
    justify-self: start;
}

.hlw-module__asymmetry-tl .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module__asymmetry-main {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.hlw-module__asymmetry-main .hlw-frame {
    aspect-ratio: 3 / 4;
    box-shadow: 0 20px 50px rgba(28, 26, 25, 0.08);
}

.hlw-module__asymmetry-bl {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    padding-top: 12px;
}

.hlw-module__asymmetry-bl .hlw-frame {
    aspect-ratio: 16 / 10;
}

.hlw-module__asymmetry-note {
    margin-top: 28px;
    max-width: 28em;
}

/* --- Film Strip --- */
.hlw-module__film {
    padding: 8px 0 48px;
}

.hlw-module__film-head {
    text-align: center;
    margin-bottom: 22px;
}

.hlw-module__film-strip {
    background: #1c1a19;
    padding: 18px 14px 22px;
    border: 1px solid rgba(28, 26, 25, 0.85);
}

.hlw-module__film-edge {
    height: 14px;
    margin: 0 6px 12px;
    background:
        repeating-linear-gradient(
            90deg,
            #fffcf8 0 10px,
            transparent 10px 18px
        );
    opacity: 0.92;
}

.hlw-module__film-edge--bottom {
    margin: 12px 6px 0;
}

.hlw-module__film-frames {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    padding: 0 4px;
}

.hlw-module__film-cell {
    position: relative;
    background: #fffcf8;
    padding: 6px 6px 10px;
}

.hlw-module__film-num {
    display: block;
    text-align: center;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: #8a8580;
    margin-bottom: 4px;
}

.hlw-module__film-cell .hlw-frame {
    aspect-ratio: 3 / 4;
}

.hlw-module__film-cell .hlw-caption {
    display: none;
}

/* --- Polaroid Wall --- */
.hlw-module__polaroid {
    padding: 8px 8px 56px;
}

.hlw-module__polaroid-head {
    text-align: center;
    margin-bottom: 12px;
}

.hlw-module__polaroid-board {
    position: relative;
    min-height: 620px;
}

.hlw-module__polaroid-card {
    position: absolute;
    width: 196px;
    background: #fffcf8;
    border: 1px solid #e8e2d8;
    box-shadow: 0 14px 32px rgba(28, 26, 25, 0.08);
    padding: 12px 12px 36px;
    box-sizing: border-box;
}

.hlw-module__polaroid-inner .hlw-frame {
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

.hlw-module__polaroid-inner .hlw-caption {
    display: none;
}

.hlw-module__polaroid-index {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    text-align: center;
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    color: #8a8580;
}

.hlw-module__polaroid-card--1 { left: 28px; top: 24px; transform: rotate(-3.2deg); }
.hlw-module__polaroid-card--2 { left: 250px; top: 8px; transform: rotate(2.4deg); }
.hlw-module__polaroid-card--3 { left: 470px; top: 36px; transform: rotate(-1.6deg); }
.hlw-module__polaroid-card--4 { left: 90px; top: 300px; transform: rotate(2.8deg); }
.hlw-module__polaroid-card--5 { left: 320px; top: 280px; transform: rotate(-2.1deg); }
.hlw-module__polaroid-card--6 { left: 520px; top: 320px; transform: rotate(3deg); }

/* --- Center Focus --- */
.hlw-module__center-focus {
    padding: 8px 4px 48px;
}

.hlw-module__center-focus-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.hlw-module__center-focus-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.4fr 0.7fr;
    gap: 22px;
    align-items: center;
}

.hlw-module__center-focus-side {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hlw-module__center-focus-side--left {
    padding-top: 36px;
}

.hlw-module__center-focus-side--right {
    padding-bottom: 36px;
}

.hlw-module__center-focus-side .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module__center-focus-main .hlw-frame {
    aspect-ratio: 3 / 4;
    box-shadow: 0 28px 64px rgba(28, 26, 25, 0.1);
}

/* --- Horizontal Story --- */
.hlw-module__hstory {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 8px 8px 48px;
}

.hlw-module__hstory-head {
    text-align: center;
}

.hlw-module__hstory-banner .hlw-frame {
    aspect-ratio: 21 / 9;
}

.hlw-module__hstory-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.hlw-module__hstory-row .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module__hstory-closing .hlw-frame {
    aspect-ratio: 16 / 9;
}

/* --- Minimal Pair --- */
.hlw-module__minimal-pair {
    padding: 12px 48px 56px;
}

.hlw-module__minimal-pair-top,
.hlw-module__minimal-pair-bottom {
    max-width: 520px;
    margin: 0 auto;
}

.hlw-module__minimal-pair-top .hlw-frame,
.hlw-module__minimal-pair-bottom .hlw-frame {
    aspect-ratio: 4 / 5;
}

.hlw-module__minimal-pair-gap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 56px 0;
}

.hlw-module__minimal-pair-mark {
    font-size: 0.62rem;
    letter-spacing: 0.48em;
    color: var(--hlw-ink, #1c1a19);
}

.hlw-module__minimal-pair-rule {
    width: 1px;
    height: 48px;
    background: var(--hlw-accent, #a89a7a);
}

.hlw-module__minimal-pair-seq {
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    color: var(--hlw-muted, #8a8580);
}

.hlw-module__minimal-pair-note {
    text-align: center;
    margin-top: 28px;
}
