@charset "UTF-8";
/* =========================================================
   MERGED: structure.css + book-typography.css
   - Keeps all structure + Media Side / Media Card functionality
   - Applies book-typography defaults to the page text
   ========================================================= */

/* ---------- Root Tokens ---------- */
:root {
    /* Layout */
    --text: 720px;
    --gutter: 280px;
    --gap: 28px;

    /* Header */
    --logoW: 200px;
    --logoH: 101px;
    --logoOffset: 33px;

    /* Vine */
    --vineW: 44px;
    --vineImg: url("/images/vine.png"); /* your transparent PNG */

    /* Media Card palette (swap HEX when ready) */
    --cap-green: #2f8f5b;
    --cap-red: #c4303a;
    --cap-blue: #5a7d9c;
    /*--cap-yellow: #c9a227;*/
    --cap-yellow: #d1b812; /* we modified Andrew's color to match the color of the icon it is supposed to go with */
    --cap-brown: #7b5a3a;

    /* Book Typography */
    --font-primary: "freight-sans-pro", sans-serif;
    --font-display: "dolce", sans-serif;

    --weight-book: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-black: 900;

    --text-main: #1f1f1f;
    --text-muted: #5a5a5a;

    --line-height-body: 1.65;
    --line-height-heading: 1;
    --paragraph-spacing: 0.75em;

    --chapter-rule-gap: 20px;
    --chapter-rule-width: 72px;
    --chapter-rule-thickness: 1px;

    --part-rule-gap: 16px;
    --part-rule-thickness: 1px;

    /* Structure colors map to book typography tokens */
    --ink: var(--text-main);
    --muted: var(--text-muted);
    --bg: #f7f7f7;

    --phrase-bg: rgba(207, 226, 195, 0.7);
}

* {
    box-sizing: border-box;
}

