/* ============================================================
   Packages page
   Adapted from the "LBL Web Deck" design: black panels, heavy slab
   headings, green accents. Everything is scoped to .packages-page so
   the rest of the site keeps its bright look.

   Section backgrounds run the full width; the content of every section
   sits in the site's centered .container, so on a wide screen nothing
   is pinned to the edges.
   ============================================================ */

/* Self-hosted, both SIL Open Font License (licenses beside the files). */
@font-face {
    font-family: 'ChunkFive';
    src: url("../fonts/ChunkFive-Regular.1a301109137c.woff2") format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'League Spartan';
    src: url("../fonts/LeagueSpartan-Bold.3f6ca86dddba.woff2") format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.packages-page {
    --pk-black: #080A09;
    --pk-paper: #F7F7F5;
    --pk-white: #FFFFFF;
    --pk-on-dark: #F8F8F5;
    --pk-muted: #696C69;
    --pk-rule: #C9C9C6;
    /* Two greens, chosen by background. The deck's green reads well on
       black (6.5:1) but is too faint for text on white (3.1:1); the
       site's green is the other way round (4.7:1 on white, 4.2:1 on
       black). */
    --pk-green-on-dark: #52A630;
    --pk-green-on-light: var(--color-primary);
    --pk-display: 'ChunkFive', 'Rockwell Extra Bold', Rockwell, Georgia, serif;
    --pk-subhead: 'League Spartan', var(--font-heading);
    /* Tallest a photo may grow before it scales down. */
    --pk-photo-max-height: min(85vh, 760px);
    /* Space above and below the photo-and-text sections, and between
       their two columns. */
    --pk-band-padding: clamp(2.5rem, 5vw, 4.5rem);
    --pk-column-gap: clamp(1.5rem, 4vw, 4rem);

    background: var(--pk-black);
    color: var(--pk-on-dark);
}

/* Headings and paragraphs take the section's colour instead of the
   site's slate. :where() keeps this at element specificity, so any
   .pk-* class that sets a colour still wins; loading after style.css is
   what lets it beat the site's own h1-h6 and p rules. */
:where(.packages-page) :is(h1, h2, h3, p) {
    color: inherit;
}

/* Anchor jumps (View packages, Compare packages, the package cards) stop
   below the fixed header, and below the fixed sale banner as well when a
   sale is running. The allowance is the banner's measured height, not the
   40px style.css gives .main-content: the banner is 46px on one line and
   wraps to 76px on a phone, where 40px still left headings under it. */
.packages-page section[id] {
    scroll-margin-top: var(--header-height);
}

.sale-banner ~ .main-content .packages-page section[id] {
    scroll-margin-top: calc(var(--header-height) + 3.5rem);
}

@media (max-width: 575.98px) {
    .sale-banner ~ .main-content .packages-page section[id] {
        scroll-margin-top: calc(var(--header-height) + 5.5rem);
    }
}

/* style.css smooth-scrolls the whole document; this page's anchor jumps
   should not animate for someone who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.packages-page a:focus-visible {
    outline: 3px solid var(--pk-green-on-dark);
    outline-offset: 3px;
}

.pk-light {
    background: var(--pk-paper);
    color: var(--pk-black);
}

.pk-light a:focus-visible {
    outline-color: var(--pk-green-on-light);
}

/* The comparison table's scroll box takes keyboard focus (see the
   template), so it needs a visible focus ring on the white panel. */
.pk-table-scroll:focus-visible {
    outline: 3px solid var(--pk-green-on-light);
    outline-offset: 4px;
}

.pk-display {
    font-family: var(--pk-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.pk-green {
    color: var(--pk-green-on-dark);
}

.pk-light .pk-green {
    color: var(--pk-green-on-light);
}

/* Photos are shown whole, never cropped. The image keeps its own
   proportions and sets its own height, rather than the text beside it
   deciding a height that cuts the top and bottom off. Past
   --pk-photo-max-height it scales down, centered in its column. */
.pk-photo {
    display: flex;
    justify-content: center;
}

.pk-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: var(--pk-photo-max-height);
    object-fit: contain;
}

/* ----------------------------------------------------------
   Button
   ---------------------------------------------------------- */
.pk-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.6rem;
    border: 2px solid var(--pk-green-on-dark);
    color: var(--pk-white);
    font-family: var(--pk-subhead);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    transition: var(--transition-fast);
}

.pk-btn i {
    color: var(--pk-green-on-dark);
    font-size: 1.4rem;
    line-height: 1;
    transition: var(--transition-fast);
}

.pk-btn:hover,
.pk-btn:focus-visible {
    background: var(--pk-green-on-dark);
    color: var(--pk-black);
}

.pk-btn:hover i,
.pk-btn:focus-visible i {
    color: var(--pk-black);
}

/* ----------------------------------------------------------
   Hero
   ---------------------------------------------------------- */
.pk-hero {
    padding-block: var(--pk-band-padding);
}

.pk-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
    gap: var(--pk-column-gap);
    align-items: center;
}

