/* ============================= */
/* VARIABLES / THEME             */
/* ============================= */

:root {
    --bg: #ffffff;
    --bg-muted: #f4f7f8;
    --bg-paper: #fbfbfa;
    --bg-dark: #0f2f3a;

    --text: #0f1f24;
    --text-soft: #5f6f75;
    --text-invert: #ffffff;

    --accent: #00796B;
    --accent-light: #4fc3f7;

    --border: #e2e8ea;
    --radius: 18px;

    --container: 1200px;
}

/* ============================= */
/* BASE                          */
/* ============================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg-paper);
    line-height: 1.65;
}

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

/* ============================= */
/* LAYOUT                        */
/* ============================= */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container.narrow {
    max-width: 1040px;
}

.site-content {
    min-height: 60vh;
}

/* ============================= */
/* HEADER                        */
/* ============================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 72px;
    gap: 32px;
}

/* LOGO */

.logo-link {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 64px;
    transition: transform 0.25s ease;
}

.logo-link:hover .site-logo {
    transform: scale(1.03);
}

/* ============================= */
/* HEADER CENTER (NAV + SEARCH)  */
/* ============================= */

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


/* поиск уезжает максимально вправо */
.header-search {
    margin-left: auto;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    display: none;
    z-index: 200;
}

.search-suggestions.open {
    display: block;
}

.search-suggestions a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
}

.search-suggestions a:hover {
    background: var(--bg-muted);
}

/* NAV */

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* ============================= */
/* HEADER SEARCH                 */
/* ============================= */



/* search icon */

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;

    font-size: 18px;
    color: var(--text);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.search-toggle:hover {
    opacity: 1;
}

/* search input */

.header-search input {
    position: absolute;
    right: 0;

    width: 0;
    opacity: 0;
    pointer-events: none;

    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #ffffff;

    font-size: 14px;
    color: var(--text);

    transform: translateX(8px);
    transition:
        width 0.35s ease,
        opacity 0.2s ease,
        transform 0.25s ease,
        box-shadow 0.2s ease;

    outline: none;
}

/* open state */

.header-search:focus-within input {
    width: 320px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);

    box-shadow: 0 0 0 2px rgba(0,121,107,0.12);
    border-color: var(--accent);
}

.header-search input::placeholder {
    color: var(--text-soft);
}

.header-search.open input {
    width: 320px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);

    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,121,107,.12);
}

/* 👇 ВАЖНО: разрешаем фокус сразу */
.header-search input:focus {
    width: 320px;
    opacity: 1;
    pointer-events: auto;
}

/* ============================= */
/* HEADER CONTACTS               */
/* ============================= */

.header-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

.header-contacts a {
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}

.header-contacts .phone {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.header-contacts .email {
    font-size: 13px;
    opacity: 0.75;
}

.header-contacts a:hover {
    opacity: 1;
}

/* ============================= */
/* BREADCRUMBS                   */
/* ============================= */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-soft);
    margin: 32px 0;
}

.breadcrumbs a {
    color: var(--text-soft);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .sep {
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--text);
    font-weight: 500;
}

/* ============================= */
/* SECTIONS                      */
/* ============================= */

.section {
    padding: 120px 0;
    background: var(--bg-paper);
}

.section.paper {
    background: url("/static/img/paper-bg.png") center / cover no-repeat;
}

.section.muted {
    background:
        linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
        url("/static/img/stone-texture.png") center / cover no-repeat;
}

.section h2 {
    font-size: 42px;
    margin-bottom: 52px;
    text-align: center;
}

/* ============================= */
/* VALUE GRID                    */
/* ============================= */

.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 56px;
}

.value {
    padding: 40px;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--border);
}

.value strong {
    display: block;
    font-size: 22px;
    margin-bottom: 18px;
}

.value p {
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 18px;
}

/* ============================= */
/* FOOTER                        */
/* ============================= */

.site-footer {
    background: var(--bg-paper);
    border-top: 1px solid var(--border);
    padding: 64px 24px 48px;
    font-size: 13px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.footer-brand strong {
    font-size: 18px;
    letter-spacing: 0.12em;
}

.footer-tagline {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-soft);
}

.footer-copy {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-soft);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-contact a {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-soft);
}


/* ============================= */
/* HERO — ПЕРЕОСМЫСЛЕН           */
/* ============================= */

.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(circle at 50% 30%, rgba(0,0,0,.03), transparent 60%),
        linear-gradient(rgba(255,255,255,.96), rgba(255,255,255,.96)),
        url("/static/img/stone-texture.png") center / cover no-repeat;
}

.hero .container {
    text-align: center;
    max-width: 820px;
}

/* бренд */
.hero h1 {
    font-size: 96px;
    letter-spacing: .18em;
    margin-bottom: 16px;
}

/* мастерская */
.hero h2 {
    font-size: 18px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 56px;
}

/* манифест */
.hero-subtitle {
    font-size: 22px;
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 72px;
}

/* действия */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.button {
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: #00695c;
}

.button.ghost {
    border: 1px solid var(--border);
    color: var(--text);
}

.button.ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}


/* ============================= */
/* RESPONSIVE                    */
/* ============================= */

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        gap: 20px;
    }

    .header-center {
        grid-column: 1 / -1;
        flex-wrap: wrap;
        gap: 16px;
    }

    .header-search input {
        right: auto;
        left: 0;
    }

    .header-search:focus-within input {
        width: 100%;
    }

    .value-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header-contacts {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .section h2 {
        font-size: 32px;
    }
}