/* These wrappers keep the original desktop layout in a single shared DOM. */
.home .projects__slides,
.home .projects__cover,
.home .insta__slides { display:contents; }
.home .projects__caption { display:none; }

@media (max-width:768px) {
    .home .projects { display:block; height:auto; padding:0 0 56px; overflow:hidden; }
    .home .projects__track { height:auto; }
    .home .projects__stage { display:flex; flex-direction:column; gap:24px; position:static; min-height:0; max-height:none; height:auto; }
    .home .projects__list { order:-1; align-items:stretch; justify-content:flex-start; width:100%; height:auto; gap:14px; padding:0 16px; }
    .home .projects__title { order:-1; width:100%; max-width:none; margin:0; text-align:left; font-size:28px; line-height:34px; letter-spacing:-.6px; }
    .home .projects__note { width:100%; max-width:none; margin:0; text-align:left; font-size:16px; line-height:23px; }
    .home .projects__list .projects__item { display:none; }
    .home .projects__media { display:block; width:calc(100% - 16px); min-width:0; height:auto; aspect-ratio:auto; margin:0 0 0 16px; overflow:hidden; }
    .home .projects__slides,
    .home .insta__slides { display:flex; gap:0; height:auto; }
    .home .projects__shot { position:relative; inset:auto; display:flex; flex-direction:column; width:60vw; height:auto; flex-shrink:0; opacity:1; visibility:visible; transition:none; text-decoration:none; color:#322828; }
    .home .projects__cover { display:block; position:relative; width:100%; aspect-ratio:3/4; overflow:hidden; border-radius:12px; }
    .home .projects__shot .projects__img { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
    .home .projects__photos { right:10px; top:10px; gap:5px; padding:6px 9px; background:rgba(0,0,0,.55); }
    .home .projects__photos-icon { width:16px; height:16px; }
    .home .projects__photos-text { font-size:11px; line-height:16px; }
    .home .projects__view { left:12px; right:12px; bottom:12px; width:auto; height:40px; padding:0 8px; transform:none; gap:6px; border-radius:8px; background:rgba(0,0,0,.55); backdrop-filter:none; -webkit-backdrop-filter:none; }
    .home .projects__view-text { font-size:13px; line-height:18px; }
    .home .projects__view-icon { width:16px; height:16px; }
    .home .projects__caption { display:flex; flex-direction:column; gap:6px; padding:14px 0 0; }
    .home .projects__caption-name { font:400 19px/24px 'Bitum',Arial,sans-serif; }
    .home .projects__caption-desc { font:300 14px/20px 'Bitum',Arial,sans-serif; color:#655c55; }
    .home .insta { align-items:stretch; gap:24px; padding-right:0; padding-left:16px; content-visibility:visible; }
    .home .insta__head { padding-right:16px; }
    .home .insta__container { width:100%; padding:0; }
    .home .insta__grid { display:block; width:100%; margin:0; overflow:hidden; animation:none; }
    .home .insta__cell { width:60vw; height:auto; aspect-ratio:9/16; flex-shrink:0; align-self:stretch; border-radius:12px; }
    .home .insta__reel { height:100%; border-radius:inherit; }
    .home .insta__video { display:block; width:100%; height:100%; object-fit:cover; }
    .home [data-home-slider]:not(.swiper-initialized) { overflow-x:auto; }
    .home [data-home-slider]:not(.swiper-initialized) > .swiper-wrapper { gap:12px; }
    .home .projects__shot:focus-visible { outline:none; box-shadow: none !important; border-radius:12px; }
}
@media (max-width:768px) and (prefers-reduced-motion:reduce) {
    .home [data-home-slider] > .swiper-wrapper { transition-duration:0ms !important; }
}

/* Homepage categories: two equal cards per row on phones. */
@media(max-width:768px) {
    .home .catalog__grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:none; grid-auto-rows:auto; gap:10px; height:auto; aspect-ratio:auto; }
    .home .catalog__grid .tile { grid-column:auto; grid-row:auto; min-width:0; min-height:0; aspect-ratio:3/4; }
    .home .catalog__grid .tile--sofa { grid-column:1/-1; aspect-ratio:auto; }
    /* Match a 3:4 half-width card, accounting for the grid's 10px gap. */
    .home .catalog__grid .tile--sofa::before { content:""; display:block; padding-top:calc((100% - 10px) * 2 / 3); }
    .home .catalog__grid .tile__caption { padding:12px; }
    .home .catalog__grid .tile__label { font-size:18px; line-height:22px; letter-spacing:-.3px; white-space:normal; overflow-wrap:break-word; }
}

/* A shared rounded clip keeps photos and captions inside each homepage tile. */
.home .catalog__grid .tile { border-radius: 10px; }

@media (max-width:768px) {
    .home .recommend__title { text-align:left; font-size:28px; line-height:1.15; letter-spacing:-.6px; }
    .home .recommend .filters { justify-content:flex-start; flex-wrap:wrap; gap:8px; height:auto; padding-top:0; }
    .home .recommend .filter { height:34px; min-height:34px; padding:0 12px; font-size:11px; line-height:1.2; }
    .home .ideas .idea__author { gap:8px; }
    .home .ideas .idea__avatar { width:32px; height:32px; flex:0 0 32px; border-radius:6px; }
    .home .ideas .idea__avatar--logo { padding:4px; }
    .home .ideas .idea__author-text { gap:3px; }
    .home .ideas .idea__author-name { font-size:13px; line-height:17px; }
    .home .ideas .idea__author-role { font-size:11px; line-height:14px; color:#7a7169; opacity:1; white-space:normal; }
    .home .projects__shot:focus-visible { background:#eee8e0; }
}

/* Compact author credit in the homepage ideas slider; mobile keeps its own scale. */
@media (min-width:769px) {
    .home .ideas .idea__author { gap:12px; }
    .home .ideas .idea__avatar { width:64px; height:64px; flex:0 0 64px; border-radius:12px; }
    .home .ideas .idea__avatar--logo { padding:6px; }
    .home .ideas .idea__author-text { gap:5px; }
    .home .ideas .idea__author-name { font-size:16px; line-height:20px; }
    .home .ideas .idea__author-role { font-size:11px; line-height:14px; }
}

/* The catalogue description and reference CTA share the right-hand column. */
.home .catalog__note-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: start;
    gap: 16px clamp(16px, 1.7vw, 32px);
    padding-right: 0;
}

@media (min-width: 1025px) {
    .home .catalog__head {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.home .catalog__cta {
    --catalog-cta-line: 24px;
    box-sizing: border-box;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    font-size: 16px;
    line-height: var(--catalog-cta-line);
}

.catalog__cta-rotator {
    display: block;
    height: var(--catalog-cta-line);
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.catalog__cta-track {
    display: flex;
    flex-direction: column;
}

.catalog__cta-line {
    display: flex;
    align-items: center;
    flex: 0 0 var(--catalog-cta-line);
    gap: 5px;
    white-space: nowrap;
}

.catalog__cta-line .pinterest__logo {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin: 0;
}

.catalog__cta-arrow { flex: 0 0 20px; }
.home #lead { scroll-margin-top: 96px; }

@media (max-width: 768px) {
    .home .catalog__note-wrap {
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
    }
    .home .catalog__cta { width: min(100%, 250px); }
}

@media (prefers-reduced-motion: no-preference) {
    .catalog__cta-track { animation: catalog-cta-rotate 12s ease-in-out infinite; }
    .catalog__cta:is(:hover, :focus-visible) .catalog__cta-track { animation-play-state: paused; }
}

@keyframes catalog-cta-rotate {
    0%, 21% { transform: translateY(0); }
    25%, 46% { transform: translateY(calc(-1 * var(--catalog-cta-line))); }
    50%, 71% { transform: translateY(calc(-2 * var(--catalog-cta-line))); }
    75%, 96% { transform: translateY(calc(-3 * var(--catalog-cta-line))); }
    100% { transform: translateY(calc(-4 * var(--catalog-cta-line))); }
}
