/* guides.css — the Guides section: clean, content-first, over a fixed comic-halftone
   backdrop. Opt in with bodyClass="guide".

   NOTE: the body carries class="guide", so the long-form article column must NOT use a
   bare ".guide" class (it would also match <body class="guide"> and force the body to the
   column width). The article column is ".guide-prose"; the body rule is "body.guide". */

body.guide {
    margin: 0;
    min-height: 100dvh;
    background: transparent;     /* MUST stay transparent: the fixed ::before backdrop sits at z-index:-1,
                                    so any opaque background here would paint over (hide) the image */
    color: #1a2230;
    overflow-x: hidden;
}

/* Full-cover fixed backdrop (a fixed layer, not background-attachment:fixed, which iOS ignores). */
body.guide::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #e9e2d4 url('/images/guides/guides-bg.webp') center center / cover no-repeat;
}

/* Footer on guides pages: emerge from the halftone backdrop instead of the default white top,
   so the background fades into the footer rather than cutting off at a hard edge. The top is
   transparent here — the fixed backdrop (behind, z-index:-1) shows through and fades into the sky. */
body.guide .site-footer {
    background-image:
        url('/images/layers/footer-building.webp'),
        linear-gradient(to bottom,
            rgba(212, 226, 244, 0) 0%,        /* transparent — the halftone shows here and fades in */
            rgba(212, 226, 244, 0) 12%,
            #d4e2f4 42%,                       /* pale sky blue */
            #e3e9f1 78%,
            #aeb1b7 87%,
            #807f84 90%, #807f84 100%);        /* grey pavement */
    background-repeat: no-repeat, no-repeat;
    background-position: left bottom, top left;
    background-size: auto, 100% 100%;
}

/* Nav scroll-scrim — shows the top 175px of the very same fixed halftone backdrop, brought
   in FRONT of the content once the page is scrolled (topnav.js toggles .nav-scrolled), so the
   logo + links rest on the real background texture instead of stark moving content. It's a
   full-viewport copy of ::before (so the image lines up pixel-for-pixel), masked to reveal
   only the top band and fade out along its bottom edge. */
body.guide::after {
    content: "";
    position: fixed;
    inset: 0;                    /* identical box to ::before so the texture aligns exactly */
    z-index: 45;                 /* behind the nav (50), above page content */
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
    background: #e9e2d4 url('/images/guides/guides-bg.webp') center center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 105px, transparent 155px);
            mask-image: linear-gradient(to bottom, #000 105px, transparent 155px);
}
body.guide.nav-scrolled::after { opacity: 1; }

/* ---------- Section landing (/guides/) ---------- */
.guides-home {
    width: var(--col-width);
    margin: 0 auto;
    min-height: 100vh;
    padding: 150px 0 6rem;
    box-sizing: border-box;
}
.guides-home h1 {
    color: var(--herosite-blue);
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    line-height: 1;
    margin: 0;
    text-align: left;
    text-shadow: 0 2px 0 #fff, 0 0 22px rgba(255, 247, 224, .9);   /* lifts the heading off the halftone */
}

/* ---------- Bento grid (featured guide + pinned posts + industry rail) ----------
   Desktop: featured cover (card) | two cardless pinned images | industry rail (card).
   Feature and pinned columns are equal width, so the two 588x441 images stack to the
   cover's height. Collapses to 2 columns on tablet, 1 on mobile. */
.guides-grid {
    display: grid;
    gap: 20px;
    margin-top: 2.25rem;
    grid-template-columns: 1fr 1fr 0.7fr;   /* featured | pinned | rail */
    align-items: start;                      /* cards hug their content height — no stretch, no white strip */
}

/* Comic-panel card — black border, offset shadow; the halftone shows in the gutters. */
.g-card {
    border: 2px solid #000;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--comic-shadow);
    overflow: hidden;
}

/* Featured guide — card height equals the cover image exactly (no white strip). */
.g-card--feature { grid-column: 1; }
.g-card--feature img { display: block; width: 100%; height: auto; }

/* Pinned posts — cardless, transparent comic-style images stacked in the middle column;
   they sit directly on the halftone backdrop (no panel, so the transparency shows). */
.guides-pins {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.g-card--pin img { display: block; width: 100%; height: auto; }

/* Industry rail — stretches to the grid height, beside the cards. */
.g-rail {
    grid-column: 3;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    padding: 24px 26px;
}
.g-rail__title { color: var(--herosite-blue); margin: 0 0 .5rem; font-size: clamp(1.15rem, 1.9vw, 1.6rem); }
.g-rail__list { list-style: none; margin: 0; padding: 0; overflow: auto; }
.g-rail__list a {
    display: block;
    padding: .6rem .2rem;
    border-bottom: 1px solid #e7eaf0;
    color: #15243a;
    font-weight: 600;
    text-decoration: none;
}
.g-rail__list li:last-child a { border-bottom: 0; }
.g-rail__list a:hover { color: var(--herosite-blue); }

/* Product CTA — pinned to the bottom of the rail (the conversion driver). */
.g-rail__cta { margin-top: auto; padding-top: 1.4rem; text-align: center; }
.g-rail__cta img { width: 92px; height: auto; }
.g-rail__cta-head {
    font-family: 'Bangers', system-ui, cursive;
    font-size: 1.5rem;
    color: var(--herosite-blue);
    margin: .15rem 0 .85rem;
    line-height: 1;
}
.g-rail__btn {
    display: block;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    padding: 11px 14px;
    margin-bottom: 12px;
    border: 2.5px solid #000;
    border-radius: 14px;
    box-shadow: 4px 4px 0 #000;
    transition: transform .12s ease, box-shadow .12s ease;
}
.g-rail__btn:last-child { margin-bottom: 0; }
.g-rail__btn--site { background: var(--herosite-blue); color: #fff; }
.g-rail__btn--logo { background: var(--herosite-yellow); color: #000; }
.g-rail__btn:hover,
.g-rail__btn:focus-visible { transform: translateY(-2px); box-shadow: 6px 6px 0 #000; }

/* Tablet: featured + pinned side by side; the industry rail drops full-width below. */
@media (max-width: 1023px) {
    .guides-grid { grid-template-columns: 1fr 1fr; }
    .g-card--feature { grid-column: 1; }
    .guides-pins { grid-column: 2; }
    .g-rail { grid-column: 1 / -1; align-self: auto; }
    .g-rail__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); column-gap: 1.5rem; }
    .g-rail__list li:last-child a { border-bottom: 1px solid #e7eaf0; }
}

/* Mobile: everything stacks in one column. */
@media (max-width: 639px) {
    .guides-grid { grid-template-columns: 1fr; gap: 16px; }
    .g-card--feature,
    .guides-pins,
    .g-rail { grid-column: 1; }
}

/* ---------- Long-form guide article — a 1440 comic card with a full-bleed hero ---------- */
.guide-prose {
    --pad: clamp(1.5rem, 3.5vw, 3rem);
    width: var(--col-width);
    margin: 140px auto 7rem;
    box-sizing: border-box;
    padding: var(--pad);
    background: #fff;
    border: 2px solid #000;
    border-radius: 18px;
    box-shadow: var(--comic-shadow);
    overflow: hidden;                 /* keeps the full-bleed hero inside the rounded corners */
    font-size: 1.15rem;
    line-height: 1.75;
}

/* Title/meta + body share a readable centred measure; the hero breaks out full-bleed. */
.guide-prose__head,
.guide-prose__body { max-width: 820px; margin-inline: auto; }
.guide-prose__meta { color: #5a6473; font-size: 1rem; margin: .6rem 0 0; }

/* 16:9 hero — top banner: flush to the top + side borders (negative margins cancel the
   card padding), wrapping into the card's rounded corners via the card's overflow:hidden. */
.guide-prose__hero {
    position: relative;
    width: calc(100% + 2 * var(--pad));
    margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) clamp(1.5rem, 3vw, 2.5rem);
}
.guide-prose__hero img { display: block; width: 100%; height: auto; }

/* "Back to Guides" — yellow comic button overlaid on the hero, 65px in from the top-left;
   presses down on hover (slides into where its shadow was). */
.guide-prose__back {
    position: absolute;
    top: 65px;
    left: 65px;
    display: inline-flex;
    align-items: center;              /* centres the < over the two text lines */
    gap: 9px;
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.3;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    background: var(--herosite-yellow);
    padding: 8px 16px;
    border: 2.5px solid #000;
    border-radius: 12px;
    box-shadow: 4px 4px 0 #000;
    transition: transform .1s ease, box-shadow .1s ease;
}
.guide-prose__back-mark { font-size: 1.6rem; line-height: 1; }
.guide-prose__back:hover,
.guide-prose__back:focus-visible {
    transform: translate(4px, 4px);   /* press into the shadow's place */
    box-shadow: 0 0 0 #000;           /* shadow collapses → depressed look */
}
@media (max-width: 639px) {
    .guide-prose__back { top: 16px; left: 16px; }
}

.guide-prose h1 { color: var(--herosite-blue); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0; }
.guide-prose h2 { color: var(--herosite-blue); font-size: clamp(1.5rem, 3.5vw, 2.2rem); line-height: 1.15; margin: 2.75rem 0 .75rem; }
.guide-prose h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin: 1.75rem 0 .5rem; }
.guide-prose p  { margin: 0 0 1.25rem; }
.guide-prose ul:not(.star-list) { margin: 0 0 1.5rem; padding-left: 1.5rem; }
.guide-prose li { margin: 0 0 .65rem; }
.guide-prose strong { color: #111; }
.guide-prose a:not(.guide-prose__back) { color: var(--herosite-blue); text-decoration: underline; text-underline-offset: 2px; }
.guide-prose hr { border: 0; border-top: 2px solid #e2e8f0; margin: 3rem 0; }
.guide-prose ol { margin: 0 0 1.5rem; padding-left: 1.5rem; }

/* Example callouts (a real service block, the contact hours) read as quoted snippets. */
.guide-prose blockquote {
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--herosite-blue);
    background: #f3f6fc;
    border-radius: 0 10px 10px 0;
}
.guide-prose blockquote p { margin: 0; }

/* Literal strings: domains, "https", etc. */
.guide-prose code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: .9em;
    background: #eef2f8;
    padding: .1em .4em;
    border-radius: 4px;
}

/* Closing call to action: the comic press-on-hover button. */
.guide-prose__cta { text-align: center; margin: 2.75rem 0 1rem; }
.guide-prose a.guide-prose__cta-btn {
    display: inline-block;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: 1.15rem;
    color: #000;
    text-decoration: none;
    background: var(--herosite-yellow);
    border: 3px solid #000;
    border-radius: 14px;
    padding: 15px 32px;
    box-shadow: 5px 5px 0 #000;
    transition: transform .1s, box-shadow .1s;
}
.guide-prose a.guide-prose__cta-btn:hover,
.guide-prose a.guide-prose__cta-btn:focus-visible {
    transform: translate(5px, 5px);
    box-shadow: 0 0 0 #000;
}
