/* ==========================================================================
   Home (site/index) — Phase 4 composition. Loaded after site.css.
   Sections: hero bento · solutions bento · about story · work showcase ·
   blog notebooks · team faces · testimonials bubbles · why stickers · contact split
   ========================================================================== */

/* Shared bits ---------------------------------------------------------------- */
.home-more { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 52px); }

.empty-state-home { padding: 1rem 0; }
.empty-state-card {
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 56px) clamp(22px, 4vw, 40px);
    border-radius: var(--r-lg);
    background: var(--paper);
    text-align: center;
}
.empty-state-card .empty-state-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    margin: 0 auto 1.25rem;
    border-radius: var(--blob);
    background: var(--butter);
    color: var(--ink);
    font-size: 2rem;
}
.empty-state-card .empty-state-icon i { color: var(--ink); }
.empty-state-card h3 { font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.8rem); margin-bottom: 0.6rem; }
.empty-state-card p { color: var(--ink-2); margin-bottom: 1.5rem; }

/* 1. Hero bento ---------------------------------------------------------------- */
.home-hero.hero-section { padding: 0 0 clamp(40px, 6vw, 88px) !important; }
.home-hero picture, .home-hero .hero-bg-img { display: none !important; }

.home-hero__bento {
    --gap: clamp(8px, 1vw, 12px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    max-width: var(--container-wide);
    margin-inline: max(clamp(8px, 1.5vw, 20px), calc((100% - var(--container-wide)) / 2));
    padding: var(--gap);
    border-radius: calc(var(--r-lg) + 6px);
    background: var(--sand);
}

.home-hero__main {
    grid-column: 1 / -1;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(28px, 5vw, 60px) clamp(22px, 4.5vw, 60px);
    border-radius: var(--r-lg);
    background: var(--butter);
}
.home-hero__main::before {
    content: '';
    position: absolute;
    z-index: -1;
    right: -90px;
    top: -110px;
    width: clamp(220px, 26vw, 340px);
    aspect-ratio: 1;
    border-radius: var(--blob);
    background: color-mix(in srgb, var(--paper) 42%, transparent);
}
.home-hero .hero-label { margin-bottom: 1.1rem; background: var(--paper); }
.home-hero .hero-title {
    max-width: 15ch;
    margin: 0 0 1.1rem;
    font-size: clamp(2.35rem, 1.2rem + 3vw, 4rem);
    line-height: 1.02;
}
.home-hero .hero-subtitle {
    max-width: 54ch;
    margin: 0 0 1.6rem;
    font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.18rem);
    color: var(--ink);
}
.home-hero .hero-buttons { justify-content: flex-start; }
.home-hero .btn-secondary-custom { --btn-bg: transparent; }
.home-hero .btn-secondary-custom:hover { --btn-bg: var(--ink); }
.home-hero__squiggle { display: none; }

/* Tiles */
.home-hero__trust { display: contents; }
.home-hero__tile,
.home-hero .trust-item {
    position: relative;
    min-height: 132px;
    border-radius: var(--r-md);
    overflow: hidden;
}
.home-hero .trust-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(16px, 2vw, 26px);
    background: var(--tile, var(--paper));
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 0.92rem + 0.5vw, 1.4rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.home-hero .trust-item i {
    width: 42px;
    height: 42px;
    border-radius: var(--blob);
    background: var(--paper);
    font-size: 1.05rem;
}
.home-hero .trust-item strong { font-style: italic; color: var(--berry-deep); }
.home-hero .trust-item:nth-child(1) { --tile: var(--mint); }
.home-hero .trust-item:nth-child(2) { --tile: var(--peach); }
.home-hero .trust-item:nth-child(3) { --tile: var(--sky); }
.home-hero .trust-item:nth-child(4) { --tile: var(--blush); }
.home-hero .trust-item:nth-child(2) i { border-radius: var(--blob-2); }
.home-hero .trust-item:nth-child(4) i { border-radius: var(--blob-2); }

.home-hero__helper {
    display: grid;
    place-items: center;
    padding: 14px;
    background: var(--lilac);
}
.home-hero__helper::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -38%;
    width: 120%;
    aspect-ratio: 1.4;
    transform: translateX(-50%);
    border-radius: 50%;
    background: color-mix(in srgb, var(--paper) 35%, transparent);
}
.home-hero__char { position: relative; width: min(150px, 78%); }

