/* ==========================================================================
   intown-homes.css — InTown Homes case study
   Prefix: intown-
   Section order: Hero → Metrics → Quote (video) → Before/After → Solution
   → Field supervision (Austin) → Project coordination (Jeanette) → Results
   → Guides (cs-resources) → FAQ → Final CTA.
   Each section borrows its style from an existing case study page:
   - Hero (shared cs-hero, white): holdfast-construction
   - Metrics 4-col grid: isc-building-materials.css
   - Before/After split cards: precision-development.css (.precision-decision)
   - Solution (features.css scrollytelling + animated mockups): isc-building-materials.css
   - Lead + coordinator cards: component-shared.css (.cs-workflow__card, as Holdfast)
   - Results (cs-workflow--isc + cs-wf__grid--4): gps-time-tracking.css
   Shared blocks (cs-quote, cs-resources, cs-faq, cs-final-cta) are reused
   unmodified; only the page-scoped pieces are declared here.
   ========================================================================== */

/* Brand link — "InTown Homes" mentions link to intownhomes.com */
.intown-brand-link {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.intown-brand-link:hover {
    color: var(--secondary-green);
}

/* Company logo in place of a person avatar (square logo already has white margin) */
.intown-logo-avatar {
    object-fit: contain;
    background: var(--white);
    padding: 12px;
    border: 2px solid var(--grey-02);
    box-shadow: none;
}

/* ==========================================================================
   HERO — same as holdfast-construction (shared cs-hero, white background,
   shared tags/title/subtitle/CTA).
   ========================================================================== */
.intown-hero__photo-wrap {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(var(--black-rgb), 0.12);
}

.intown-hero__photo {
    display: block;
    width: 100%;
    height: 480px;
    object-fit: cover;
}

/* ==========================================================================
   METRICS (cs-metrics, 4 columns — same as isc-building-materials.css)
   ========================================================================== */
.cs-metrics__grid--4 {
    grid-template-columns: repeat(2, 1fr);
}

/* Metric cards — same card as Holdfast's Winning Workflow (.cs-workflow__card):
   white card, 16px radius, 1.25rem padding, icon tile on top, left-aligned text */
.cs-metrics__grid--4 {
    gap: 1.5rem;
    text-align: left;
}

.intown-metrics .cs-metric {
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--grey-03);
    border-radius: 16px;
    padding: 1.25rem;
}

.intown-metrics .cs-metric__value {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.intown-metrics .cs-metric__label {
    font-size: 1.25rem;
}

.intown-metrics .cs-metric__desc {
    font-size: 0.875rem;
    color: var(--grey-05);
    line-height: 1.65;
}

.intown-metrics__source {
    margin: var(--spacing-lg) 0 0;
    font-size: 0.75rem;
    color: var(--text-quaternary);
    text-align: center;
}

/* ==========================================================================
   BEFORE / AFTER (dark split cards, same as .precision-decision)
   ========================================================================== */
.intown-decision {
    background: var(--text-primary);
    padding: 5rem 1.5rem;
}

.intown-decision__container {
    max-width: var(--spacing-container);
    margin: 0 auto;
}

.intown-decision__header {
    text-align: center;
    margin-bottom: 3rem;
}

.intown-decision__title {
    font-size: 3.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.intown-decision__subtitle {
    font-size: 1.5rem;
    font-weight: var(--font-weight-light);
    color: rgba(var(--white-rgb), 0.55);
    line-height: 1.5;
}

.intown-decision__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.intown-decision__card {
    background: rgba(var(--white-rgb), 0.04);
    border: 1px solid rgba(var(--white-rgb), 0.08);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.intown-decision__card--featured {
    border-color: var(--secondary-green);
    border-width: 1.5px;
    background: rgba(var(--secondary-green-rgb), 0.06);
}

.intown-decision__card:hover {
    box-shadow: 0 8px 28px rgba(var(--black-rgb), 0.35);
    transform: translateY(-2px);
}

.intown-decision__eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: rgba(var(--white-rgb), 0.35);
    margin-bottom: 0.75rem;
}

.intown-decision__brand-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.intown-decision__brand-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: rgba(var(--white-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--white-rgb), 0.6);
}

.intown-decision__brand-icon--green {
    background: rgba(var(--secondary-green-rgb), 0.15);
    color: var(--secondary-green);
}

.intown-decision__brand-name {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--white);
    line-height: 1.2;
}

.intown-decision__divider {
    border: none;
    border-top: 1px solid rgba(var(--white-rgb), 0.08);
    margin: 1.25rem 0;
}

.intown-decision__divider--green {
    border-top-color: rgba(var(--secondary-green-rgb), 0.3);
}

.intown-decision__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex-grow: 1;
}

.intown-decision__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.intown-decision__item-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 7px;
    background: rgba(var(--white-rgb), 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--white-rgb), 0.4);
    flex-shrink: 0;
}

.intown-decision__item-icon--red {
    color: var(--alert-red);
}

.intown-decision__item-icon--green {
    background: rgba(var(--secondary-green-rgb), 0.12);
    color: var(--secondary-green);
}

.intown-decision__item-title {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    line-height: 1.4;
    margin: 0 0 2px;
}

.intown-decision__item-desc {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-light);
    color: rgba(var(--white-rgb), 0.55);
    line-height: 1.5;
    margin: 0;
}

/* Card footer holds the customer quote */
.intown-decision__quote {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(var(--white-rgb), 0.08);
}

.intown-decision__card--featured .intown-decision__quote {
    border-top-color: rgba(var(--secondary-green-rgb), 0.2);
}

