/* home-styles.css — sections of the home, in the order they appear (§12.1, §12.3).
   Every value that changes between visual directions comes from the variables of globals.css. */

/******************** HOME HERO ****************************/
/***********************************************************/

#home_hero {
    position: relative;
    isolation: isolate;
    padding-block: calc(var(--section-padding-y) - 3rem) var(--section-padding-y);
}

@media (max-width: 767px) {
    #home_hero {
        padding-block: 2.5rem var(--section-padding-y-compact);
    }
}

/* display: block because Beaver gives the row's pseudo-elements display: table (clearfix) */
#home_hero::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--hero-glow);
}

#home_hero .fl-col-group {
    display: flex;
    align-items: center;
    gap: 4.5rem;
}

@media (max-width: 1024px) {
    #home_hero .fl-col-group {
        flex-direction: column;
        align-items: stretch;
        gap: 3rem;
    }
}

#home_hero .home-hero__copy {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_hero .home-hero__copy {
        flex: none;
    }
}

#home_hero .home-hero__visual {
    flex: 0 1 27rem;
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_hero .home-hero__visual {
        flex: none;
        width: min(100%, 26rem);
    }
}

#home_hero .home-hero__copy .fl-col-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

#home_hero .home-hero__visual .fl-col-content {
    position: relative;
    display: flex;
    flex-direction: column;
}

/*------------ STATUS ------------*/

#home_hero .home-hero__status {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: fit-content;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background-color: var(--surface-color);
    color: var(--muted-color);
    font-family: var(--mono-font);
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

/* Map pin drawn as a mask, so the text stays a plain editable field (an inline <svg> would turn it
   into rich text). Inline URL-encoded SVG, not a file: a mask image is a CORS fetch, and Chrome
   blocks it when the prototype is opened from disk (file://) */
#home_hero .home-hero__status::before {
    content: "";
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/*------------ TITLE AND TEXT ------------*/

#home_hero .home-hero__title {
    max-width: 15ch;
    font-size: var(--hero-title-size);
}

#home_hero .home-hero__text {
    max-width: 54ch;
    color: var(--muted-color);
    font-size: 1.1875rem;
    line-height: 1.65;
}

@media (max-width: 767px) {
    #home_hero .home-hero__text {
        font-size: 1.0625rem;
    }
}

/*------------ PORTRAIT ------------*/

/* The class lands on the <img> here and on the <figure> Beaver prints (§5.6): both clip */
#home_hero .home-hero__portrait {
    width: 100%;
    overflow: hidden;
    border: var(--portrait-border);
    border-radius: var(--portrait-radius);
    box-shadow: var(--portrait-shadow);
    filter: var(--portrait-filter);
}

/*------------ BADGE ------------*/

#home_hero .hero-badge {
    position: absolute;
    left: -2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-strong-color);
    border-radius: var(--radius-md);
    background-color: var(--badge-background);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}

@media (max-width: 767px) {
    #home_hero .hero-badge {
        left: 0.75rem;
        bottom: 0.75rem;
    }
}

#home_hero .hero-badge .hero-badge__title {
    color: var(--primary-color);
    font-family: var(--display-font);
    font-size: 1.125rem;
    font-weight: var(--heading-weight);
}

#home_hero .hero-badge .hero-badge__meta {
    color: var(--muted-color);
    font-size: 0.875rem;
}

/******************** HOME CLIENTS *************************/
/***********************************************************/

#home_clients {
    padding-block: var(--section-padding-y);
}

@media (max-width: 767px) {
    #home_clients {
        padding-block: var(--section-padding-y-compact);
    }
}

#home_clients .fl-col-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

#home_clients .home-clients__intro {
    flex: 1 1 0;
    min-width: 0;
}

#home_clients .home-clients__aside {
    display: flex;
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    #home_clients .home-clients__intro,
    #home_clients .home-clients__aside {
        flex: 0 0 100%;
    }
}

#home_clients .home-clients__intro .fl-col-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2.5rem;
}

#home_clients .home-clients__aside .fl-col-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2.5rem;
}

@media (max-width: 767px) {
    #home_clients .home-clients__intro .fl-col-content {
        padding-bottom: 0;
    }
}

#home_clients .home-clients__text {
    max-width: 60ch;
    color: var(--muted-color);
}

/*------------ CLIENT CARD ------------*/

#home_clients .project-card {
    display: flex;
    flex: 0 0 calc((100% - 3rem) / 3);
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_clients .project-card {
        flex-basis: calc((100% - 1.5rem) / 2);
    }
}