/* ---------- Base Body ---------- */
body {
    margin: 0;
    background: var(--bg);

    font-family: var(--font-primary);
    font-weight: var(--weight-book);
    font-style: normal;
    color: var(--text-main);
    line-height: var(--line-height-body);
    font-size: 1.25rem;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    /* AMOS: ADDED TO STICK FOOTER IMAGE TO BOTTOM*/
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Paragraphs */
p {
    margin: 0 0 var(--paragraph-spacing) 0;
    font-weight: var(--weight-book);
    max-width: 70ch;
}

/* Emphasis */
em,
i {
    font-style: italic;
    font-weight: inherit;
}
strong,
b {
    font-weight: var(--weight-bold);
    font-style: normal;
}
strong em,
em strong {
    font-weight: var(--weight-bold);
    font-style: italic;
}

/* ---------- Chapter Titles (H1 pattern) ----------
   <h1 class="chapter-title">
     <span class="chapter-number">CHAPTER 3</span>
     <span class="chapter-name">Title Here</span>
   </h1>
*/
.chapter-title {
    font-family: var(--font-primary);
    color: var(--text-main);
    text-align: left;
    margin: 1.75em 0 0.7em 0;
    line-height: var(--line-height-heading);
}
.chapter-number {
    display: inline-block;
    font-weight: var(--weight-book);
    font-style: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 2.25rem;
    color: var(--text-muted);
    position: relative;
    padding-bottom: var(--chapter-rule-gap);
    border-bottom: 1px solid #272727;
    margin-bottom: 30px;
}
.chapter-name {
    display: block;
    font-weight: var(--weight-semibold);
    font-style: normal;
    font-size: clamp(3rem, 4.2vw, 4rem);
    letter-spacing: -0.01em;
    font-family: var(--font-primary);
    color: var(--text-main);
    text-align: left;
    margin: 0;
    line-height: var(--line-height-heading);
    text-wrap: pretty;
}
.chapter-opener {
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- PART Titles ----------
   <h1 class="part-title">
     <span class="part-number">PART II</span>
     <span class="part-name">Part Name Here</span>
   </h1>
*/
.part-title {
    font-family: var(--font-primary);
    color: var(--text-main);
    text-align: center;
    margin: 0 0 1.5em 0;
    line-height: 1.15;
}
.part-number {
    display: block;
    font-weight: var(--weight-book);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-bottom: var(--part-rule-gap);
    position: relative;
    border-bottom: 1px solid #272727;
    margin-bottom: 30px;
}
.part-name {
    display: block;
    margin-top: 0.75em;
    font-weight: var(--weight-bold);
    font-size: clamp(5rem, 5.2vw, 6rem);
    letter-spacing: -0.02em;
}

/* ---------- Headings ---------- */
h2 {
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    font-style: normal;
    line-height: 1.15;
    margin: 0.45em 0 0;
    font-size: clamp(2.2rem, 2.4vw, 2.6rem);
    letter-spacing: -0.01em;
}
h2.main-sub {
    font-family: var(--font-primary);
    font-weight: var(--weight-book);
    line-height: 1.15;
    margin: -15px 0 52px;
    font-size: clamp(2.2rem, 2.4vw, 2.6rem);
    letter-spacing: -0.01em;
}
h3 {
    font-family: var(--font-primary);
    font-weight: var(--weight-medium);
    font-style: italic;
    line-height: var(--line-height-heading);
    margin: 0.75em 0 2px;
}
h3.contents {
    font-weight: var(--weight-semibold);
    font-style: normal;
    margin: 0 0 35px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
p.vol-intro {
    border-bottom: solid 2px #7a9964;
    padding-bottom: 33px;
    margin: 0 0 22px;
}
p.vol-intro img {
    float: left;
    width: 200px;
}

/* ---------- Lists (diamond bullets) ---------- */
article ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25em 20px;
}
article ul li {
    position: relative;
    padding-left: 33px; /* indent spec */
    margin: 0.6em 0;
    font-family: var(--font-primary);
    font-weight: var(--weight-semibold); /* semibold */
    line-height: 1.55;
}
article ul.nonbold li {
    font-weight: var(--weight-book);
}
article ul.list2 {
    margin: -0.8em 0 1em 50px;
}
article ul.list2 li {
    font-weight: var(--weight-book);
    font-style: italic;
    padding-left: 20px; /* indent spec */
}
article ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    transform: rotate(90deg);
    background: var(--cap-green);
    opacity: 0.9;
}
article ul.list2 li::before {
    transform: none;
    background: var(--text-muted);
}

/* ---------- Boxed Quotes + Attribution ---------- */
.div-box {
    margin: 2em 0;
    padding: 1.1em 1.1em 1.5em;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: rgba(138, 154, 59, 0.02);
}
blockquote {
    font-style: italic;
    font-size: 20px;
    font-weight: var(--weight-semibold);
    line-height: 1.7;
    margin: 0;
    color: var(--text-muted);
}
.div-box.scripture blockquote {
    margin-top: 14px;
}
.div-box figcaption {
    font-style: normal;
    font-weight: var(--weight-medium);
    text-align: right;
}
blockquote.break {
    margin-top: 20px;
}

/* ---------- Inline lead-in ---------- */
.leadin {
    font-weight: var(--weight-semibold);
    font-style: normal;
    letter-spacing: 0.01em;
}

/* ---------- Figures ---------- */
figure,
.figure {
    margin: 24px 0;
}
figure img,
.figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}
figcaption {
    margin-top: 0;
    font-size: 0.92em;
    line-height: 1.1;
    color: var(--text-muted);
}

/* =========================================================
   STRUCTURE + COMPONENTS
   ========================================================= */

/* ===== Header ===== */
.site-header {
    position: relative;
    height: calc(var(--logoH));
}
.site-logo {
    position: absolute;
    top: var(--logoOffset);
    left: var(--logoOffset);
    width: var(--logoW);
    height: auto;
    z-index: 10;
}
.site-logo img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Top Navigation ===== */
.top-nav {
    position: absolute;
    top: calc(var(--logoOffset) + 54px);
    left: calc(var(--logoOffset) + var(--logoW) + 100px);
    z-index: 10;
}
.top-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    align-items: center;
}
.top-nav-list a {
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 0.14em;
    font-weight: 400;
    color: #444;
    text-transform: uppercase;
    transition: color 0.15s ease;
    white-space: nowrap;
}
.top-nav-list a:hover {
    color: var(--cap-green);
}

