/* =========================================================
   UBUNTU LTD
   SINGLE JOURNAL POST
========================================================= */


/* =========================================================
   HERO
========================================================= */

.u-post-hero {
    padding:
        calc(
            125px +
            env(safe-area-inset-top,0px)
        )
        0
        clamp(65px,8vw,110px);

    background:
        var(--bark);

    color:
        var(--husk);
}


.u-post-crumbs {
    display:
        flex;

    flex-wrap:
        wrap;

    align-items:
        center;

    gap:
        7px;

    margin-bottom:
        clamp(46px,6vw,82px);

    color:
        rgba(235,237,228,.55);

    font-size:
        .83rem;
}


.u-post-crumbs a {
    color:
        inherit;

    text-decoration:
        none;
}


.u-post-crumbs a:hover {
    color:
        var(--amber);
}


.u-post-hero-content {
    max-width:
        1100px;
}


.u-post-category {
    margin:
        0 0 1.1rem;

    color:
        var(--amber-soft);

    font-size:
        .73rem;

    font-weight:
        700;

    letter-spacing:
        .18em;
}


.u-post-hero h1 {
    max-width:
        1050px;

    margin:
        0;

    color:
        #fff;

    font-size:
        clamp(
            3rem,
            7vw,
            6.6rem
        );

    font-weight:
        400;

    line-height:
        .96;

    letter-spacing:
        -.043em;
}


.u-post-deck {
    max-width:
        730px;

    margin:
        1.8rem 0 0;

    color:
        rgba(235,237,228,.68);

    font-size:
        clamp(
            1.08rem,
            1.6vw,
            1.3rem
        );

    line-height:
        1.65;
}


/* =========================================================
   META
========================================================= */

.u-post-meta {
    display:
        flex;

    flex-wrap:
        wrap;

    align-items:
        center;

    gap:
        clamp(
            24px,
            4vw,
            52px
        );

    margin-top:
        clamp(
            38px,
            5vw,
            58px
        );

    padding-top:
        26px;

    border-top:
        1px solid
        var(--line-dark);
}


.u-post-author {
    display:
        flex;

    align-items:
        center;

    gap:
        12px;
}


.u-post-author img {
    width:
        48px;

    height:
        48px;

    border-radius:
        50%;

    object-fit:
        cover;
}


.u-post-author div,
.u-post-meta-detail {
    display:
        grid;

    gap:
        1px;
}


.u-post-meta span {
    color:
        rgba(235,237,228,.46);

    font-size:
        .72rem;

    letter-spacing:
        .04em;
}


.u-post-meta strong {
    color:
        var(--husk);

    font-size:
        .87rem;

    font-weight:
        600;
}


/* =========================================================
   FEATURED IMAGE
========================================================= */

.u-post-featured {
    padding:
        clamp(28px,4vw,54px)
        0
        0;

    background:
        var(--paper);
}


.u-post-featured-media {
    margin:
        0;
}


.u-post-featured-media img {
    display:
        block;

    width:
        100%;

    max-height:
        820px;

    object-fit:
        cover;
}


.u-post-featured-media figcaption {
    max-width:
        720px;

    margin-top:
        10px;

    color:
        var(--ink-60);

    font-size:
        .78rem;

    line-height:
        1.5;
}


/* =========================================================
   CONTENT LAYOUT
========================================================= */

.u-post-content-section {
    padding-block:
        clamp(70px,9vw,135px);

    background:
        var(--paper);
}


.u-post-content-grid {
    display:
        grid;

    grid-template-columns:
        80px
        minmax(0,760px)
        minmax(180px,1fr);

    gap:
        clamp(
            30px,
            5vw,
            70px
        );

    align-items:
        start;

    justify-content:
        center;
}


/* =========================================================
   SHARE SIDEBAR
========================================================= */

.u-post-share {
    position:
        sticky;

    top:
        120px;

    display:
        grid;

    justify-items:
        center;

    gap:
        14px;
}


