/* Legal Center: hub (/legal/) and the legal documents under it. Values measured on live roc.ai
   (Divi pages cloned from /privacy/, Divi_Child blog and media-coverage splash styles). Loaded only by
   page-legal.php and template-legal-document.php, after style.css and media.css. Desktop rules first,
   then the responsive tiers. */

/* ==========================================================================
   DOCUMENT: title band
   ========================================================================== */
.legal-hero {
    padding: 10vw 0 80px;
}

.legal-hero__title {
    padding-bottom: 10px;
    margin-bottom: 40px;
    font-family: var(--font-regular);
    font-size: 87px;
    line-height: 1;
    text-align: center;
    color: var(--color-ink);
}

.legal-hero__meta {
    margin-bottom: 40px;
    font-family: var(--font-medium);
    font-size: 18px;
    line-height: 2;
    text-align: center;
    color: var(--color-slate);
}

/* ==========================================================================
   DOCUMENT: body
   ========================================================================== */
/* No divider under the text: the footer line closes the page, like the Code of Ethics (Evan, DIGITAL-292). */
.legal-body {
    padding-bottom: 120px;
}

.legal-copy {
    overflow-wrap: break-word;
    font-family: var(--font-regular);
    font-size: 18px;
    line-height: 1.33;
    color: var(--color-ink);
}

.legal-copy h3 {
    padding-bottom: 10px;
    font-family: var(--font-bold);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-rust);
}

/* Subsections (1.1, 1.2) are never as big as their section: an h4 reads like the bold run-in labels. */
.legal-copy h4 {
    padding-bottom: 10px;
    font-weight: 600;
}

.legal-copy h3[id] { padding-top: 36px; }

.legal-copy [id] { scroll-margin-top: 120px; }

.legal-copy p { padding-bottom: 18px; }

.legal-copy p:last-of-type { padding-bottom: 0; }

.legal-copy strong { font-weight: 600; }

.legal-copy a {
    text-decoration: underline;
    color: var(--color-ink);
}

.legal-copy ul,
.legal-copy ol {
    padding: 0 0 18px 18px;
    line-height: 26px;
}

.legal-copy ul { list-style: disc; }

.legal-copy ol {
    padding-left: 0;
    list-style: decimal inside;
}

.legal-copy ol li { padding-bottom: 20px; }
.legal-copy ol ol { padding: 2px 0 2px 35px; }

.legal-copy .legal-list__nest { list-style: none; }
.legal-copy .legal-list--alpha { list-style: lower-alpha inside; }

/* The rust line runs along the text only; the box keeps its space above and below. */
.legal-callout {
    position: relative;
    margin-bottom: 28px;
    padding: 20px 24px 20px 28px;
    background: var(--color-cream);
}

.legal-callout::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 4px;
    background: var(--color-rust);
}

.legal-callout p:last-child { margin-bottom: 0; }

.legal-table-wrap {
    margin-bottom: 28px;
    overflow-x: auto;
}

.legal-table {
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.4;
}

.legal-table th,
.legal-table td {
    padding: 6px 24px;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--color-ink);
    font-weight: 700;
    color: #555;
}

.legal-table td {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #d9d4c7;
}

/* ==========================================================================
   HUB
   ========================================================================== */
.legal-hub__wrap {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 150px 0 0;
}

.legal-hub__head { padding-bottom: clamp(32px, 3.2vw, 64px); }

.legal-hub__title {
    padding-bottom: 10px;
    font-family: var(--font-bold);
    font-size: 120px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--color-ink);
}

.legal-hub__groups { padding-bottom: 128px; }

.legal-hub__group {
    margin: clamp(48px, 4vw, 80px) 0 clamp(16px, 1.5vw, 28px);
    font-family: var(--font-bold);
    font-size: clamp(20px, 1.44vw, 28px);
    font-weight: 500;
    line-height: 1.17;
    text-transform: uppercase;
    color: var(--color-rust);
}

.legal-hub__group:first-child { margin-top: 0; }

.legal-hub__list { list-style: none; }

.legal-hub__item {
    padding-right: 10px;
    border-top: 1px solid var(--color-steel);
}

.legal-hub__item:last-child { border-bottom: 1px solid var(--color-steel); }