@media (max-width: 767px) {
    #home_clients .project-card {
        flex-basis: 100%;
    }
}

/******************** HOME DESIGN **************************/
/***********************************************************/

#home_design {
    padding-block: var(--section-padding-y);
    background-color: var(--surface-alt-color);
}

@media (max-width: 767px) {
    #home_design {
        padding-block: var(--section-padding-y-compact);
    }
}

#home_design .fl-col-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

#home_design .home-design__intro {
    flex: 1 1 0;
    min-width: 0;
}

#home_design .home-design__aside {
    display: flex;
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    #home_design .home-design__intro,
    #home_design .home-design__aside {
        flex: 0 0 100%;
    }
}

#home_design .home-design__intro .fl-col-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2.5rem;
}

#home_design .home-design__aside .fl-col-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2.5rem;
}

@media (max-width: 767px) {
    #home_design .home-design__intro .fl-col-content {
        padding-bottom: 0;
    }
}

#home_design .home-design__text {
    max-width: 60ch;
    color: var(--muted-color);
}

/*------------ DESIGN CARD ------------*/

#home_design .project-card {
    display: flex;
    flex: 0 0 calc((100% - 3rem) / 3);
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_design .project-card {
        flex-basis: calc((100% - 1.5rem) / 2);
    }
}

@media (max-width: 767px) {
    #home_design .project-card {
        flex-basis: 100%;
    }
}

/******************** HOME WPILOT **************************/
/***********************************************************/

/* The band keeps WPilot's own dark look in every direction: its colors come from --band-* */
#home_wpilot {
    --title-color: var(--band-title-color);
    --text-color: var(--band-text-color);
    --muted-color: var(--band-muted-color);
    --surface-color: var(--band-surface-color);
    --border-color: var(--band-border-color);
    --border-strong-color: var(--band-border-strong-color);
    --primary-color: var(--wpilot-blue);
    --button-primary-background: var(--band-button-background);
    --button-primary-color: var(--band-button-color);
    --button-primary-shadow: 0 12px 34px -14px var(--wpilot-violet);
    position: relative;
    isolation: isolate;
    padding-block: var(--section-padding-y);
    background-color: var(--band-background-color);
    color: var(--text-color);
}

@media (max-width: 767px) {
    #home_wpilot {
        padding-block: var(--section-padding-y-compact);
    }
}

#home_wpilot::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(40% 60% at 90% 0%, color-mix(in srgb, var(--wpilot-violet) 22%, transparent), transparent 70%),
        radial-gradient(35% 55% at 0% 100%, color-mix(in srgb, var(--wpilot-cyan) 14%, transparent), transparent 70%);
}

#home_wpilot .fl-col-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

#home_wpilot .home-wpilot__intro {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_wpilot .home-wpilot__intro {
        flex: 0 0 100%;
    }
}

/* The text sits centered against the two trailers, with the buttons right below it */
#home_wpilot .home-wpilot__intro .fl-col-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    height: 100%;
    padding: 0 2rem 3.5rem 0;
}

@media (max-width: 1024px) {
    #home_wpilot .home-wpilot__intro .fl-col-content {
        padding: 0 0 2rem;
    }
}

#home_wpilot .home-wpilot__logo {
    width: 160px;
    height: auto;
}

#home_wpilot .home-wpilot__title {
    max-width: 20ch;
}

#home_wpilot .home-wpilot__text {
    max-width: 58ch;
    color: var(--muted-color);
}

#home_wpilot .home-wpilot__actions {
    margin-top: 0.75rem;
}

/*------------ VIDEO CARD ------------*/

/* The two product trailers, to the right of the text and before the product list */
#home_wpilot .home-wpilot__video {
    display: flex;
    flex: 0 0 15.5rem;
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_wpilot .home-wpilot__video {
        flex: 1 1 0;
    }
}

#home_wpilot .home-wpilot__video .fl-col-content {
    flex: 1 1 auto;
    gap: 0.625rem;
    padding-bottom: 3.5rem;
}

#home_wpilot .home-wpilot__video .video-card__name {
    margin-top: 0.25rem;
    font-size: 1.25rem;
}

/*------------ PRODUCT ITEM ------------*/

#home_wpilot .product-item {
    display: flex;
    flex: 0 0 calc((100% - 2rem) / 3);
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_wpilot .product-item {
        flex-basis: calc((100% - 1rem) / 2);
    }
}

@media (max-width: 767px) {
    #home_wpilot .product-item {
        flex-basis: 100%;
    }
}

/*------------ NOTE ------------*/