.u-post-share > span {
    writing-mode:
        vertical-rl;

    transform:
        rotate(180deg);

    color:
        var(--ink-60);

    font-size:
        .67rem;

    font-weight:
        700;

    letter-spacing:
        .14em;
}


.u-post-share > div {
    display:
        grid;

    gap:
        8px;
}


.u-post-share a {
    display:
        grid;

    place-items:
        center;

    width:
        40px;

    height:
        40px;

    border:
        1px solid
        var(--line);

    border-radius:
        50%;

    color:
        var(--ink);

    transition:
        color .3s,
        border-color .3s,
        transform .3s,
        background .3s;
}


.u-post-share a:hover {
    border-color:
        var(--bark);

    background:
        var(--bark);

    color:
        var(--husk);

    transform:
        translateY(-2px);
}


.u-post-share svg {
    width:
        15px;

    height:
        15px;

    fill:
        currentColor;
}


/* =========================================================
   ARTICLE TYPOGRAPHY
========================================================= */

.u-post-body {
    min-width:
        0;

    color:
        var(--ink);

    font-size:
        clamp(
            1.02rem,
            1.35vw,
            1.14rem
        );

    line-height:
        1.86;
}


.u-post-body > *:first-child {
    margin-top:
        0;
}


.u-post-body p {
    margin:
        0 0 1.55em;
}


.u-post-body > p:first-child {
    font-size:
        clamp(
            1.15rem,
            1.6vw,
            1.32rem
        );

    line-height:
        1.75;
}


.u-post-body h2 {
    margin:
        2.1em 0 .72em;

    font-size:
        clamp(
            2rem,
            3.3vw,
            3.2rem
        );

    line-height:
        1.05;
}


.u-post-body h3 {
    margin:
        2em 0 .7em;

    font-size:
        clamp(
            1.5rem,
            2.3vw,
            2.1rem
        );
}


.u-post-body h4 {
    margin:
        1.8em 0 .65em;

    font-family:
        var(--sans);

    font-size:
        1rem;

    font-weight:
        700;

    letter-spacing:
        .06em;

    text-transform:
        uppercase;
}


.u-post-body a {
    color:
        var(--clay);

    text-decoration-thickness:
        1px;

    text-underline-offset:
        3px;
}


.u-post-body strong {
    color:
        var(--ink);

    font-weight:
        700;
}


.u-post-body ul,
.u-post-body ol {
    margin:
        0 0 1.8em;

    padding-left:
        1.35em;
}


.u-post-body li {
    margin-bottom:
        .55rem;
}


/* =========================================================
   BLOCKQUOTES
========================================================= */

.u-post-body blockquote,
.u-post-body
.wp-block-quote {
    position:
        relative;

    margin:
        clamp(45px,6vw,75px)
        0;

    padding:
        0 0 0
        clamp(25px,4vw,44px);

    border-left:
        3px solid
        var(--amber);

    color:
        var(--bark);

    font-family:
        var(--serif);

    font-size:
        clamp(
            1.8rem,
            3.3vw,
            3rem
        );

    font-weight:
        400;

    line-height:
        1.18;
}


.u-post-body blockquote p {
    margin:
        0;
}


.u-post-body blockquote cite {
    display:
        block;

    margin-top:
        1rem;

    color:
        var(--ink-60);

    font-family:
        var(--sans);

    font-size:
        .78rem;

    font-style:
        normal;

    font-weight:
        600;

    letter-spacing:
        .08em;

    text-transform:
        uppercase;
}


/* =========================================================
   ARTICLE IMAGES
========================================================= */

.u-post-body figure {
    margin:
        clamp(42px,6vw,72px)
        0;
}


.u-post-body img {
    max-width:
        100%;

    height:
        auto;
}


.u-post-body
.wp-block-image img {
    display:
        block;

    width:
        100%;
}