.legal-hub__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(40px, 4vw, 80px);
    padding: clamp(20px, 2vw, 40px) 0;
}

.legal-hub__name {
    flex: 1 1 auto;
    padding: 0;
    font-family: var(--font-medium);
    font-size: clamp(20px, 1.44vw, 28px);
    font-weight: 500;
    line-height: 1.17;
    color: var(--color-ink);
}

.legal-hub__date {
    flex: 0 0 auto;
    font-family: var(--font-medium);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
    color: var(--color-slate);
}


/* ==========================================================================
   CODE OF ETHICS (template-code-of-ethics.php)
   ========================================================================== */
.legal-hero--ethics { padding: 8.6vw 0 130px; }

/* live keeps 685px for the flag while it loads and under a short drawing (222px on phones) */
.ethics-flag { min-height: 685px; }

.ethics-intro { padding-bottom: 120px; }

.ethics-intro__row { padding-bottom: 60px; }

.ethics-intro__eyebrow {
    margin-bottom: 60px;
    font-family: var(--font-bold);
    font-size: 14px;
    line-height: 24px;
    color: var(--color-rust);
}

.ethics-intro__title,
.ethics-copy__title {
    padding-bottom: 10px;
    margin-bottom: 40px;
    font-family: var(--font-regular);
    font-size: 57px;
    line-height: 1.12;
    color: var(--color-ink);
}

.ethics-intro__text,
.ethics-copy {
    overflow-wrap: break-word;
    font-family: var(--font-regular);
    font-size: 18px;
    line-height: 1.33;
    color: var(--color-ink);
}

.ethics-intro__text p,
.ethics-copy p { padding-bottom: 18px; }

.ethics-intro__text p:last-of-type,
.ethics-copy p:last-of-type { padding-bottom: 0; }

.ethics-copy a {
    text-decoration: underline;
    color: var(--color-ink);
}

.ethics-split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.ethics-split__media,
.ethics-split__quote { width: 46%; }

.ethics-split__image {
    width: 100%;
    height: auto;
}

.ethics-split__quote {
    padding-top: 40px;
    border-top: 4px solid var(--color-rust);
    font-family: var(--font-light);
    font-size: 45px;
    line-height: 1.42;
    color: var(--color-ink);
}

.ethics-standards__row {
    padding-block: min(2%, 33px);
    border-bottom: 1px solid var(--color-steel);
}

.ethics-copy { margin-bottom: 150px; }

.ethics-copy__title { color: var(--color-rust); }

.ethics-copy__lead {
    padding-bottom: 10px;
    margin-bottom: 50px;
    font-size: 28px;
    line-height: 1.2;
}

.ethics-copy p { margin-bottom: 20px; }

.ethics-action {
    margin-bottom: 120px;
    text-align: center;
}

.ethics-btn {
    position: relative;
    display: flex;
    align-items: center;
    width: fit-content;
    height: 56px;
    margin: 0 auto;
    padding: 0 50px 0 24px;
    border: 1px solid var(--color-steel);
    border-radius: var(--radius-pill);
    font-family: var(--font-bold);
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    color: var(--color-ink);
    transition: border-color 0.5s;
}

.ethics-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 24px;
    width: 12px;
    height: 17px;
    transform: translateY(-50%);
    background: url("../images/carrot-rust.svg") center / contain no-repeat;
}

.ethics-btn:hover,
.ethics-btn:focus-visible { border-color: var(--color-rust); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1600px) {
    .legal-hub__wrap {
        max-width: none;
        margin: 0;
        padding: 195px 150px 0;
    }

    .legal-hub__head { padding-bottom: 64px; }
}

@media (min-width: 1024px) and (max-width: 1600px) {
    .legal-hero { padding-top: 240px; }
    .legal-hero--roomy { padding-bottom: 130px; }
    .legal-hero--ethics { padding-top: 8.6vw; }
}

/* The hub row runs the live 80% zoom up to 1500px, like the content rows. */
@media (max-width: 1500px) {
    .legal-hub__row { zoom: 0.8; }

    /* the hover line stays one full screen pixel at the zoom */
    .legal-hub__row .line-link { --line-link-width: 1.25px; }

    /* the live 33px cap only applies outside the zoom band */
    .ethics-standards__row { padding-block: 2%; }
}

