* {
    box-sizing:border-box;
}

[hidden] {
    display:none !important;
}

body {
    margin:0;
    background:#e7e7e5;
    color:#202020;
    font-family:Arial,Helvetica,sans-serif;
}

.site-header {
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:18px;
    padding:18px 5%;
}

.brand {
    color:#171717;
    text-decoration:none;
    font-size:40px;
    font-weight:800;
    letter-spacing:-3px;
}

.site-header nav {
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}

.site-header nav a {
    color:#222;
    text-decoration:none;
    font-size:14px;
}

.issue-heading {
    text-align:center;
    padding:25px 16px 10px;
}

.issue-heading h1 {
    font-size:clamp(24px,4vw,40px);
    margin:10px 0;
}

.eyebrow {
    font-size:11px;
    letter-spacing:2px;
}

.demo-notice {
    font-size:12px;
    text-align:center;
    color:#555;
    padding:0 15px;
}

.reader {
    max-width:1200px;
    margin:auto;
    padding:12px 20px 30px;
}

.book {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    perspective:1800px;
    align-items:stretch;
}

.book.enhanced {
    display:flex;
    justify-content:center;
    gap:0;
}

.sheet {
    position:relative;
    width:100%;
    min-height:500px;
    padding:clamp(24px,4vw,48px);
    background:#fffdf5;
    color:#222;
    border:1px solid #cfcfc7;
    box-shadow:0 10px 30px #0002;
    overflow-wrap:anywhere;
}

.enhanced .sheet {
    width:50%;
    min-width:0;
    transform-style:preserve-3d;
}

.enhanced .sheet:first-of-type {
    transform-origin:right center;
}

.enhanced .sheet + .sheet {
    transform-origin:left center;
}

.sheet.turn-forward {
    animation:turnForward .65s ease both;
    transform-origin:left center;
}

.sheet.turn-backward {
    animation:turnBackward .65s ease both;
    transform-origin:right center;
}

@keyframes turnForward {
    0% {
        transform:rotateY(-65deg);
        filter:brightness(.72);
    }
    100% {
        transform:rotateY(0);
        filter:brightness(1);
    }
}

@keyframes turnBackward {
    0% {
        transform:rotateY(65deg);
        filter:brightness(.72);
    }
    100% {
        transform:rotateY(0);
        filter:brightness(1);
    }
}

.page-brand {
    font-size:42px;
    font-weight:800;
    letter-spacing:-3px;
    margin-bottom:35px;
}

.page-label {
    text-transform:uppercase;
    font-size:11px;
    letter-spacing:2px;
    margin-bottom:15px;
}

.sheet h2 {
    font-family:Georgia,serif;
    font-size:clamp(28px,4vw,48px);
    line-height:1.1;
    margin:0 0 20px;
}

.page-subtitle {
    font-size:17px;
    font-weight:600;
    line-height:1.5;
}

.page-body {
    font-family:Georgia,serif;
    font-size:17px;
    line-height:1.8;
    padding-bottom:40px;
}

.page-number {
    position:absolute;
    bottom:18px;
    right:24px;
    font-size:12px;
}

.theme-classic {
    background:#fffdf5;
}

.theme-modern {
    background:#fff;
    color:#172738;
    border-top:9px solid #172738;
}

.theme-forest {
    background:#18392f;
    color:#fff9e6;
}

.theme-midnight {
    background:#101c2c;
    color:#fff;
}

.front_cover,
.back_cover,
.advertisement {
    text-align:center;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.front_cover .page-brand,
.back_cover .page-brand {
    font-size:clamp(72px,11vw,140px);
    letter-spacing:-7px;
}

.front_cover h2 {
    font-size:clamp(40px,6vw,76px);
}

.reader-controls {
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    margin-top:24px;
}

.reader-controls button,
.demo-link {
    display:inline-block;
    padding:12px 18px;
    background:#222;
    color:#fff;
    border:0;
    border-radius:6px;
    cursor:pointer;
    text-decoration:none;
    font:inherit;
}

.reader-controls button:disabled {
    opacity:.35;
    cursor:default;
}

#page-counter {
    min-width:90px;
    text-align:center;
}

.reader-hint {
    text-align:center;
    font-size:12px;
    color:#555;
}

.edition-library {
    max-width:1100px;
    background:white;
    margin:20px auto;
    padding:30px;
}

.issue-grid {
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(230px,1fr));
    gap:24px;
    margin:24px 0;
}

.issue-card {
    background:#18392f;
    color:white;
    padding:25px;
    text-decoration:none;
    min-height:300px;
}

.issue-card span {
    font-size:48px;
    font-weight:800;
}

.site-footer {
    text-align:center;
    padding:25px;
    color:#555;
    font-size:12px;
}

