/* =========================================================
   FOUNDAM FRAMEWORK v0.2
   PAGE SYSTEMS
   ========================================================= */

.foundam-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--fm-color-bg);
    color: var(--fm-color-ink);
}


/* =========================================================
   PAGE HERO 01
   ========================================================= */

.fm-page-hero {
    padding-block: clamp(4rem, 8vw, 7rem);
    border-bottom: var(--fm-border-default);
    background: var(--fm-color-bg);
}

.fm-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--fm-space-2);
    margin-bottom: var(--fm-space-8);
    color: var(--fm-color-subtle);
    font-size: var(--fm-text-xs);
    font-weight: var(--fm-weight-semibold);
    letter-spacing: 0.04em;
}

.fm-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.fm-breadcrumb a:hover {
    color: var(--fm-color-ink);
}

.fm-page-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: var(--fm-space-grid);
    align-items: end;
}

.fm-page-hero__main {
    max-width: 900px;
}

.fm-page-hero__title {
    margin: 0;
    font-family: var(--fm-font-sans);
    font-size: clamp(3.35rem, 7vw, 6.8rem);
    font-weight: var(--fm-weight-medium);
    line-height: 0.94;
    letter-spacing: var(--fm-tracking-display);
}

.fm-page-hero__lead {
    max-width: 760px;
    margin: var(--fm-space-7) 0 0;
    color: var(--fm-color-text);
    font-size: clamp(1.125rem, 2vw, 1.4rem);
    line-height: 1.58;
}

.fm-page-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--fm-space-6);
    margin-top: var(--fm-space-7);
}

.fm-page-hero__aside {
    padding-top: var(--fm-space-6);
    border-top: var(--fm-border-default);
}

.fm-page-hero__aside > p {
    margin: 0;
    color: var(--fm-color-muted);
    font-size: var(--fm-text-base);
    line-height: var(--fm-leading-body);
}

.fm-page-hero__meta {
    margin: var(--fm-space-7) 0 0;
    padding: 0;
    list-style: none;
    border-top: var(--fm-border-default);
}

.fm-page-hero__meta li {
    padding-block: var(--fm-space-3);
    border-bottom: var(--fm-border-default);
    color: var(--fm-color-text);
    font-size: var(--fm-text-sm);
    font-weight: var(--fm-weight-semibold);
}


/* =========================================================
   PROOF STRIP 01
   ========================================================= */

.fm-proof-strip {
    background: var(--fm-color-dark);
    color: var(--fm-color-on-dark);
}

.fm-proof-strip__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.fm-proof-strip__item {
    min-height: 130px;
    padding: var(--fm-space-6) var(--fm-space-6) var(--fm-space-6) 0;
    border-right: var(--fm-border-dark);
}

.fm-proof-strip__item + .fm-proof-strip__item {
    padding-left: var(--fm-space-6);
}

.fm-proof-strip__item:last-child {
    border-right: 0;
}

.fm-proof-strip__item strong,
.fm-proof-strip__item span {
    display: block;
}

.fm-proof-strip__item strong {
    margin-bottom: var(--fm-space-3);
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: var(--fm-weight-medium);
    letter-spacing: var(--fm-tracking-heading);
}

.fm-proof-strip__item span {
    color: var(--fm-color-on-dark-muted);
    font-size: var(--fm-text-xs);
    line-height: 1.45;
    text-transform: uppercase;
    letter-spacing: var(--fm-tracking-label);
}


/* =========================================================
   CONTENT SPLIT 01
   ========================================================= */

.fm-content-split__grid {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: clamp(3rem, 8vw, 8rem);
    align-items: start;
}

.fm-content-split__body {
    max-width: 720px;
}

.fm-content-split__body > p {
    margin: 0 0 var(--fm-space-5);
    color: var(--fm-color-text);
    font-size: var(--fm-text-lg);
    line-height: var(--fm-leading-body);
}