@media (max-width: 1450px) {
    .legal-hub__wrap { padding: 181px 140px 0; }
}

@media (max-width: 1300px) {
    .legal-hub__wrap { padding: 181px 125px 0; }
}

@media (max-width: 1280px) {
    .legal-hero__title { font-size: 68px; }
}

@media (max-width: 1024px) {
    .legal-hub__row { zoom: 1; }
    .legal-hub__row .line-link { --line-link-width: 1px; }

    .legal-hub__wrap { padding: 95px 100px 0; }
    .legal-hub__head { padding-bottom: 33px; }

    /* "CENTER" is about 4.15em wide: below 760px the 120px title shrinks with the 200px of side padding instead of
       running past the page (phones switch to 15vw below). */
    .legal-hub__title { font-size: min(120px, calc((100vw - 200px) / 4.3)); }
}

@media (max-width: 980px) {
    .legal-hero {
        margin-bottom: 5.63vw;
        padding: 16.3vw 0 0 14.4vw;
    }

    .legal-hero__row { min-height: 817px; }

    .ethics-split { display: block; }

    .ethics-split__media,
    .ethics-split__quote { width: auto; }

    .ethics-standards__row { padding-block: 30px; }

    .ethics-btn {
        height: 55px;
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .legal-hero {
        margin-bottom: 0;
        padding: 120px 0 0;
    }

    .legal-hero__row {
        width: 100%;
        min-height: 0;
        padding: 0 25px 96px;
    }

    .ethics-flag { min-height: 222px; }

    /* Live prints 65px and splits "Acceptable" mid-word at 390px; the size follows the width until 65px fits. */
    .legal-hero__title {
        margin-bottom: 24px;
        font-size: min(65px, 15.8vw);
        line-height: 65px;
    }

    .legal-hero__meta {
        margin-bottom: 24px;
        font-size: 16px;
    }

    .legal-body { padding-bottom: 96px; }

    .legal-body__row {
        width: 100%;
        padding: 0 25px;
    }

    .legal-copy h3 { font-size: 24px; }

    .legal-copy p { margin-bottom: 10px; }

    .ethics-intro { padding-bottom: 96px; }

    .ethics-intro__row,
    .ethics-standards__row {
        width: 100%;
        padding-inline: 25px;
    }

    .ethics-intro__row { padding-bottom: 96px; }

    .ethics-split {
        width: 100%;
        padding-inline: 25px;
    }

    .ethics-split__image { margin-bottom: 40px; }

    .ethics-split__quote {
        font-size: 30px;
        line-height: 41px;
    }

    .ethics-intro__title,
    .ethics-copy__title {
        margin-bottom: 24px;
        font-size: 36px;
    }

    .ethics-copy { margin-bottom: 60px; }

    .ethics-copy__lead {
        margin-bottom: 40px;
        font-size: 24px;
    }

    .ethics-copy p { margin-bottom: 10px; }

    .ethics-action { margin-bottom: 40px; }

    .ethics-btn {
        height: 44px;
        font-size: 4.2vw;
    }
}

@media (max-width: 475px) {
    .legal-hub__wrap { padding: 105px 15px 0; }

    .legal-hub__head { padding-bottom: 0; }

    .legal-hub__title {
        margin-bottom: 40px;
        padding: 0;
        font-size: 15vw;
    }

    .legal-hub__groups {
        padding-bottom: 96px;
        border-bottom: 1px solid var(--color-steel);
    }

    /* Lines only between the entries: none above the first or under the last one of a group (Evan, DIGITAL-333). */
    .legal-hub__item:first-child { border-top: 0; }
    .legal-hub__item:last-child { border-bottom: 0; }

    .legal-hub__link {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 8px;
        padding: 40px 0;
    }

    .legal-hub__item:first-child .legal-hub__link { padding-top: 0; }

    .legal-hub__date { text-align: left; }
}

/* The live legal pages lack the page rule that joins the footer addresses into one paragraph on phones
   (their address lines keep the line breaks). Copied for parity. */
@media (max-width: 475px) {
    body:has(.legal-hub, .legal-copy, .ethics-copy) .site-footer__address--flow br { display: inline; }
}