.reader:fullscreen {
    max-width:none;
    overflow:auto;
    background:#ddd;
    padding:30px;
}

@media(max-width:760px) {

    .book {
        grid-template-columns:1fr;
    }

    .enhanced .sheet {
        width:100%;
    }

    .sheet {
        min-height:500px;
        padding:28px;
    }

    .reader {
        padding:12px;
    }

    .page-body {
        font-size:16px;
    }
}

@media(prefers-reduced-motion:reduce) {

    .sheet.turn-forward,
    .sheet.turn-backward {
        animation:none;
    }
}


.magazine-media {
    margin:18px auto;
    max-width:100%;
}
.magazine-media img,
.magazine-media video {
    width:100%;
    max-height:650px;
    display:block;
    object-fit:contain;
}
.media-full {width:100%}
.media-half {width:65%}
.media-quarter {width:40%}

.advertiser-link {
    font-size:13px;
    text-align:center;
}

.advertiser-link a {
    color:inherit;
}

@media(max-width:760px) {
    .media-half,.media-quarter {
        max-width:100%;
    }
}

/* OFWZ STUDIO-5C — paper curl and corner controls */

.book.enhanced {
    perspective:2000px;
    perspective-origin:50% 50%;
    isolation:isolate;
}

.enhanced .sheet {
    position:relative;
    transform-style:preserve-3d;
    --curl-size:38px;
    --curl-shadow:12px;
    --curl-opacity:.6;
}

.ofwz-page-corner {
    position:absolute;
    bottom:0;
    width:48px;
    height:48px;
    border:0;
    padding:0;
    background:transparent;
    cursor:grab;
    touch-action:none;
    z-index:12;
    color:inherit;
}

.ofwz-page-corner:active {
    cursor:grabbing;
}

.ofwz-page-corner:focus-visible {
    outline:2px solid #648b80;
    outline-offset:-4px;
}

.corner-next {
    right:0;
}

.corner-previous {
    left:0;
}

.ofwz-page-corner::after {
    content:"";
    position:absolute;
    bottom:0;
    width:30px;
    height:30px;
    pointer-events:none;
    background:linear-gradient(
        135deg,
        #ffffff18,
        #ffffffc9 48%,
        #b5b3aa 52%,
        #77766e 100%
    );
}

.corner-next::after {
    right:0;
    clip-path:polygon(
        100% 0,
        100% 100%,
        0 100%
    );
}

.corner-previous::after {
    left:0;
    transform:scaleX(-1);
    clip-path:polygon(
        100% 0,
        100% 100%,
        0 100%
    );
}

.ofwz-paper-fold,
.ofwz-fold-shadow {
    position:absolute;
    bottom:0;
    right:0;
    width:0;
    height:0;
    opacity:0;
    pointer-events:none;
}

.ofwz-curl-active .ofwz-paper-fold {
    width:min(var(--curl-size),75%);
    height:var(--curl-size);
    opacity:var(--curl-opacity);
    z-index:10;

    clip-path:polygon(
        100% 0,
        100% 100%,
        0 100%,
        30% 70%,
        55% 42%,
        82% 13%
    );

    background:linear-gradient(
        135deg,
        #a5a39a 0%,
        #e1ddd1 28%,
        #fffdf5 48%,
        #ffffff 57%,
        #e5e1d6 75%,
        #a6a397 100%
    );
}

.ofwz-curl-active .ofwz-fold-shadow {
    width:min(
        calc(var(--curl-size) + 25px),
        90%
    );

    height:calc(
        var(--curl-size) + 25px
    );

    opacity:.65;
    z-index:9;

    background:linear-gradient(
        135deg,
        transparent 35%,
        #00000065 73%,
        #000000a0 100%
    );

    filter:blur(var(--curl-shadow));
    clip-path:polygon(
        100% 0,
        100% 100%,
        0 100%
    );
}

.ofwz-curl-left .ofwz-paper-fold,
.ofwz-curl-left .ofwz-fold-shadow {
    right:auto;
    left:0;
    transform:scaleX(-1);
}

.enhanced .sheet.ofwz-turning {
    z-index:15;
    backface-visibility:hidden;
    will-change:transform;
}

.enhanced .sheet.ofwz-curl-right {
    transform-origin:left center;
}

.enhanced .sheet.ofwz-curl-left {
    transform-origin:right center;
}

.ofwz-turning .ofwz-page-corner {
    pointer-events:none;
}

.magazine-media audio {
    display:block;
    width:100%;
    max-width:100%;
}

@media(max-width:760px) {

    .ofwz-page-corner {
        width:52px;
        height:52px;
    }

    .book.enhanced {
        perspective:1400px;
    }
}

@media(prefers-reduced-motion:reduce) {

    .ofwz-paper-fold,
    .ofwz-fold-shadow {
        display:none;
    }
}