.home-hero__rating {
    display: grid;
    place-items: center;
    padding: 18px 14px;
    background: var(--paper);
}
.home-hero .google-rating-badge {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 230px;
    padding: 0.85rem 1.1rem !important;
    border-radius: 20px !important;
    font-size: 0.95rem !important;
    text-align: center;
    transform: rotate(-4deg);
}
.home-hero .google-rating-badge strong { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; }

@media (min-width: 992px) {
    .home-hero__bento {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
        min-height: min(calc(100svh - var(--header-h) - 72px), 720px);
    }
    /* Main card fills the left column; tiles flow into the right two columns in source order. */
    .home-hero__main { grid-column: auto; grid-row: span 3; }
    .home-hero__tile, .home-hero .trust-item { min-height: 0; }
}
@media (min-width: 1200px) {
    .home-hero__squiggle {
        display: block;
        position: absolute;
        z-index: -1;
        right: clamp(24px, 3vw, 44px);
        bottom: clamp(26px, 3vw, 40px);
        width: 130px;
        color: var(--berry);
        opacity: 0.85;
    }
}

/* 2. Solutions — bento service tiles ------------------------------------------------ */
.home-services__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(14px, 1.6vw, 20px);
}
.home-services__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    isolation: isolate;
}
.home-services__card .service-desc { margin-bottom: 1.25rem; }
.home-services__card .service-link {
    margin-top: auto;
    padding: 0.55rem 1.05rem;
    border-radius: var(--pill);
    background: var(--paper);
    transition: background 0.2s, color 0.2s;
}
.home-services__card .service-link:hover { background: var(--ink); color: var(--paper) !important; text-decoration: none; }
.home-services__item:nth-child(6n + 1) .home-services__card { --card: var(--butter); }
.home-services__item:nth-child(6n + 2) .home-services__card { --card: var(--lilac-soft); }
.home-services__item:nth-child(6n + 3) .home-services__card { --card: var(--mint-soft); }
.home-services__item:nth-child(6n + 4) .home-services__card { --card: var(--peach-soft); }
.home-services__item:nth-child(6n + 5) .home-services__card { --card: var(--sky-soft); }
.home-services__item:nth-child(6n + 6) .home-services__card { --card: var(--blush-soft); }

/* Featured (first) tile */
.home-services__item:first-child .home-services__card { padding: clamp(26px, 3.5vw, 48px); }
.home-services__item:first-child .service-icon { width: 76px; height: 76px; font-size: 1.9rem; }
.home-services__item:first-child .service-title { font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.4rem); max-width: 14ch; }
.home-services__item:first-child .service-desc { font-size: 1.1rem; color: var(--ink); max-width: 40ch; }
.home-services__item:first-child .home-services__card::after {
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    right: -70px;
    bottom: -90px;
    width: 260px;
    aspect-ratio: 1;
    border-radius: var(--blob-2);
    background: color-mix(in srgb, var(--paper) 40%, transparent);
}

@media (min-width: 640px) {
    .home-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-services__item:first-child { grid-column: 1 / -1; }
}
@media (min-width: 992px) {
    .home-services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-services__item:first-child { grid-column: span 2; grid-row: span 2; }
    .home-services__grid:not(:has(> :nth-child(5))) > :first-child { grid-row: auto; }
    .home-services__item:nth-child(6):last-child { grid-column: 1 / -1; }
}

