/* =============================================================================
   Hiventory — restored stylesheet
   Пересобрано из архивного app.css (Swiper + animate.css + кастом, 136 КБ)
   в самостоятельный CSS без фреймворков.
   ============================================================================= */

/* ----------------------------------------------------------------- Токены -- */
:root {
    --brand-a:        #fbf651;   /* жёлтый  */
    --brand-b:        #fe8a71;   /* коралл  */
    --gradient:       linear-gradient(-135deg, var(--brand-a), var(--brand-b));
    --title:          #f6bf3e;
    --title-stroke:   #fc0;
    --gold-dark:      #bb8c20;
    --text:           #333;
    --text-soft:      #565353;
    --surface:        #fff;
    --surface-alt:    #f7f7f7;
    --border:         #ececec;

    --font: "Montserrat", "Segoe UI", Arial, Helvetica, sans-serif;
    --font-nav: "Oswald", "Arial Narrow", Arial, sans-serif;
    --container: 1140px;

    --rail: 62px;         /* ширина свёрнутого рельса  */
    --rail-open: 220px;   /* раскрытого по ховеру      */
    --rail-bg: #fc0;      /* фирменный жёлтый шапки    */
    --rail-bg-mobile: #ff0;
}

/* ------------------------------------------------------------------ Сброс -- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}
.container--narrow { max-width: 860px; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
:focus-visible {
    outline: 3px solid var(--brand-b);
    outline-offset: 2px;
}

/* ------------------------------------------------------------- Шапка/меню -- */
/* Десктоп: фиксированный жёлтый рельс слева во всю высоту (62px),
   по наведению разъезжается до 220px — иконки сменяются подписями.
   Точь-в-точь поведение оригинального .header / .header:hover. */
.site-header {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: var(--rail);
    background: var(--rail-bg);
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: width 0.3s ease;
}
.site-header:hover,
.site-header:focus-within { width: var(--rail-open); }

.brand {
    flex: 0 0 auto;
    padding: 14px 0;
    display: flex;
    justify-content: center;
}
.brand__logo {
    width: 46px; height: 46px;
    object-fit: contain;
    background: #fff;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Меню вертикально по центру рельса (оригинал: top:50vh; margin-top:-150px) */
.primary-nav { margin: auto 0; }

.primary-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 55px;
    padding: 10px 19px;
    font-family: var(--font-nav);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    color: var(--text);
    transition: background 0.2s ease;
}
.primary-nav a:hover { background: rgba(255, 255, 255, 0.45); }

.primary-nav img { width: 24px; height: 24px; flex: 0 0 auto; }

/* Свёрнут — только иконки; раскрыт — только подписи */
.primary-nav span { display: none; }
.site-header:hover .primary-nav span,
.site-header:focus-within .primary-nav span { display: inline; }
.site-header:hover .primary-nav img,
.site-header:focus-within .primary-nav img { display: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 46px; height: 42px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.9);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    width: 100%; height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Открытое меню — бургер превращается в крестик «закрыть» */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Контент не заезжает под рельс */
main, .site-footer { padding-left: var(--rail); }

/* ------------------------------------------------------------------- Hero -- */
.hero {
    position: relative;
    padding-bottom: 60px;
    background: var(--surface-alt);
}

.hero__media {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(70vh, 560px);
    padding: 120px 20px 60px;
    background: #cfcfcf url("../images/hero.jpg") no-repeat center / cover;
}
.hero__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
}

.hero__text {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
}

