/*
 * Glacial Blocks — shared frontend + editor CSS.
 *
 * Blocks ship almost no CSS of their own: css/webflow.css owns the design.
 * This file carries only the cross-cutting visibility classes, the resets the
 * faithful (Tier-B) sections' deliberate deviations need, and accessibility
 * guardrails.
 *
 * Breakpoints mirror the design's own media queries in css/webflow.css
 * (991 / 767 / 479), NOT generic device widths.
 */

/* ---------------------------------------------------------------- Visibility
 * Classes are emitted only when the toggle is on, so existing saved content
 * is never affected.
 */
@media (min-width: 992px) {
    .gl-hide-desktop {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .gl-hide-tablet {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .gl-hide-mobile {
        display: none !important;
    }
}

/* Keep hidden blocks editable (dimmed) inside the editor canvas. */
.editor-styles-wrapper .gl-hide-desktop,
.editor-styles-wrapper .gl-hide-tablet,
.editor-styles-wrapper .gl-hide-mobile {
    display: revert !important;
    opacity: 0.55;
}

/* ------------------------------------------------------- Homepage <h1>
 * The welcome block's practice name is an h2.h2-lg in the export and the
 * page's <h1> here. .h2-lg owns the size at every breakpoint; mirror the
 * design's bare `h2 {}` rule for everything else, so components.css's stock
 * h1 (bold, 44px line-height, 20px top margin) doesn't apply.
 */
h1.h2-lg {
    margin-top: 0;
    margin-bottom: 20px;
    font-family: "Source Serif 4", sans-serif;
    font-weight: 300;
    line-height: 1.05em;
}

/* ------------------------------------------------------------ Focus states
 * Never strip outlines — replace them. The design's links sit on white, tan,
 * green and near-black, so the ring carries its own white halo.
 */
.button-jm:focus-visible,
.explore-links:focus-visible,
.service-link:focus-visible,
.tab-link:focus-visible,
.tab-link-2:focus-visible,
.lightbox-link:focus-visible {
    outline: 2px solid var(--color-4);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px var(--color);
}

/* ---------------------------------------------------------- Reduced motion
 * css/webflow-ix.css pre-hides the IX2-animated elements (opacity:0) and the
 * IX3 hero lines (visibility:hidden) so they can animate in. Visitors who ask
 * for reduced motion get them shown immediately.
 */
@media (prefers-reduced-motion: reduce) {
    html.w-mod-js [data-w-id] {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Out-specifies webflow-ix.css's html.w-mod-js:not(.w-mod-ix3) :is(…) — (0,4,1) vs (0,3,1). */
    html:root.w-mod-js.w-mod-js :is(.hero-top-line, .left-gold-bar, .hero-p, .buttons-hero, .locations-div) {
        visibility: visible !important;
    }
}

/* ------------------------------------------------------------ Editor canvas
 * The front end gets its body type from webflow.css's `body {}` rule; in the
 * editor iframe the content root is .editor-styles-wrapper, which core gives
 * its own defaults. Mirror the design's body type there only.
 */
.editor-styles-wrapper {
    color: #1e2020;
    font-family: Manrope, sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.75em;
}

/* ------------------------------------------------- Links on dark bands
 * Rows with a text colour (ink/green bands → white) carry .gl-c; prose links
 * inside them inherit that colour with a gold underline instead of the
 * theme's green, which disappears on ink. :not([class]) leaves buttons alone.
 */
.gl-c a:not([class]) {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--gl-accent);
    text-underline-offset: 3px;
}

.gl-c a:not([class]):hover {
    color: var(--gl-accent-light);
}

/* ------------------------------------------------ Designed inner pages
 * When a page's content starts / ends with a full-bleed band (a toolbox row
 * or an alignfull section block), the band owns the spacing: drop the theme
 * wrapper's 4rem so it doesn't stack on the band's own 8% padding — and so
 * the closing band meets the footer with no white strip. The (empty) related
 * pages slot that singular.php prints first is skipped over; a page that
 * still shows Related Pages keeps the wrapper padding.
 */
.standard-inner-wrapper:has(> :is(.gl-row, .alignfull):first-child),
.standard-inner-wrapper:has(> .related-pages-bottom:first-child:not(:has(*)) + :is(.gl-row, .alignfull)) {
    padding-top: 0;
}

.standard-inner-wrapper:has(> :is(.gl-row, .alignfull):last-child) {
    padding-bottom: 0;
}
