/* ==========================================================================
   Content Pages — ColdPoint Real Estate Group
   Shared styles for the service, company, legal, and resource pages:
   /brokerage.html, /development.html, /advisory.html, /about.html,
   /projects.html, /privacy.html, /terms.html, /resources/*.

   Anything here is used by more than one of those pages. Truly page-specific
   styling would get its own file; anything that spreads to listings, provinces
   or contact should be promoted to components.css instead — see the note on
   .hero-subtitle there for why that matters.
   All values reference design-system.css custom properties.
   ========================================================================== */


/* ==========================================================================
   Page Hero
   These pages have no hero photograph, so the hero paints its own gradient
   rather than sitting on a flat navy slab. Same treatment as the homepage
   hero fallback, so the two read as one family.
   ========================================================================== */
.hero-page {
    background-image: var(--gradient-hero);
}

/* These pages use .nav-solid, so the bar is already opaque. The hero only
   needs to clear it, not sit behind it. */
.hero-page .hero-overlay {
    background-image: none;
}


/* ==========================================================================
   Breadcrumb Bar
   A full-width strip below the nav carrying the breadcrumb trail. Sits on
   the subtle surface so it reads as chrome rather than content.
   ========================================================================== */


/* ==========================================================================
   Definition Row
   A term-and-explanation pair used in the glossary and in the "what this
   means" passages of the guides. A left rule instead of a card keeps a long
   run of them from turning into a wall of boxes.
   ========================================================================== */
.def-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
}

.def-row {
    border-left: 2px solid var(--color-border-strong);
    padding-left: var(--space-2);
}

.def-row dt {
    font-weight: var(--font-semibold);
    color: var(--color-text);
    letter-spacing: var(--tracking-tight);
    margin-bottom: 2px;
}

.def-row dd {
    margin: 0;
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
}


/* ==========================================================================
   Spec Table
   Cost ranges, cap rates, comparison matrices. Wide tables scroll inside
   their own container so the page body never scrolls sideways.
   ========================================================================== */
.table-scroll {
    overflow-x: auto;
    /* overflow-x alone coerces overflow-y to auto, which grows a stray
       vertical scrollbar on any sub-pixel overflow. Horizontal only. */
    overflow-y: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background-color: var(--color-surface);
}

.spec-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.spec-table th,
.spec-table td {
    text-align: left;
    padding: var(--space-1) var(--space-2);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.spec-table thead th {
    background-color: var(--color-surface-sunken);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-text-subtle);
    white-space: nowrap;
}

.spec-table tbody tr:last-child td {
    border-bottom: none;
}

.spec-table td:first-child {
    font-weight: var(--font-medium);
    color: var(--color-text);
}

/* Figures line up column-to-column only with tabular figures. */
.spec-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


/* ==========================================================================
   Feature Row
   The alternating text/detail blocks on the service pages.
   ========================================================================== */
.feature-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.feature-row + .feature-row {
    margin-top: var(--space-4);
}

@media (min-width: 900px) {
    .feature-row {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: var(--space-5);
    }
}

.feature-row-label {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin-bottom: var(--space-1);
}

.feature-row h3 {
    letter-spacing: var(--tracking-tight);
}

/* Paragraphs here are not inside .prose, so they need their own rhythm —
   without this, consecutive paragraphs run together as one block. */
.feature-row-body p {
    margin-bottom: var(--space-2);
}

.feature-row-body > p:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Process Steps
   A numbered sequence. The numbering is load-bearing here — these are
   genuinely ordered stages of an engagement, not a decorated list.
   ========================================================================== */
.steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 720px) {
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-4);
    }
}

@media (min-width: 1024px) {
    .steps-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.steps li {
    counter-increment: step;
    padding-top: var(--space-2);
    border-top: 2px solid var(--color-primary);
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    font-variant-numeric: tabular-nums;
    letter-spacing: var(--tracking-wider);
    color: var(--color-text-subtle);
    margin-bottom: var(--space-1);
}

.steps h3 {
    font-size: var(--text-base);
    margin-bottom: 4px;
}

.steps p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}