#home_wpilot .home-wpilot__note {
    padding-top: 2rem;
    color: var(--muted-color);
    font-family: var(--mono-font);
    font-size: 0.8125rem;
}

#home_wpilot .home-wpilot__note a {
    color: var(--product-h2w);
}

/******************** HOME STACK ***************************/
/***********************************************************/

#home_stack {
    padding-block: var(--section-padding-y);
}

@media (max-width: 767px) {
    #home_stack {
        padding-block: var(--section-padding-y-compact);
    }
}

#home_stack .fl-col-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

#home_stack .home-stack__intro .fl-col-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2.5rem;
}

/*------------ STACK GROUP ------------*/

#home_stack .stack-group {
    display: flex;
    flex: 0 0 calc(100% / 3);
    min-width: 0;
}


@media (max-width: 767px) {
    #home_stack .stack-group {
        flex-basis: 100%;
    }
}

/* A spec sheet: hairlines between cells instead of cards */
#home_stack .stack-group .fl-col-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.625rem;
    padding: 1.5rem 1.5rem 1.75rem 0;
    border-top: 1px solid var(--border-color);
}

#home_stack .stack-group__title {
    color: var(--primary-color);
    font-family: var(--mono-font);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/*------------ STACK TAG ------------*/

/* One technology per tag, so a name never breaks across lines */
#home_stack .stack-group__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#home_stack .stack-group__tag {
    display: inline-flex;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-size: 0.875rem;
    line-height: 1.3;
    white-space: nowrap;
}

/******************** HOME EXPERIENCE **********************/
/***********************************************************/

#home_experience {
    padding-block: var(--section-padding-y);
    background-color: var(--surface-alt-color);
}

@media (max-width: 767px) {
    #home_experience {
        padding-block: var(--section-padding-y-compact);
    }
}

#home_experience .fl-col-group {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

#home_experience .home-experience__intro {
    flex: 1 1 0;
    min-width: 0;
}

#home_experience .home-experience__aside {
    display: flex;
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    #home_experience .home-experience__intro,
    #home_experience .home-experience__aside {
        flex: 0 0 100%;
    }
}

#home_experience .home-experience__intro .fl-col-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2.5rem;
}

#home_experience .home-experience__aside .fl-col-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2.5rem;
}

@media (max-width: 767px) {
    #home_experience .home-experience__intro .fl-col-content {
        padding-bottom: 0;
    }
}

#home_experience .home-experience__text {
    max-width: 58ch;
    color: var(--muted-color);
}

/*------------ EXPERIENCE ITEM ------------*/

#home_experience .experience-item {
    display: flex;
    flex: 0 0 calc((100% - 3rem) / 2);
    min-width: 0;
}

@media (max-width: 767px) {
    #home_experience .experience-item {
        flex-basis: 100%;
    }
}

/******************** HOME CONTACT *************************/
/***********************************************************/

#home_contact {
    position: relative;
    isolation: isolate;
    padding-block: var(--section-padding-y);
    border-top: 1px solid var(--border-color);
}

@media (max-width: 767px) {
    #home_contact {
        padding-block: var(--section-padding-y-compact);
    }
}

#home_contact::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--contact-glow);
}

#home_contact .fl-col-group {
    display: flex;
    align-items: center;
    gap: 4rem;
}

@media (max-width: 1024px) {
    #home_contact .fl-col-group {
        flex-direction: column;
        align-items: stretch;
        gap: 2.5rem;
    }
}

#home_contact .home-contact__copy {
    flex: 1 1 0;
    min-width: 0;
}

#home_contact .home-contact__details {
    flex: 0 1 26rem;
    min-width: 0;
}

@media (max-width: 1024px) {
    #home_contact .home-contact__copy,
    #home_contact .home-contact__details {
        flex: none;
    }
}

#home_contact .home-contact__copy .fl-col-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#home_contact .home-contact__title {
    max-width: 18ch;
}

#home_contact .home-contact__text {
    max-width: 50ch;
    color: var(--muted-color);
    font-size: 1.125rem;
}

/*------------ CONTACT LINKS ------------*/

#home_contact .home-contact__details .fl-col-content {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--surface-color);
}

/* The <ul> of the design and the .fl-list Beaver prints for the list module (§5.7) */
#home_contact .home-contact__links,
#home_contact .home-contact__links .fl-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

#home_contact .home-contact__links a {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: 0 1.25rem;
    border-radius: calc(var(--radius-lg) - 0.375rem);
    color: var(--text-color);
    font-family: var(--mono-font);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

#home_contact .home-contact__links a:hover {
    background-color: var(--surface-alt-color);
    color: var(--primary-color);
}