.u-post-body figcaption {
    margin-top:
        9px;

    color:
        var(--ink-60);

    font-size:
        .77rem;

    line-height:
        1.5;
}


/* Full-width media inside article */

.u-post-body
.alignwide {
    width:
        min(
            1000px,
            calc(100vw - 40px)
        );

    max-width:
        none;

    margin-left:
        50%;

    transform:
        translateX(-50%);
}


.u-post-body
.alignfull {
    width:
        100vw;

    max-width:
        none;

    margin-left:
        50%;

    transform:
        translateX(-50%);
}


/* =========================================================
   TABLES
========================================================= */

.u-post-body table {
    width:
        100%;

    margin:
        2rem 0;

    border-collapse:
        collapse;
}


.u-post-body th,
.u-post-body td {
    padding:
        12px 14px;

    border-bottom:
        1px solid
        var(--line);

    text-align:
        left;
}


.u-post-body th {
    background:
        var(--husk);

    font-size:
        .82rem;

    font-weight:
        700;
}


/* =========================================================
   SIDE NOTE
========================================================= */

.u-post-side-note {
    position:
        sticky;

    top:
        125px;

    padding:
        22px 0;

    border-top:
        1px solid
        var(--line);

    border-bottom:
        1px solid
        var(--line);
}


.u-post-side-note p {
    margin:
        0 0 .7rem;

    color:
        var(--clay);

    font-size:
        .68rem;

    font-weight:
        700;

    letter-spacing:
        .15em;
}


.u-post-side-note span {
    display:
        block;

    max-width:
        22ch;

    color:
        var(--ink-60);

    font-family:
        var(--serif);

    font-size:
        1.08rem;

    line-height:
        1.45;
}


/* =========================================================
   TAGS
========================================================= */

.u-post-tags {
    display:
        grid;

    gap:
        12px;

    margin-top:
        clamp(50px,7vw,85px);

    padding-top:
        28px;

    border-top:
        1px solid
        var(--line);
}


.u-post-tags > span {
    color:
        var(--ink-60);

    font-size:
        .68rem;

    font-weight:
        700;

    letter-spacing:
        .14em;

    text-transform:
        uppercase;
}


.u-post-tags > div {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;
}


.u-post-tags a {
    padding:
        .55rem .9rem;

    border:
        1px solid
        var(--line);

    border-radius:
        99px;

    color:
        var(--ink);

    font-size:
        .79rem;

    font-weight:
        600;

    text-decoration:
        none;
}


.u-post-tags a:hover {
    border-color:
        var(--bark);

    background:
        var(--bark);

    color:
        var(--husk);
}


/* =========================================================
   AUTHOR
========================================================= */

.u-post-author-section {
    padding:
        0 0
        clamp(70px,9vw,125px);

    background:
        var(--paper);
}


.u-author-card {
    max-width:
        980px;

    margin:
        0 auto;

    display:
        grid;

    grid-template-columns:
        120px
        minmax(0,1fr);

    gap:
        clamp(
            25px,
            4vw,
            48px
        );

    padding:
        clamp(
            32px,
            5vw,
            58px
        );

    background:
        var(--husk);
}


.u-author-card-avatar img {
    display:
        block;

    width:
        120px;

    height:
        120px;

    border-radius:
        50%;

    object-fit:
        cover;
}


.u-author-label {
    margin:
        0 0 .5rem;

    color:
        var(--leaf);

    font-size:
        .68rem;

    font-weight:
        700;

    letter-spacing:
        .14em;
}


.u-author-card h3 {
    margin:
        0 0 .8rem;

    font-size:
        clamp(
            1.7rem,
            3vw,
            2.6rem
        );
}


.u-author-card > div:last-child > p:last-child {
    max-width:
        65ch;

    margin:
        0;

    color:
        var(--ink-60);
}


/* =========================================================
   COMMENTS
========================================================= */