.pk-hero-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pk-hero-badge {
    align-self: center;
    width: clamp(110px, 11vw, 170px);
    height: auto;
}

.pk-hero-title {
    font-size: clamp(2rem, 2.8vw, 2.75rem);
    margin: 0;
}

.pk-hero-title span {
    display: block;
}

.pk-hero-lead {
    font-size: 1.25rem;
    line-height: 1.5;
    margin: 0;
}

.pk-hero-panel .pk-btn {
    align-self: flex-start;
}

/* ----------------------------------------------------------
   Package overview
   ---------------------------------------------------------- */
.pk-overview {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
    text-align: center;
}

.pk-section-title {
    font-size: clamp(2.1rem, 5vw, 4.25rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.pk-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2.5rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.pk-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 2rem 1.25rem;
    border: 1px solid var(--pk-green-on-dark);
    color: var(--pk-on-dark);
    transition: var(--transition-fast);
}

.pk-card:hover,
.pk-card:focus-visible {
    color: var(--pk-on-dark);
    background: rgba(82, 166, 48, 0.1);
    transform: translateY(-3px);
}

.pk-card-icon {
    font-size: 4rem;
    line-height: 1;
    color: var(--pk-green-on-dark);
}

/* Room for the longest name, so the lines below it align across cards. */
.pk-card-name {
    font-size: 1.35rem;
    min-height: 3.5em;
    margin: 1.25rem 0 0.5rem;
}

.pk-card-unit {
    font-family: var(--pk-display);
    text-transform: uppercase;
    font-size: 1.35rem;
    color: var(--pk-green-on-dark);
    margin: 0 0 1.5rem;
}

.pk-card-tagline {
    font-size: 1.05rem;
    line-height: 1.45;
    margin: auto 0 0;
}

.pk-compare-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    font-family: var(--pk-display);
    text-transform: uppercase;
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--pk-green-on-dark);
}

.pk-compare-link i {
    font-size: 2rem;
}

.pk-compare-link:hover {
    color: var(--pk-on-dark);
}

/* ----------------------------------------------------------
   Comparison table
   ---------------------------------------------------------- */
.pk-compare {
    padding: 0 0 clamp(3.5rem, 7vw, 6rem);
}

.pk-compare-panel {
    background: var(--pk-white);
    color: var(--pk-black);
    padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 3vw, 3rem);
}

.pk-compare-title {
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    text-align: center;
    margin-bottom: 2rem;
}

/* position: relative matters. The screen-reader "Included" / "Not
   included" labels are absolutely positioned, and an overflow box only
   clips absolute children when it is their containing block; without it
   they sat outside the scroll box and stretched the page to 925px on a
   phone. */
.pk-table-scroll {
    position: relative;
    overflow-x: auto;
}

.pk-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.pk-table th,
.pk-table td {
    padding: 1rem 1.25rem;
    border-bottom: 3px solid var(--pk-rule);
    text-align: center;
    vertical-align: middle;
}

.pk-table thead th {
    font-family: var(--pk-display);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 1.35rem;
    line-height: 1.1;
    color: var(--pk-green-on-light);
}

.pk-table thead th,
.pk-table tbody td {
    border-left: 4px solid var(--pk-black);
}

/* The row labels, and the empty corner cell above them, stay put while
   the packages scroll on a phone. */
.pk-table tbody th,
.pk-table thead td {
    position: sticky;
    left: 0;
    background: var(--pk-white);
}

.pk-table tbody th {
    text-align: left;
    white-space: nowrap;
    font-family: var(--pk-display);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 1.05rem;
}

.pk-table tbody th i {
    color: var(--pk-green-on-light);
    font-size: 2rem;
    margin-right: 1rem;
    vertical-align: middle;
}

.pk-table tbody td {
    font-size: 1.15rem;
}

.pk-table .bi-check-lg {
    font-size: 1.75rem;
}