.hero__title {
    margin: 0;
    max-width: 520px;
    font-size: clamp(2rem, 5vw, 3.125rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 10px var(--text-soft);
}

.hero__sub {
    display: inline-block;
    margin: 10px 0 0;
    padding: 6px 10px;
    font-size: clamp(1rem, 2vw, 1.1875rem);
    color: #fff;
    background: #000;
}

/* Белая карточка «Kenalan yuk sama Hiventory!» */
.hero__about {
    position: relative;
    width: min(360px, calc(100% - 40px));
    margin: -60px 20px 0 auto;
    padding: 30px 20px;
    text-align: center;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.hero__about h2 {
    margin-bottom: 15px;
    font-size: 1.25rem;
    color: var(--gold-dark);
}
.hero__about p { margin: 0; line-height: 1.75; }

/* --------------------------------------------------------------- Секции --- */
.section { padding: 60px 0; }
.section--light { background: var(--surface-alt); }
.section--cta { background: var(--gradient); }

.section-title {
    margin-bottom: 30px;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 300;
    text-transform: uppercase;
    color: var(--title);
    text-shadow: 1px 1px 10px var(--text-soft);
    -webkit-text-stroke: 1px var(--title-stroke);
}
.section--cta .section-title {
    color: #fff;
    -webkit-text-stroke-color: rgba(0, 0, 0, 0.25);
}

.section-lead { max-width: 60ch; }
.note { font-size: 0.9rem; color: var(--text-soft); }

.poster img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

/* ------------------------------------------------------------- Аккордеон -- */
.accordion { display: grid; gap: 10px; }

.accordion__item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.accordion__item summary {
    padding: 16px 46px 16px 18px;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.accordion__item summary::-webkit-details-marker { display: none; }

/* Вопрос — настоящий h3 внутри summary; гасим дефолтные размеры заголовка */
.accordion__q {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.accordion__item summary::after {
    content: "";
    position: absolute;
    right: 18px; top: 50%;
    width: 9px; height: 9px;
    margin-top: -6px;
    border-right: 2px solid var(--brand-b);
    border-bottom: 2px solid var(--brand-b);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.accordion__item[open] summary::after {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.accordion__body {
    padding: 0 18px 18px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
.accordion__body ol,
.accordion__body ul { padding-left: 20px; }
.accordion__body ol { list-style: decimal; }
.accordion__body ul { list-style: disc; }
.accordion__body li { margin-bottom: 0.5em; }
.accordion__body p:last-child,
.accordion__body li:last-child { margin-bottom: 0; }

/* ------------------------------------------------------ Списки/чеклисты --- */
.checklist, .terms { margin-bottom: 1em; }
.terms { padding-left: 20px; list-style: decimal; }
.terms li { margin-bottom: 0.6em; }

.checklist li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 0.5em;
}
.checklist li::before {
    content: "";
    position: absolute;
    left: 4px; top: 0.45em;
    width: 11px; height: 6px;
    border-left: 2px solid var(--brand-b);
    border-bottom: 2px solid var(--brand-b);
    transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- Кнопки -- */
.cta-row { margin: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn--primary {
    color: var(--text);
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); }
.btn__icon { width: 22px; height: 22px; flex: 0 0 auto; }

/* ------------------------------------------------------------ Instagram -- */
.feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.feed > * { min-width: 0; }
.feed img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}
.feed a:hover img { opacity: 0.85; }

/* ---------------------------------------------------------------- Футер --- */
.site-footer {
    padding: 26px 0;
    text-align: center;
    background: var(--text);
    color: #fff;
}
.site-footer__copyright { margin: 0; font-size: 0.875rem; }

/* ------------------------------------------------------------- Мобильные -- */
/* Мобильные: рельс превращается в верхнюю панель, меню — полноэкранный
   жёлтый оверлей, выезжающий сверху (оригинальный .header-right.open). */
@media (max-width: 991px) {
    .site-header {
        position: sticky;
        inset: 0 0 auto 0;
        /* выше оверлея (z-index: 40), иначе лого и кнопка закрытия
           оказываются под жёлтой панелью и меню не закрыть */
        z-index: 50;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: auto;
        padding: 8px 16px;
        overflow: visible;
    }
    .site-header:hover,
    .site-header:focus-within { width: auto; }

    /* Оверлей меню — потомок .site-header, поэтому поднимать надо именно
       лого и кнопку внутри того же стекового контекста, иначе они
       остаются под жёлтой панелью и меню нечем закрыть. */
    .brand {
        padding: 0;
        position: relative;
        z-index: 60;
    }
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 60;
    }

    main, .site-footer { padding-left: 0; }

    .primary-nav {
        position: fixed;
        inset: 0;
        z-index: 40;
        margin: 0;
        padding: 90px 24px 24px;
        overflow-y: auto;
        background: var(--rail-bg-mobile);
        transform: translate3d(0, -100%, 0);
        opacity: 0;
        transition: transform 0.45s ease, opacity 0s ease 0.45s;
    }
    .primary-nav.is-open {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        transition: transform 0.45s ease, opacity 0s ease 0s;
    }

    .primary-nav a {
        height: auto;
        padding: 16px 4px;
        font-size: 22px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    }
    /* В оверлее показываем и иконку, и подпись */
    .primary-nav span { display: inline; }
    .primary-nav img { display: inline; }

    .hero__media { min-height: 380px; padding-top: 40px; }
    .hero__about { margin: -40px auto 0; }
    .section { padding: 44px 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}