.fm-content-split__body > p:last-child {
    margin-bottom: 0;
}

.fm-answer-note {
    margin-top: var(--fm-space-7);
    padding: var(--fm-space-5);
    border-left: 4px solid var(--fm-color-lime);
    background: var(--fm-color-bg-alt);
    color: var(--fm-color-text);
    font-size: var(--fm-text-sm);
    line-height: 1.65;
}


/* =========================================================
   CARD GRID 01
   ========================================================= */

.fm-card-section--alt {
    background: var(--fm-color-bg-alt);
}

.fm-card-section--dark {
    background: var(--fm-color-dark);
    color: var(--fm-color-on-dark);
}

.fm-card-grid {
    display: grid;
    margin-top: var(--fm-space-9);
    border-top: var(--fm-border-default);
    border-left: var(--fm-border-default);
}

.fm-card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.fm-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.fm-card-grid--4 { grid-template-columns: repeat(4, 1fr); }

.fm-info-card {
    min-height: 310px;
    padding: var(--fm-space-6);
    border-right: var(--fm-border-default);
    border-bottom: var(--fm-border-default);
}

.fm-info-card__index {
    display: block;
    margin-bottom: var(--fm-space-8);
    color: var(--fm-color-subtle);
    font-size: var(--fm-text-xs);
    font-weight: var(--fm-weight-bold);
    letter-spacing: var(--fm-tracking-label);
}

.fm-info-card h3 {
    margin: 0;
    font-size: clamp(1.45rem, 2.3vw, 2.05rem);
    font-weight: var(--fm-weight-medium);
    line-height: 1.08;
    letter-spacing: var(--fm-tracking-heading);
}

.fm-info-card p {
    margin: var(--fm-space-5) 0 0;
    color: var(--fm-color-muted);
    font-size: var(--fm-text-sm);
    line-height: 1.65;
}

.fm-info-card .fm-text-link {
    margin-top: var(--fm-space-6);
}


/* =========================================================
   FAQ 01
   ========================================================= */

.fm-faq {
    border-top: var(--fm-border-default);
}

.fm-faq__layout {
    display: grid;
    grid-template-columns: 0.65fr 1.35fr;
    gap: var(--fm-space-grid);
}

.fm-faq__heading {
    position: sticky;
    top: 130px;
    align-self: start;
}

.fm-faq__items {
    border-top: var(--fm-border-default);
}

.fm-faq-item {
    padding-block: var(--fm-space-6);
    border-bottom: var(--fm-border-default);
}

.fm-faq-item h3 {
    margin: 0 0 var(--fm-space-4);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.2;
    font-weight: var(--fm-weight-semibold);
}

.fm-faq-item p {
    margin: 0;
    color: var(--fm-color-muted);
    font-size: var(--fm-text-base);
    line-height: var(--fm-leading-body);
}


/* =========================================================
   LOCATION 01
   ========================================================= */

.fm-location {
    background: var(--fm-color-surface);
    border-top: var(--fm-border-default);
    border-bottom: var(--fm-border-default);
}

.fm-location__grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--fm-space-grid);
}

.fm-location__copy {
    max-width: 720px;
    margin: 0;
    color: var(--fm-color-muted);
    font-size: var(--fm-text-lg);
    line-height: var(--fm-leading-body);
}

.fm-location__areas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fm-space-2);
    margin: var(--fm-space-7) 0 0;
    padding: 0;
    list-style: none;
}

.fm-location__areas li {
    padding: 0.65rem 0.9rem;
    border: var(--fm-border-default);
    background: var(--fm-color-bg);
    font-size: var(--fm-text-sm);
    font-weight: var(--fm-weight-semibold);
}


/* =========================================================
   EXPERIENCE GRID 01
   ========================================================= */

.fm-experience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: var(--fm-space-9);
    border-top: var(--fm-border-default);
    border-left: var(--fm-border-default);
}

