/* index */
body {
    font-family: Helvetica, sans-serif;
}

.home {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.home main {
    flex: 1;
}

header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    font-size: 20px;
    font-weight: 450;
    letter-spacing: -.8px;
    line-height: 0.9;
    white-space: nowrap;
}

header p {
    margin: 0;
}

header p:last-child {
    text-align: right;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    display: block;
    width: auto;
    height: 40px;
    object-fit: contain;
}

main {
    display: flex;
    justify-content: center;
}

.navigation {
    width: min(100%, 750px);
    margin-top: 160px;
    text-align: center;
    padding-bottom: 60px;
}

h1 {
    margin: 0 0 25px;
    font-size: clamp(55px, 7vw, 84px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -6px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 70px;
}

.photo-card {
    color: #111;
    border: 1px solid #111;
    background: white;
    text-decoration: none;
    transition: transform 0.4s ease;
}

.photo-card:hover {
    transform: translateY(-9px);
}

.photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.photo-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 35px;
    padding: 5px 7px;
    font-size: 17px;
    text-align: left;
    letter-spacing: -0.5px;
}

.description {
    width: 400px;
    max-width: 100%;
    margin: 29px auto 0;
    font-size: 17px;
    letter-spacing: -0.5px;
}

@media (max-width: 650px) {
    .navigation {
        margin-top: 100px;
    }

    .photo-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        width: min(280px, 100%);
        margin: 0 auto;
    }
}

.home > header,
.site-credits {
    padding-left: 1%;
    padding-right: 1%;
    width: 100%;
    box-sizing: border-box;
}

.site-credits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    padding-bottom: 25px;
    font-size: 10px;
    letter-spacing: -0.2px;
    margin-top: auto;
}

.site-credits p {
    margin: 0;
}

@media (max-width: 650px) {
    .site-credits {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}



/* latest */
.latest {
    min-height: 100vh;
    margin: 0;
    padding: 45px 6%;
    overflow-x: hidden;
    background: #111;
    color: #f7f7f2;
}

.latest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.latest-header a,
.latest-header p {
    margin: 0;
    color: inherit;
    font-size: 20px;
    font-weight: 450;
    letter-spacing: -.8px;
    text-decoration: none;
}

.latest-logo {
    display: flex;
    justify-content: center;
}

.latest-logo img {
    width: auto;
    height: 30px;
    object-fit: contain;
}

.newsletter-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 80px;
}

.newsletter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(72vw, 750px);
    perspective: 1800px;
    filter: drop-shadow(0 30px 35px rgba(0, 0, 0, 0.65));
    transform-style: preserve-3d;
}

.newsletter-page {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 400px;
    overflow: hidden;
    background: #f7f5ed;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
}

.newsletter-page canvas {
    display: block;
    width: 100%;
    height: auto;
}

.left-page {
    transform-origin: right center;
    transform: rotateY(3deg);
    border-radius: 8px 0 0 8px;
    box-shadow: inset -30px 0 35px rgba(0, 0, 0, 0.2);
}

.right-page {
    transform-origin: left center;
    border-radius: 0 8px 8px 0;
    box-shadow: inset 30px 0 35px rgba(0, 0, 0, 0.2);
}

.newsletter-page.blank canvas {
    display: none;
}

.newsletter-page.blank {
    background: #f7f5ed;
}

.newsletter-page.blank::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        transparent 75%,
        rgba(0, 0, 0, 0.12)
    );
}

.newsletter-controls {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 20px;
    width: min(72vw, 750px);
    margin-top: 28px;
}

.newsletter-controls p {
    margin: 0;
    font-size: 13px;
    text-align: center;
}

.newsletter-controls button {
    width: 48px;
    height: 42px;
    border: 1px solid #f7f7f2;
    background: transparent;
    color: #f7f7f2;
    font-size: 18px;
    cursor: pointer;
}

.newsletter-controls button:hover {
    background: #f7f7f2;
    color: #111;
}

.newsletter-controls button:disabled {
    cursor: default;
    opacity: 0.25;
}

@media (max-width: 700px) {
    .latest {
        padding: 30px 4%;
    }

    .latest-header a,
    .latest-header p {
        font-size: 18px;
        letter-spacing: -1px;
    }

    .newsletter-area {
        margin-top: 65px;
    }

    .newsletter {
        width: 96vw;
    }

    .newsletter-page {
        min-height: 250px;
    }

    .newsletter-controls {
        width: 96vw;
    }
}

