@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --bg: #f2f2ef;
    --bg-soft: rgba(250, 250, 248, 0.9);
    --surface: rgba(255, 255, 255, 0.66);
    --surface-strong: rgba(255, 255, 255, 0.88);
    --text: #171819;
    --muted: #5e6267;
    --line: rgba(23, 24, 25, 0.12);
    --accent: #2a2f35;
    --accent-soft: rgba(23, 24, 25, 0.05);
    --shadow: 0 18px 46px rgba(22, 24, 28, 0.05);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --content-width: 1200px;
    --header-pad-x: 36px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Manrope", "Noto Serif SC", sans-serif;
    background:
        linear-gradient(180deg, #f5f5f1 0%, #efefeb 46%, #f5f5f2 100%);
    color: var(--text);
    line-height: 1.75;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    filter: blur(4px);
}

body::before {
    top: 10%;
    right: -120px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(40, 45, 50, 0.05), transparent 72%);
}

body::after {
    bottom: 8%;
    left: -100px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(40, 45, 50, 0.04), transparent 70%);
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.bg-big-text {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-big-text span {
    position: absolute;
    font-family: "Noto Serif SC", serif;
    font-size: clamp(90px, 14vw, 180px);
    font-weight: 600;
    color: rgba(34, 38, 42, 0.05);
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.12em;
}

.bg-word-1 { top: 9%; left: -5%; }
.bg-word-2 { bottom: 19%; right: -6%; }
.bg-word-3 { top: 67%; left: 28%; }
.bg-word-4 { bottom: 10%; left: 30%; }
.bg-word-5 { top: 70%; right: 15%; }

header,
.hero,
.works,
.contact,
footer,
main,
.page-content {
    position: relative;
    z-index: 1;
}

header {
    width: min(calc(100% - 32px), calc(var(--content-width) + 80px));
    margin: 12px auto 0;
    padding: 14px var(--header-pad-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(248, 248, 245, 0.84);
    box-shadow: 0 8px 24px rgba(15, 18, 22, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo {
    font-family: "Noto Serif SC", serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

nav a {
    margin-left: 0;
    padding: 7px 11px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
    opacity: 1;
    background: var(--accent-soft);
    color: var(--accent);
}

.hero {
    width: min(calc(100% - 32px), calc(var(--content-width) + 80px));
    min-height: 58vh;
    margin: 18px auto 0;
    padding: 72px 36px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-family: "Noto Serif SC", serif;
    font-size: clamp(50px, 9vw, 96px);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.08;
    text-wrap: balance;
}

.hero p {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.hero h1 span {
    color: var(--accent);
}

.works {
    width: min(calc(100% - 32px), var(--content-width));
    padding: 36px 0 0;
    margin: 0 auto;
}

.works h2,
.page-content h2,
.contact h2 {
    font-family: "Noto Serif SC", serif;
    font-size: clamp(21px, 2.6vw, 30px);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.25;
}

.works h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
    margin-bottom: 34px;
}

.works h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2px;
    width: 40px;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), rgba(23, 24, 25, 0.12));
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.work {
    padding: 10px;
    border: 1px solid rgba(23, 24, 25, 0.08);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

.work img {
    width: 100%;
    border-radius: 6px;
    transition: transform 0.45s ease;
    cursor: pointer;
}

.work img:hover {
    transform: scale(1.025);
}

.work p {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.contact {
    width: min(calc(100% - 32px), 760px);
    padding: 48px 0 0;
    margin: 0 auto;
}

input,
textarea {
    width: 100%;
    padding: 16px 18px;
    margin-top: 12px;
    border: 1px solid rgba(83, 63, 45, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #8d7f72;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(159, 107, 68, 0.4);
    box-shadow: 0 0 0 4px rgba(159, 107, 68, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

button {
    margin-top: 16px;
    padding: 12px 20px;
    border: 1px solid rgba(23, 24, 25, 0.14);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0.08em;
    box-shadow: none;
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

button:hover {
    opacity: 1;
    transform: none;
    box-shadow: none;
    background: rgba(23, 24, 25, 0.04);
    color: var(--text);
    border-color: rgba(23, 24, 25, 0.22);
}

footer {
    width: min(calc(100% - 32px), calc(var(--content-width) + 80px));
    margin: 90px auto 26px;
    padding: 26px 40px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(249, 249, 246, 0.76);
    backdrop-filter: blur(8px);
}

.category {
    width: min(calc(100% - 32px), 1160px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding: 22px 0 0;
    margin: 0 auto;
}

.category a {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 260px;
    padding: 28px;
    border: 1px solid rgba(23, 24, 25, 0.08);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(251, 251, 249, 0.9));
    box-shadow: var(--shadow);
    text-align: left;
    text-decoration: none;
    color: var(--text);
    font-family: "Noto Serif SC", serif;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.3;
    transition: background-color 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    position: relative;
}

.category a::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 10px;
    border: 1px solid rgba(23, 24, 25, 0.06);
}

.category a:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(251, 251, 249, 0.96));
    transform: none;
    box-shadow: var(--shadow);
    border-color: rgba(23, 24, 25, 0.14);
}

.page-content {
    width: min(calc(100% - 32px), 1200px);
    margin: 34px auto 0;
    padding: 0 16px;
}

.page-back {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 18px auto 0;
}

.page-back a,
.page-back button {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid rgba(23, 24, 25, 0.18);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.page-back a:hover,
.page-back button:hover {
    background: transparent;
    color: var(--text);
    border-color: rgba(23, 24, 25, 0.42);
}

.page-lead {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 12px auto 0;
    padding: 24px 0 10px;
}

.page-lead p:first-child {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.page-lead h1 {
    font-family: "Noto Serif SC", serif;
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.page-lead p:last-child {
    max-width: 720px;
    color: var(--muted);
}

.page-content p {
    margin-bottom: 20px;
    color: #372e27;
}

.page-content img {
    width: 100%;
    margin: 30px 0;
}

.language-switcher {
    margin-left: 8px;
}

.language-switcher select {
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(83, 63, 45, 0.12);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
}

.language-switcher select:focus {
    outline: none;
    border-color: rgba(159, 107, 68, 0.4);
}

@media (max-width: 1080px) {
    :root {
        --header-pad-x: 28px;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    header {
        border-radius: 30px;
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: 64vh;
        padding: 96px 24px 54px;
    }

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

@media (max-width: 768px) {
    .bg-word-1,
    .bg-word-2,
    .bg-word-3,
    .bg-word-4,
    .bg-word-5 {
        font-size: 72px;
        opacity: 0.6;
    }

    header {
        width: min(calc(100% - 20px), calc(var(--content-width) + 80px));
        margin-top: 10px;
        padding: 16px 18px;
        border-radius: 28px;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .logo {
        font-size: 22px;
        text-align: center;
    }

    header > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100%;
    }

    nav {
        justify-content: center;
    }

    nav a {
        font-size: 13px;
        padding: 8px 10px;
        letter-spacing: 0.08em;
    }

    .language-switcher {
        margin-left: 0;
        display: flex;
        justify-content: center;
    }

    .language-switcher select {
        padding: 8px 12px;
        font-size: 12px;
    }

    .hero h1 {
        font-size: clamp(36px, 13vw, 54px);
    }

    .hero p {
        letter-spacing: 0.18em;
        font-size: 0.72rem;
    }

    .works,
    .contact,
    .page-content,
    .page-back,
    .page-lead {
        width: min(calc(100% - 20px), var(--content-width));
    }

    .page-back {
        margin-top: 14px;
    }

    .page-back a,
    .page-back button {
        font-size: 15px;
    }

    .page-lead {
        padding-top: 18px;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .work {
        padding: 10px;
        border-radius: 10px;
    }

    .category a {
        min-height: 200px;
        padding: 20px;
        border-radius: 14px;
        font-size: clamp(22px, 7vw, 28px);
    }

    footer {
        width: min(calc(100% - 20px), calc(var(--content-width) + 80px));
        margin-top: 70px;
        margin-bottom: 18px;
        padding: 20px 18px;
        border-radius: 12px;
    }
}