.fm-experience-card {
    min-height: 330px;
    padding: var(--fm-space-7);
    border-right: var(--fm-border-default);
    border-bottom: var(--fm-border-default);
}

.fm-experience-card__meta {
    margin-bottom: var(--fm-space-7);
    color: var(--fm-color-subtle);
    font-size: var(--fm-text-xs);
    font-weight: var(--fm-weight-bold);
    letter-spacing: var(--fm-tracking-label);
}

.fm-experience-card h3 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.02;
    font-weight: var(--fm-weight-medium);
    letter-spacing: var(--fm-tracking-heading);
}

.fm-experience-card p {
    margin: var(--fm-space-5) 0 0;
    color: var(--fm-color-muted);
    line-height: var(--fm-leading-body);
}

.fm-experience-card__proof {
    display: inline-block;
    margin-top: var(--fm-space-6);
    padding-top: var(--fm-space-3);
    border-top: var(--fm-border-default);
    color: var(--fm-color-text);
    font-size: var(--fm-text-xs);
    font-weight: var(--fm-weight-semibold);
}


/* =========================================================
   INSIGHTS
   ========================================================= */

.fm-insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: var(--fm-border-default);
    border-left: var(--fm-border-default);
}

.fm-insight-card {
    min-height: 360px;
    padding: var(--fm-space-6);
    border-right: var(--fm-border-default);
    border-bottom: var(--fm-border-default);
}

.fm-insight-card__meta {
    margin-bottom: var(--fm-space-7);
    color: var(--fm-color-subtle);
    font-size: var(--fm-text-xs);
    font-weight: var(--fm-weight-bold);
}

.fm-insight-card h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.1;
    font-weight: var(--fm-weight-medium);
    letter-spacing: var(--fm-tracking-heading);
}

.fm-insight-card h2 a {
    color: inherit;
    text-decoration: none;
}

.fm-insight-card p {
    margin: var(--fm-space-5) 0 0;
    color: var(--fm-color-muted);
    line-height: 1.65;
}

.fm-insight-card .fm-text-link {
    margin-top: var(--fm-space-6);
}

.fm-empty-editorial {
    max-width: 760px;
    padding: var(--fm-space-8) 0;
}

.fm-empty-editorial h2 {
    margin: 0;
    font-size: var(--fm-text-h3);
    font-weight: var(--fm-weight-medium);
    letter-spacing: var(--fm-tracking-heading);
}

.fm-empty-editorial p {
    color: var(--fm-color-muted);
    line-height: var(--fm-leading-body);
}


/* =========================================================
   CONTACT / PROJECT FORM
   ========================================================= */

.fm-contact-panel {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--fm-space-grid);
}

.fm-contact-panel__details {
    border-top: var(--fm-border-default);
}

.fm-contact-detail {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: var(--fm-space-5);
    padding-block: var(--fm-space-5);
    border-bottom: var(--fm-border-default);
}

.fm-contact-detail span {
    color: var(--fm-color-subtle);
    font-size: var(--fm-text-xs);
    font-weight: var(--fm-weight-bold);
    letter-spacing: var(--fm-tracking-label);
    text-transform: uppercase;
}

.fm-contact-detail strong,
.fm-contact-detail a {
    color: var(--fm-color-ink);
    font-size: var(--fm-text-base);
    font-weight: var(--fm-weight-medium);
    text-decoration: none;
}

.fm-project-form-section {
    background: var(--fm-color-bg-alt);
}

.fm-project-form-layout {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: var(--fm-space-grid);
}

.fm-project-form-intro {
    max-width: 480px;
    color: var(--fm-color-muted);
    line-height: var(--fm-leading-body);
}

.fm-project-form-shell {
    padding: var(--fm-space-7);
    background: var(--fm-color-surface);
    border: var(--fm-border-default);
}

.fm-project-form-content input,
.fm-project-form-content textarea,
.fm-project-form-content select {
    width: 100%;
    max-width: 100%;
}