/* 3. About — asymmetric story block --------------------------------------------------- */
.home-about__story { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
.home-about .about-image-container { max-width: 500px; margin-inline: auto; }
.home-about .about-image-main { aspect-ratio: 1; }
.home-about .about-image-container::before { background: var(--peach); }
.home-about__pin {
    position: absolute;
    z-index: 2;
    top: 4%;
    right: 2%;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: var(--blob-2);
    background: var(--paper);
    color: var(--berry);
    font-size: 1.6rem;
    box-shadow: var(--shadow-lift);
    transform: rotate(8deg);
}
.home-about__lead {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
    font-weight: 500;
    line-height: 1.45;
    color: var(--ink);
}
.home-about .about-features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 1.75rem; }
.home-about .about-features li { border-radius: 20px; align-items: flex-start; }
@media (min-width: 768px) {
    .home-about .about-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
    .home-about__story { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* 4. Portfolio — showcase cards with a device frame on a pastel stage ------------------- */
.home-work .portfolio-filter { margin-bottom: clamp(28px, 3.5vw, 44px); }
.home-work__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 2vw, 28px);
}
.home-work__item[hidden] { display: none !important; }
.home-work__card {
    padding: clamp(10px, 1.2vw, 14px);
    border-radius: var(--r-lg);
    background: var(--paper);
}
.home-work__stage {
    padding: clamp(18px, 3vw, 40px) clamp(18px, 3vw, 40px) 0;
    border-radius: calc(var(--r-lg) - 10px);
    background: var(--stage, var(--lilac));
    overflow: hidden;
}
.home-work__screen {
    position: relative;
    padding-top: 24px;
    border-radius: 18px 18px 0 0;
    background: var(--paper);
    overflow: hidden;
    box-shadow: var(--shadow-lift);
}
.home-work__screen::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 14px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--blush);
    box-shadow: 14px 0 0 var(--butter), 28px 0 0 var(--mint);
}
.home-work img.portfolio-image { border-radius: 0; background: var(--sand); }
.home-work .portfolio-overlay { padding: 18px 12px 10px; gap: 0.5rem; }
.home-work .portfolio-category { background: var(--sand); }
.home-work .portfolio-title { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem); }
.home-work__item:nth-child(6n + 1) .home-work__card { --stage: var(--lilac); }
.home-work__item:nth-child(6n + 2) .home-work__card { --stage: var(--mint); }
.home-work__item:nth-child(6n + 3) .home-work__card { --stage: var(--peach); }
.home-work__item:nth-child(6n + 4) .home-work__card { --stage: var(--sky); }
.home-work__item:nth-child(6n + 5) .home-work__card { --stage: var(--blush); }
.home-work__item:nth-child(6n + 6) .home-work__card { --stage: var(--butter); }
@media (min-width: 768px) {
    .home-work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 5. Blog — notebook cards -------------------------------------------------------------- */
.home-notes__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(18px, 2vw, 28px);
}
.home-notes__card {
    padding: 34px 14px 8px;
    border-radius: var(--r-md);
    background: var(--paper);
    overflow: visible;
}
/* Binder holes along the top edge */
.home-notes__card::before {
    content: '';
    display: block;
    position: absolute;
    top: 12px;
    left: 24px;
    right: 24px;
    height: 10px;
    background: radial-gradient(circle, var(--sand-2) 4px, transparent 4.5px) 0 0 / 22px 10px repeat-x;
}
.home-notes .blog-image-wrapper { border-radius: 18px; }
.home-notes .blog-image { aspect-ratio: 16 / 10; }
.home-notes .blog-category-tag { position: absolute; left: 12px; top: 12px; z-index: 1; }
.home-notes .blog-content {
    margin: 18px 6px 14px 10px;
    padding: 0 8px 0 18px;
    border-left: 2px solid var(--berry-soft);
}
.home-notes .blog-title { font-size: clamp(1.2rem, 1.08rem + 0.4vw, 1.45rem); margin-bottom: 0.25rem; }
.home-notes .blog-title a { color: var(--ink); text-decoration: none; }
.home-notes .blog-title a:hover { color: var(--berry); }
.home-notes .blog-excerpt { margin-bottom: 0.4rem; font-size: 0.98rem; }
.home-notes .blog-read-more { margin-top: auto; }
@media (min-width: 768px) {
    .home-notes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-notes__item:nth-child(odd) .home-notes__card { transform: rotate(-0.6deg); }
    .home-notes__item:nth-child(even) .home-notes__card { transform: rotate(0.6deg); }
    .home-notes__item .home-notes__card:hover { transform: rotate(0) translateY(-4px); box-shadow: var(--shadow-lift); }
}
@media (min-width: 992px) {
    .home-notes__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 6. Team — friendly faces on pastel blobs --------------------------------------------- */
.home-team__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(28px, 4vw, 48px);
    max-width: 1000px;
    margin-inline: auto;
}
.home-team__card { padding: 0; background: transparent; overflow: visible; }
.home-team__face {
    position: relative;
    width: min(230px, 72%);
    margin: 0 auto 1.4rem;
}
.home-team__face::before {
    content: '';
    position: absolute;
    inset: -7% -9% -5% -7%;
    border-radius: var(--blob);
    background: var(--face, var(--peach));
    transition: border-radius 0.6s var(--ease), transform 0.6s var(--ease);
}
.home-team__face::after {
    content: '';
    position: absolute;
    right: -14%;
    top: -10%;
    width: 68px;
    aspect-ratio: 180 / 170;
    background: url("/images/illustrations/char-wave-butter.svg") no-repeat center / contain;
    transform: scale(0) rotate(-20deg);
    transform-origin: bottom left;
    transition: transform 0.45s var(--ease);
}
.home-team__card:hover .home-team__face::before { border-radius: var(--blob-2); transform: rotate(-6deg); }
.home-team__card:hover .home-team__face::after,
.home-team__card:focus-within .home-team__face::after { transform: scale(1) rotate(0); }
.home-team img.team-image {
    position: relative;
    width: 100%;
    margin: 0;
    border-radius: 50%;
    border: 6px solid var(--paper);
    background: var(--paper);
}
.home-team .team-info { padding: 0; }
.home-team__item:nth-child(3n + 1) .home-team__card { --face: var(--peach); }
.home-team__item:nth-child(3n + 2) .home-team__card { --face: var(--lilac); }
.home-team__item:nth-child(3n + 3) .home-team__card { --face: var(--mint); }
.home-team .team-social a { background: var(--paper); }
.home-team .team-social a:hover { background: var(--ink); }
@media (min-width: 576px) {
    .home-team__row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); }
    .home-team__face { width: min(230px, 84%); }
}

