/* ==========================================================================
   Healing Nest by Maria – основни стилове
   Цветовете и размерите са по дизайн токените от ЗАДАНИЕ.md, т. 4.
   ========================================================================== */

:root {
    /* Цветове */
    --c-wine: #52093B;
    --c-raspberry: #8E244D;
    --c-gold: #CDBB87;
    --c-gold-dark: #B09A5E;
    --c-gold-hover: #C2AD72;
    --c-bg: #F1EFEA;
    --c-beige: #EEE9E0;
    --c-beige-2: #E6E0D5;
    --c-line: #DFD9CE;
    --c-text: #2A1A24;
    --c-text-2: #5E4B55;
    --c-white: #FFFFFF;
    --c-footer: #2A1A24;
    --c-footer-text: #E4DCDF;
    --c-footer-muted: #BFB0B7;
    --c-footer-line: #4A3440;

    /* Акцент: вишнев навсякъде, малинов на „Женски кръг“ (клас .theme-krag) */
    --c-accent: var(--c-raspberry);
    --c-primary: var(--c-wine);

    /* Шрифтове */
    --f-heading: 'Merriweather', Georgia, serif;
    --f-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
    --f-logo: 'Cormorant Garamond', Georgia, serif;

    /* Размери на текста */
    --fs-body: 17px;
    --fs-h1: 48px;
    --fs-h2: 38px;
    --fs-h3: 22px;

    /* Отстояния */
    --gutter: 80px;
    --section-y: 96px;
    --header-h: 96px;
    --radius-card: 16px;
}

@media (max-width: 1199.98px) {
    :root {
        --gutter: 40px;
        --fs-h1: 40px;
        --fs-h2: 32px;
        --section-y: 80px;
    }
}

@media (max-width: 1079.98px) {
    :root {
        --header-h: 64px;
    }
}

@media (max-width: 767.98px) {
    :root {
        --gutter: 20px;
        --fs-body: 16px;
        --fs-h1: 30px;
        --fs-h2: 27px;
        --fs-h3: 20px;
        --section-y: 56px;
    }
}

.theme-krag {
    --c-primary: var(--c-raspberry);
}

/* --- Основа --------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: var(--fs-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
}

main:focus {
    outline: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--f-heading);
    font-weight: 700;
    color: var(--c-primary);
    line-height: 1.25;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: 1.3; }
h3 { font-size: var(--fs-h3); line-height: 1.35; }

p {
    margin: 0 0 1em;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--c-wine);
}

a:hover {
    color: var(--c-raspberry);
}

:focus-visible {
    outline: 2px solid var(--c-raspberry);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: calc(1280px + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: var(--section-y);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 300;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--c-wine);
    color: var(--c-white);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
    color: var(--c-white);
}

/* Малко заглавие над секция */
.eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-accent);
}

@media (max-width: 767.98px) {
    .eyebrow {
        font-size: 12px;
    }
}

/* --- Бутони --------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-family: var(--f-body);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
    background: var(--c-primary);
    color: var(--c-bg);
}

.btn--primary:hover {
    background: var(--c-raspberry);
    color: var(--c-white);
}

.theme-krag .btn--primary:hover {
    background: var(--c-wine);
}

.btn--gold {
    background: var(--c-gold);
    color: var(--c-text);
}

.btn--gold:hover {
    background: var(--c-gold-hover);
    color: var(--c-text);
}

.btn--outline {
    border-color: var(--c-gold);
    background: transparent;
    color: var(--c-primary);
    font-weight: 600;
}

.btn--outline:hover {
    background: rgba(205, 187, 135, 0.18);
    color: var(--c-primary);
}

/* С рамка, върху вишнев фон */
.btn--outline-light {
    border-color: var(--c-gold);
    background: transparent;
    color: var(--c-bg);
    font-weight: 600;
}

.btn--outline-light:hover {
    background: rgba(205, 187, 135, 0.2);
    color: var(--c-white);
}

.btn--small {
    padding: 8px 12px;
    font-size: 13px;
}

.btn--block {
    display: flex;
    width: 100%;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.button-row--start {
    justify-content: flex-start;
}

/* --- Лого ----------------------------------------------------------------- */

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--c-wine);
    text-decoration: none;
}

.logo:hover {
    color: var(--c-wine);
}

.logo__symbol {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.logo__text {
    display: flex;
    flex-direction: column;
    font-family: var(--f-logo);
}

.logo__name {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.1;
    white-space: nowrap;
}

.logo__by {
    font-size: 15px;
    font-style: italic;
    font-weight: 500;
    line-height: 1.25;
}

/* --- Хедър ---------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-beige-2);
}

.site-header__inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
}

.main-nav,
.main-nav__list {
    display: flex;
    align-items: stretch;
    gap: 36px;
}

.main-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav__list li {
    display: flex;
}

.main-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--c-wine);
    text-decoration: none;
    white-space: nowrap;
}

/* Златната лента под точката от менюто (ховър и активна страница) */
.main-nav__link::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 5px;
    background: var(--c-gold);
    opacity: 0;
    transition: opacity 0.2s;
}

.main-nav__link:hover {
    color: var(--c-wine);
}

.main-nav__link:hover::after,
.main-nav__link.is-active::after {
    opacity: 1;
}

.main-nav__cta {
    align-self: center;
    padding: 12px 22px;
}

.header-mobile {
    display: none;
}

@media (max-width: 1279.98px) {
    .main-nav,
    .main-nav__list {
        gap: 26px;
    }

    .main-nav__link {
        font-size: 17px;
    }
}