.fm-project-form-content input,
.fm-project-form-content select {
    min-height: 48px;
}

.fm-project-form-content textarea {
    min-height: 160px;
}

.fm-project-form-fallback p {
    margin: 0 0 var(--fm-space-5);
    color: var(--fm-color-muted);
    line-height: var(--fm-leading-body);
}


/* =========================================================
   CASE STUDY CONTENT
   ========================================================= */

.fm-case-study-content {
    color: var(--fm-color-text);
    font-size: var(--fm-text-base);
    line-height: var(--fm-leading-loose);
}

.fm-case-study-content h2,
.fm-case-study-content h3 {
    color: var(--fm-color-ink);
    font-weight: var(--fm-weight-medium);
    letter-spacing: var(--fm-tracking-heading);
}

.fm-case-study-content h2 {
    margin: var(--fm-space-9) 0 var(--fm-space-5);
    font-size: var(--fm-text-h3);
}

.fm-case-study-content h3 {
    margin: var(--fm-space-7) 0 var(--fm-space-4);
    font-size: 1.5rem;
}

.fm-case-study-content p,
.fm-case-study-content ul,
.fm-case-study-content ol,
.fm-case-study-content figure {
    margin-top: 0;
    margin-bottom: var(--fm-space-5);
}

.fm-case-study-content img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {

    .fm-page-hero__grid,
    .fm-content-split__grid,
    .fm-location__grid,
    .fm-contact-panel,
    .fm-project-form-layout {
        grid-template-columns: 1fr 1fr;
        gap: var(--fm-space-8);
    }

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

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

    .fm-proof-strip__item:nth-child(2) {
        border-right: 0;
    }

    .fm-proof-strip__item:nth-child(n+3) {
        border-top: var(--fm-border-dark);
    }

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

@media (max-width: 767px) {

    .fm-page-hero {
        padding-block: var(--fm-space-8);
    }

    .fm-breadcrumb {
        margin-bottom: var(--fm-space-6);
    }

    .fm-page-hero__grid,
    .fm-content-split__grid,
    .fm-faq__layout,
    .fm-location__grid,
    .fm-contact-panel,
    .fm-project-form-layout {
        display: block;
    }

    .fm-page-hero__title {
        font-size: clamp(3rem, 15vw, 4.8rem);
    }

    .fm-page-hero__lead {
        margin-top: var(--fm-space-6);
        font-size: var(--fm-text-base);
    }

    .fm-page-hero__aside,
    .fm-content-split__body,
    .fm-location__grid > div + div,
    .fm-contact-panel__details,
    .fm-project-form-shell {
        margin-top: var(--fm-space-8);
    }

    .fm-page-hero__actions {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--fm-space-5);
    }

    .fm-proof-strip__grid {
        grid-template-columns: 1fr;
    }

    .fm-proof-strip__item,
    .fm-proof-strip__item + .fm-proof-strip__item {
        min-height: auto;
        padding: var(--fm-space-5) 0;
        border-right: 0;
        border-top: var(--fm-border-dark);
    }

    .fm-proof-strip__item:first-child {
        border-top: 0;
    }

    .fm-card-grid,
    .fm-card-grid--2,
    .fm-card-grid--3,
    .fm-card-grid--4,
    .fm-experience-grid,
    .fm-insights-grid {
        grid-template-columns: 1fr;
    }

    .fm-info-card,
    .fm-experience-card,
    .fm-insight-card {
        min-height: auto;
    }

    .fm-faq__heading {
        position: static;
        margin-bottom: var(--fm-space-8);
    }

    .fm-location__copy {
        font-size: var(--fm-text-base);
    }

    .fm-contact-detail {
        grid-template-columns: 1fr;
        gap: var(--fm-space-2);
    }

    .fm-project-form-shell {
        padding: var(--fm-space-5);
    }
}

.fm-location__link {
    margin-top: var(--fm-space-6);
}