.u-post-comments {
    padding-block:
        clamp(
            70px,
            9vw,
            120px
        );

    background:
        var(--husk-2);
}


.u-post-comments-inner {
    max-width:
        850px;
}


.u-post-comments
.comments-title {
    margin-bottom:
        2rem;

    font-size:
        clamp(
            2rem,
            4vw,
            3.6rem
        );
}


.u-post-comments
.comment-list {
    margin:
        0 0 3rem;

    padding:
        0;

    list-style:
        none;
}


.u-post-comments
.comment-list li {
    padding:
        24px 0;

    border-bottom:
        1px solid
        var(--line);
}


.u-post-comments
.comment-author {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;
}


.u-post-comments
.avatar {
    border-radius:
        50%;
}


.u-post-comments
textarea,
.u-post-comments
input[type="text"],
.u-post-comments
input[type="email"],
.u-post-comments
input[type="url"] {
    width:
        100%;

    padding:
        .85rem 1rem;

    border:
        1px solid
        var(--line);

    background:
        var(--paper);

    color:
        var(--ink);

    font:
        inherit;
}


.u-post-comments
.form-submit
.submit {
    padding:
        .8rem 1.4rem;

    border:
        0;

    border-radius:
        99px;

    background:
        var(--bark);

    color:
        var(--husk);

    font:
        inherit;

    font-weight:
        600;

    cursor:
        pointer;
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.u-post-navigation {
    background:
        var(--bark);
}


.u-post-nav-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );
}


.u-post-nav-item {
    min-height:
        240px;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        center;

    padding:
        clamp(
            30px,
            5vw,
            66px
        );

    color:
        var(--husk);

    text-decoration:
        none;

    transition:
        background .3s;
}


.u-post-nav-prev {
    border-right:
        1px solid
        var(--line-dark);
}


.u-post-nav-item:hover {
    background:
        var(--bark-2);
}


.u-post-nav-item span {
    margin-bottom:
        .8rem;

    color:
        var(--amber);

    font-size:
        .72rem;

    font-weight:
        700;

    letter-spacing:
        .08em;
}


.u-post-nav-item strong {
    max-width:
        16ch;

    font-family:
        var(--serif);

    font-size:
        clamp(
            1.5rem,
            3vw,
            2.7rem
        );

    font-weight:
        400;

    line-height:
        1.1;
}


.u-post-nav-next {
    align-items:
        flex-end;

    text-align:
        right;
}


/* =========================================================
   RELATED STORIES
========================================================= */

.u-related-stories {
    padding-block:
        clamp(
            75px,
            9vw,
            135px
        );

    background:
        var(--paper);
}


.u-related-stories-head {
    margin-bottom:
        clamp(
            35px,
            5vw,
            58px
        );
}


.u-related-stories-head h2 {
    font-size:
        clamp(
            2.4rem,
            4.5vw,
            4.3rem
        );
}


.u-related-stories-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0,1fr)
        );

    gap:
        clamp(
            22px,
            3vw,
            36px
        );
}


.u-related-story {
    display:
        flex;

    flex-direction:
        column;

    background:
        var(--husk);
}


.u-related-story-image {
    display:
        block;

    height:
        300px;

    overflow:
        hidden;

    background:
        var(--bark-2);
}


.u-related-story-image img {
    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    transition:
        transform .8s;
}


.u-related-story:hover
.u-related-story-image img {
    transform:
        scale(1.035);
}


.u-related-story-placeholder {
    width:
        100%;

    height:
        100%;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    background:
        var(--bark-2);

    color:
        var(--husk);
}


.u-related-story-placeholder span {
    color:
        var(--amber);

    font-size:
        .68rem;

    font-weight:
        700;

    letter-spacing:
        .16em;
}


.u-related-story-placeholder strong {
    font-family:
        var(--serif);

    font-size:
        2.5rem;

    font-weight:
        400;
}


