/* ==========================================================
   LAURIE IN THE MEDIA
   Styles for the media page and editor-only entry previews.
   ========================================================== */

/* 1. PAGE LAYOUT
   Match the campaign's content inset and serif headings. */

.lc-media-layout #inner-wrap .entry-header {
    display: none;
}

.laurie-media-page {
    --lc-media-paper-color: #fff;
    --lc-media-paper-border: #d6dfe2;
    --lc-media-tear-depth: 9px;
    --lc-media-link-color: #245d80;
    color: var(--lc-ink, #253d49);
    overflow-wrap: anywhere;
}

.laurie-media-page .lc-media-hero,
.laurie-media-page .lc-media-section {
    padding-inline: var(--lc-edge, 5vw);
}

.laurie-media-page .lc-media-hero {
    padding-block: clamp(2rem, 5vw, 4rem);
    background: #e7f1f5;
    border-bottom: 1px solid #c6dce7;
}

.laurie-media-page .lc-media-section {
    padding-block: clamp(2rem, 4vw, 3.5rem);
}

.laurie-media-page .lc-media-section + .lc-media-section {
    padding-top: 0;
}

.laurie-media-page :is(h1, h2, h3) {
    color: var(--lc-navy, #304e60);
    font-family: Georgia, serif;
    font-weight: 500;
    line-height: 1.12;
}

.laurie-media-page .lc-media-hero h1 {
    margin: 0 0 .3em;
    font-size: clamp(2.45rem, 6vw, 4.6rem);
}

.laurie-media-page .lc-media-hero p {
    margin: 0;
    max-width: 62ch;
    font-size: clamp(1.12rem, 1.8vw, 1.4rem);
    line-height: 1.65;
}

.laurie-media-page .lc-media-section > h2 {
    margin: 0 0 .8em;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.laurie-media-page .lc-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.4rem, 3vw, 2.5rem);
}

/* 2. NEWSPAPER CLIPPINGS
   The paper layer sits behind the content and carries the shadow. */

.laurie-media-page .lc-media-clipping {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    padding-bottom: calc(1.25rem + var(--lc-media-tear-depth));
}

.laurie-media-page .lc-media-paper {
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgb(36 58 68 / 10%))
            drop-shadow(0 9px 10px rgb(36 58 68 / 9%));
}