/* ===== Full-width hero video (11:5) ===== */
.hero-video {
    width: 100vw;
    margin: 0;
    padding-top: 50px;
    position: relative;
    z-index: 5; /* above the vine */
}
.hero-video-inner {
    width: 100%;
    aspect-ratio: 11 / 5;
    overflow: hidden;
    background: #000;
}
.hero-video-inner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 920px) {
    .hero-video-inner {
        aspect-ratio: 9 / 16; /* true vertical */
    }
}

/* ===== Page grid: [fluid] [TEXT] [MEDIA GUTTER] [fluid] ===== */
.page {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(0, var(--text)) var(--gutter) 1fr;
    column-gap: var(--gap);
    padding: 42px 16px 80px;

    /* AMOS: ADDED TO STICK FOOTER IMAGE TO BOTTOM*/
    flex: 1;
}
.page > * {
    grid-column: 2;
}

/* Optional intro subhead */
.subhead {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 60ch;
}

/* Phrase highlight */
.phrase {
    background: var(--phrase-bg);
    padding: 0 0.28em;
    border-radius: 0.45em;
}

/* ===== Media Row ===== */
.media-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: inherit;
    column-gap: inherit;
    align-items: start;
    margin: 18px 0;
}
.media-row > * {
    grid-column: 2;
}

/* ===== Media Side (layout-only slot) ===== */
.media-side {
    grid-column: 3;
    position: sticky;
    top: 120px;
    z-index: 2;
    justify-self: center;
    background: none;
    padding: 0;
    border: 0;
    box-shadow: none;
}

@media (min-width: 920px) {
    /* ===== Vine Rail (fixed to viewport) ===== */
    .page::before {
        content: "";
        position: absolute;
        top: -103px;
        bottom: 0;
        left: calc((100% - var(--text) - var(--gutter) - var(--gap)) / 2 + var(--text) + var(--gap) + (var(--gutter) / 2));
        width: var(--vineW);
        transform: translateX(-50%);
        background-image: var(--vineImg);
        background-repeat: repeat-y;
        background-position: center top;
        background-size: var(--vineW) auto;
        pointer-events: none;
        z-index: 1;
        opacity: 0.95;
    }
}

/* ===== Media Card (horizontal, icon in caption) ===== */
article .media-card {
    --thumb: 120px;
    --caption: 120px; /* your standard */
    --icon: 60px;

    border-radius: 12px; /* Added border radius to match child elements and avoid the white corners being exposed on hover */
    display: inline-block;
    text-decoration: none;
    border-bottom: none;
    color: var(--bg);
    outline: none;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}