.u-related-story-body {
    flex:
        1 1 auto;

    padding:
        22px 22px 26px;
}


.u-related-story-meta {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;

    margin-bottom:
        .8rem;

    color:
        var(--ink-60);

    font-size:
        .72rem;
}


.u-related-story-meta
span:first-child {
    color:
        var(--leaf);

    font-weight:
        700;

    letter-spacing:
        .08em;
}


.u-related-story-meta
span + span::before {
    content:
        "•";

    margin-right:
        8px;

    color:
        var(--amber);
}


.u-related-story h3 {
    margin:
        0 0 .65rem;

    font-size:
        1.4rem;

    line-height:
        1.15;
}


.u-related-story h3 a {
    color:
        inherit;

    text-decoration:
        none;
}


.u-related-story-body p {
    margin:
        0;

    color:
        var(--ink-60);

    font-size:
        .88rem;

    line-height:
        1.65;
}


/* =========================================================
   FINAL CTA
========================================================= */

.u-post-cta {
    padding-block:
        clamp(
            78px,
            9vw,
            130px
        );

    background:
        var(--leaf);

    color:
        var(--husk);
}


.u-post-cta-inner {
    max-width:
        900px;
}


.u-post-cta .kicker {
    color:
        var(--amber-soft);
}


.u-post-cta h2 {
    max-width:
        10ch;

    margin-bottom:
        1rem;

    color:
        #fff;

    font-size:
        clamp(
            2.7rem,
            5.5vw,
            5.4rem
        );
}


.u-post-cta-inner > p:not(.kicker) {
    max-width:
        52ch;

    margin-bottom:
        2rem;

    color:
        rgba(255,255,255,.72);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {

    .u-post-content-grid {
        grid-template-columns:
            55px
            minmax(0,760px);

        justify-content:
            center;
    }


    .u-post-side-note {
        display:
            none;
    }


    .u-related-stories-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0,1fr)
            );
    }

}


@media (max-width: 760px) {

    .u-post-meta {
        align-items:
            flex-start;
    }


    .u-post-content-grid {
        grid-template-columns:
            1fr;
    }


    .u-post-share {
        position:
            static;

        display:
            flex;

        align-items:
            center;

        justify-content:
            flex-start;
    }


    .u-post-share > span {
        writing-mode:
            initial;

        transform:
            none;
    }


    .u-post-share > div {
        display:
            flex;
    }


    .u-author-card {
        grid-template-columns:
            1fr;
    }


    .u-post-nav-grid {
        grid-template-columns:
            1fr;
    }


    .u-post-nav-prev {
        border-right:
            0;

        border-bottom:
            1px solid
            var(--line-dark);
    }


    .u-post-nav-next {
        align-items:
            flex-start;

        text-align:
            left;
    }

}


@media (max-width: 620px) {

    .u-post-hero h1 {
        font-size:
            clamp(
                2.9rem,
                14vw,
                4.7rem
            );
    }


    .u-post-featured-media img {
        min-height:
            340px;

        object-fit:
            cover;
    }


    .u-related-stories-grid {
        grid-template-columns:
            1fr;
    }


    .u-related-story-image {
        height:
            330px;
    }

}





/* =========================================================
   SINGLE POST BODY SPACING FIX
========================================================= */

.u-post-body {
    padding:
        clamp(24px, 3vw, 38px) !important;

    background:
        var(--paper);

    border-radius:
        var(--r);

    box-shadow:
        0 18px 45px
        rgba(19,35,26,.10);
}


/* Keep wider media from colliding with the padded container */

.u-post-body .alignwide,
.u-post-body .alignfull {
    max-width:
        calc(100% + 0px);

    width:
        100%;

    margin-left:
        0;

    transform:
        none;
}


/* Mobile */

@media (max-width: 620px) {

    .u-post-body {
        padding:
            22px 18px !important;
    }

}