.intown-decision__quote-text {
    font-size: 0.9375rem;
    font-style: italic;
    font-weight: var(--font-weight-light);
    color: rgba(var(--white-rgb), 0.85);
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

.intown-decision__quote-cite {
    font-size: 0.75rem;
    font-style: normal;
    color: rgba(var(--white-rgb), 0.45);
}

/* ==========================================================================
   FEATURES IN ACTION (features.css scrollytelling + animated mockups from
   js/intown-animations.js — same as .isc-features-section)
   ========================================================================== */
.intown-features-section {
    background: var(--white);
    padding: 8rem 0;
}

/* Remote punch lists mockup — checklist screen (js/intown-animations.js createPunchLists) */
.it-cl {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--text-primary);
}

.it-cl__list {
    padding: 0 16px;
}

.it-cl .it-cl__list--first {
    padding-top: 8px;
}

.it-cl__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--grey-03);
}

.it-cl__grip {
    display: inline-flex;
    color: var(--grey-04);
}

.it-cl__circle {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    border: 2px solid var(--grey-04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.it-cl__circle--done {
    background: var(--secondary-green);
    border-color: var(--secondary-green);
    color: var(--white);
}

.it-cl__text {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.it-cl__row--done .it-cl__text {
    color: var(--grey-04);
    text-decoration: line-through;
}

.it-cl__row--fresh {
    animation: it-cl-in 0.5s ease-out;
}

@keyframes it-cl-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.it-cl__done-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 12px;
    font-size: 0.9375rem;
    color: var(--grey-05);
    border-bottom: 1px solid var(--grey-03);
    margin: 0 16px;
    padding-left: 0;
    padding-right: 0;
}

.it-cl__add {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 9999px;
    background: var(--text-primary);
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
}

/* Initials avatars inside the mockups (match the person's name) */
.intown-features-section .it-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1;
}

.intown-features-section .it-avatar--sm {
    width: 24px;
    height: 24px;
    margin-left: 0;
    font-size: 0.625rem;
}

/* 24px avatars (task list, task card): smaller initials */
.intown-features-section .f2__avatar.it-avatar,
.intown-features-section .it-avatar--sm {
    font-size: 0.5rem;
    letter-spacing: 0.02em;
}

.intown-features-section .it-avatar--aw {
    background: var(--blue);
}

.intown-features-section .it-avatar--jh {
    background: var(--dark-magenta);
}

/* ==========================================================================
   LEAD + COORDINATOR — shared cs-workflow__card cards (same as Holdfast's
   Winning Workflow), 2 per row on desktop and tablet, 1 on mobile
   ========================================================================== */
.intown-lead {
    background: var(--grey-02);
}

.intown-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Lead: 3 per row on desktop, 2 on tablet, 1 on mobile */
.intown-lead .intown-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   RESULTS — cs-workflow--isc + cs-wf__grid--4 from gps-time-tracking.css
   ========================================================================== */
.cs-workflow--isc .cs-wf__step {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-workflow--isc .cs-wf__step:hover {
    box-shadow: 0 8px 28px rgba(var(--black-rgb), 0.35);
    transform: translateY(-2px);
}

/* 2 cards per row on desktop and tablet, 1 on mobile */
.intown-results .cs-wf__grid--4 {
    grid-template-columns: repeat(2, 1fr);
}

/* ==========================================================================
   RESOURCES — same card text clamp as precision-development.css
   ========================================================================== */
.cs-resources__card-title,
.cs-resources__card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* FAQ (cs-faq) and Final CTA (cs-final-cta) reuse the shared, unmodified blocks. */

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    /* Hero: no image on tablet and mobile */
    .intown-hero__photo-wrap { display: none; }

    /* Metrics */
    .cs-metrics__grid--4 { grid-template-columns: repeat(2, 1fr); }

    /* Lead cards */
    .intown-lead .intown-grid { grid-template-columns: repeat(2, 1fr); }

    /* Before / After */
    .intown-decision { padding: 4rem 1.5rem; }
    .intown-decision__grid { grid-template-columns: 1fr; }
    .intown-decision__title { font-size: 2.5rem; }
    .intown-decision__subtitle { font-size: 1.25rem; }

    /* Features */
    .intown-features-section { padding: 5rem 0; }

}

@media (max-width: 768px) {
    /* Keep Learning: still 2 per row on tablet (shared CSS goes to 1 here) */
    .cs-resources__grid { grid-template-columns: repeat(2, 1fr); }


    /* Before / After */
    .intown-decision { padding: 3rem 1rem; }
    .intown-decision__title { font-size: 2rem; }
    .intown-decision__subtitle { font-size: 1.125rem; }

    /* Features */
    .intown-features-section { padding: 4rem 0; }
    .features__br-desktop { display: none; }

}

@media (max-width: 480px) {
    /* Keep Learning */
    .cs-resources__grid { grid-template-columns: 1fr; }

    /* Results */
    .intown-results .cs-wf__grid--4 { grid-template-columns: 1fr; }

    /* Lead + coordinator cards */
    .intown-grid,
    .intown-lead .intown-grid { grid-template-columns: 1fr; }

    /* Metrics */
    .cs-metrics__grid--4 { grid-template-columns: 1fr; gap: 1.5rem; text-align: left; }
    .intown-metrics .cs-metric,
    .intown-metrics .cs-metric:first-child,
    .intown-metrics .cs-metric:last-child {
        padding: 1.25rem;
        border: 1px solid var(--grey-03);
    }


    /* Before / After */
    .intown-decision { padding: 2.5rem 1rem; }
    .intown-decision__title { font-size: 1.75rem; }
    .intown-decision__subtitle { font-size: 1rem; }
    .intown-decision__card { padding: 1.5rem; }

    /* Features */
    .intown-features-section { padding: 3rem 0; }

}