@media (max-width: 1079.98px) {
    .main-nav {
        display: none;
    }

    .header-mobile {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .logo {
        gap: 8px;
    }

    .logo__symbol {
        width: 34px;
        height: 34px;
    }

    .logo__name {
        font-size: 16px;
        letter-spacing: 0.08em;
        line-height: 1.05;
    }

    .logo__by {
        font-size: 12px;
    }
}

/* Бутон с трите черти (става ×, когато менюто е отворено) */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--c-wine);
    cursor: pointer;
}

.menu-toggle__bars {
    position: relative;
    width: 22px;
    height: 14px;
}

.menu-toggle__bars span {
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s, opacity 0.2s, top 0.2s;
}

.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 6px; }
.menu-toggle__bars span:nth-child(3) { top: 12px; }

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

/* --- Меню на телефон (цял екран) ----------------------------------------- */

body.menu-open {
    overflow: hidden;
}

body.menu-open .header-mobile__cta {
    display: none;
}

.mobile-menu {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px var(--gutter) 32px;
    overflow-y: auto;
    background: var(--c-white);
}

.mobile-menu[hidden] {
    display: none;
}

@media (min-width: 1080px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-menu__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--c-beige);
    font-family: var(--f-heading);
    font-size: 21px;
    font-weight: 700;
    color: var(--c-wine);
    text-decoration: none;
}

.mobile-menu__link.is-active {
    padding-left: 14px;
    border-left: 4px solid var(--c-gold);
}

.mobile-menu__chevron {
    font-size: 20px;
    color: var(--c-gold);
}

.mobile-menu__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu__actions .btn {
    padding: 15px 20px;
}

.mobile-menu__contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    color: var(--c-text-2);
}

.mobile-menu__contacts > a {
    color: var(--c-text-2);
    text-decoration: none;
}

.mobile-menu__social {
    display: flex;
    gap: 18px;
    margin-top: 6px;
    font-weight: 700;
}

/* --- Футър ---------------------------------------------------------------- */

.site-footer {
    padding: 72px 0 40px;
    background: var(--c-footer);
    color: var(--c-footer-text);
    font-size: 15px;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--c-footer-text);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--c-gold);
}

.site-footer ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas: "brand nav contacts follow";
    gap: 40px;
}

.site-footer__brand {
    grid-area: brand;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-footer__col--nav { grid-area: nav; }
.site-footer__col--contacts { grid-area: contacts; }
.site-footer__col--follow { grid-area: follow; }

.site-footer__name {
    font-family: var(--f-logo);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.1;
    color: var(--c-bg);
}

.site-footer__by {
    font-family: var(--f-logo);
    font-size: 17px;
    font-style: italic;
    font-weight: 500;
    color: var(--c-gold);
}

.site-footer__tagline {
    line-height: 1.6;
}

.site-footer__title {
    margin: 0 0 10px;
    font-family: var(--f-body);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.65;
    color: var(--c-gold);
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--c-footer-line);
    font-size: 14px;
    color: var(--c-footer-muted);
}

.site-footer .site-footer__legal {
    flex-direction: row;
    gap: 24px;
}

.site-footer__legal a {
    color: var(--c-footer-muted);
    text-decoration: underline;
}

@media (max-width: 899.98px) {
    .site-footer {
        padding: 48px 0 32px;
    }

    .site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "brand brand"
            "nav follow"
            "contacts contacts";
        gap: 28px 20px;
    }

    .site-footer__brand {
        gap: 8px;
        margin-bottom: 4px;
    }

    .site-footer__name {
        font-size: 24px;
    }

    .site-footer__by {
        font-size: 16px;
    }

    .site-footer__tagline {
        font-size: 14px;
    }

    .site-footer__city {
        display: none;
    }

    .site-footer__bottom {
        flex-direction: column-reverse;
        gap: 12px;
        margin-top: 32px;
        padding-top: 20px;
        font-size: 13px;
    }

    .site-footer .site-footer__legal {
        gap: 20px;
    }
}

/* --- Проста страница (404, временни страници) ---------------------------- */

.simple-page {
    padding-block: 120px;
    text-align: center;
}

.simple-page__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(760px + 2 * var(--gutter));
}

.simple-page__symbol {
    width: 96px;
    height: 96px;
    margin-bottom: 20px;
}

.simple-page h1 {
    margin-bottom: 20px;
}

.simple-page__lead {
    max-width: 600px;
    margin-bottom: 36px;
    font-size: 18px;
    color: var(--c-text-2);
}

.simple-page__lead:last-child {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .simple-page {
        padding-block: 72px;
    }

    .simple-page__symbol {
        width: 72px;
        height: 72px;
    }

    .simple-page__lead {
        font-size: 16px;
    }

    .simple-page .button-row {
        flex-direction: column;
        width: 100%;
    }
}

/* --- Страница „Стил на сайта“ (само локално) ------------------------------ */

.style-guide h2 {
    margin: 56px 0 24px;
}

.swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.swatch {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--c-line);
    border-radius: 12px;
    background: var(--c-white);
    font-size: 14px;
}

.swatch__color {
    height: 72px;
    margin-bottom: 8px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
}

.swatch__name {
    font-weight: 700;
}

.swatch__hex {
    color: var(--c-text-2);
}

.style-guide__type {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 40px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-card);
    background: var(--c-white);
}

.style-guide__logo {
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: var(--c-wine);
    font-family: var(--f-logo);
}

.style-guide__dark {
    margin-top: 24px;
    padding: 32px;
    border-radius: var(--radius-card);
    background: var(--c-wine);
}