/* 7. Testimonials — speech bubbles ------------------------------------------------------ */
.home-voices__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(28px, 3vw, 36px);
    align-items: start;
}
.home-voices__bubble { height: auto; margin-bottom: 18px; padding-bottom: 0; background: var(--bubble, var(--butter-soft)); }
.home-voices__bubble .testimonial-text { margin: 0 0 1.25rem; padding: 0; background: none; border-radius: 0; font-size: 1.15rem; }
.home-voices__bubble .testimonial-quote {
    display: block;
    height: 1.6rem;
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    color: var(--berry);
}
.home-voices__bubble .testimonial-quote::before,
.home-voices__bubble .testimonial-quote::after { content: none; }
.home-voices__bubble .testimonial-author { margin: 0 calc(clamp(24px, 3vw, 36px) * -1); padding: 16px clamp(24px, 3vw, 36px) 22px; border-top: 2px dashed color-mix(in srgb, var(--ink) 12%, transparent); }
.home-voices__bubble .testimonial-avatar-placeholder { background: var(--paper); }
.home-voices__bubble .testimonial-meta span, .home-voices__bubble .testimonial-meta small { font-size: 0.88rem; color: var(--ink-2); }
.home-voices__item:nth-child(3n + 1) .home-voices__bubble { --bubble: var(--butter-soft); }
.home-voices__item:nth-child(3n + 2) .home-voices__bubble { --bubble: var(--lilac-soft); }
.home-voices__item:nth-child(3n + 3) .home-voices__bubble { --bubble: var(--mint-soft); }
@media (min-width: 768px) {
    .home-voices__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
    .home-voices__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-voices__item:nth-child(3n + 2) { margin-top: 32px; }
}

