/* ═══════════════════════════════════════════════════════════
   home.css — Homepage styles (ifarfor.ru)
   Fullpage snap for sections 1-2, then free scroll
   ═══════════════════════════════════════════════════════════ */

/* ─── Page & Container ─────────────────────────────────────── */
body.home-page {
    margin: 0;
    padding: 0;
    padding-top: 78px;
    font-family: BlinkMacSystemFont, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #555;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

.home-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ─── Snap Viewport — one scrollable container ───────────── */
.home-snap {
    --snap-top: 78px;
    position: fixed;
    top: var(--snap-top);
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.home-snap__track {
    width: 100%;
}

/* Hero & Video — each fills one screen */
.home-snap__page {
    width: 100%;
    height: calc(100vh - var(--snap-top));
    height: calc(100dvh - var(--snap-top));
    overflow: hidden;
    position: relative;
}

/* Content page — natural height, flows normally */
.home-snap__page--content {
    height: auto;
    overflow: visible;
}

/* ─── Dot Navigation ──────────────────────────────────────── */
.home-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 100;
}

.home-dots__dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #999;
    background: transparent;
    cursor: pointer;
    padding: 0;
    background-clip: content-box;
    box-sizing: border-box;
    border-width: 0;
    background-image: radial-gradient(circle, #999 4px, transparent 4px);
    transition: background-image .3s;
}

.home-dots__dot--active {
    background-image: radial-gradient(circle, #222 5px, transparent 5px);
}

/* ─── Shared Typography ───────────────────────────────────── */
.home-section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #222;
    letter-spacing: 0.01em;
    margin: 0 0 12px;
    text-align: center;
}

.home-section-subtitle {
    font-size: 0.95rem;
    color: #777;
    text-align: center;
    margin: 0 0 40px;
    line-height: 1.6;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #222;
    border-radius: 0;
    cursor: pointer;
    transition: background .2s, color .2s;
    box-sizing: border-box;
}

.home-btn--primary { background: #222; color: #fff; }
.home-btn--primary:hover { background: #000; }
.home-btn--outline { background: transparent; color: #222; border-color: #222; }
.home-btn--outline:hover { background: #222; color: #fff; }

/* ─── Scroll Reveal ───────────────────────────────────────── */
.home-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.home-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Placeholder Label ───────────────────────────────────── */
.home-placeholder-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999;
}

/* ═══════════════════════════════════════════════════════════
   Section 1: Hero + Trust (fullscreen)
   ═══════════════════════════════════════════════════════════ */
.home-hero {
    width: 100%;
    height: 100%;
}

.home-hero__layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    height: 100%;
}

.home-hero__img {
    position: relative;
    overflow: hidden;
}

.home-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-hero__trust {
    background: #f8f6f2;
    display: flex;
    flex-direction: column;
    padding: 56px 48px;
}

.home-hero__center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #222;
    line-height: 1.4;
    margin: 0 0 16px;
}

.home-hero__subtitle {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 12px;
}

.home-hero__links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 30px;
}

.home-hero__link {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #222;
    line-height: 1.4;
    text-decoration: none;
    transition: color .2s;
}

.home-hero__link:hover {
    color: #555;
}

/* Scroll hint arrow */
.home-hero__scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    animation: home-bounce 2s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes home-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════════════════════
   Section 2: Video (fullscreen)
   ═══════════════════════════════════════════════════════════ */
.home-video {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #111 url('/public/video/heroes1_poster.webp') center/cover no-repeat;
}

.home-video__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-video__bg--mobile {
    display: none;
}

.home-video__caption {
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════
   Content sections (inside scrollable page 2)
   ═══════════════════════════════════════════════════════════ */

/* ─── Themes ──────────────────────────────────────────────── */
.home-themes {
    padding: 80px 0;
}

.home-themes .product-related__item {
    flex: 0 0 280px;
}

.home-themes .product-related__card-img {
    aspect-ratio: 1;
    border-radius: 0;
}

.home-themes .product-related__card-name {
    font-size: 0.88rem;
    color: #222;
    text-align: center;
    margin: 12px 0 4px;
}

/* ─── Home Badge Sections ────────────────────────────────── */
.home-badges .product-related__card {
    position: relative;
    display: block;
}
.home-badges .cc-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
}
.home-badges .cc-badge--new {
    background: #2e7d32;
    color: #fff;
}
.home-badges .cc-badge--back {
    background: #bf360c;
    color: #fff;
}
.home-badges--new {
    background: #f5faf5;
}
.home-badges--back {
    background: #fff8f0;
}

/* ─── Inspiration Mosaic (idx-grid reuse) ────────────────── */
.home-inspiration {
    padding: 80px 0;
    background: #fafafa;
}

.home-wrap--wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.idx-grid--home {
    margin-top: 32px;
}

@media (min-width: 900px) {
    .idx-grid.idx-grid--home { max-width: 100%; grid-template-columns: repeat(4, 1fr); }
}

/* ─── Product Types ───────────────────────────────────────── */
.home-types {
    padding: 80px 0;
}

.home-types__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.home-types__card {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}

.home-types__card-img {
    border-radius: 100%;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.home-types__card-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .4s ease;
}

.home-types__card:hover .home-types__card-img img { transform: scale(1.03); }

.home-types__card-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #222;
    margin-top: 12px;
    letter-spacing: 0.02em;
}