.laurie-media-page .lc-media-paper::before {
    display: block;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid var(--lc-media-paper-border);

	background: linear-gradient(177deg, #fffefb 68%, #fdf9ed 90%, #fef6db 100%);
    content: "";
}

/* 3. PUBLICATION MASTHEAD */

.laurie-media-page .lc-media-masthead {
    align-self: stretch;
    display: grid;
    place-items: center;
    min-height: 3rem;
    padding-inline: 1rem;
    margin-bottom: .65rem;
    color: var(--lc-navy, #304e60);
    font: 700 clamp(1.4rem, 3vw, 2rem)/1.15 Georgia, serif;
    text-align: center;
}

.laurie-media-page .lc-media-masthead img {
    display: block;
    max-width: min(100%, 250px);
    mix-blend-mode: multiply;
    max-height: 5rem;
    width: auto;
    height: auto;
    object-fit: contain;
}

.laurie-media-page .lc-media-date {
    display: block;
    margin-bottom: .8rem;
    font-size: .875rem;
}

.laurie-media-page .lc-media-clipping .lc-media-date {
    align-self: stretch;
    padding: .25rem .6rem;
    background: #eef3f5;
}

/* 4. ARTICLE TEXT */

/* Self-hosted Libre Baskerville for clipping text. The browser loads
   each subset only when the clipping contains characters it covers. */
@font-face {
    font-family: "Libre Baskerville";
    src: url("../fonts/libre-baskerville-latin-ext.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Libre Baskerville";
    src: url("../fonts/libre-baskerville-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.laurie-media-page :is(.lc-media-clipping, .lc-media-video) :is(h2, h3) {
    margin: 0 0 .55rem;
    font-size: clamp(1.55rem, 2.75vw, 2.2rem);
}

.laurie-media-page :is(.lc-media-clipping, .lc-media-video) p {
    margin: 0 0 .8rem;
    line-height: 1.65;
}

.laurie-media-page .lc-media-clipping > :is(h2, h3, p:not(.lc-media-attribution), .lc-media-date) {
    font-family: "Libre Baskerville", Georgia, serif;
}

.laurie-media-page .lc-media-clipping > :is(h2, h3) {
    font-size: clamp(1.4rem, 2.5vw, 1.95rem);
    font-weight: 600;
    line-height: 1.2;
}

.laurie-media-page .lc-media-clipping > p:not(.lc-media-attribution) {
    font-size: .975rem;
    font-weight: 400;
    line-height: 1.55;
}

.laurie-media-page .lc-media-attribution {
    color: #4c6370;
    font-size: .875rem;
}

.laurie-media-page .lc-media-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    margin-top: auto;
    color: var(--lc-media-link-color);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .18em;
}

/* 5. BLUE PAPERCLIP
   Change the SVG strokes to recolor it. Adjust width, height, top
   and left here to resize or reposition it. Its own angle is fixed. */

.laurie-media-page .lc-media-paperclip {
    position: absolute;
    top: -9px;
    left: 12px;
    width: 22px;
    height: 42px;
    transform: rotate(-13deg);
    filter: drop-shadow(1px 2px 1px rgb(36 58 68 / 25%));
    pointer-events: none;
}

/* 6. TORN-PAPER EDGE
   Fallback: existing fixed torn edge
   Enhancement: randomized torn edge where CSS random() is supported

   The contour clips only the backdrop, so text and focus outlines
   stay intact. Adjust --lc-media-tear-depth for a deeper or shallower
   edge. The outer layer shadows the clipped silhouette. Browsers
   without polygon clipping retain the full rectangular border.
*/

@supports (clip-path: polygon(0 0, 100% 0, 100% 100%)) {

    /* Base / fallback version */
    .laurie-media-page .lc-media-paper::before {
        clip-path: polygon(
            0 0,
            100% 0,
            100% calc(100% - var(--lc-media-tear-depth)),
            98% 100%,
            96% calc(100% - 3px),
            93% calc(100% - 5px),
            90% calc(100% - 2px),
            87% calc(100% - 4px),
            84% 100%,
            81% calc(100% - 4px),
            79% calc(100% - 2px),
            76% calc(100% - 7px),
            73% calc(100% - 3px),
            70% calc(100% - 5px),
            67% 100%,
            64% calc(100% - 2px),
            61% calc(100% - 6px),
            58% calc(100% - 4px),
            55% calc(100% - 7px),
            52% calc(100% - 2px),
            50% calc(100% - 4px),
            47% 100%,
            44% calc(100% - 4px),
            41% calc(100% - 2px),
            38% calc(100% - 6px),
            35% calc(100% - 3px),
            32% calc(100% - 4px),
            29% 100%,
            26% calc(100% - 2px),
            23% calc(100% - 6px),
            20% calc(100% - 3px),
            18% calc(100% - 6px),
            15% calc(100% - 2px),
            12% calc(100% - 4px),
            9% 100%,
            6% calc(100% - 4px),
            3% calc(100% - 2px),
            0 calc(100% - var(--lc-media-tear-depth))
        );
        border-bottom: 0;
    }

    /* Override with randomized version only in browsers that support random() */
    @supports (top: random(1px, 10px)) {
        .laurie-media-page .lc-media-paper::before {
            clip-path: polygon(
                0 0,
                100% 0,
                100% calc(100% - random(4px, 15px)),
                98% calc(100% - random(2px, 12px)),
                96% calc(100% - random(2px, 12px)),
                93% calc(100% - random(2px, 12px)),
                90% calc(100% - random(2px, 12px)),
                87% calc(100% - random(2px, 20px)),
                84% calc(100% - random(2px, 12px)),
                81% calc(100% - random(2px, 12px)),
                79% calc(100% - random(2px, 18px)),
                76% calc(100% - random(2px, 12px)),
                73% calc(100% - random(2px, 20px)),
                70% calc(100% - random(2px, 12px)),
                67% calc(100% - random(2px, 18px)),
                64% calc(100% - random(2px, 12px)),
                61% calc(100% - random(2px, 12px)),
                58% calc(100% - random(2px, 20px)),
                55% calc(100% - random(2px, 12px)),
                52% calc(100% - random(2px, 18px)),
                50% calc(100% - random(2px, 12px)),
                47% calc(100% - random(2px, 10px)),
                44% calc(100% - random(2px, 12px)),
                41% calc(100% - random(2px, 18px)),
                38% calc(100% - random(2px, 12px)),
                35% calc(100% - random(2px, 20px)),
                32% calc(100% - random(2px, 12px)),
                29% calc(100% - random(2px, 18px)),
                26% calc(100% - random(2px, 12px)),
                23% calc(100% - random(2px, 20px)),
                20% calc(100% - random(2px, 12px)),
                18% calc(100% - random(2px, 18px)),
                15% calc(100% - random(2px, 12px)),
                12% calc(100% - random(2px, 20px)),
                9% calc(100% - random(2px, 12px)),
                6% calc(100% - random(2px, 20px)),
                3% calc(100% - random(2px, 12px)),
                0 calc(100% - random(4px, 12px))
            );
            border-bottom: 0;
        }
    }
}

/* 7. INTERVIEWS AND VIDEO */

.laurie-media-page .lc-media-video {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--lc-media-paper-border);
    border-radius: var(--lc-radius, 10px);
    background: var(--lc-media-paper-color);
}

.laurie-media-page .lc-media-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: .4rem;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* 8. RESPONSIVE LAYOUT */

@media (max-width: 680px) {
    .laurie-media-page .lc-media-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .laurie-media-page .lc-media-paperclip {
        left: 8px;
        height: 38px;
    }
}

/* 9. ACCESSIBILITY
   The paper effects are static for all motion preferences. */

.laurie-media-page .lc-media-link:focus-visible {
    outline: 2px solid var(--lc-media-link-color);
    outline-offset: 3px;
    border-radius: 2px;
}