.media-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}
.media-card:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    animation: media-wiggle 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes media-wiggle {
    0% {
        transform: translateY(-1px) rotate(0deg);
    }
    25% {
        transform: translateY(-1px) rotate(-0.6deg);
    }
    50% {
        transform: translateY(-1px) rotate(0.6deg);
    }
    75% {
        transform: translateY(-1px) rotate(-0.3deg);
    }
    100% {
        transform: translateY(-1px) rotate(0deg);
    }
}
.media-card-items {
    display: flex;
    align-items: stretch;
}
.media-card-img {
    width: var(--thumb);
    height: var(--thumb);
    object-fit: cover;
    display: block;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.media-card-caption {
    width: var(--caption);
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: #fff;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
.media-card-icon {
    width: var(--icon);
    height: var(--icon);
    border-radius: 999px;
    flex-shrink: 0;
    outline: 1px solid rgba(255, 255, 255, 0.65);
    outline-offset: 0;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transition:
        box-shadow 0.18s ease,
        outline-color 0.18s ease;
}
.media-card:hover .media-card-icon {
    outline-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.35);
}
.media-card-text {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 650;
}
.cap-green .media-card-caption {
    background: var(--cap-green);
}
.cap-red .media-card-caption {
    background: var(--cap-red);
}
.cap-blue .media-card-caption {
    background: var(--cap-blue);
}
.cap-yellow .media-card-caption {
    background: var(--cap-yellow);
}
.cap-brown .media-card-caption {
    background: var(--cap-brown);
}

/* ===== Footer ===== */
.site-footer {
    height: 185px;
    background-image: url("/images/soil-bg.jpg");
    background-repeat: repeat-x;
    background-position: center top;
    background-size: auto 185px;
    display: flex;
    align-items: flex-end;
}
.footer-inner {
    width: 100%;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.footer-nav {
    display: flex;
    gap: 26px;
}
.footer-nav a {
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: #f7f5f4;
    text-transform: uppercase;
    transition: opacity 0.15s ease;
}
.footer-nav a:hover {
    opacity: 0.8;
}
.footer-copy {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #f7f5f4;
    opacity: 0.85;
}

/* =========================================================
   Header Controls: Language (Globe ⇄ X) + Mobile Menu (☰ ⇄ X)
   ========================================================= */

/* ---------- Language Switcher (Globe ⇄ X) ---------- */

.lang-switcher {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 12;
}

.lang-details {
    position: relative;
}

.lang-trigger {
    list-style: none;
    cursor: pointer;

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    color: #444;
    border-radius: 999px;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.lang-trigger::-webkit-details-marker {
    display: none;
}

.lang-trigger:hover,
.lang-details[open] .lang-trigger {
    background: rgba(0, 0, 0, 0.06);
    color: var(--cap-green);
}

/* icon sizing */
.lang-trigger svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* default: show globe, hide X */
.lang-trigger .icon-close {
    display: none;
}
.lang-details[open] .icon-globe {
    display: none;
}
.lang-details[open] .icon-close {
    display: block;
}

/* dropdown */
.lang-menu {
    position: absolute;
    top: 46px;
    right: 0;

    min-width: 170px;
    padding: 10px;

    display: grid;
    gap: 6px;

    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);

    z-index: 20;
}

.lang-menu a {
    text-decoration: none;
    color: #222;
    font-size: 13px;
    line-height: 1.2;

    padding: 8px 10px;
    border-radius: 10px;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.lang-menu a:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--cap-green);
}

/* Hide mobile menu by default (desktop) */
.mobile-menu {
    display: none;
}

/* ---------- Mobile Hamburger Menu (☰ ⇄ X) ---------- */
/* Only active on mobile. On desktop you keep .top-nav visible. */

@media (max-width: 920px) {
    /* Hide the desktop nav on mobile */
    .top-nav {
        display: none;
    }
    .mobile-menu {
        display: block;
    }

    /* Place hamburger 20px left of globe:
     globe right: 15px, button 40px wide, gap 20px
     => hamburger right = 15 + 40 + 20 = 75px
     If you prefer your earlier 60px, change right: 60px; */
    .mobile-menu {
        position: absolute;
        top: 10px;
        right: 20px;
        z-index: 12;
    }

    .menu-details {
        position: relative;
    }

    .menu-trigger {
        list-style: none;
        cursor: pointer;

        width: 40px;
        height: 40px;

        display: grid;
        place-items: center;

        color: #444;
        border-radius: 999px;

        transition:
            background-color 0.15s ease,
            color 0.15s ease;
    }

    .menu-trigger::-webkit-details-marker {
        display: none;
    }

    .menu-trigger:hover,
    .menu-details[open] .menu-trigger {
        background: rgba(0, 0, 0, 0.06);
        color: var(--cap-green);
    }

    /* Hamburger icon */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .hamburger span {
        display: block;
        width: 18px;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
    }

    /* Close X icon inside the hamburger button */
    .menu-trigger .icon-close {
        width: 22px;
        height: 22px;
        display: none;
    }

    /* Swap hamburger ⇄ X when open */
    .menu-details[open] .hamburger {
        display: none;
    }
    .menu-details[open] .icon-close {
        display: block;
    }

    /* Dropdown (styled to match language menu) */
    .menu-dropdown {
        position: absolute;
        top: 46px;
        right: 0;

        min-width: 190px;
        padding: 10px;

        display: grid;
        gap: 6px;

        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);

        z-index: 20;
    }

    .menu-dropdown a {
        text-decoration: none;
        color: #222;
        font-size: 13px;
        line-height: 1.2;

        padding: 8px 10px;
        border-radius: 10px;

        letter-spacing: 0.14em;
        font-weight: 400;
        text-transform: uppercase;

        transition:
            background-color 0.15s ease,
            color 0.15s ease;
    }

    .menu-dropdown a:hover {
        background: rgba(0, 0, 0, 0.06);
        color: var(--cap-green);
    }

    /* Media card */
    /* Page becomes single column */
    .page {
        grid-template-columns: 1fr;
        padding-left: clamp(24px, 30px, 36px);
        padding-right: clamp(24px, 30px, 36px);
    }

    .page > * {
        grid-column: 1;
    }

    /* Media row stacks */
    .media-row {
        display: block;
        margin: 20px 0;
    }

    /* Media card goes UNDER paragraph and is centered */
    .media-side {
        position: static;
        margin-top: 16px;

        display: flex;
        justify-content: center;
    }
    article li {
        text-wrap: balance;
    }
    .site-footer {
        background-position: right top;
    }
}
/* ==HOME: Desktop: two linked circular PNGs on the vine ===== */