.pk-table-note {
    text-align: center;
    font-style: italic;
    font-size: 0.95rem;
    margin: 2rem 0 0;
    color: var(--pk-muted);
}

.pk-table-hint {
    text-align: center;
    font-size: 0.9rem;
    color: var(--pk-muted);
    margin: -1rem 0 1rem;
}

@media (max-width: 575.98px) {
    /* Narrow, wrapping row labels leave room for about two packages at
       once; the edge shadow shows there is more to scroll to. */
    .pk-table {
        min-width: 560px;
    }

    .pk-table th,
    .pk-table td {
        padding: 0.75rem 0.6rem;
    }

    .pk-table thead th {
        font-size: 1rem;
    }

    .pk-table thead td,
    .pk-table tbody th {
        width: 7.5rem;
        min-width: 7.5rem;
        box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.35);
    }

    .pk-table tbody th {
        white-space: normal;
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .pk-table tbody th i {
        display: none;
    }

    .pk-table tbody td {
        font-size: 1rem;
    }
}

/* ----------------------------------------------------------
   Package detail
   ---------------------------------------------------------- */
.pk-detail-intro {
    padding-block: var(--pk-band-padding);
}

.pk-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
    gap: var(--pk-column-gap);
    align-items: center;
}

.pk-detail-title {
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    color: var(--pk-green-on-dark);
    margin-bottom: 1rem;
}

.pk-detail-tagline {
    font-family: var(--pk-subhead);
    font-weight: 700;
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    line-height: 1.25;
    color: var(--pk-white);
    margin-bottom: 1.5rem;
}

.pk-detail-lead {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    line-height: 1.55;
    max-width: 34em;
    margin: 0;
}

.pk-included {
    padding: clamp(2.5rem, 4vw, 3.5rem) 0 2rem;
}

.pk-included-label {
    font-family: var(--pk-subhead);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pk-green-on-light);
    margin-bottom: 2rem;
}

.pk-included-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.pk-included-list i {
    display: block;
    font-size: 4rem;
    line-height: 1;
    color: var(--pk-green-on-light);
    margin-bottom: 1rem;
}

.pk-included-list strong {
    display: block;
    font-family: var(--pk-subhead);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.15rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.pk-included-list span {
    display: block;
    line-height: 1.45;
}

.pk-fineprint {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--pk-muted);
    margin: 2.5rem 0 0;
}

/* ----------------------------------------------------------
   Print products
   ---------------------------------------------------------- */
.pk-prints {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    text-align: center;
}

.pk-prints-title {
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    margin-bottom: 1rem;
}

.pk-prints-lead {
    font-size: 1.25rem;
    max-width: 40rem;
    margin: 0 auto 2.5rem;
}

.pk-print-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Each photo at its own proportions, uncropped. The tiles in a row are
   different heights, so their bottoms line up to keep the captions in a
   row. */
.pk-print {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    margin: 0;
}

.pk-print img {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid var(--pk-green-on-light);
}

.pk-print figcaption {
    margin-top: 0.9rem;
    font-family: var(--pk-subhead);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    line-height: 1.25;
}

.pk-prints-note {
    font-style: italic;
    font-size: 1.15rem;
    margin: 2.5rem 0 1.5rem;
}

.pk-partner-logo {
    width: 220px;
    height: auto;
}

/* ----------------------------------------------------------
   Closing call to action
   ---------------------------------------------------------- */
.pk-cta {
    padding-block: var(--pk-band-padding);
    border-bottom: 10px solid var(--pk-green-on-dark);
}

.pk-cta-grid {
    display: grid;
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
    gap: var(--pk-column-gap);
    align-items: center;
}

.pk-cta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
}

.pk-cta-title {
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    margin: 0;
}

.pk-cta-title span {
    display: block;
}

.pk-cta-lead {
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.35;
    margin: 0;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 991.98px) {
    .pk-hero-grid,
    .pk-detail-grid,
    .pk-cta-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pk-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pk-included-list,
    .pk-print-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    /* Bootstrap's phone gutter is 12px, which leaves the photos and the
       white comparison panel nearly touching the screen edge. */
    .packages-page .container {
        --bs-gutter-x: 2.5rem;
    }

    .pk-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .pk-card-name {
        min-height: 0;
    }

    .pk-included-list,
    .pk-print-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pk-hero-badge {
        align-self: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pk-card,
    .pk-btn,
    .pk-btn i {
        transition: none;
    }

    .pk-card:hover,
    .pk-card:focus-visible {
        transform: none;
    }
}