/* 8. Why choose us — tilted sticker cards (2×2) ------------------------------------------ */
.home-why__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(18px, 2.4vw, 28px);
    max-width: 1000px;
    margin-inline: auto;
}
.home-why .home-why__card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.1rem;
    align-content: start;
    padding: clamp(24px, 3vw, 34px);
    overflow: visible;
    transform: rotate(-1.2deg);
}
.home-why .home-why__item:nth-child(even) .home-why__card { transform: rotate(1.1deg); }
.home-why .home-why__item .home-why__card:hover { transform: rotate(0) translateY(-4px); }
.home-why__card .service-icon { grid-row: span 2; margin: 0; background: var(--paper); }
.home-why__card .service-title { align-self: end; margin-top: 0.2rem; }
/* Strip of tape holding the sticker */
.home-why .home-why__card::before {
    content: '';
    display: block;
    position: absolute;
    top: -11px;
    left: 50%;
    width: 78px;
    height: 22px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--paper) 75%, transparent);
    transform: translateX(-50%) rotate(-4deg);
}
.home-why__item:nth-child(1) .home-why__card { --card: var(--butter); }
.home-why__item:nth-child(2) .home-why__card { --card: var(--mint); }
.home-why__item:nth-child(3) .home-why__card { --card: var(--lilac); }
.home-why__item:nth-child(4) .home-why__card { --card: var(--peach); }
.home-why .home-why__card .service-desc { color: var(--ink); }
.home-why__char { position: absolute; right: -10px; top: -46px; width: 76px; transform: rotate(8deg); }
@media (min-width: 768px) {
    .home-why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 9. Contact — split card --------------------------------------------------------------- */
.home-contact__split {
    display: grid;
    gap: clamp(12px, 2vw, 24px);
    padding: clamp(10px, 1.6vw, 20px);
    border-radius: var(--r-lg);
    background: var(--lilac-soft);
}
.home-contact__chat {
    height: auto;
    padding: clamp(16px, 3vw, 36px) clamp(12px, 2.5vw, 28px);
    background: transparent;
    gap: 0;
}
.home-contact .contact-intro { font-size: 1.12rem; color: var(--ink); max-width: 38ch; }
.home-contact__chips { display: grid; gap: 10px; margin-top: 0.75rem; }
.home-contact .contact-item {
    align-items: center;
    margin: 0;
    padding: 10px 18px 10px 10px;
    border-radius: 24px;
    background: var(--paper);
}
.home-contact .contact-item .contact-icon { background: var(--butter); }
.home-contact .contact-item:nth-child(2) .contact-icon { background: var(--mint); border-radius: var(--blob-2); }
.home-contact .contact-item:nth-child(3) .contact-icon { background: var(--peach); }
.home-contact .contact-item:nth-child(4) .contact-icon { background: var(--sky); border-radius: var(--blob-2); }
.home-contact .contact-label { display: block; line-height: 1.3; }
.home-contact .contact-value { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; line-height: 1.4; }
.home-contact .contact-value a { color: var(--ink); text-decoration: none; }
.home-contact .contact-value a:hover { color: var(--berry); text-decoration: underline; }
.home-contact__char { width: 104px; margin-top: 1.5rem; }
.home-contact .contact-form-card {
    height: 100%;
    border-radius: calc(var(--r-lg) - 8px);
    box-shadow: var(--shadow-float);
}
.home-contact .contact-form-card .btn-primary-custom { margin-top: 0.4rem; }
@media (min-width: 992px) {
    .home-contact__split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; }
}
@media (max-width: 991.98px) {
    .home-contact__char { display: none; }
}

/* Refinements ----------------------------------------------------------------------- */
.home-contact__chat .section-label { align-self: flex-start; }
.home-contact__char { width: 120px; }
.home-why__char { width: 92px; top: -58px; right: -14px; }
.home-about__lead { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); }
@media (max-width: 575.98px) {
    .home-hero .google-rating-badge { font-size: 0.85rem !important; padding: 0.75rem 0.8rem !important; }
}
/* Featured solution tile: a helper fills the open space at the bottom right (CSS only, no markup). */
@media (min-width: 992px) {
    .home-services__item:first-child .home-services__card {
        background-image: url("/images/illustrations/char-point-lilac.svg");
        background-repeat: no-repeat;
        background-position: right clamp(28px, 4vw, 56px) bottom clamp(28px, 4vw, 48px);
        background-size: clamp(130px, 13vw, 180px) auto;
    }
}
@media (min-width: 992px) {
    .home-services__item:first-child .home-services__card::after { display: none; }
    .home-services__item:first-child .home-services__card { background-size: clamp(150px, 15vw, 210px) auto; }
}