.vine-badges {
    /* sit on the vine, not tied to any paragraph */
    position: fixed;
    top: 300px; /* pick your starting point */
    left: calc((100vw - var(--text) - var(--gutter) - var(--gap)) / 2 + var(--text) + var(--gap) + (var(--gutter) / 2));
    transform: translateX(-50%);
    z-index: 3; /* above the vine */
    display: flex;
    flex-direction: column;
    gap: 75px; /* space between the two circles */
    pointer-events: auto;
}

.vine-badge {
    width: 125px;
    height: 125px;
    display: inline-block;
    border-radius: 999px;
    overflow: hidden;
    text-decoration: none;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.vine-badge:hover {
    animation: vine-wiggle 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}
@keyframes vine-wiggle {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-0.8deg);
    }
    50% {
        transform: rotate(0.8deg);
    }
    75% {
        transform: rotate(-0.4deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.vine-badge img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 999px;
}

/* optional hover affordance */
.vine-badge:hover {
    transform: translateY(-1px);
}

/* ===== Mobile: after all article content, side-by-side ===== */
@media (max-width: 920px) {
    .vine-badges {
        position: static; /* back into normal document flow */
        transform: none;
        z-index: auto;
        display: flex;
        flex-direction: row; /* side-by-side */
        justify-content: center;
        gap: 80px;

        /*This is not original to Andrew's CSS. It seemed like we only wanted the overlap on the homepage so I moved this sytle to a new class so we could apply it only where wanted*/
        &.overlap-mobile {
            margin-top: -60px;
        }
    }
    p.vol-intro img {
        display: block;
        margin: 0 auto;
        float: none;
    }
}

.chapter-nav {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;

    a {
        text-decoration: none;
        font-size: 16px;
        letter-spacing: 0.14em;
        font-weight: 400;
        color: #444;
        text-transform: uppercase;
        transition: color 0.15s ease;
        white-space: nowrap;

        &.hidden {
            visibility: hidden;
        }
    }
}

/* Default: ignore the line break */
br.mobile-only {
    display: none;
}

/* Mobile: allow the line break */
@media (max-width: 920px) {
    br.mobile-only {
        display: inline;
    }
}

article a,
a.body-link {
    color: #8a9a3b;
    text-decoration: none;
    border-bottom: dashed 1px #8a9a3b;
}