/* ─── Collection of the Month ─────────────────────────────── */
.home-collection {
    padding: 80px 0;
    background: #f8f6f2;
}

.home-collection__layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}

.home-collection__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #ece7df;
}

.home-collection__img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.home-collection__eyebrow {
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: #999; margin: 0 0 12px;
}

.home-collection__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2rem; font-weight: 400; color: #222;
    margin: 0 0 20px; letter-spacing: 0.01em;
}

.home-collection__text {
    font-size: 0.95rem; color: #555; line-height: 1.7; margin: 0 0 32px;
}

/* ─── About Us ────────────────────────────────────────────── */
.home-about { padding: 80px 0; }

.home-about__layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px; align-items: center;
}

.home-about__img {
    position: relative; overflow: hidden;
    aspect-ratio: 4 / 3; background: #f8f6f2;
}

.home-about__img--photo {
    background-color: #f8f6f2;
    background-image: url("/public/img/home/about-1200.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.home-about__img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.home-about__body .home-section-title { text-align: left; }

.home-about__text {
    font-size: 0.95rem; color: #555; line-height: 1.7; margin: 0 0 24px;
}

.home-link {
    font-size: 0.85rem; font-weight: 600; color: #222;
    text-decoration: none; border-bottom: 1px solid #222;
    padding-bottom: 2px; transition: border-color .2s;
}

.home-link:hover { border-color: #999; }

/* ═══════════════════════════════════════════════════════════
   Responsive: Tablet (≤899px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
    body.home-page { padding-top: 60px; }
    .home-snap { --snap-top: 60px; }

    .home-wrap { padding: 0 16px; }
    .home-section-title { font-size: 1.6rem; }
    .home-section-subtitle { margin-bottom: 28px; }

    /* Dots */
    .home-dots { right: 12px; }

    /* Hero */
    .home-hero__layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    .home-hero__img { min-height: 0; }
    .home-hero__trust { padding: 28px 20px; }
    .home-hero__title { font-size: 1.5rem; }
    .home-hero__link { font-size: 1.5rem; }
    .home-hero__scroll-hint { display: none; }

    /* Video */
    .home-video__caption { font-size: 1.8rem; bottom: 32px; }

    /* Content sections */
    .home-themes { padding: 56px 0; }
    .home-themes .product-related__item { flex: 0 0 220px; }

    .home-inspiration { padding: 56px 0; }

    .home-types { padding: 56px 0; }
    .home-types__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    .home-collection { padding: 56px 0; }
    .home-collection__layout { grid-template-columns: 1fr; gap: 32px; }
    .home-collection__img { aspect-ratio: 16 / 9; }

    .home-about { padding: 56px 0; }
    .home-about__img--photo { background-image: url("/public/img/home/about-840.jpg"); }
    .home-about__layout { grid-template-columns: 1fr; gap: 32px; }
    .home-about__body .home-section-title { text-align: center; }
}

/* ═══════════════════════════════════════════════════════════
   Responsive: Mobile (≤600px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .home-about__img--photo { background-image: url("/public/img/home/about-480.jpg"); }
    .home-hero__link { font-size: 1.3rem; }

    .home-video { background-image: url('/public/video/heroes1_vertical_poster.webp'); }
    .home-video__bg--desktop { display: none; }
    .home-video__bg--mobile { display: block; }
    .home-video__caption { font-size: 1.4rem; bottom: 24px; }

    .home-themes .product-related__item { flex: 0 0 180px; }
    .home-types__grid { gap: 12px; }
    .home-types__card-title { font-size: 0.78rem; }

    .home-dots { right: 8px; }
    .home-dots__dot { width: 24px; height: 24px; }
}

@media (max-width: 768px) {
    body.home-page { padding-top: 44px; }
    .home-snap { --snap-top: 86px; }
}
