/*
 * INDEX.CSS — Стили для лендинга (главная страница)
 * Уникальный стиль, отличный от внутренних страниц
 * =================================================
 */

/* --- ПЕРЕМЕННЫЕ --- */
:root {
    --color-text: #111111;
    --color-text-muted: #666666;
    --color-border: #e5e5e5;
    --color-surface: #fafafa;
    --color-success: #589535;
}

/* --- БАЗОВЫЙ RESET --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.25s ease;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

/* --- LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 0rem 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* --- HEADER --- */
header {
    /* margin-bottom удален для слияния фонов */
}

/* --- НОВЫЙ КЛАСС ФОНА --- */
.bg-warm {
    background-color: #FAF9F5;
}

header .container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.header-top img {
    width: 50px;
    height: 50px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-top img:hover {
    transform: rotate(20deg) scale(1.1);
}

@media (min-width: 768px) {
    .header-top {
        font-size: 0.9rem;
    }
    .header-top img {
        width: 60px;
        height: 60px;
    }
}

.atelier-title img,
.atelier-title svg {
    display: block;
    margin: 0 auto;
    width: auto;
    height: 40px;
}

@media (min-width: 768px) {
    .atelier-title img,
    .atelier-title svg {
        height: 80px;
    }
}

/* --- HERO --- */
.atelier-title {
    font-family: var(--font-main), serif;
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    color: var(--color-text);
}

@media (min-width: 768px) {
    .atelier-title {
        font-size: 3.2rem;
        margin-bottom: 1rem;
        line-height: 1.1;
    }
}

.hero-image {
    max-width: 1000px;
    margin: 2rem auto 2rem;
}

@media (min-width: 768px) {
    .hero-image {
        margin: 0rem auto 3rem;
    }
}

/* --- WELCOME SECTION --- */
#welcome {
    text-align: center;
    line-height: 1.2;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    #welcome {
        padding: 0 2rem 2rem;
    }
}

/* --- BENTO --- */
.bento-grid {
    display: grid;
    gap: 0.75rem; /* Компактный отступ для мобилок */
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на мобилках */
}

/* Мобильное позиционирование (2-1-2-1) */
.bento-item-doodle    { grid-column: 1; grid-row: 1; }
.bento-item-request   { grid-column: 2; grid-row: 1; }
.bento-item-residents { grid-column: 1 / -1; grid-row: 2; }
.bento-item-noai      { grid-column: 1; grid-row: 3; }
.bento-item-kitchen   { grid-column: 2; grid-row: 3; }
.bento-item-join      { grid-column: 1 / -1; grid-row: 4; }

/* Десктопная сетка */
@media (min-width: 768px) {
    .bento-grid {
        gap: 1rem;
        grid-template-columns: 1fr 1.3fr 1fr;
        grid-auto-rows: min-content;
    }
    .bento-item-doodle    { grid-column: 1; grid-row: 1 / 3; }
    .bento-item-request   { grid-column: 1; grid-row: 3 / 6; }
    .bento-item-residents { grid-column: 2; grid-row: 1 / 6; }
    .bento-item-noai      { grid-column: 3; grid-row: 1 / 2; }
    .bento-item-kitchen   { grid-column: 3; grid-row: 2 / 4; }
    .bento-item-join      { grid-column: 3; grid-row: 4 / 6; }
}

.bento-card {
    transition: transform 0.3s ease, filter 0.3s ease;
}
.bento-card:hover {
    transform: translateY(-4px) scale(1.02);
    filter: brightness(1.05);
}

/* Стили для аватарок в блоке Residents */
.honeycomb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.honeycomb-item {
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.honeycomb-empty {
    border: 2px dashed rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

/* --- BUTTONS */
.btn-big {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-light);
    font-size: 1.25rem;
    padding: 0.8rem 1.5rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
}
.btn-big:hover {background-color: #4b45b5}

.btn-cta {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--color-success);
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease, opacity 0.25s ease;
    margin-top: 1.5rem;
}

.btn-cta:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

@media (min-width: 768px) {
    .btn-cta {
        padding: 1rem 2.5rem;
        font-size: 1.25rem;
    }
}

/* --- SECTION TITLE --- */
.section-title {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title {
        margin-bottom: 3rem;
    }
}

/* --- PLANS GRID --- */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- PLAN CARD --- */
.plan-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 768px) {
    .plan-card {
        padding: 2rem;
    }
}

.plan-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .plan-card h3 {
        font-size: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .plan-card h3 {
        font-size: 2rem;
    }
}

.plan-card p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.plan-card hr {
    border: 0;
    height: 1px;
    background: var(--color-border);
    margin: 1.5rem 0;
}

.plan-card .price {
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-text);
    border-top: 1px dashed var(--color-border);
}

/* Plan features list */
.bold-items {
    list-style: none;
}

.bold-items li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.9rem;
}

.bold-items li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--color-text-muted);
    font-size: 0.85em;
}

/* --- TEAM GRID --- */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .team-grid {
        gap: 2.5rem;
        margin-bottom: 4rem;
    }
}

.team-member {
    width: 70px;
    text-align: center;
    position: relative;
}

/* Стили для бейджика PRO */
.pro-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #111827;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    pointer-events: none;
}

@media (min-width: 768px) {
    .team-member {
        width: 100px;
    }

    .pro-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        top: 0px;
        right: 0px;
    }
}

.team-member img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    background: #f0f0f0;
    margin-bottom: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.team-member:hover img {
    transform: scale(1.1);
}

.team-member figcaption {
    font-weight: 700;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .team-member figcaption {
        font-size: 1rem;
    }
}

.team-member .small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

@media (min-width: 768px) {
    .team-member .small {
        font-size: 0.8rem;
    }
}

/* --- FAQ ACCORDION --- */
#faq {
    max-width: 800px;
    margin: 0 auto 4rem;
}

details {
    border-bottom: 1px solid var(--color-border);
}

summary {
    position: relative;
    padding: 1.25rem 2rem 1.25rem 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    list-style: none;
    color: var(--color-text);
    display: flex;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-muted);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    line-height: 1;
}

details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

details p {
    padding-bottom: 1.25rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
    summary {
        padding: 1.5rem 0;
        font-size: 1.125rem;
    }
    summary::after {
        font-size: 1.5rem;
    }
    details p {
        padding-bottom: 1.5rem;
        font-size: 1rem;
    }
}

/* --- ABOUT SECTION --- */
#about {
    margin: 0 auto 4rem;
}

#about .about-card {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
}


#about .about-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

#about .about-content .lead {
    font-size: 1.05rem;
    color: #1f2937;
    font-weight: 500;
}

#about a {
    text-decoration: underline;
    text-decoration-color: #d1d5db;
    text-underline-offset: 3px;
    color: inherit;
    transition: all 0.2s ease;
}

#about a:hover {
    color: #111827;
    text-decoration-color: #111827;
}

@media (min-width: 768px) {
    #about .about-card {
        background-color: #f9fafb;
        padding: 3rem;
        border-radius: 1.5rem;
    }

    #about .about-content {
        gap: 1.25rem;
        font-size: 1rem;
    }

    #about .about-content .lead {
        font-size: 1.125rem;
    }
}

/* --- FOOTER --- */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* --- CANVAS BACKGROUND --- */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}