/* ==========================================================================
   Checklist
   Used for scope lists and "what's included" blocks. The tick is an inline
   SVG in the markup; this sizes and colours the slot.
   ========================================================================== */
.checklist {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
    margin: 0 0 var(--space-3);
    padding: 0;
    list-style: none;
}

@media (min-width: 720px) {
    .checklist-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--space-4);
    }
}

.checklist li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: var(--space-1);
    align-items: start;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-text-muted);
}

.checklist-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    /* Nudged so the tick centres on the first line rather than its cap height. */
    margin-top: 5px;
    color: var(--color-success);
}

.checklist-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.25;
}


/* ==========================================================================
   Callout
   A single emphasised aside inside long-form copy. One variant only —
   a page with three kinds of coloured box has no emphasis left.
   ========================================================================== */
.callout {
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    background-color: var(--color-surface-subtle);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
}

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

.callout-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 4px;
}


/* ==========================================================================
   Article Layout
   Long-form resource pages: reading column with a sticky sidebar on wide
   screens for the contents list and the download CTA.
   ========================================================================== */
.article-layout {
    display: grid;
    /* minmax(0, ...) not 1fr: a bare 1fr track is minmax(auto, 1fr), so its
       floor is the reading column's min-content width. A wide .spec-table
       inside then pushes the track past the viewport and the whole page
       scrolls sideways instead of the table scrolling in .table-scroll. */
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
}

/* Grid and flex children floor at min-content unless told otherwise, which is
   what lets one wide descendant widen the page. */
.article-layout > * {
    min-width: 0;
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: var(--space-6);
        align-items: start;
    }

    .article-sidebar {
        position: sticky;
        /* Clear the fixed nav plus a little breathing room. */
        top: calc(var(--nav-height) + var(--space-2));
    }
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-subtle);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.article-meta-sep {
    color: var(--color-neutral-300);
}

.sidebar-panel {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    box-shadow: var(--shadow-xs);
}

.sidebar-panel + .sidebar-panel {
    margin-top: var(--space-3);
}

.sidebar-panel h3 {
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-text-subtle);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-2);
}

.toc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
}

.toc a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.toc a:hover {
    color: var(--color-text);
}


/* ==========================================================================
   Gated Download Form
   The lead-capture panel on gated resources. Mirrors the homepage lead
   magnet, but scoped here so resource pages need not load home.css.
   ========================================================================== */
.gate-form .form-group {
    margin-bottom: var(--space-2);
}

.gate-note {
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
    margin-top: var(--space-1);
    margin-bottom: 0;
}

/* Bots fill this; people never see it. Positioned off-screen rather than
   display:none, which some bots detect and skip. */


.gate-success {
    text-align: center;
}

.gate-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto var(--space-2);
    border-radius: var(--radius-full);
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.gate-success-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}


/* ==========================================================================
   Team Grid
   The named-people section on /about.html. Buyers transact with people;
   an anonymous brokerage does not get the call.
   ========================================================================== */
.team-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
}

@media (min-width: 720px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ==========================================================================
   Project Card
   Portfolio entries on /projects.html. Evidence for the development claim,
   so the facts (size, temperature, scope) lead over the prose.
   ========================================================================== */
.project-card {
    padding: var(--space-3);
    gap: var(--space-2);
}

.project-card-eyebrow {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.project-card h3 {
    letter-spacing: var(--tracking-tight);
}

.project-specs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    padding-top: var(--space-2);
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.project-specs div {
    display: flex;
    flex-direction: column;
}

.project-specs dt {
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.project-specs dd {
    margin: 0;
    font-weight: var(--font-medium);
    font-variant-numeric: tabular-nums;
    color: var(--color-text);
}


/* ==========================================================================
   Resource Hub filter bar
   ========================================================================== */


.filter-chip {
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.filter-chip:hover {
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.filter-chip.is-active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.filter-chip:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}


/* ==========================================================================
   Reduced motion
   Every transition above is decorative. Honour the preference globally for
   this file rather than repeating the query per component.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .filter-chip,
    .toc a,
    .prose a {
        transition: none;
    }
}