.newsletter.cover-view .left-page {
    visibility: hidden;
}

.newsletter.cover-view .right-page {
    border-radius: 0 8px 8px 0;
    animation: open-newsletter 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.newsletter.turn-forward .right-page {
    z-index: 5;
    animation: turn-forward 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.newsletter.turn-backward .left-page {
    z-index: 5;
    animation: turn-backward 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.newsletter.end-view .right-page {
    visibility: hidden;
}

@keyframes open-newsletter {
    from {
        transform: rotateY(-88deg);
        opacity: 0.4;
    }

    to {
        transform: rotateY(-3deg);
        opacity: 1;
    }
}

@keyframes turn-forward {
    0% {
        transform: rotateY(-3deg);
        filter: brightness(1);
    }

    45% {
        filter: brightness(0.72);
    }

    100% {
        transform: rotateY(-178deg);
        filter: brightness(0.9);
    }
}

@keyframes turn-backward {
    0% {
        transform: rotateY(3deg);
        filter: brightness(1);
    }

    45% {
        filter: brightness(0.72);
    }

    100% {
        transform: rotateY(178deg);
        filter: brightness(0.9);
    }
}




/* archive */
.archive {
    min-height: 100vh;
    margin: 0;
    padding: 38px 4%;
    overflow-x: hidden;
    background: #101010;
    color: #f5f3ed;
}

.archive * {
    box-sizing: border-box;
}

.archive-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
}

.archive-header > a:first-child {
    justify-self: start;
}

.archive-header > p {
    justify-self: end;
}

.archive-header a,
.archive-header p {
    margin: 0;
    color: inherit;
    font-size: 20px;
    font-weight: 450;
    letter-spacing: -0.8px;
    text-decoration: none;
}

.archive-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.archive-logo img {
    display: block;
    width: auto;
    height: 30px;
    object-fit: contain;
}

.archive .archive-area {
    position: relative;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    min-height: calc(100vh - 100px);
    padding-top: 70px;
}

.year-filter {
    position: relative;
    z-index: 4;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding-left: 48px;
}

.year-filter::before {
    content: "";
    position: absolute;
    top: 5%;
    bottom: 5%;
    left: 0;
    width: 330px;
    border-left: 3px solid #6f6f6f;
    border-radius: 50%;
    pointer-events: none;
}

.year-option {
    --curve-offset: 0px;
    --interaction-offset: 0px;

    position: relative;
    padding: 0;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transform: translateX(
        calc(var(--curve-offset) + var(--interaction-offset))
    );
    transition:
        color 0.25s ease,
        transform 0.3s ease;
}

.year-option:first-child,
.year-option:last-child {
    --curve-offset: 12px;
}

.year-option::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -46px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #777;
    transform: translateY(-50%);
    transition:
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.year-option:hover {
    --interaction-offset: 5px;
    color: #f5f3ed;
}

.year-option.active {
    --interaction-offset: 8px;
    color: #f5f3ed;
    font-weight: 700;
}

.year-option.active::before {
    background: #f1493f;
    box-shadow: 0 0 12px rgba(241, 73, 63, 0.65);
}

.issue-carousel {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 500px;
    padding: 65px 7vw 80px;
    overflow-x: auto;
    overflow-y: hidden;
    perspective: 1700px;
    scrollbar-width: none;
}

.issue-carousel::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 48%;
    left: 50%;
    width: 46%;
    height: 72%;
    border-radius: 50%;
    background: radial-gradient(
        ellipse,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.08) 35%,
        transparent 72%
    );
    filter: blur(35px);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.issue-carousel::after {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: 48px;
    left: 50%;
    width: 340px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    filter: blur(28px);
    transform: translateX(-50%);
    pointer-events: none;
}

.issue-carousel::-webkit-scrollbar {
    display: none;
}

.issue-card {
    --rotation: 0deg;
    --tilt: 0deg;
    --vertical-position: 0px;
    --hover-lift: 0px;
    --card-scale: 1;
    --card-opacity: 1;
    --card-layer: 1;

    position: relative;
    z-index: var(--card-layer);
    flex: 0 0 220px;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: var(--card-opacity);
    cursor: pointer;
    transform:
        translateY(
            calc(var(--vertical-position) + var(--hover-lift))
        )
        rotateZ(var(--tilt))
        rotateY(var(--rotation))
        scale(var(--card-scale));
    transform-style: preserve-3d;
    transform-origin: center bottom;
    transition:
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease,
        filter 0.4s ease;
}

.issue-card:hover {
    --hover-lift: -18px;
    z-index: 12;
    opacity: 1;
    filter: brightness(1.08);
}

.issue-card.selected {
    z-index: 10;
    opacity: 1;
}

.month-tab {
    position: relative;
    z-index: 3;
    display: inline-block;
    min-width: 58px;
    padding: 10px 13px 8px;
    border-radius: 7px 7px 0 0;
    background: #252525;
    color: #f5f3ed;
    font-size: 12px;
    letter-spacing: 2px;
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.issue-card.selected .month-tab {
    background: #303030;
    box-shadow: 0 -5px 18px rgba(255, 255, 255, 0.1);
}

.issue-cover {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid #4e4e4e;
    border-radius: 6px;
    background: white;
    box-shadow:
        0 28px 45px rgba(0, 0, 0, 0.7),
        0 8px 15px rgba(0, 0, 0, 0.5);
    transition:
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.issue-card.selected .issue-cover {
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow:
        0 35px 60px rgba(0, 0, 0, 0.78),
        0 0 16px rgba(255, 255, 255, 0.35),
        0 0 55px rgba(255, 255, 255, 0.14);
}

.issue-card.selected .issue-cover::after {
    content: "";
    position: absolute;
    z-index: 4;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 15%,
        rgba(255, 255, 255, 0.17) 38%,
        transparent 58%
    );
    pointer-events: none;
}

.issue-cover img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-fallback {
    position: absolute;
    color: #151515;
    font-family: inherit;
    font-size: 28px;
    line-height: 0.9;
}

.issue-card.no-thumbnail img {
    display: none;
}

.selected-issue {
    position: relative;
    z-index: 3;
    grid-column: 2;
    padding-bottom: 30px;
    text-align: center;
}

.selected-issue h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 450;
    letter-spacing: -0.8px;
}

.selected-issue button {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #f5f3ed;
    font-size: 15px;
    letter-spacing: -0.5px;
    cursor: pointer;
}

.selected-issue button:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.selected-issue button:disabled {
    opacity: 0.3;
    cursor: default;
}

.archive-message {
    position: relative;
    z-index: 2;
    width: 100%;
    color: #888;
    text-align: center;
}

.issue-viewer[hidden] {
    display: none;
}

.issue-viewer {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 4%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.viewer-window {
    position: relative;
    width: min(1100px, 95vw);
    height: 88vh;
    background: white;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.viewer-window iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.close-viewer {
    position: absolute;
    z-index: 2;
    top: -18px;
    right: -18px;
    width: 42px;
    height: 42px;
    border: 1px solid #f5f3ed;
    border-radius: 50%;
    background: #101010;
    color: #f5f3ed;
    font-size: 23px;
    cursor: pointer;
}

.close-viewer:hover {
    background: #f5f3ed;
    color: #101010;
}

@media (max-width: 750px) {
    .archive {
        padding: 28px 4%;
    }

    .archive-header a,
    .archive-header p {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .archive-logo img {
        height: 22px;
    }

    .archive .archive-area {
        display: block;
        padding-top: 65px;
    }

    .year-filter {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        padding: 0 0 25px;
        overflow-x: auto;
    }

    .year-filter::before,
    .year-option::before {
        display: none;
    }

    .year-option,
    .year-option:first-child,
    .year-option:last-child {
        --curve-offset: 0px;
        --interaction-offset: 0px;
        padding: 8px 12px;
        border: 1px solid #555;
        font-size: 14px;
    }

    .year-option.active {
        border-color: #f5f3ed;
    }

    .issue-carousel {
        min-height: 420px;
        padding: 40px 12vw 60px;
    }

    .issue-carousel::before {
        width: 75%;
    }

    .issue-card {
        flex-basis: 190px;
    }

    .selected-issue {
        padding-bottom: 20px;
    }
}